@font-face {
  font-family: "Geist";
  src: url("../fonts/Geist-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --sans: "Geist", system-ui, sans-serif;
  --display: "Geist", system-ui, sans-serif;
}

.doc-print-typography,
.invoice-doc-screen-scope,
.invoice-pdf-root,
body.invoice-pdf,
.doc-wrap--report {
  --doc-text-size: 9pt;
  --doc-text-lh: 1.25;
  --doc-title-size: 14pt;
  --doc-report-title-size: 11pt;
  --doc-section-size: 10pt;
  --doc-section-weight: 600;
  --doc-label-size: 8pt;
  --doc-table-size: 8.5pt;
  --doc-table-th-size: 8pt;
  --doc-table-cell-py: 0.8mm;
  --doc-table-cell-pr: 1.5mm;
  --doc-section-gap: 3mm;
  --doc-block-gap: 2mm;
  --doc-title-margin-bottom: 2mm;
  --doc-table-margin-bottom: 3mm;
}

@media (max-width: 639px) {
  .doc-wrap--report {
    --doc-text-size: max(9pt, 12px);
    --doc-table-size: max(8.5pt, 12px);
    --doc-label-size: max(8pt, 11px);
    --doc-table-th-size: max(8pt, 11px);
  }
}

.doc-wrap--report .doc,
body.report-pdf .doc,
.report-pdf-root .doc {
  font-family: var(--sans);
  font-size: var(--doc-text-size);
  line-height: var(--doc-text-lh);
  font-weight: 400;
}

.doc-wrap--report .doc > h1,
body.report-pdf .doc > h1,
.report-pdf-root .doc > h1 {
  font-size: var(--doc-report-title-size);
  font-weight: var(--doc-section-weight);
  line-height: var(--doc-text-lh);
  margin: 0 0 var(--doc-block-gap);
}

.doc-wrap--report .report-section > h2,
.doc-wrap--report .doc > h2.report-section-heading,
body.report-pdf .report-section > h2,
body.report-pdf .doc > h2.report-section-heading,
.report-pdf-root .report-section > h2,
.report-pdf-root .doc > h2.report-section-heading,
body.report-pdf .doc > h2:not(.report-section-label),
.report-pdf-root .doc > h2:not(.report-section-label) {
  font-size: var(--doc-section-size);
  font-weight: var(--doc-section-weight);
  line-height: var(--doc-text-lh);
  margin: 0 0 var(--doc-block-gap);
}

.doc-wrap--report .report-summary,
body.report-pdf .report-summary,
.report-pdf-root .report-summary {
  margin: 0 0 var(--doc-block-gap);
}

.doc-wrap--report .report-summary-grid {
  gap: var(--doc-block-gap) var(--doc-section-gap);
}

.doc-wrap--report .report-summary-label,
body.report-pdf .report-summary-label,
.report-pdf-root .report-summary-label {
  font-size: var(--doc-label-size);
  color: var(--muted, #4d5c54);
}

.doc-wrap--report .report-summary-value,
body.report-pdf .report-summary-value,
.report-pdf-root .report-summary-value {
  font-size: var(--doc-text-size);
  font-weight: var(--fw-normal, 400);
  color: var(--ink, #17211c);
}

.doc-wrap--report .report-summary-party-name,
body.report-pdf .report-summary-party-name,
.report-pdf-root .report-summary-party-name {
  font-weight: var(--doc-section-weight);
}

.doc-wrap--report .report-summary-party-detail,
body.report-pdf .report-summary-party-detail,
.report-pdf-root .report-summary-party-detail {
  font-weight: var(--fw-normal, 400);
}

.doc-wrap--report .report-section,
body.report-pdf .report-section,
.report-pdf-root .report-section {
  margin-top: var(--doc-section-gap);
}

.doc-wrap--report .report-section > h2,
body.report-pdf .report-section > h2,
.report-pdf-root .report-section > h2 {
  margin: 0 0 var(--doc-block-gap);
}

.doc-wrap--report .doc-table th,
.doc-wrap--report .doc-table td,
body.report-pdf .doc-table--pdf th,
body.report-pdf .doc-table--pdf td,
.report-pdf-root .doc-table--pdf th,
.report-pdf-root .doc-table--pdf td {
  font-size: var(--doc-table-size);
  padding: var(--doc-table-cell-py) var(--doc-table-cell-pr) var(--doc-table-cell-py) 0;
  vertical-align: top;
  font-weight: 400;
}

.doc-wrap--report .doc-table th,
body.report-pdf .doc-table--pdf th,
.report-pdf-root .doc-table--pdf th {
  font-size: var(--doc-table-th-size);
  color: #66706b;
  font-weight: var(--doc-section-weight);
}

.doc-wrap--report .doc-table-footnote,
body.report-pdf .doc-table-footnote,
.report-pdf-root .doc-table-footnote {
  font-size: var(--doc-label-size);
  margin: 2pt 0 0;
}

body.report-pdf .pre,
.report-pdf-root .pre,
body.report-pdf .muted,
.report-pdf-root .muted {
  margin-top: 0;
  margin-bottom: 0;
}

body.report-pdf .pre.report-section-body,
.report-pdf-root .pre.report-section-body {
  white-space: pre-wrap;
}

body.report-pdf .doc-table--pdf .doc-cell-note,
body.report-pdf .doc-table--pdf .doc-cell-route,
.report-pdf-root .doc-table--pdf .doc-cell-note,
.report-pdf-root .doc-table--pdf .doc-cell-route {
  white-space: pre-wrap;
}

.doc-photos-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-3);
  align-items: start;
  margin: var(--sp-3) 0 0;
  width: 100%;
}

.doc-wrap--report .doc .doc-photos-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-3);
  align-items: start;
  width: 100%;
}

@media (max-width: 639px) {
  .doc-photos-grid,
  .doc-wrap--report .doc .doc-photos-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.doc-photo-figure {
  margin: 0;
  min-width: 0;
  break-inside: avoid;
  page-break-inside: avoid;
}

.doc-photo-frame {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: min(360px, 70vw);
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--paper, #fff);
}

.doc-photo-frame img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
  border-radius: var(--radius-sm);
}

.doc-photo-open {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.doc-wrap--report .doc-photo-open {
  cursor: pointer;
}

.doc-wrap--report .doc-photo-open:focus-visible {
  outline: 2px solid var(--pine, #157a52);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.doc-photo-open img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
}

body:not(.report-pdf) .doc-wrap--report .doc-photos-grid {
  align-items: stretch;
}

body:not(.report-pdf) .doc-wrap--report .doc-photo-frame {
  aspect-ratio: 4 / 3;
  height: auto;
  background: var(--paper, #fff);
  border-radius: var(--radius-sm);
  align-items: center;
}

body:not(.report-pdf) .doc-wrap--report .doc-photo-frame img,
body:not(.report-pdf) .doc-wrap--report .doc-photo-open img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  object-position: center;
}

body:not(.report-pdf) .doc-wrap--report .doc-photo-open {
  height: 100%;
  align-items: center;
}

.doc-wrap--report .doc-photo-caption,
body.report-pdf .doc-photo-caption,
.report-pdf-root .doc-photo-caption {
  margin: var(--doc-block-gap) 0 0;
  line-height: var(--doc-text-lh);
  word-break: normal;
  overflow-wrap: break-word;
  hyphens: manual;
}

.doc-wrap--report .doc-photo-caption-text,
body.report-pdf .doc-photo-caption-text,
.report-pdf-root .doc-photo-caption-text {
  display: block;
  font-size: var(--doc-text-size);
  font-weight: 600;
  color: var(--ink, #17211c);
}

.report-photo.is-placeholder .doc-photo-frame img {
  object-fit: contain;
}

.report-photo.is-placeholder .ph-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 36%;
  text-align: center;
  font-size: 11px;
  font-weight: 500;
  color: #157a52;
  opacity: 0.75;
  letter-spacing: 0.02em;
  pointer-events: none;
}

body.report-pdf .report-photo.is-placeholder .ph-label , .report-pdf-root .report-photo.is-placeholder .ph-label {
  font-size: 7pt;
}

.doc-report-foot {
  margin-top: var(--sp-6, 32px);
  font-size: 9pt;
  color: #66706b;
}

.doc-wrap--report .report-pdf-action + .doc-report-foot {
  margin-top: 0;
}

.doc-report-foot-rule {
  border-top: 1px solid var(--line, #e1e7e3);
  margin-bottom: 8px;
}

.doc-report-foot-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.doc-report-foot-brand {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}

.doc-report-foot-mark,
.doc-report-foot-mark-img {
  align-self: center;
}

.doc-report-foot-mark {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: #3d5c4a;
  color: #f4fbf7;
  font-size: 13px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
}

.doc-report-foot-mark-img {
  flex: none;
  display: block;
  width: 22px;
  height: 22px;
  object-fit: contain;
  vertical-align: middle;
}

.doc-report-foot-meta {
  margin: 0;
  text-align: right;
  flex: 1 1 auto;
}

.doc-wrap--report .doc-table th.num,
.doc-wrap--report .doc-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.doc-wrap--report .doc-table tr.doc-table-total td {
  border-top: 1px solid var(--line, #e1e7e3);
  font-weight: 500;
}

.doc-wrap--report .doc-table tr.doc-table-total td.num {
  font-weight: 700;
}

.doc-table-footnote {
  margin: 4px 0 0;
}

.report-summary-grid {
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .report-summary-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.report-summary-label {
  margin: 0 0 var(--sp-1);
  display: block;
}

.report-summary-value {
  margin: 0 0 var(--sp-1);
}

.report-summary-col .report-summary-value:last-child {
  margin-bottom: 0;
}

.report-summary-workdays {
  margin-top: var(--sp-3);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1) var(--sp-3);
  align-items: baseline;
}

.doc-wrap--report .report-section-body {
  margin: 0;
}

.report-table-wrap {
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
}

.doc-wrap--report .doc-table {
  table-layout: fixed;
  width: 100%;
  margin-bottom: 0;
}

.doc-col-nowrap {
  white-space: nowrap;
}

.doc-wrap--report .doc-table--time .doc-cell-day,
.doc-wrap--report .doc-table--trips .doc-cell-day,
.doc-wrap--report .doc-table--time .doc-cell-time,
.doc-wrap--report .doc-table--time th:first-child,
.doc-wrap--report .doc-table--time th:nth-child(2),
.doc-wrap--report .doc-table--trips th:first-child {
  white-space: nowrap;
}

body.report-pdf .doc-cell-day, .report-pdf-root .doc-cell-day,
body.report-pdf .doc-cell-time , .report-pdf-root .doc-cell-time {
  white-space: nowrap;
}

body.report-pdf .doc-cell-duration,
.report-pdf-root .doc-cell-duration,
body.report-pdf .doc-table--time .doc-cell-duration,
body.report-pdf .doc-table--trips .doc-cell-duration {
  white-space: nowrap;
}

.doc-wrap--report .doc-table tr.doc-table-total td {
  font-weight: var(--fw-semibold, 600);
}

.report-pdf-action {
  margin: var(--sp-6, 32px) 0;
  display: flex;
  justify-content: center;
}

.report-pdf-action .btn {
  width: auto;
  max-width: 100%;
}

@media (max-width: 639px) {
  body.report-page:has(#cookie-notice:not([hidden])) .doc-wrap--report {
    padding-bottom: calc(33vh + var(--sp-3) + env(safe-area-inset-bottom));
    padding-bottom: calc(33dvh + var(--sp-3) + env(safe-area-inset-bottom));
  }
}

@media (max-width: 639px) {
  .doc-wrap--report .doc-table--parts td.num,
  .doc-wrap--report .doc-table--parts th.num {
    white-space: nowrap;
  }
  .doc-wrap--report .doc-table--parts tbody tr td:first-child {
    overflow-wrap: normal;
    word-break: normal;
  }
  .doc-wrap--report .doc-table--parts tr.doc-table-total td {
    white-space: nowrap;
  }

  body:not(.report-pdf) .doc-wrap--report .doc-table--cards-sm {
    display: block;
    border-collapse: separate;
  }
  body:not(.report-pdf) .doc-wrap--report .doc-table--cards-sm thead {
    display: none;
  }
  body:not(.report-pdf) .doc-wrap--report .doc-table--cards-sm tbody {
    display: block;
  }
  body:not(.report-pdf) .doc-wrap--report .doc-table--cards-sm tbody tr:not(.doc-table-total) {
    display: grid;
    gap: var(--sp-2);
    padding: var(--sp-3);
    margin-bottom: var(--sp-3);
    border: 1px solid var(--line, #e1e7e3);
    border-radius: var(--radius-sm);
    background: var(--paper, #ffffff);
  }
  body:not(.report-pdf) .doc-wrap--report .doc-table--cards-sm tbody tr:not(.doc-table-total) td {
    display: block;
    padding: 0;
    border: none;
    text-align: left;
  }
  body:not(.report-pdf) .doc-wrap--report .doc-table--cards-sm tbody tr:not(.doc-table-total) td.num {
    text-align: right;
  }
  body:not(.report-pdf) .doc-wrap--report .doc-table--time tbody tr:not(.doc-table-total) {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto auto;
  }
  body:not(.report-pdf) .doc-wrap--report .doc-table--time .doc-cell-day {
    grid-column: 1;
    grid-row: 1;
  }
  body:not(.report-pdf) .doc-wrap--report .doc-table--time .doc-cell-time {
    grid-column: 1;
    grid-row: 2;
  }
  body:not(.report-pdf) .doc-wrap--report .doc-table--time .doc-cell-duration {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: start;
  }
  body:not(.report-pdf) .doc-wrap--report .doc-table--time .doc-cell-note {
    grid-column: 1 / -1;
    grid-row: 3;
    margin-top: var(--sp-1);
  }
  body:not(.report-pdf) .doc-wrap--report .doc-table--trips tbody tr:not(.doc-table-total) {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto auto;
  }
  body:not(.report-pdf) .doc-wrap--report .doc-table--trips .doc-cell-day {
    grid-column: 1;
    grid-row: 1;
  }
  body:not(.report-pdf) .doc-wrap--report .doc-table--trips .doc-cell-km {
    grid-column: 2;
    grid-row: 1;
  }
  body:not(.report-pdf) .doc-wrap--report .doc-table--trips .doc-cell-duration {
    grid-column: 2;
    grid-row: 2;
  }
  body:not(.report-pdf) .doc-wrap--report .doc-table--trips .doc-cell-route {
    grid-column: 1 / -1;
    grid-row: 3;
    margin-top: var(--sp-1);
  }
  body:not(.report-pdf) .doc-wrap--report .doc-table--cards-sm tbody tr.doc-table-total {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--sp-2) var(--sp-3);
    width: 100%;
    margin: var(--sp-2) 0 0;
    padding: var(--sp-2) 0 0;
    border: none;
    border-top: 1px solid var(--line, #e1e7e3);
    border-radius: 0;
    background: transparent;
  }
  body:not(.report-pdf) .doc-wrap--report .doc-table--cards-sm tbody tr.doc-table-total td {
    display: block;
    padding: 0;
    border: none;
    text-align: left;
  }
  body:not(.report-pdf) .doc-wrap--report .doc-table--cards-sm tbody tr.doc-table-total td:empty {
    display: none;
  }
  body:not(.report-pdf) .doc-wrap--report .doc-table--cards-sm tbody tr.doc-table-total td.num {
    text-align: right;
  }
  body:not(.report-pdf) .doc-wrap--report .doc-table--time tbody tr.doc-table-total td.num {
    margin-left: auto;
  }
  body:not(.report-pdf) .doc-wrap--report .doc-table--trips tbody tr.doc-table-total {
    justify-content: flex-start;
  }
  body:not(.report-pdf) .doc-wrap--report .doc-table--trips tbody tr.doc-table-total td:first-child {
    flex: 1 1 auto;
    min-width: 0;
  }
  body:not(.report-pdf) .doc-wrap--report .doc-table--trips tbody tr.doc-table-total td.num {
    flex: 0 0 auto;
  }
}

@media (min-width: 640px) {
  .doc-wrap--report .doc-table--time col.doc-col-date {
    width: 14%;
  }
  .doc-wrap--report .doc-table--time col.doc-col-time-range {
    width: 16%;
  }
  .doc-wrap--report .doc-table--trips col.doc-col-date {
    width: 14%;
  }
  .doc-wrap--report .doc-table--trips col.doc-col-fill {
    width: 45%;
  }
  .doc-wrap--report .doc-table--trips col.doc-col-km {
    width: 12%;
  }
  .doc-wrap--report .doc-table--trips col.doc-col-duration {
    width: 16%;
  }
  .doc-wrap--report .doc-table--trips .doc-cell-route {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

body.report-pdf .doc,
.report-pdf-root .doc {
  padding: 0;
  border: none;
  border-radius: 0;
  border-top: none;
  box-shadow: none;
}

body.report-pdf .report-head--pdf , .report-pdf-root .report-head--pdf {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px 16px;
  margin-bottom: 8pt;
  padding-top: 8px;
}

body.report-pdf .report-head--pdf .report-head-brand , .report-pdf-root .report-head--pdf .report-head-brand {
  flex: 0 1 auto;
  min-width: 0;
}

body.report-pdf .report-head--pdf .report-head-meta .report-logo , .report-pdf-root .report-head--pdf .report-head-meta .report-logo {
  display: block;
  margin: 0 0 1.5mm auto;
  max-height: 44px;
  max-width: 55mm;
  width: auto;
  height: auto;
  object-fit: contain;
}

body.report-pdf .report-head--pdf .report-head-meta .report-logo.report-logo--square , .report-pdf-root .report-head--pdf .report-head-meta .report-logo.report-logo--square {
  max-height: 60px;
}

body.report-pdf .report-head--pdf .kicker , .report-pdf-root .report-head--pdf .kicker {
  margin: 0;
  font-size: var(--doc-label-size);
  font-weight: var(--fw-semibold, 600);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4a524e;
}

body.report-pdf .report-head--pdf .report-head-meta , .report-pdf-root .report-head--pdf .report-head-meta {
  flex: 0 1 52%;
  text-align: right;
  font-size: var(--doc-label-size);
  line-height: 1.3;
  color: #66706b;
}

body.report-pdf .report-head-company , .report-pdf-root .report-head-company {
  font-weight: var(--doc-section-weight);
  color: #4d5c54;
  margin-bottom: 2px;
}

body.report-pdf .report-section > h2:has(+ .report-table-wrap) , .report-pdf-root .report-section > h2:has(+ .report-table-wrap) {
  break-after: avoid;
  page-break-after: avoid;
}

body.report-pdf .doc-table--pdf , .report-pdf-root .doc-table--pdf {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  margin-bottom: 0;
}

body.report-pdf .doc-table--pdf thead , .report-pdf-root .doc-table--pdf thead {
  display: table-header-group;
}

body.report-pdf .doc-table--pdf th,
.report-pdf-root .doc-table--pdf th,
body.report-pdf .doc-table--pdf td,
.report-pdf-root .doc-table--pdf td {
  border-bottom: 0.5pt solid #e3e7e5;
}

body.report-pdf .doc-table--pdf .num , .report-pdf-root .doc-table--pdf .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

body.report-pdf .doc-table--pdf tr.doc-table-total td , .report-pdf-root .doc-table--pdf tr.doc-table-total td {
  font-weight: 500;
  border-top: 0.5pt solid #e3e7e5;
  border-bottom: 0.5pt solid #e3e7e5;
}

body.report-pdf .doc-table--pdf tr.doc-table-total td.num , .report-pdf-root .doc-table--pdf tr.doc-table-total td.num {
  font-weight: 700;
}

body.report-pdf .doc-table--pdf tbody tr , .report-pdf-root .doc-table--pdf tbody tr {
  break-inside: avoid;
  page-break-inside: avoid;
}

body.report-pdf .doc-table--pdf tbody tr.doc-table-total , .report-pdf-root .doc-table--pdf tbody tr.doc-table-total {
  break-before: avoid;
  page-break-before: avoid;
}

body.report-pdf .doc-col-fill , .report-pdf-root .doc-col-fill {
  width: auto;
}

body.report-pdf .doc-col-qty , .report-pdf-root .doc-col-qty {
  width: 11%;
}

body.report-pdf .doc-col-unit , .report-pdf-root .doc-col-unit {
  width: 10%;
}

body.report-pdf .doc-col-money , .report-pdf-root .doc-col-money {
  width: 14%;
}

body.report-pdf .doc-col-date , .report-pdf-root .doc-col-date {
  width: 14%;
}

body.report-pdf .doc-col-time-range , .report-pdf-root .doc-col-time-range {
  width: 16%;
}

body.report-pdf .doc-col-duration , .report-pdf-root .doc-col-duration {
  width: 13%;
}

body.report-pdf .doc-col-date , .report-pdf-root .doc-col-date {
  width: 14%;
}

body.report-pdf .doc-table--trips col.doc-col-date , .report-pdf-root .doc-table--trips col.doc-col-date {
  width: 14%;
}

body.report-pdf .doc-table--trips col.doc-col-fill , .report-pdf-root .doc-table--trips col.doc-col-fill {
  width: 45%;
}

body.report-pdf .doc-table--trips col.doc-col-km , .report-pdf-root .doc-table--trips col.doc-col-km {
  width: 12%;
}

body.report-pdf .doc-table--trips col.doc-col-duration , .report-pdf-root .doc-table--trips col.doc-col-duration {
  width: 16%;
}

body.report-pdf .doc-col-km , .report-pdf-root .doc-col-km {
  width: 10%;
}

body.report-pdf .doc-wrap--report > .doc , .report-pdf-root .doc-wrap--report > .doc {
  position: relative;
}

body.report-pdf .doc-wrap--report > .doc::before , .report-pdf-root .doc-wrap--report > .doc::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--pine, #157a52);
  pointer-events: none;
}

body.report-pdf .doc-table--pdf td:first-child, .report-pdf-root .doc-table--pdf td:first-child,
body.report-pdf .doc-table--pdf td.doc-col-fill , .report-pdf-root .doc-table--pdf td.doc-col-fill {
  overflow-wrap: anywhere;
  word-break: normal;
}

body.report-pdf .doc-photos-grid--pdf,
.report-pdf-root .doc-photos-grid--pdf {
  --pdf-photo-frame-w: 57.883mm;
  --pdf-photo-frame-h: 43.412mm;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: var(--sp-2);
  row-gap: var(--sp-2);
  margin-top: 4pt;
  align-items: start;
}

body.report-pdf .doc-photos-grid--pdf .doc-photo-figure,
.report-pdf-root .doc-photos-grid--pdf .doc-photo-figure {
  margin-bottom: 0;
}

body.report-pdf .doc-photo-figure , .report-pdf-root .doc-photo-figure {
  break-inside: avoid;
  page-break-inside: avoid;
}

body.report-pdf .doc-photos-grid--pdf .doc-photo-frame,
.report-pdf-root .doc-photos-grid--pdf .doc-photo-frame {
  display: block;
  box-sizing: border-box;
  width: var(--pdf-photo-frame-w);
  max-width: 100%;
  height: var(--pdf-photo-frame-h);
  min-height: var(--pdf-photo-frame-h);
  max-height: var(--pdf-photo-frame-h);
  overflow: hidden;
  background: var(--paper, #fff);
  border-radius: var(--radius-sm);
  break-inside: avoid;
  page-break-inside: avoid;
}

body.report-pdf .doc-photos-grid--pdf .doc-photo-frame img,
.report-pdf-root .doc-photos-grid--pdf .doc-photo-frame img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  border-radius: var(--radius-sm);
}

body.report-pdf .report-section:has(.doc-photos-grid--pdf) + .report-section,
.report-pdf-root .report-section:has(.doc-photos-grid--pdf) + .report-section {
  margin-top: var(--sp-6, 32px);
}

body.report-pdf .doc-report-foot , .report-pdf-root .doc-report-foot {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 7.5pt;
  line-height: 1.35;
  color: #66706b;
  width: 100%;
  box-sizing: border-box;
  border-top: none;
  padding-top: 0;
}

body.report-pdf .doc-report-foot-rule , .report-pdf-root .doc-report-foot-rule {
  display: block;
  width: 100%;
  border-top: 0.5pt solid #d4dcd8;
  margin: 0 0 2mm;
}

body.report-pdf .doc-report-foot-pages::after , .report-pdf-root .doc-report-foot-pages::after {
  content: counter(page) " / " counter(pages);
  font-variant-numeric: tabular-nums;
}

body.report-pdf .doc-report-foot-mark , .report-pdf-root .doc-report-foot-mark {
  width: 18px;
  height: 18px;
  font-size: 12px;
  line-height: 18px;
}

body.report-pdf .doc-report-foot-mark-img , .report-pdf-root .doc-report-foot-mark-img {
  width: 20px;
  height: 20px;
  vertical-align: middle;
}

body.report-pdf .doc-report-foot-row , .report-pdf-root .doc-report-foot-row {
  flex-wrap: nowrap;
  align-items: baseline;
}

body.report-pdf .doc-report-foot-brand , .report-pdf-root .doc-report-foot-brand {
  display: flex;
  align-items: baseline;
  flex-wrap: nowrap;
  white-space: nowrap;
  min-width: auto;
}

body.report-pdf .doc-report-foot-mark, .report-pdf-root .doc-report-foot-mark,
body.report-pdf .doc-report-foot-mark-img , .report-pdf-root .doc-report-foot-mark-img {
  align-self: center;
}

body.report-pdf .doc-report-foot-meta , .report-pdf-root .doc-report-foot-meta {
  margin: 0;
  line-height: 1.35;
}

@media print {
  .doc-wrap--report .mobile-list-scroll {
    max-height: none;
    overflow: visible;
    -webkit-mask-image: none;
    mask-image: none;
  }
  .topbar {
    display: none !important;
  }
  .doc-wrap--report .doc {
    padding: 0;
    box-shadow: none;
    border-radius: 0;
  }
  .doc-wrap--report .doc-table {
    table-layout: fixed;
    border-collapse: collapse;
  }
  .doc-wrap--report .doc-table thead {
    display: table-header-group;
  }
  .doc-wrap--report .doc-table th,
  .doc-wrap--report .doc-table td {
    border-bottom: 0.5pt solid #e3e7e5;
  }
  .doc-wrap--report .doc-table .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
  }
  .doc-wrap--report .doc-table tr.doc-table-total td {
    font-weight: 500;
    border-top: 0.5pt solid #e3e7e5;
  }
  .doc-wrap--report .doc-table tr.doc-table-total td.num {
    font-weight: 700;
  }
  .doc-wrap--report .report-section > h2:has(+ .report-table-wrap) {
    break-after: avoid;
    page-break-after: avoid;
  }
  .doc-wrap--report .doc-table tbody tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .doc-wrap--report .doc-table tbody tr.doc-table-total {
    break-before: avoid;
    page-break-before: avoid;
  }
  .doc-wrap--report .doc-photos-grid {
    gap: var(--sp-3);
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .doc-wrap--report .doc-photo-figure {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .doc-wrap--report .doc-report-foot {
    font-size: 7.5pt;
  }
  .doc-wrap--report .no-print {
    display: none !important;
  }
}

html.report-lightbox-open {
  overflow: hidden;
}

.report-photo-lightbox {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border: none;
  max-width: 100vw;
  max-height: 100vh;
  max-height: 100dvh;
  background: transparent;
}

.report-photo-lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: var(--sp-3);
  z-index: 50;
}

.report-photo-lightbox::backdrop {
  background: color-mix(in srgb, var(--ink, #17211c) 85%, transparent);
}

.report-photo-lightbox-panel {
  position: relative;
  width: min(100%, 56rem);
  max-height: calc(100vh - var(--sp-6, 32px));
  max-height: calc(100dvh - var(--sp-6, 32px));
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--sp-2);
  pointer-events: auto;
  overflow: visible;
  flex-shrink: 0;
}

.report-photo-lightbox-close {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  min-width: var(--hit-min, 44px);
  min-height: var(--hit-min, 44px);
}

button.report-photo-lightbox-close.btn {
  box-sizing: border-box;
  width: var(--hit-min, 44px);
  height: var(--hit-min, 44px);
  min-width: var(--hit-min, 44px);
  min-height: var(--hit-min, 44px);
  padding: 0;
  background: rgb(0 0 0 / 0.55);
  color: #fff;
  border-color: transparent;
  border-radius: 50%;
  box-shadow: none;
}

button.report-photo-lightbox-close.btn:hover {
  background: rgb(0 0 0 / 0.72);
}

.report-photo-lightbox-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: min(85vh, 24rem);
  min-height: min(85dvh, 24rem);
  touch-action: pan-y;
}

.report-photo-lightbox-img {
  display: block;
  max-width: 100%;
  max-height: 85vh;
  max-height: 85dvh;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
}

.report-photo-lightbox-prev,
.report-photo-lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  min-width: var(--hit-min, 44px);
  min-height: var(--hit-min, 44px);
  padding: 0 var(--sp-2);
  border: 0;
  border-radius: 50%;
  background: rgb(0 0 0 / 0.55);
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}

.report-photo-lightbox-prev {
  left: var(--sp-1);
}

.report-photo-lightbox-next {
  right: var(--sp-1);
}

.report-photo-lightbox-prev:disabled,
.report-photo-lightbox-next:disabled {
  opacity: 0.35;
  cursor: default;
}

.report-photo-lightbox-prev:focus-visible,
.report-photo-lightbox-next:focus-visible,
.report-photo-lightbox-close:focus-visible {
  outline: 2px solid var(--pine, #157a52);
  outline-offset: 2px;
}

.report-photo-lightbox-loading {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 2.5rem;
  height: 2.5rem;
  border: 3px solid color-mix(in srgb, #fff 25%, transparent);
  border-top-color: #fff;
  border-radius: 50%;
  animation: report-photo-lightbox-spin 0.75s linear infinite;
  pointer-events: none;
}

.report-photo-lightbox-loading[hidden] {
  display: none;
}

@keyframes report-photo-lightbox-spin {
  to {
    transform: rotate(360deg);
  }
}

.report-photo-lightbox-meta {
  flex-shrink: 0;
  margin: 0;
  background: transparent;
}

.report-photo-lightbox-counter {
  margin: 0;
  text-align: center;
  color: #fff;
}

.report-photo-lightbox-caption {
  margin: var(--sp-1) 0 0;
  text-align: center;
  color: #fff;
  white-space: pre-wrap;
}

@media (min-width: 640px) {
  .report-photo-lightbox-prev,
  .report-photo-lightbox-next {
    min-width: 48px;
    min-height: 48px;
    font-size: 2rem;
  }
  .report-photo-lightbox-prev {
    left: var(--sp-2);
  }
  .report-photo-lightbox-next {
    right: var(--sp-2);
  }
  button.report-photo-lightbox-close.btn {
    width: var(--hit-min, 44px);
    height: var(--hit-min, 44px);
    min-width: var(--hit-min, 44px);
    min-height: var(--hit-min, 44px);
  }
}

.photo-lightbox--app button.report-photo-lightbox-close.btn {
  top: var(--sp-1);
  right: var(--sp-1);
}

@media (max-width: 639px) {
  .photo-lightbox--app[open] {
    padding: 0;
  }
  .photo-lightbox--app .report-photo-lightbox-panel {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    justify-content: center;
  }
  .photo-lightbox--app .report-photo-lightbox-stage {
    flex: 1 1 auto;
    min-height: 0;
  }
  .photo-lightbox--app .report-photo-lightbox-img {
    max-height: calc(100vh - var(--sp-6));
    max-height: calc(100dvh - var(--sp-6));
  }
  .photo-lightbox--app .report-photo-lightbox-meta {
    padding-bottom: var(--sp-2);
  }
}

@media (prefers-reduced-motion: reduce) {
  .report-photo-lightbox-loading {
    animation: none;
  }
}

@media print {
  .report-photo-lightbox {
    display: none !important;
  }
}

:root {
  --bg: #f3f6f4;
  --paper: #ffffff;
  --surface: #ffffff;
  --ink: #17211c;
  --muted: #4d5c54;
  --text-muted: var(--muted);
  --line: #e1e7e3;
  --pine: #157a52;
  --pine-deep: #0e5c3d;
  --pine-soft: #e5f5ee;
  --brand: var(--pine);
  --on-brand: #f4fbf7;
  --warn: var(--amber);
  --amber: #e6b325;
  --amber-deep: #8a6208;
  --amber-soft: #fff3c4;
  --blue: #1a5f9e;
  --blue-deep: #0f3d66;
  --blue-soft: #e8f1fa;
  --violet: #5b3d8a;
  --violet-deep: #3d2860;
  --violet-soft: #f0eaf8;
  --brass: #8a5a2b;
  --brass-soft: #f3eadf;
  --danger: #8d2f2a;
  --danger-soft: #f8ebe8;
  --shadow: 0 1px 2px rgba(23, 33, 28, 0.04), 0 16px 40px rgba(23, 33, 28, 0.06);
  --space: 8px;
  --space-section: 10px;
  --pad-card-block: 10px;
  --pad-card-inline: 12px;
  --pad-card-inline-mobile: 14px;
  --pad-card: var(--pad-card-block) var(--pad-card-inline);
  --pad-card-loose: 12px;
  --timer-run: #3ddc97;
  --timer-run-bg: #eaf8f1;
  --timer-pause: #b8a030;
  --timer-pause-bg: #fff8e6;

  /* Typography tokens (app shell; selectors migrate in later commits) */
  --fs-2xs: 0.75rem;
  --fs-xs: 0.8125rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-input: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: clamp(1.25rem, 2vw, 1.75rem);
  --fw-normal: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --lh-tight: 1.25;
  --lh-base: 1.5;
  --lh-relaxed: 1.55;
  --fs-btn-toolbar: var(--fs-base);
  --fs-btn-compact: var(--fs-sm);
  --fs-section: var(--fs-lg);
  /* List typography: title --fs-list, meta --fs-list-compact */
  --fs-list: var(--fs-sm);
  --fs-list-compact: var(--fs-xs);
  --fs-meta: var(--fs-list-compact);
  --lh-list: 1.3;
  --ico-header: 22px;
  --fab-size: 52px;
  --empty-padding: var(--pad-card);

  /* Spacing scale */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;

  /* Layout */
  --content-max: 1080px;
  --form-max: 560px;
  --measure-prose: 60ch;

  /*
   * Radius scale (pro SaaS: fields/buttons tight, cards slightly softer)
   *   field/btn  6px  inputs, selects, buttons
   *   sm         4px  badges, dense chips
   *   card       8px  panels, list shells
   *   pill     999px  only true pills (lang, period chips)
   */
  --radius: 8px;
  --radius-card: var(--radius);
  --radius-card-inner: calc(var(--radius-card) - 1px);
  --radius-sm: 4px;
  --radius-control: 6px;
  --radius-btn: 6px;
  --radius-pill: 999px;
  --border-field: #8a948f;
  --border-field-focus: var(--pine);
  --shadow-card: var(--shadow);
  --shadow-control: none;
  --shadow-btn-primary: 0 4px 12px rgba(21, 122, 82, 0.16);
  /*
   * Button scale (desktop). Mobile: .btn / .btn-small → --hit-min (touch).
   * Change sizes only here — components use these tokens.
   *   lg  44px  landing hero CTA
   *   md  36px  default .btn, primary actions
   *   sm  32px  .btn-small, secondary toolbars
   *   xs  28px  side-foot, dense chrome
   *   row 24px  icon-only in compact list rows
   */
  --btn-h-lg: 44px;
  --btn-h: 36px;
  --btn-h-sm: 32px;
  --control-h: var(--btn-h);
  --control-h-sm: var(--btn-h-sm);
  --btn-h-xs: 28px;
  --btn-pad-x: 14px;
  --btn-pad-x-sm: 10px;
  --btn-transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease, transform 0.12s ease;

  /* Compact list rows */
  --row-h-compact: 34px;
  --row-icon: 18px;
  --row-btn: 28px;
  --hit-min: 44px;
  /* Icon in square .title-actions .btn at --btn-h */
  --ico-title-action: 18px;

  /* Period nav chips (Työt / Valmiit / Ajot) */
  --period-chip-min-h: 32px;
  --period-chip-padding-x: var(--sp-3);
  --period-chip-gap: var(--sp-1);
  --period-chip-fs: var(--fs-sm);

  /* Status badges (.badge) — compact list size */
  --badge-min-h: auto;
  --badge-padding-x: var(--sp-2);
  --badge-fs: var(--fs-xs);
  --badge-lh: var(--lh-tight);

  /* Scrollbars (screen UI) */
  --scrollbar-size: var(--sp-2);
  --scrollbar-thumb: color-mix(in srgb, var(--muted) 42%, transparent);
  --scrollbar-thumb-hover: color-mix(in srgb, var(--pine) 55%, var(--muted));
  --scrollbar-track: transparent;

}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { color-scheme: light; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(980px 420px at 0% -10%, #e5f5ee 0%, transparent 60%),
    radial-gradient(720px 360px at 100% 0%, #eef2f6 0%, transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: var(--fw-semibold);
  /* Slightly larger than --fs-base (1rem) for default reading size */
  font-size: 1.0625rem;
  line-height: var(--lh-base);
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

img, video, svg:not(.ico) { max-width: 100%; height: auto; }

.ico {
  display: inline-block;
  width: 1em;
  height: 1em;
  font-size: 22px;
  line-height: 1;
  flex: none;
  flex-shrink: 0;
  overflow: visible;
  max-width: none;
  color: inherit;
  opacity: 1;
  stroke: currentColor;
  fill: none;
  stroke-width: 1px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ico * {
  vector-effect: non-scaling-stroke;
}

.ico-fill {
  fill: currentColor;
}

.side-nav a .ico,
.side-nav-sub a .ico {
  font-size: 24px;
}

.title-actions .ico {
  font-size: var(--ico-title-action);
}

.btn-icon .ico {
  font-size: 24px;
}

.side-foot .ico {
  font-size: 18px;
}

.flag-fab .ico {
  font-size: 26px;
}

.field .ico {
  font-size: 22px;
}

img { display: block; }

html, body { max-width: 100%; }

body { overflow-x: clip; }

@media screen {
  * {
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
  }

  @supports not (scrollbar-color: #000 transparent) {
    *::-webkit-scrollbar {
      width: var(--scrollbar-size);
      height: var(--scrollbar-size);
    }

    *::-webkit-scrollbar-track {
      background: transparent;
    }

    *::-webkit-scrollbar-thumb {
      background: var(--scrollbar-thumb);
      border-radius: var(--radius-pill);
      border: calc(var(--sp-1) / 2) solid transparent;
      background-clip: content-box;
    }

    *::-webkit-scrollbar-thumb:hover {
      background: var(--scrollbar-thumb-hover);
    }

    *::-webkit-scrollbar-button {
      display: none;
    }
  }
}

.shell, .main, .stack, .project-layout, .card, .subcard, form, .topbar, .side { min-width: 0; }

h1,
h2,
h3,
.card-compact h2,
.empty-state h2,
.project-section-title {
  font-family: var(--display);
  line-height: var(--lh-tight);
  text-wrap: balance;
  margin: 0 0 0.4em;
}

h1 {
  font-size: clamp(1.625rem, 1.1rem + 1.5vw, 2rem);
  font-weight: var(--fw-bold);
  letter-spacing: -0.02em;
}

h2,
h3,
.card-compact h2,
.empty-state h2,
.project-section-title {
  font-weight: 650;
  letter-spacing: -0.01em;
}

h2 { font-size: var(--fs-lg); }

h3 { font-size: var(--fs-base); }

p { text-wrap: pretty; }

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

a:where(:not(.btn)):has(> .ico):hover,
a:where(:not(.btn)):has(> .ico):focus-visible {
  text-decoration: none;
}

a:where(:not(.btn)):has(> .ico):hover > :not(.ico),
a:where(:not(.btn)):has(> .ico):focus-visible > :not(.ico) {
  color: var(--pine);
}

button, [role="button"], .btn { cursor: pointer; }

:focus-visible { outline: 2px solid var(--pine); outline-offset: 3px; }

.skip {
  position: absolute;
  left: 12px;
  top: auto;
  transform: translateY(-100%);
  background: var(--paper);
  padding: var(--sp-2) var(--sp-3);
  z-index: 20;
}

.skip:focus {
  top: 12px;
  transform: none;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.muted { color: var(--muted); }

.tiny { font-size: var(--fs-sm); }

.muted,
.tiny,
.page-header-meta,
.profile-field-hint,
.profile-reports-lead,
.empty-state p,
.filter-empty p,
.side-legal a,
.sheet-legal a,
.foot-rev,
.warehouse-row-sub,
.warehouse-system-label {
  font-weight: var(--fw-normal);
}

.address-copy-row { margin: calc(-1 * var(--sp-1)) 0 var(--sp-2); }

.text-btn {
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--pine-deep);
  background: none;
  border: none;
  padding: 0;
  min-height: auto;
  text-decoration: none;
  cursor: pointer;
}

.text-btn:hover { color: var(--pine); }

.kicker {
  font-family: var(--sans);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pine-deep);
  margin: 0 0 var(--sp-2);
}

.num { font-variant-numeric: tabular-nums; text-align: right; }

.pre { white-space: pre-wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: var(--btn-h);
  padding: 0 var(--btn-pad-x);
  border-radius: var(--radius-btn);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
  text-decoration: none;
  background: transparent;
  color: var(--ink);
  box-shadow: var(--shadow-control);
  overflow: visible;
  white-space: normal;
  transition: var(--btn-transition);
}

.btn .ico,
.btn-icon .ico,
button .ico {
  font-size: 20px;
  line-height: 1;
  display: inline-block;
  width: 1em;
  height: 1em;
  overflow: visible;
  flex: none;
  color: inherit;
  opacity: 1;
}

.btn:focus-visible {
  outline: 2px solid var(--pine);
  outline-offset: 2px;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
}

.btn-primary { background: var(--pine); color: #f4fbf7; }

.btn-primary:hover { background: var(--pine-deep); }

.btn-primary:disabled,
.btn-primary[aria-disabled="true"],
.btn-primary:disabled:hover,
.btn-primary[aria-disabled="true"]:hover,
.btn-primary:disabled:focus,
.btn-primary[aria-disabled="true"]:focus,
.btn-primary:disabled:focus-visible,
.btn-primary[aria-disabled="true"]:focus-visible,
.btn-primary:disabled:active,
.btn-primary[aria-disabled="true"]:active {
  background: var(--line);
  border-color: var(--line);
  color: var(--muted);
  opacity: 1;
  cursor: not-allowed;
}

.btn-running { background: var(--amber); color: var(--ink); box-shadow: var(--shadow-card); }

.btn-running:hover { background: #d4a21c; }

.btn-ghost { background: var(--paper); border-color: var(--line); color: var(--ink); }

.btn-ghost:hover { border-color: var(--ink); }

.btn-danger { background: transparent; color: var(--danger); border-color: transparent; }

.btn-danger:hover {
  background: color-mix(in srgb, var(--danger) 8%, transparent);
}

.btn-small {
  height: auto;
  min-height: var(--btn-h-sm);
  padding: 0 var(--btn-pad-x-sm);
  font-size: var(--fs-btn-compact);
  line-height: var(--lh-tight);
  box-sizing: border-box;
  border-radius: var(--radius-btn);
}

.btn-xs {
  min-height: var(--btn-h-xs);
  height: auto;
  padding: 0 var(--sp-2);
  font-size: var(--fs-sm);
  line-height: var(--lh-tight);
  border-radius: var(--radius-btn);
  gap: var(--sp-2);
}

.btn-row {
  width: var(--row-btn);
  height: var(--row-btn);
  min-width: var(--row-btn);
  min-height: var(--row-btn);
  padding: 0;
  border-radius: var(--radius-btn);
  justify-content: center;
  gap: 0;
}

.btn-row .ico {
  width: var(--row-icon);
  height: var(--row-icon);
  font-size: var(--row-icon);
}

.page-header-actions .csv-header-btn,
.page-header-actions .trip-csv-btn {
  flex-shrink: 0;
}

.csv-header-btn,
.trip-csv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--sp-1);
  white-space: normal;
}

.csv-header-btn[aria-disabled="true"],
.trip-csv-btn[aria-disabled="true"] {
  pointer-events: none;
  cursor: default;
  color: var(--muted);
}

.csv-header-btn .ico,
.trip-csv-btn .ico {
  width: 1.25rem;
  height: 1.25rem;
}

.timer-toggle { width: 100%; min-height: var(--btn-h); font-size: var(--fs-base); }

.timer-elapsed {
  margin: 0 0 var(--sp-2);
  font-size: 1.45rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: var(--amber-deep);
}

.timer-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3) var(--sp-4);
  padding: var(--sp-4) 18px;
  margin-bottom: var(--sp-3);
}

.timer-hero--idle { background: var(--paper); }

.timer-hero.timer-state--run,
.timer-hero--running { background: var(--timer-run-bg); }

.timer-hero.timer-state--pause,
.timer-hero--paused { background: var(--timer-pause-bg); }

.timer-hero-main { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3) var(--sp-5); min-width: 0; flex: 1 1 12rem; }

.timer-hero-status { display: flex; align-items: center; gap: var(--sp-2); font-weight: var(--fw-semibold); font-size: var(--fs-sm); }

.timer-hero-dot,
.timer-state-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: none;
}

.timer-state--run .timer-hero-dot,
.timer-state--run .timer-state-dot { background: var(--timer-run); }

.timer-state--pause .timer-hero-dot,
.timer-state--pause .timer-state-dot,
.timer-hero-dot--paused { background: var(--timer-pause); }

.timer-dot-pulse,
.timer-hero-pulse { animation: timer-dot-pulse 1.6s ease-in-out infinite; }

@keyframes timer-dot-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.92); }
}

@media (prefers-reduced-motion: reduce) {
  .timer-dot-pulse,
  .timer-hero-pulse { animation: none !important; }
}

.timer-hero-elapsed {
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: var(--fw-bold);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  line-height: 1.1;
  color: var(--ink);
}

.timer-hero-elapsed--idle { color: var(--muted); opacity: 0.55; }

.timer-hero-started { display: block; margin-top: var(--sp-1); }

.timer-hero-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; justify-content: flex-end; }

.timer-hero-actions--idle .btn-timer-start-lg { white-space: nowrap; }

.timer-hero-manual-add { min-height: var(--hit-min); }

.timer-hero-manual-label--short { display: none; }

@media (max-width: 639px) {
  .timer-hero-actions--idle {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    width: 100%;
    gap: var(--sp-2);
  }
  .timer-hero-actions--idle > form,
  .timer-hero-actions--idle > a.btn-timer-start-lg,
  .timer-hero-actions--idle > .timer-hero-manual-add {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
  .timer-hero-actions--idle > form {
    display: flex;
  }
  .timer-hero-actions--idle > form .btn-timer-start-lg,
  .timer-hero-actions--idle > a.btn-timer-start-lg,
  .timer-hero-actions--idle > .timer-hero-manual-add {
    width: 100%;
    min-width: 0;
    min-height: var(--hit-min);
    padding-inline: var(--sp-2);
    box-sizing: border-box;
    justify-content: safe center;
    overflow: hidden;
  }
  .timer-hero-actions--idle .btn-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .timer-hero-actions--idle .btn .ico {
    flex-shrink: 0;
  }
  .timer-hero-manual-label--long { display: none; }
  .timer-hero-manual-label--short { display: inline; }

  .timer-hero--active .timer-hero-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    width: 100%;
    gap: var(--sp-2);
  }
  .timer-hero--active .timer-hero-actions > form {
    display: flex;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
  .timer-hero--active .timer-hero-actions .btn-timer-pause,
  .timer-hero--active .timer-hero-actions .btn-timer-resume,
  .timer-hero--active .timer-hero-actions .btn-timer-stop-outline {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
}

.btn-timer-start-lg { min-height: var(--btn-h); padding: 0 var(--btn-pad-x); font-size: var(--fs-sm); font-weight: 650; }

.btn-timer-stop-outline {
  min-height: var(--btn-h);
  padding: 0 var(--btn-pad-x);
  font-weight: 650;
  background: transparent;
  color: var(--danger);
  border: 1.5px solid var(--danger);
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: var(--btn-transition);
}

.btn-timer-stop-outline:hover { background: color-mix(in srgb, var(--danger) 8%, transparent); }

.btn-timer-pause { min-height: var(--btn-h); }

.timer-stop-note { margin-bottom: var(--sp-3); }

.timer-stop-note form { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-3); align-items: end; }

.timer-stop-note-label { flex: 1 1 12rem; margin: 0; min-width: 0; }

.timer-stop-note-label input { width: 100%; min-height: var(--control-h); }

.timer-sticky-bar {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  z-index: 7;
  min-height: var(--hit-min);
  display: flex;
  align-items: center;
  gap: var(--sp-2) var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  background: var(--paper);
  border-bottom: 3px solid var(--line);
  box-shadow: var(--shadow-card);
  opacity: 0;
  transform: translateY(-100%);
}

.timer-sticky-bar.timer-state--run { border-bottom-color: var(--timer-run); }

.timer-sticky-bar.timer-state--pause { border-bottom-color: var(--timer-pause); }

.timer-sticky-bar.timer-sticky-bar--shown {
  animation: timer-sticky-enter 150ms ease-out forwards;
}

.vp-mobile-only .timer-sticky-bar {
  --timer-bar-h: calc(var(--hit-min) + 2 * var(--sp-2) + 3px);
  top: auto;
  bottom: calc(56px + env(safe-area-inset-bottom));
  transform: translateY(100%);
  border-bottom: 0;
  border-top: 3px solid var(--line);
}

.vp-mobile-only .timer-sticky-bar.timer-state--run { border-top-color: var(--timer-run); border-bottom-color: transparent; }

.vp-mobile-only .timer-sticky-bar.timer-state--pause { border-top-color: var(--timer-pause); border-bottom-color: transparent; }

@keyframes timer-sticky-enter {
  from { opacity: 0; transform: translateY(-100%); }
  to { opacity: 1; transform: translateY(0); }
}

.vp-mobile-only .timer-sticky-bar.timer-sticky-bar--shown {
  animation-name: timer-sticky-enter-mobile;
}

@keyframes timer-sticky-enter-mobile {
  from { opacity: 0; transform: translateY(100%); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .timer-sticky-bar { opacity: 1; transform: none; }
  .timer-sticky-bar.timer-sticky-bar--shown { animation: none; }
}

.timer-sticky-link {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
}

.timer-sticky-elapsed { font-weight: 650; font-variant-numeric: tabular-nums; flex: none; }

.timer-sticky-title { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-sm); }

.timer-sticky-actions { display: flex; gap: var(--sp-1); flex: none; }

.timer-sticky-dot { width: 8px; height: 8px; }

.timer-section-title { font-size: var(--fs-base); margin: 0 0 var(--sp-2); }

.time-list { list-style: none; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: var(--radius-card); overflow: hidden; }

.time-list-item { margin: 0; border-bottom: 1px solid var(--line); }

.time-list-item:last-child { border-bottom: 0; }

.time-list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  grid-template-areas:
    "date range actions"
    "duration duration actions"
    "note note actions";
  gap: var(--sp-2) var(--sp-3);
  align-items: center;
  padding: var(--sp-2) var(--sp-3);
  font-size: var(--fs-sm);
  min-height: var(--hit-min);
}

.time-list-item--open .time-list-row {
  background: var(--pine-soft);
}

.time-list-open-label {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
}

.time-list-open-duration {
  font-variant-numeric: tabular-nums;
}

.time-list-date {
  grid-area: date;
  min-width: 0;
}

.time-list-range {
  grid-area: range;
  justify-self: end;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: flex-end;
  gap: var(--sp-1);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.time-list-duration {
  grid-area: duration;
  font-variant-numeric: tabular-nums;
}

.time-list-note {
  grid-area: note;
  white-space: normal;
}

.time-list-actions {
  grid-area: actions;
  align-self: start;
  justify-self: end;
}

.time-list-note { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

.time-list-edit { padding: 0 var(--sp-3) var(--sp-3); border-top: 1px dashed var(--line); }

.time-list-item-editing { background: var(--pine-soft); }

.time-list-item-editing .time-list-row { background: transparent; }

.time-list-item.just-saved,
.trip-list-item.just-saved,
.warehouse-list-item.just-saved,
.admin-user-item.just-saved {
  animation: just-saved-fade 1.5s ease-out forwards;
}

@keyframes just-saved-fade {
  from { background: var(--pine-soft); }
  to { background: transparent; }
}

@media (prefers-reduced-motion: reduce) {
  .time-list-item.just-saved,
  .trip-list-item.just-saved,
  .warehouse-list-item.just-saved,
  .admin-user-item.just-saved {
    animation: none;
    background: var(--pine-soft);
  }
}

.time-list-edit .time-entry-grid { border-top: 0; padding-top: var(--sp-2); }

.time-add-manual { margin-top: var(--sp-3); font-size: var(--fs-sm); }

button.time-add-manual.btn-ghost.btn-small {
  position: relative;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: var(--brand);
  height: var(--btn-h-sm);
  min-height: var(--btn-h-sm);
}

button.time-add-manual.btn-ghost.btn-small:hover {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: var(--brand);
}

@media (hover: hover) {
  button.time-add-manual.btn-ghost.btn-small:hover {
    text-decoration: underline;
  }
}

button.time-add-manual.btn-ghost.btn-small::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--hit-min);
  height: var(--hit-min);
  transform: translate(-50%, -50%);
}

.time-show-form button.time-add-manual { margin-top: 0; }

@media (max-width: 639px) {
  button.time-add-manual.btn-ghost.btn-small {
    height: var(--btn-h-sm);
    min-height: var(--btn-h-sm);
    font-size: var(--fs-sm);
  }

  button.time-add-manual.btn-ghost.btn-small::after {
    left: 0;
    right: 0;
    width: auto;
    top: 50%;
    height: var(--hit-min);
    transform: translateY(-50%);
  }
}

.time-show-form--below { margin-top: var(--sp-2); }

.check-small { font-size: var(--fs-sm); }

.job-row-timer-status { display: inline-flex; align-items: center; gap: var(--sp-1); }

.job-row-timer-status.timer-state--run .job-row-timer-dot { background: var(--timer-run); }

.job-row-timer-status.timer-state--pause .job-row-timer-dot { background: var(--timer-pause); }

.job-row-timer-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }

@media (min-width: 640px) {
  .time-list-row {
    grid-template-columns: 6.5rem 6.5rem 5.5rem minmax(0, 1fr) auto;
    grid-template-areas: none;
    min-height: 0;
  }
  .time-list-range {
    display: block;
    justify-content: stretch;
  }
  .time-list-date,
  .time-list-range,
  .time-list-duration,
  .time-list-note,
  .time-list-actions {
    grid-area: auto;
    justify-self: stretch;
  }
  .time-list-range {
    justify-self: stretch;
  }
  .time-list-note {
    white-space: nowrap;
  }
  .time-list-actions {
    justify-self: end;
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.time-entries {
  list-style: none;
  padding: 0;
  margin: var(--sp-3) 0 0;
  display: grid;
  gap: 0;
}

.time-entries-head { display: none; }

.time-entry {
  list-style: none;
  padding: var(--sp-2) 0 0;
  margin: 0;
  border-top: 1px solid var(--line);
}

.time-entries-head + .time-entry { border-top: 0; }

.help-tip-wrap {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
}

.help-tip-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--hit-min);
  height: var(--hit-min);
  min-width: var(--hit-min);
  min-height: var(--hit-min);
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  flex-shrink: 0;
}

.help-tip-open:hover {
  color: var(--ink);
}

.help-tip-open:focus-visible {
  outline: 2px solid var(--pine);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.help-tip-popover {
  position: absolute;
  top: calc(100% + var(--sp-1));
  left: 0;
  z-index: 30;
  box-sizing: border-box;
  width: max-content;
  min-width: min(16rem, calc(100vw - 32px));
  max-width: min(20rem, calc(100vw - 32px));
  padding: var(--sp-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow-card);
  font-size: var(--fs-sm);
  font-weight: var(--fw-normal);
  line-height: 1.45;
  color: var(--ink);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.12s ease, visibility 0.12s ease;
}

.help-tip-popover::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: calc(-1 * var(--sp-1));
  height: var(--sp-1);
}

.help-tip-popover p {
  margin: 0;
}

.help-tip-popover-lead {
  margin-bottom: var(--sp-2);
  font-weight: var(--fw-semibold);
}

.help-tip-popover-more {
  color: var(--muted);
}

.help-tip-wrap:hover:not(.is-dismissed) .help-tip-popover,
.help-tip-wrap:focus-within:not(.is-dismissed) .help-tip-popover,
.help-tip-wrap.is-open .help-tip-popover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.help-tip-wrap.is-dismissed .help-tip-popover {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.time-entry-grid {
  display: grid;
  gap: var(--sp-2) var(--sp-2);
  align-items: end;
  min-width: 0;
}

.time-entry-times {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr) minmax(0, 0.65fr);
  gap: var(--sp-2) var(--sp-2);
  min-width: 0;
}

.time-stamp-split {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  min-width: 0;
}

.time-stamp-split input[type="date"],
.time-stamp-split input[type="time"] {
  flex: 1 1 7rem;
  min-width: 0;
  box-sizing: border-box;
}

.time-entry-label { margin: 0; font-size: var(--fs-sm); font-weight: var(--fw-semibold); gap: var(--sp-1); }

.time-entry-label input { min-height: var(--control-h-sm); font-size: var(--fs-sm); padding: var(--sp-2) var(--sp-2); }

.time-duration-field[readonly] {
  background: color-mix(in srgb, var(--line) 40%, var(--paper));
  color: var(--ink);
  cursor: default;
}

.time-col-note {
  grid-column: 1 / -1;
  min-width: 0;
}

.time-col-note input {
  width: 100%;
  box-sizing: border-box;
}

.time-entry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-2);
  align-items: center;
}

.time-add { display: grid; gap: var(--sp-2); padding-top: var(--sp-3); margin-top: var(--sp-3); border-top: 1px solid var(--line); }

.time-add label { margin: var(--sp-1) 0 var(--sp-1); }

.time-add input { min-height: var(--control-h); }

.time-add-toggle { width: auto; flex-shrink: 0; }

.time-add-panel:not([hidden]) { padding-top: var(--sp-3); }

.time-add-panel {
  scroll-margin-top: calc(72px + env(safe-area-inset-top, 0px));
}

@media (max-width: 639px) {
  .time-add-panel:not([hidden]) {
    scroll-margin-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom) + var(--sp-4));
  }
}

.time-add-panel .time-add { margin-top: 0; padding-top: var(--sp-3); }

.time-entry-photos {
  margin: var(--sp-2) 0 0;
  font-size: var(--fs-sm);
}

.time-entry-photos > summary {
  cursor: pointer;
  font-weight: var(--fw-semibold);
  color: var(--muted);
  list-style: none;
  padding: var(--sp-1) 0;
}

.time-entry-photos > summary::-webkit-details-marker { display: none; }

.time-entry-photos > summary:hover { color: var(--ink); }

.time-entry-photos .tiny { margin: var(--sp-2) 0 0; }

.time-entry-photo-thumbs {
  list-style: none;
  padding: 0;
  margin: var(--sp-2) 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.time-entry-photo-thumbs img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}

.time-fields {
  display: grid;
  gap: var(--sp-2) var(--sp-2);
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr) minmax(0, 0.65fr);
}

@media (max-width: 719px) {
  .time-entry-times {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .time-col-duration {
    grid-column: 1 / -1;
    max-width: 8rem;
  }
  .time-fields {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .time-fields label:last-child {
    grid-column: 1 / -1;
    max-width: 8rem;
  }
}

@media (min-width: 720px) {
  .time-entries-head {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(0, 0.6fr) auto;
    gap: var(--sp-2);
    align-items: end;
    padding: 0 0 var(--sp-2);
    margin: var(--sp-3) 0 0;
    border-bottom: 1px solid var(--line);
  }
  .time-entries-head + .time-entry { border-top: 0; }
  .time-entry-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(0, 0.6fr) auto;
    gap: var(--sp-2);
  }
  .time-entry-times { display: contents; }
  .time-entry-actions {
    grid-column: 4;
    grid-row: 1;
    align-self: end;
    justify-self: end;
  }
  .time-col-note {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .time-entry-label-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: var(--badge-min-h);
  padding: 0 var(--badge-padding-x);
  border-radius: var(--radius-pill);
  background: var(--pine-soft);
  color: var(--pine-deep);
  font-size: var(--badge-fs);
  line-height: var(--badge-lh);
  font-weight: var(--fw-semibold);
  white-space: nowrap;
}

.badge-running {
  background: var(--amber-soft);
  color: var(--amber-deep);
}

.badge-draft {
  background: var(--amber-soft);
  color: var(--amber-deep);
  border: 1px solid color-mix(in srgb, var(--amber) 45%, var(--line));
}

.badge-sample {
  background: var(--blue-soft);
  color: var(--blue-deep);
}

.badge-news {
  background: var(--pine-soft);
  color: var(--pine-deep);
}

.job.job-sample {
  border-color: var(--blue-deep);
  background: color-mix(in srgb, var(--blue-soft) 35%, var(--paper));
  box-shadow: var(--shadow-card);
}

.job-sample-star {
  display: inline-flex;
  vertical-align: middle;
  margin-right: var(--sp-1);
  color: var(--blue-deep);
}

.job-sample-star .ico {
  width: 1.1rem;
  height: 1.1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  color: var(--ink);
  text-decoration: none;
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  letter-spacing: -0.03em;
  line-height: 1;
}

svg.mark,
img.mark.mark-img {
  width: 32px;
  height: 32px;
  max-width: none;
  flex: none;
  display: block;
  color: var(--pine);
  object-fit: contain;
}

img.mark.mark-img {
  width: 32px;
  height: 32px;
}

.mark .tick { color: var(--brass); }

.brand--full .brand-logo {
  width: auto;
  object-fit: contain;
  object-position: left center;
  flex: none;
}

.brand--full .brand-logo--dark {
  display: none;
}

.brand--on-dark .brand-logo--light {
  display: none;
}

.brand--on-dark .brand-logo--dark {
  display: block;
}

.brand--landing .brand-logo {
  height: 44px;
  max-height: 44px;
  max-width: min(15rem, 58vw);
}

.brand--app .brand-logo {
  height: 36px;
  max-height: 36px;
  max-width: min(11rem, 52vw);
}

@media (max-width: 639px) {
  .brand--landing .brand-logo {
    height: 36px;
    max-height: 36px;
    max-width: min(12rem, 62vw);
  }
  .brand--app .brand-logo {
    height: 32px;
    max-height: 32px;
    max-width: min(10rem, 56vw);
  }
}

@media (max-width: 359px) {
  .brand--landing .brand-logo {
    height: 32px;
    max-height: 32px;
  }
}

.topbar, .side, .site-foot {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
}

.topbar {
  justify-content: space-between;
  flex-wrap: wrap;
  padding: var(--sp-4) max(var(--sp-5), env(safe-area-inset-right)) var(--sp-4) max(var(--sp-5), env(safe-area-inset-left));
  max-width: 1120px;
  margin: 0 auto;
  min-height: 72px;
  box-sizing: border-box;
}

.top-nav { display: none; gap: var(--sp-4); }

.top-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: var(--fw-medium);
}

.top-nav a[aria-current="page"] {
  font-weight: var(--fw-semibold);
}

.top-actions, .lang, .hero-actions, .row-actions, .head-actions, .share-row, .side-foot {
  display: flex;
  gap: var(--sp-2);
  align-items: center;
  flex-wrap: wrap;
}

.lang a {
  color: var(--muted);
  text-decoration: none;
  min-width: var(--hit-min);
  min-height: var(--hit-min);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lang a[aria-current="true"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--pine); }

.hero, .band, .site-foot {
  max-width: 1120px;
  margin: 0 auto;
  padding: var(--sp-3) max(var(--sp-5), env(safe-area-inset-right)) var(--sp-6) max(var(--sp-5), env(safe-area-inset-left));
}

.hero {
  display: grid;
  gap: var(--sp-6);
  align-items: start;
  padding-top: var(--sp-3);
}

.hero-copy { max-width: 40rem; }

.lead { font-size: var(--fs-lg); max-width: 38rem; }

.sheet {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: var(--sp-5) var(--sp-5) var(--sp-2);
}

.sheet h2 { font-size: var(--fs-xl); }

.sheet table { width: 100%; border-collapse: collapse; margin: var(--sp-3) 0; }

.sheet td { padding: var(--sp-2) 0; border-bottom: 1px solid var(--line); }

.how-panel {
  background:
    radial-gradient(420px 180px at 0% 0%, rgba(21, 122, 82, 0.16), transparent 70%),
    linear-gradient(180deg, #e7f6ef 0%, #f8fcf9 100%);
  border: 1px solid #c9e4d6;
  border-radius: var(--radius-card);
  padding: var(--sp-6) var(--sp-5) var(--sp-5);
  box-shadow: var(--shadow-card);
}

.how h2 { font-size: clamp(1.7rem, 3vw, 2.15rem); max-width: 16em; }

.steps { list-style: none; padding: var(--sp-2) 0 0; margin: 0; display: grid; gap: var(--sp-4); }

.steps li {
  position: relative;
  overflow: hidden;
  background: var(--paper);
  border-radius: var(--radius-card);
  padding: var(--sp-4);
  border: 1px solid #d3e7dc;
  box-shadow: var(--shadow-card);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--sp-3);
  align-items: start;
}

.steps h3 { font-size: var(--fs-lg); margin: 0 0 0.25em; }

.steps p { margin: 0; color: var(--muted); }

.step-mark,
.step-copy {
  position: relative;
  z-index: 1;
}

.step-mark { display: block; }

.step-no-bg {
  position: absolute;
  top: -0.06em;
  right: 0.02em;
  z-index: 0;
  font-size: 72px;
  line-height: 0.95;
  font-weight: var(--fw-bold);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  color: color-mix(in srgb, var(--pine) 8%, transparent);
  pointer-events: none;
  user-select: none;
}

.faq details {
  background: var(--paper);
  border-radius: var(--radius-control);
  padding: var(--sp-3) var(--sp-4);
  margin-bottom: var(--sp-2);
  border: 1px solid var(--line);
}

.faq summary { cursor: pointer; font-weight: var(--fw-semibold); min-height: var(--hit-min); display: flex; align-items: center; }

.faq p,
.faq li { font-weight: var(--fw-normal); }

.faq ul { margin: 0.5em 0 1em; padding-left: 1.25em; }

.faq li { margin: 0.35em 0; }

.line-qty,
.line-sale-price { display: grid; gap: var(--sp-1); font-size: var(--fs-sm); font-weight: var(--fw-semibold); margin: 0; }

.line-qty input,
.line-sale-price input { width: 7rem; max-width: 100%; font-weight: var(--fw-normal); min-height: var(--control-h); }

.line-edit { display: flex; gap: var(--sp-2) var(--sp-3); align-items: flex-end; flex-wrap: wrap; min-width: 0; }

.site-foot {
  color: var(--muted);
  width: 100%;
  justify-content: space-between;
  flex-wrap: wrap;
  padding-bottom: max(48px, env(safe-area-inset-bottom));
  font-size: var(--fs-sm);
}

.site-foot p { margin: 0; }

.site-foot > p {
  font-size: var(--fs-2xs);
}

.foot-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  width: 100%;
  margin-bottom: var(--sp-1);
}

.legal-item {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.legal-sep {
  color: var(--muted);
  margin-inline: var(--sp-2);
  user-select: none;
}

.foot-legal a,
.side-legal a,
.sheet-legal a {
  color: var(--muted);
  font-weight: var(--fw-normal);
  text-decoration: none;
  white-space: nowrap;
}

.foot-legal a:hover,
.foot-legal a:focus-visible,
.side-legal a:hover,
.side-legal a:focus-visible,
.sheet-legal a:hover,
.sheet-legal a:focus-visible {
  color: var(--ink);
}

@media (max-width: 639.98px) {
  .foot-legal a,
  .side-legal a,
  .sheet-legal a {
    display: inline-flex;
    align-items: center;
    min-height: var(--hit-min);
  }

  .foot-legal {
    flex-wrap: wrap;
    font-size: var(--fs-2xs);
  }

  .foot-legal .legal-sep {
    margin-inline: var(--sp-1);
  }
}

@media (max-width: 359.98px) {
  .foot-legal {
    flex-wrap: wrap;
    row-gap: 0;
  }
}

.foot-rev {
  margin: var(--sp-1) 0 0;
  font-size: var(--fs-2xs);
  font-variant-numeric: tabular-nums;
}

.side-foot .foot-rev,
.sheet-foot .foot-rev {
  font-size: var(--fs-xs);
  line-height: var(--lh-tight);
}

.side-legal,
.sheet-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  width: 100%;
  font-size: var(--fs-2xs);
  margin: 0;
}

.side-legal a,
.sheet-legal a {
  font-size: inherit;
}

.legal-doc-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px 12px;
}

.legal-brand { display: inline-flex; margin-bottom: 16px; }

.legal-doc h1 { font-size: clamp(1.5rem, 2.4vw, 2rem); margin: 0 0 8px; }

.legal-doc h2 { font-size: 1.05rem; margin: 1.25rem 0 0.35rem; }

.legal-doc p { margin: 0 0 0.75rem; line-height: 1.55; }

.legal-doc h3 { font-size: 1rem; margin: 1rem 0 0.35rem; }

.legal-doc ul { margin: 0 0 0.75rem; padding-left: 1.25rem; }

.legal-doc li { margin: 0.2rem 0; line-height: 1.55; }

.legal-doc .legal-back { margin-top: 1.25rem; }

.legal-cookie-table { margin: 12px 0; font-size: 0.92rem; }

.legal-cookie-table code { font-size: 0.86em; }

.auth-page .site-foot { max-width: 420px; margin: 16px auto 0; padding: 0 16px 24px; }

.auth-legal {
  font-size: var(--fs-sm);
  font-weight: var(--fw-normal);
  margin: 0;
  line-height: 1.45;
}

.auth-card-note { font-weight: var(--fw-normal); margin: var(--sp-2) 0; }

.auth-legal a {
  color: var(--pine-deep);
  text-decoration: none;
}

.auth-card-note a {
  color: var(--pine-deep);
  font-weight: var(--fw-semibold);
  text-decoration: none;
}

.auth-card-note a:hover,
.auth-card-note a:focus-visible {
  color: var(--pine);
}

.auth-legal a:hover {
  color: var(--pine);
}

.verify-email-lead { font-weight: var(--fw-normal); margin: 0; line-height: var(--lh-base); }

.verify-email-address { font-weight: var(--fw-semibold); }

.verify-email-hint { margin: var(--sp-2) 0 0; }

.verify-email-logout { margin: var(--sp-3) 0 0; }

.cookie-notice {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  max-height: 33vh;
  max-height: 33dvh;
  padding: var(--sp-2) var(--sp-3) max(var(--sp-2), env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.92);
  border-top: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(8px);
  box-sizing: border-box;
  overflow: hidden;
}

.cookie-notice-inner {
  max-width: 1180px;
  max-height: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--sp-2);
  overflow-y: auto;
}

.cookie-notice-body {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  font-size: var(--fs-xs);
  color: var(--muted);
  line-height: var(--lh-tight);
}

.cookie-notice-body a {
  color: var(--pine-deep);
  font-weight: var(--fw-semibold);
  text-decoration: none;
}

.cookie-notice-body a:hover,
.cookie-notice-body a:focus-visible {
  color: var(--pine);
}

.cookie-notice-accept {
  flex-shrink: 0;
  width: 100%;
  min-height: var(--hit-min);
  padding: 0 var(--sp-3);
  font-size: var(--fs-xs);
}

@media (min-width: 640px) {
  .cookie-notice-inner {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: var(--sp-2) var(--sp-3);
  }
  .cookie-notice-accept {
    width: auto;
  }
}

.shell { min-height: 100vh; min-height: 100dvh; }

.side {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2) var(--sp-4);
  padding: var(--sp-3) var(--sp-4);
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(14px);
}

.side-nav { display: flex; gap: var(--sp-1); flex-wrap: wrap; }

.side-nav a {
  color: var(--ink);
  text-decoration: none;
  min-height: var(--hit-min);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0 var(--sp-3);
  border-radius: var(--radius-control);
  font-weight: var(--fw-medium);
}

.side-nav a[aria-current="page"] {
  background: var(--pine-soft);
  color: var(--pine-deep);
  font-weight: var(--fw-semibold);
}

.side-nav-group {
  flex: 1 1 100%;
  min-width: 0;
  margin-top: var(--sp-2);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--line);
}

.side-nav-group-label {
  margin: 0 0 var(--sp-2);
  padding: 0 var(--sp-3);
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.side-nav-sub {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  min-width: 0;
}

.side-nav-sub a {
  color: var(--ink);
  text-decoration: none;
  min-height: var(--hit-min);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0 var(--sp-3) 0 22px;
  border-radius: var(--radius-control);
  font-size: var(--fs-base);
  font-weight: var(--fw-medium);
  border-left: 2px solid transparent;
}

.side-nav-sub a:hover { background: var(--pine-soft); }

.side-nav-sub a[aria-current="page"] {
  background: var(--pine-soft);
  color: var(--pine-deep);
  border-left-color: var(--pine);
  font-weight: var(--fw-semibold);
}

.admin-user-list.job-list--compact {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
  max-width: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--paper);
}

.admin-user-item {
  margin: 0;
  padding: 0;
  min-width: 0;
}

.admin-user-list .admin-user-row {
  cursor: default;
  text-decoration: none;
  color: inherit;
}

.admin-user-list .job-row-shell:hover .admin-user-row {
  background: var(--pine-soft);
}

.admin-user-test-account-form {
  margin: 0;
  display: contents;
}

.admin-pro-entitlements {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.admin-pro-entitlement {
  min-width: 0;
}

.admin-pro-entitlement-text {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  min-width: 0;
}

.admin-pro-entitlement-line {
  display: block;
  min-width: 0;
  line-height: var(--lh-tight);
}

.admin-user-pro {
  min-width: 0;
}

.admin-user-pro-empty {
  display: none;
}

.admin-pro-end-options {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  margin: 0;
}

.admin-pro-end-stripe-hint {
  margin: 0 0 0 calc(20px + var(--sp-2));
  font-size: var(--fs-xs);
  line-height: var(--lh-tight);
}

.admin-user-pro-end-confirm.banner,
.admin-user-pro-grant-confirm.banner {
  display: block;
  margin: 0;
  padding: var(--sp-2) var(--sp-3);
  font-size: var(--fs-sm);
}

.admin-user-pro-end-confirm.banner > p,
.admin-user-pro-grant-confirm.banner > p {
  margin: 0;
  font-weight: var(--fw-semibold);
}

@media (max-width: 639px) {
  .admin-user-pro-grant-confirm.banner > p {
    white-space: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

.admin-user-pro-end-confirm form,
.admin-user-pro-grant-confirm form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin-top: var(--sp-2);
}

.admin-user-pro-end-confirm .head-delete-confirm-actions,
.admin-user-pro-grant-confirm .head-delete-confirm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  align-items: center;
}

.admin-user-list.job-list--compact .job-row-actions .btn-icon.admin-user-pro-end-trigger:hover,
.admin-user-list.job-list--compact .job-row-actions .btn-icon.admin-user-pro-end-trigger:focus-visible {
  background: var(--danger);
  border-color: var(--danger);
  color: var(--paper);
}

.admin-user-list.job-list--compact .job-row-actions .btn-icon.admin-user-pro-end-trigger:hover .ico,
.admin-user-list.job-list--compact .job-row-actions .btn-icon.admin-user-pro-end-trigger:focus-visible .ico {
  color: var(--paper);
}

.admin-user-list.job-list--compact .job-row-actions .btn-icon.admin-user-role-active,
.admin-user-list.job-list--compact .job-row-actions .btn-icon.admin-user-test-account-active,
.admin-user-list.job-list--compact .job-row-actions .btn-icon.admin-user-agent-api-active,
.admin-user-list.job-list--compact .job-row-actions .btn-icon.admin-user-pro-grant-active {
  background: var(--pine-soft);
  border-color: var(--pine);
  color: var(--pine-deep);
}

.admin-user-list.job-list--compact .job-row-actions .btn-icon.admin-user-role-active .ico,
.admin-user-list.job-list--compact .job-row-actions .btn-icon.admin-user-test-account-active .ico,
.admin-user-list.job-list--compact .job-row-actions .btn-icon.admin-user-agent-api-active .ico,
.admin-user-list.job-list--compact .job-row-actions .btn-icon.admin-user-pro-grant-active .ico {
  stroke-width: 1.5px;
  color: var(--pine-deep);
}

.admin-user-list.job-list--compact .job-row-actions .btn-icon.admin-user-role-active:hover,
.admin-user-list.job-list--compact .job-row-actions .btn-icon.admin-user-test-account-active:hover,
.admin-user-list.job-list--compact .job-row-actions .btn-icon.admin-user-agent-api-active:hover,
.admin-user-list.job-list--compact .job-row-actions .btn-icon.admin-user-pro-grant-active:hover,
.admin-user-list.job-list--compact .job-row-actions .btn-icon.admin-user-role-active:focus-visible,
.admin-user-list.job-list--compact .job-row-actions .btn-icon.admin-user-test-account-active:focus-visible,
.admin-user-list.job-list--compact .job-row-actions .btn-icon.admin-user-agent-api-active:focus-visible,
.admin-user-list.job-list--compact .job-row-actions .btn-icon.admin-user-pro-grant-active:focus-visible {
  background: var(--pine);
  border-color: var(--pine);
  color: var(--paper);
}

.admin-user-list.job-list--compact .job-row-actions .btn-icon.admin-user-role-active:hover .ico,
.admin-user-list.job-list--compact .job-row-actions .btn-icon.admin-user-test-account-active:hover .ico,
.admin-user-list.job-list--compact .job-row-actions .btn-icon.admin-user-agent-api-active:hover .ico,
.admin-user-list.job-list--compact .job-row-actions .btn-icon.admin-user-pro-grant-active:hover .ico,
.admin-user-list.job-list--compact .job-row-actions .btn-icon.admin-user-role-active:focus-visible .ico,
.admin-user-list.job-list--compact .job-row-actions .btn-icon.admin-user-test-account-active:focus-visible .ico,
.admin-user-list.job-list--compact .job-row-actions .btn-icon.admin-user-agent-api-active:focus-visible .ico,
.admin-user-list.job-list--compact .job-row-actions .btn-icon.admin-user-pro-grant-active:focus-visible .ico {
  color: var(--paper);
}

.admin-user-list.job-list--compact .job-row-actions .btn-icon {
  position: relative;
  width: var(--row-btn);
  height: var(--row-btn);
  min-width: var(--row-btn);
  min-height: var(--row-btn);
  margin: 0;
  padding: 0;
}

.admin-user-list.job-list--compact .job-row-actions .btn-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--hit-min);
  height: var(--hit-min);
  transform: translate(-50%, -50%);
}

.admin-user-contact {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-list > .admin-user-list-head {
  display: none;
  margin: 0;
  list-style: none;
  border-bottom: 1px solid var(--line);
  box-sizing: border-box;
}

.admin-user-last-login {
  min-width: 0;
}

.admin-user-last-login-label::after {
  content: ":";
  margin-inline-end: var(--sp-1);
}

@media (min-width: 640px) {
  .admin-user-list {
    --admin-user-pad-x: var(--sp-3);
    --admin-user-actions-w: calc(9 * var(--row-btn) + 8 * var(--sp-1));
    --admin-user-data-cols:
      minmax(6rem, 0.85fr)
      minmax(0, 1.35fr)
      minmax(0, 1fr)
      minmax(0, 1.1fr)
      8rem;
    --admin-user-cols: var(--admin-user-data-cols) var(--admin-user-actions-w);
  }

  .admin-user-list > .admin-user-list-head {
    display: grid;
    grid-template-columns: var(--admin-user-cols);
    align-items: center;
    gap: 0 var(--sp-3);
    padding: var(--sp-2) var(--admin-user-pad-x);
    font-size: var(--fs-meta);
    color: var(--muted);
  }

  .admin-user-list-head-cell--name { grid-column: 1; }
  .admin-user-list-head-cell--contact { grid-column: 2; }
  .admin-user-list-head-cell--meta { grid-column: 3; }
  .admin-user-list-head-cell--pro { grid-column: 4; }
  .admin-user-list-head-cell--login {
    grid-column: 5;
    white-space: nowrap;
    text-align: end;
  }

  .admin-user-list-head-cell--actions {
    grid-column: 6;
  }

  .admin-user-list .job-row-shell {
    display: grid;
    grid-template-columns: var(--admin-user-cols);
    align-items: start;
    gap: var(--sp-1) var(--sp-3);
    padding-inline: var(--admin-user-pad-x);
  }

  .admin-user-list .admin-user-row {
    display: grid;
    grid-column: 1 / 6;
    align-items: start;
    gap: var(--sp-1) var(--sp-3);
  }

  .admin-user-list.job-list--compact .admin-user-row {
    padding-inline: 0;
    grid-template-columns: var(--admin-user-data-cols);
  }

  @supports (grid-template-columns: subgrid) {
    .admin-user-list.job-list--compact .admin-user-row {
      grid-template-columns: subgrid;
    }
  }

  .admin-user-list .admin-user-row .job-row-title {
    grid-column: 1;
    grid-row: 1;
    flex-direction: column;
    align-items: flex-start;
    flex-wrap: nowrap;
    row-gap: var(--sp-1);
  }

  .admin-user-list .admin-user-row .job-row-title-text {
    max-width: 100%;
  }

  .admin-user-list .admin-user-contact {
    grid-column: 2;
    grid-row: 1;
    font-size: var(--fs-list-compact);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .admin-user-list .admin-user-meta {
    grid-column: 3;
    grid-row: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .admin-user-list .admin-user-pro {
    grid-column: 4;
    grid-row: 1;
    font-size: var(--fs-list-compact);
    min-width: 0;
    overflow: hidden;
  }

  .admin-user-list .admin-user-last-login {
    grid-column: 5;
    grid-row: 1;
    min-width: 0;
    white-space: nowrap;
    font-size: var(--fs-list-compact);
    font-variant-numeric: tabular-nums;
    text-align: end;
    justify-self: end;
  }

  .admin-user-list .admin-user-last-login-label {
    display: none;
  }

  .admin-user-list .job-row-actions {
    grid-column: 6;
    grid-row: 1;
    flex-wrap: nowrap;
    justify-content: flex-end;
    align-content: center;
    width: var(--admin-user-actions-w);
    max-width: var(--admin-user-actions-w);
    padding: 0;
  }

  .admin-user-contact {
    display: flex;
    flex-direction: column;
    gap: var(--sp-1);
    min-width: 0;
  }

  .admin-user-email {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .admin-user-company {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .admin-user-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--sp-1) var(--sp-2);
  }

  .admin-user-locale-pill {
    display: inline-flex;
    align-items: center;
    padding: 0 var(--sp-2);
    border-radius: var(--radius-pill);
    border: 1px solid var(--line);
    font-size: var(--fs-xs);
    line-height: var(--lh-tight);
  }

  .admin-user-list.job-list--compact .job-row-actions .btn-icon.admin-user-agent-api-warn,
  .admin-user-list.job-list--compact .job-row-actions .btn-icon.admin-user-agent-api-warn:hover,
  .admin-user-list.job-list--compact .job-row-actions .btn-icon.admin-user-agent-api-warn:focus-visible {
    color: var(--danger);
  }

  .admin-user-list.job-list--compact .job-row-actions .btn-icon.admin-user-agent-api-warn .ico,
  .admin-user-list.job-list--compact .job-row-actions .btn-icon.admin-user-agent-api-warn:hover .ico,
  .admin-user-list.job-list--compact .job-row-actions .btn-icon.admin-user-agent-api-warn:focus-visible .ico {
    color: var(--danger);
  }
}

@media (max-width: 639px) {
  .admin-user-list .job-row-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0 var(--sp-1);
  }

  .admin-user-list .admin-user-row {
    grid-column: 1;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: repeat(5, auto);
    gap: var(--sp-1);
    align-items: start;
    min-width: 0;
  }

  .admin-user-list .admin-user-row .job-row-title {
    grid-column: 1;
    grid-row: 1;
  }

  .admin-user-list .admin-user-contact {
    grid-column: 1;
    grid-row: 2;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    word-break: break-word;
  }

  .admin-user-list .admin-user-meta {
    grid-column: 1;
    grid-row: 3;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
  }

  .admin-user-list .admin-user-pro {
    grid-column: 1;
    grid-row: 4;
  }

  .admin-user-list .admin-pro-entitlement-line {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .admin-user-list .admin-user-pro-empty {
    display: none;
  }

  .admin-user-list .admin-user-last-login {
    grid-column: 1;
    grid-row: 5;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--sp-1);
    font-size: var(--fs-sm);
    color: var(--muted);
    min-width: 0;
  }

  .admin-user-list .job-row-actions {
    grid-column: 2;
    grid-row: 1 / -1;
    align-self: start;
    flex-shrink: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: calc(4 * var(--row-btn) + 3 * var(--sp-1));
  }
}

.admin-user-item > .admin-user-delete-confirm,
.admin-user-item > .admin-user-revoke-confirm,
.admin-user-item > .admin-user-grant-confirm,
.admin-user-item > .admin-user-pro-end-confirm,
.admin-user-item > .admin-user-pro-grant-confirm,
.admin-user-item > .admin-user-recover-panel,
.admin-user-item > .admin-test-invoices,
.admin-user-item > .admin-test-invoice-delete-confirm,
.admin-user-item > .admin-test-invoices-delete-all {
  margin: 0;
  border-radius: 0;
  border-left: none;
  border-right: none;
  border-bottom: none;
}

.admin-user-item > .admin-user-pro-end-confirm,
.admin-user-item > .admin-user-pro-grant-confirm {
  border-top: 1px solid var(--line);
}

.admin-test-invoices {
  padding: var(--sp-2) var(--sp-3) var(--sp-3);
  border-top: 1px solid var(--line);
}

.admin-test-invoices-title {
  margin-bottom: var(--sp-2);
}

.admin-test-invoice-list {
  margin: 0 0 var(--sp-2);
}

.admin-test-invoice-row-shell,
.admin-user-list .admin-test-invoice-list .admin-test-invoice-row-shell {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  width: 100%;
  min-width: 0;
  padding-inline: 0;
  grid-template-columns: none;
}

.admin-user-list .admin-test-invoice-list .admin-test-invoice-actions {
  grid-column: auto;
  grid-row: auto;
  align-self: center;
  width: auto;
  max-width: none;
  flex: 0 0 auto;
}

.admin-test-invoice-row-shell .admin-test-invoice-row {
  flex: 1 1 auto;
  min-width: 0;
}

.admin-test-invoice-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: var(--sp-1) var(--sp-3);
  font-size: var(--fs-sm);
}

.admin-test-invoice-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  flex: 0 1 auto;
  min-width: 0;
}

.admin-test-invoice-id {
  font-weight: var(--fw-semibold);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow-wrap: anywhere;
}

.admin-test-invoice-head .invoice-status-badges {
  display: inline-flex;
  flex-wrap: wrap;
  gap: var(--sp-1);
  min-width: 0;
}

.admin-test-invoice-body {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--sp-3);
  flex: 1 1 0;
  min-width: 0;
}

.admin-test-invoice-customer {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}

.admin-test-invoice-customer:empty {
  display: none;
}

.admin-test-invoice-amount {
  flex-shrink: 0;
  margin-left: auto;
  font-weight: var(--fw-semibold);
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.admin-test-invoice-actions {
  flex-shrink: 0;
}

.admin-test-invoices-delete-all-trigger {
  margin-top: var(--sp-2);
}

@media (max-width: 639px) {
  .admin-test-invoice-row {
    flex-wrap: wrap;
    row-gap: var(--sp-1);
  }

  .admin-test-invoice-head,
  .admin-test-invoice-body {
    flex: 1 1 100%;
  }
  /* Trash hit area: .admin-user-list .btn-icon::after is var(--hit-min) square. */
}

.admin-test-invoices-delete-all label {
  display: block;
  margin: var(--sp-2) 0;
  font-size: var(--fs-sm);
}

.admin-test-invoices-delete-all input {
  display: block;
  width: 100%;
  max-width: var(--form-max);
  margin-top: var(--sp-1);
  box-sizing: border-box;
}

.admin-user-recover-title { margin: 0 0 var(--sp-2); font-size: var(--fs-base); }

.admin-user-recover-email-label { margin: 0 0 var(--sp-1); }

.admin-user-recover-email-value { margin: 0 0 var(--sp-2); font-weight: var(--fw-semibold); }

.admin-user-recover-table-wrap { overflow-x: auto; margin: var(--sp-2) 0; }

.admin-user-recover-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }

.admin-user-recover-table th,
.admin-user-recover-table td { padding: var(--sp-1) var(--sp-2); text-align: left; border-bottom: 1px solid var(--line); }

.admin-user-recover-form { display: flex; flex-direction: column; gap: var(--sp-2); margin-top: var(--sp-3); max-width: var(--form-max); }

.admin-user-recover-password { margin: 0; }

.admin-user-recover-password input { width: 100%; max-width: var(--form-max); box-sizing: border-box; }

.admin-user-recover-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  width: 100%;
  max-width: none;
}

.admin-user-recover-actions .admin-user-recover-cancel { margin-left: auto; }

.admin-user-locked-pill {
  display: inline-block;
  margin-left: var(--sp-1);
  padding: 0 var(--sp-2);
  font-size: var(--fs-xs);
  border-radius: var(--radius-pill);
  background: var(--amber-soft);
  color: var(--amber-deep);
}

.side-running { flex: 1 1 100%; min-width: 0; margin: var(--sp-1) 0 0; }

.side-running-link,
.sheet-running-link {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
  min-height: var(--hit-min);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-control);
  color: var(--ink);
  text-decoration: none;
  font-weight: var(--fw-semibold);
  min-width: 0;
  max-width: 100%;
  border-left: 3px solid transparent;
}

.side-running-link.timer-state--run,
.sheet-running-link.timer-state--run {
  background: var(--timer-run-bg);
  border-left-color: var(--timer-run);
}

.side-running-link.timer-state--pause,
.sheet-running-link.timer-state--pause {
  background: var(--timer-pause-bg);
  border-left-color: var(--timer-pause);
}

.side-running-link:hover,
.sheet-running-link:hover {
  filter: brightness(0.98);
}

.side-running-link[aria-current="page"] { box-shadow: inset 0 0 0 1px var(--line); }

.side-running-dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  margin-top: 0.35em;
  border-radius: 50%;
}

.side-running-paused-label {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
}

.side-running-title--paused {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
  color: var(--muted);
}

.side-running-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
}

.side-running-title {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: var(--fs-xs);
  line-height: var(--lh-tight);
}

.side-elapsed {
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
  color: var(--ink);
}

.side-foot {
  margin-left: auto;
  gap: var(--sp-2);
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.side-foot-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
}

.side-foot-row form { margin: 0; }

.side-foot form { margin: 0; }

.side-foot .lang,
.sheet-foot .lang { gap: var(--sp-2); }

.side-foot .lang a,
.sheet-foot .lang a {
  min-width: 0;
  min-height: auto;
  padding: 0;
  font-size: var(--fs-sm);
  font-weight: var(--fw-normal);
  color: var(--muted);
  text-decoration: none;
}

@media (max-width: 699.98px) {
  .sheet-foot .lang a {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: var(--hit-min);
    min-height: var(--hit-min);
  }

  .sheet-foot .lang a::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: var(--hit-min);
    height: var(--hit-min);
    transform: translate(-50%, -50%);
  }
}

.side-foot .lang a[aria-current="true"],
.sheet-foot .lang a[aria-current="true"] {
  color: var(--ink);
  text-decoration: none;
  box-shadow: inset 0 -2px 0 var(--pine);
}

.side-foot .btn {
  min-height: var(--btn-h-xs);
  padding: 0 var(--sp-2);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  border-radius: var(--radius-btn);
  gap: var(--sp-2);
}

.side-foot .btn .ico { width: 1.05rem; height: 1.05rem; }

.side-foot .side-logout-link,
.sheet-foot .sheet-logout-link {
  width: auto;
  min-height: auto;
  padding: 0;
  border: 0;
  box-shadow: 0;
  background: transparent;
  color: var(--muted);
  font-weight: var(--fw-semibold);
  justify-content: flex-start;
}

.side-foot .side-logout-link:hover,
.sheet-foot .sheet-logout-link:hover {
  color: var(--ink);
  border-color: transparent;
  box-shadow: 0;
}

.main {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding: var(--sp-5) max(var(--sp-4), env(safe-area-inset-right)) calc(96px + env(safe-area-inset-bottom)) max(var(--sp-4), env(safe-area-inset-left));
  box-sizing: border-box;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
  margin-bottom: var(--sp-2);
  min-width: 0;
  width: 100%;
}

.page-header h1 {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}

.page-header-title {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
}

.page-header-title h1 { margin: 0; }

.page-header-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-shrink: 0;
}

.page-header-actions .btn,
.page-header-actions > a.btn {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  font-size: var(--fs-btn-toolbar);
}

.page-header .btn-primary {
  font-size: var(--fs-btn-toolbar);
}

.page-header-meta { margin: 0 0 var(--sp-2); }

.news-app-banner {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  box-sizing: border-box;
  max-width: 100%;
  min-width: 0;
  min-height: var(--hit-min);
  margin: 0 0 var(--sp-4);
  padding: calc(var(--sp-2) + 6px) calc(var(--sp-3) + 6px);
  background: var(--pine-soft);
  border: 0;
  border-radius: var(--radius-control);
  overflow-x: clip;
}

@keyframes news-badge-pulse {
  0% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--pine-deep) 45%, transparent);
  }
  100% {
    box-shadow: 0 0 0 6px transparent;
  }
}

.news-app-banner .badge-news {
  background: var(--pine-deep);
  color: #fff;
  animation: news-badge-pulse 1.2s ease-out 2;
}

@media (prefers-reduced-motion: reduce) {
  .news-app-banner .badge-news {
    animation: none;
  }
}

.news-app-banner__content {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2) var(--sp-3);
  min-width: 0;
}

.news-app-banner__title {
  flex: 1 1 8rem;
  min-width: 0;
  margin: 0;
  font-weight: var(--fw-normal);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

@media (max-width: 639px) {
  .news-app-banner {
    flex-wrap: nowrap;
    gap: var(--sp-1);
    min-height: 0;
    margin: 0 0 var(--sp-2);
    padding: var(--sp-1) var(--sp-1) var(--sp-1) var(--sp-2);
    font-size: var(--fs-sm);
    line-height: var(--lh-tight);
    overflow: visible;
  }

  .news-app-banner__content {
    flex-wrap: nowrap;
    gap: var(--sp-2);
  }

  .news-app-banner__title {
    flex: 1 1 0;
  }

  .news-app-banner__read {
    font-size: var(--fs-sm);
  }

  .news-app-banner__close {
    min-width: 2rem;
    min-height: 2rem;
  }
}

.news-app-banner__form { margin: 0; flex-shrink: 0; }

.news-app-banner__read {
  min-height: var(--hit-min);
  padding: 0 var(--sp-1);
  white-space: nowrap;
}

.page-header-back { margin: 0 0 var(--sp-1); }

.news-app-banner__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--hit-min);
  min-height: var(--hit-min);
  padding: 0;
  border: 0;
  border-radius: var(--radius-control);
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .news-app-banner {
    flex-wrap: nowrap;
    min-height: var(--control-h);
    padding-block: var(--sp-1);
    padding-inline: var(--sp-4);
    overflow: visible;
  }

  .news-app-banner__content {
    flex-wrap: nowrap;
  }

  .news-app-banner__title {
    display: block;
    -webkit-line-clamp: unset;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
  }

}

.news-app-banner__read,
.news-app-banner__close {
  position: relative;
}

.news-app-banner__read {
  min-height: 0;
}

.news-app-banner__read::before,
.news-app-banner__close::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(100%, var(--hit-min));
  height: var(--hit-min);
  transform: translate(-50%, -50%);
}

@media (min-width: 640px) {
  .news-app-banner__close {
    min-height: 0;
  }
}

.page-header-back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  min-height: var(--hit-min);
  padding: var(--sp-1) 0;
  font-size: var(--fs-sm);
  color: inherit;
  text-decoration: none;
}

.page-header-back-link .ico {
  font-size: var(--ico-header);
  width: var(--ico-header);
  height: var(--ico-header);
}

.page-header-actions .btn .ico,
.page-header-actions > a.btn .ico {
  font-size: var(--ico-header);
  width: var(--ico-header);
  height: var(--ico-header);
}

.page-head {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-3);
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: var(--sp-3);
  min-width: 0;
}

.page-head > div { flex: 1 1 auto; min-width: 0; }

.page-head > h1 { flex: 1 1 auto; min-width: 0; margin: 0; }

.page-head h1 { margin: 0; }

.page-head .btn,
.page-head > a.btn { flex: 0 1 auto; max-width: 100%; }

.title-row { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; min-width: 0; width: 100%; }

.title-row h1 { margin: 0; flex: 1 1 auto; min-width: 0; }

.title-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex-shrink: 0;
}

.title-actions form { margin: 0; display: contents; }

.title-actions .share-head-slot,
.project-mobile-actions .share-head-slot { display: contents; }

.sample-star.is-on { color: var(--blue-deep); }

.title-actions .btn {
  flex-shrink: 0;
  width: var(--btn-h);
  height: var(--btn-h);
  min-width: var(--btn-h);
  min-height: var(--btn-h);
  padding: 0;
  border-radius: var(--radius-btn);
  justify-content: center;
}

.title-actions .btn .ico {
  width: var(--ico-title-action);
  height: var(--ico-title-action);
  font-size: var(--ico-title-action);
  margin: 0;
}

.title-actions .btn-ghost {
  box-shadow: var(--shadow-card);
}

.title-actions .btn-ghost:hover {
  box-shadow: var(--shadow-card);
}

.project-head-block { width: 100%; min-width: 0; }

.head-delete-confirm:not(:target) { display: none; }

.head-delete-confirm { margin-top: var(--sp-3); }

.head-delete-confirm:target { scroll-margin-top: 5rem; }

.head-delete-confirm.is-dismissed { display: none !important; }

.head-delete-confirm .head-delete-confirm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1);
  align-items: center;
}

.head-delete-confirm--inline.banner {
  gap: var(--sp-1) var(--sp-2);
  padding: var(--sp-1) var(--sp-2);
  margin: var(--sp-2) 0 0;
}

.head-delete-confirm--inline form {
  margin: 0;
  flex: 0 0 auto;
}

.head-delete-confirm--inline > p {
  font-size: var(--fs-sm);
}

.head-delete-confirm--inline .head-delete-confirm-actions .btn-danger,
.head-delete-confirm .head-delete-confirm-actions .btn-danger,
.head-delete-confirm > form > .btn-danger.btn-small,
.head-delete-confirm > .btn-danger.btn-small[type="submit"] {
  background: var(--danger);
  border-color: var(--danger);
  color: var(--paper);
  box-shadow: var(--shadow-control);
}

.head-delete-confirm--inline .head-delete-confirm-actions .btn-danger:hover,
.head-delete-confirm .head-delete-confirm-actions .btn-danger:hover,
.head-delete-confirm > form > .btn-danger.btn-small:hover,
.head-delete-confirm > .btn-danger.btn-small[type="submit"]:hover {
  background: color-mix(in srgb, var(--danger) 88%, #000);
  border-color: color-mix(in srgb, var(--danger) 88%, #000);
  color: var(--paper);
}

.head-delete-confirm--inline .head-delete-confirm-actions .btn-danger:focus-visible,
.head-delete-confirm .head-delete-confirm-actions .btn-danger:focus-visible,
.head-delete-confirm > form > .btn-danger.btn-small:focus-visible,
.head-delete-confirm > .btn-danger.btn-small[type="submit"]:focus-visible {
  outline: 2px solid var(--pine);
  outline-offset: 2px;
}

.list-with-actions-item .head-delete-confirm { margin-top: var(--sp-2); }

.list-with-actions-item .head-delete-confirm:target { scroll-margin-top: 5rem; }

.back { color: var(--muted); text-decoration: none; display: inline-flex; min-height: var(--hit-min); align-items: center; }

.card, .subcard {
  --card-pad-block: var(--pad-card-loose);
  --card-pad-inline: var(--pad-card-loose);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: var(--pad-card-loose);
  margin: var(--space-section) 0;
  box-shadow: var(--shadow-card);
}

.empty {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: var(--pad-card-loose);
  margin: var(--space-section) 0;
  box-shadow: var(--shadow-card);
  text-align: left;
}

.card-compact {
  --card-pad-block: var(--pad-card-block);
  --card-pad-inline: var(--pad-card-inline);
  padding: var(--pad-card);
  margin: var(--space-section) 0;
  box-shadow: var(--shadow-card);
}

.card-compact h2 {
  font-size: var(--fs-lg);
  margin: 0 0 var(--sp-2);
}

.section-head-tight { margin: 0 0 var(--sp-2); }

.section-head-tight h2 { margin: 0 0 var(--sp-1); }

.section-head-tight .tiny { margin: 0; }

.toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  min-width: 0;
}

.toolbar-row .check {
  margin: 0;
  flex: 0 0 auto;
}

.toolbar-row label:not(.check) {
  flex: 1 1 8rem;
  min-width: 0;
  margin: 0;
  font-size: var(--fs-sm);
}

.toolbar-row label:not(.check) input {
  min-height: 36px;
  padding: var(--sp-2) var(--sp-3);
}

.invoiced-form:not(:has(input[name="invoiced"]:checked)) .invoiced-ref-wrap {
  display: none;
}

.invoiced-ref-wrap {
  flex: 1 1 10rem;
  min-width: 0;
}

.project-settings-form {
  display: grid;
  gap: var(--sp-3);
}

.project-settings-rows {
  margin: 0;
}

.project-foot-settings {
  container-type: inline-size;
  container-name: project-foot-settings;
}

.project-setting-row {
  padding: var(--sp-2) 0;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.project-setting-row:first-child {
  padding-top: 0;
}

.project-setting-row--invoiced:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.project-setting-control {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: var(--sp-2);
  min-width: 0;
  width: auto;
}

@media (min-width: 640px) {
  .project-setting-control {
    justify-content: flex-end;
    min-width: 11rem;
  }
}

.project-foot-settings .project-setting-control--invoiced .invoiced-ref-wrap {
  flex: none;
  width: 100%;
  min-width: 0;
  margin: 0;
}

@media (min-width: 640px) {
  .project-foot-settings .project-setting-control--invoiced .invoiced-ref-wrap {
    flex: 1 1 100%;
  }
}

.project-setting-check {
  margin: 0;
}

.project-settings-feedback {
  flex: 0 0 auto;
}

[data-autosave-feedback-inline] > .project-settings-feedback,
[data-autosave-feedback-inline] .project-settings-feedback {
  grid-column: 1 / -1;
}

.autosave-flash {
  transition: background-color 1s ease, border-color 1s ease;
}

body .autosave-flash.autosave-flash-ok {
  background-color: var(--pine-soft) !important;
  border-color: var(--pine) !important;
}

body .autosave-flash.autosave-flash-error {
  background-color: var(--danger-soft) !important;
  border-color: var(--danger) !important;
}

.project-settings-feedback--error {
  color: var(--danger);
}

label.autosave-flash {
  border-radius: var(--radius-control);
}

.project-foot-settings .project-settings-form {
  gap: 0;
}

@container project-foot-settings (max-width: 28rem) {
  .project-setting-row {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .project-setting-control {
    width: 100%;
    min-width: 0;
    justify-content: flex-start;
  }
}

.project-foot-settings .project-setting-row {
  flex-direction: row;
  align-items: center;
  gap: var(--sp-2);
}

.project-foot-settings .admin-setting-label {
  flex: 1 1 auto;
  min-width: 0;
}

.project-foot-settings .project-setting-control {
  width: auto;
  min-width: 0;
  justify-content: flex-start;
}

@media (min-width: 640px) {
  .project-foot-settings .project-setting-control {
    justify-content: flex-end;
    min-width: 11rem;
  }
}

.project-foot-settings .project-setting-row--invoiced:has(input[name="invoiced"]:checked) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--sp-2);
}

.project-foot-settings .project-setting-row--invoiced:has(input[name="invoiced"]:checked) .project-setting-control--invoiced {
  display: contents;
}

.project-foot-settings .project-setting-row--invoiced:has(input[name="invoiced"]:checked) .project-setting-check {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
}

.project-foot-settings .project-setting-row--invoiced:has(input[name="invoiced"]:checked) .invoiced-ref-wrap {
  grid-column: 1 / -1;
  grid-row: 2;
  width: 100%;
  flex: none;
}

.parts-card {
  container-type: inline-size;
  container-name: parts-card;
}

.parts-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-2);
  margin: calc(-1 * var(--card-pad-block)) calc(-1 * var(--card-pad-inline)) var(--sp-3);
  padding: var(--sp-3) var(--card-pad-inline);
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius-card-inner) var(--radius-card-inner) 0 0;
}

.parts-head-title {
  flex: 1 1 12rem;
  min-width: 0;
}

.parts-head-title h2 {
  margin: 0 0 4px;
}

.parts-head .parts-lead {
  margin: 0;
}

.parts-vat-control {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
}

.parts-vat-label {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin: 0;
  font-size: var(--fs-sm);
}

.parts-vat-label-text {
  color: var(--muted);
  white-space: nowrap;
}

.parts-vat-select {
  --parts-vat-select-w: 16ch;
  width: var(--parts-vat-select-w);
  min-width: var(--parts-vat-select-w);
  max-width: 100%;
  height: var(--control-h-sm);
  min-height: var(--control-h-sm);
  font-size: var(--fs-xs);
  padding-inline: var(--sp-2);
  margin: 0;
}

@container parts-card (max-width: 28rem) {
  .parts-head {
    flex-direction: column;
    align-items: stretch;
  }
  .parts-vat-control {
    width: 100%;
  }
  .parts-vat-select {
    width: 100%;
  }
}

.share-toolbar-title {
  margin: 0;
  flex: 0 0 auto;
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
}

.share-toolbar form {
  margin: 0;
  flex: 0 0 auto;
}

.share-toolbar-link {
  flex: 1 1 12rem;
  min-width: 0;
  margin: 0;
}

.share-toolbar-status {
  flex: 1 1 8rem;
  min-width: 0;
  margin: 0;
}

.share-toolbar-link input {
  min-height: var(--btn-h-sm);
  padding: var(--sp-2) var(--sp-3);
}

.timer-toolbar-title {
  margin: 0;
  flex: 0 0 auto;
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
}

.timer-toolbar form { margin: 0; flex: 0 0 auto; }

.timer-toolbar-meta { margin: 0; flex: 1 1 0; min-width: 0; overflow: hidden; }

.project-foot-compact {
  --project-foot-single-btn-min: 17ch;
  display: block;
  margin: var(--space-section) 0;
}

.project-foot-compact > .card-compact {
  margin-top: 0;
  margin-bottom: 0;
}

.project-foot-compact > .card-compact + .project-foot-settings,
.project-foot-compact > .project-foot-actions + .project-foot-settings {
  margin-top: var(--sp-2);
}

.parts-lead { margin: 0 0 var(--sp-3); }

.parts-add-form { display: grid; gap: var(--sp-2); margin-bottom: var(--sp-3); min-width: 0; }

.parts-add-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  align-items: center;
  min-width: 0;
}

.parts-add-new-item-fields {
  display: none;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: var(--sp-2);
  align-items: center;
  min-width: 0;
}

.parts-add-form.parts-add-form--new-item .parts-add-new-item-fields {
  display: flex;
}

.parts-add-catalog-confirm {
  display: none;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: var(--sp-2);
  align-items: center;
  min-width: 0;
}

.parts-add-form.parts-add-form--catalog-picked .parts-add-catalog-confirm:not([hidden]) {
  display: flex;
}

.parts-add-new-item-fields .parts-add-qty,
.parts-add-new-item-fields .parts-add-sale-price,
.parts-add-catalog-confirm .parts-add-qty,
.parts-add-catalog-confirm .parts-add-sale-price {
  min-height: var(--control-h-sm);
  height: var(--control-h-sm);
  box-sizing: border-box;
  margin: 0;
}

.parts-add-new-item-fields .parts-add-qty,
.parts-add-catalog-confirm .parts-add-qty {
  width: 5.5rem;
  max-width: 100%;
  text-align: right;
}

.parts-add-new-item-fields .parts-add-sale-price,
.parts-add-catalog-confirm .parts-add-sale-price {
  width: 10ch;
  min-width: 10ch;
  max-width: 100%;
  text-align: right;
}

.parts-card .parts-add-form--catalog-picked .parts-add-catalog-confirm,
.parts-card-embedded .parts-add-form--catalog-picked .parts-add-catalog-confirm,
.parts-card .parts-add-form--new-item .parts-add-new-item-fields,
.parts-card-embedded .parts-add-form--new-item .parts-add-new-item-fields {
  flex: 0 0 auto;
  flex-wrap: nowrap;
}

.parts-card-embedded .parts-add-form--catalog-picked .parts-add-catalog-confirm,
.parts-card-embedded .parts-add-form--new-item .parts-add-new-item-fields {
  flex: 0 1 auto;
}

.mobile-sheet-form.parts-add-form .parts-add-catalog-confirm {
  display: none;
  flex-direction: column;
  align-items: stretch;
  gap: var(--sp-2);
  width: 100%;
  margin-bottom: var(--sp-2);
}

.mobile-sheet-form.parts-add-form .parts-add-catalog-confirm:not([hidden]) {
  display: flex;
}

.mobile-sheet-form.parts-add-form .parts-add-catalog-confirm label {
  margin-bottom: 0;
}

.mobile-sheet-form.parts-add-form .parts-add-catalog-confirm input {
  width: 100%;
  min-height: var(--hit-min);
  margin-top: var(--sp-1);
}

.mobile-sheet-form.parts-add-form .parts-add-new-item-fields {
  display: none;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  margin-bottom: 0;
}

.mobile-sheet-form.parts-add-form.parts-add-form--new-item .parts-add-new-item-fields {
  display: flex;
}

.mobile-sheet-form.parts-add-form .parts-add-new-item-fields label {
  margin-bottom: var(--sp-2);
}

.mobile-sheet-form.parts-add-form .parts-add-new-item-fields input {
  width: 100%;
  margin-top: var(--sp-1);
}

.parts-add-inline-field {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-1);
  min-width: 0;
}

.parts-add-inline-field > .catalog-combo {
  flex: 1 1 0;
  width: 100%;
  min-width: 0;
}

.parts-add-inline-field.parts-add-warehouse {
  flex: 0 1 auto;
  max-width: min(12rem, 100%);
}

.parts-add-field-label--spacer {
  display: none;
}

.parts-vat-control--inline {
  flex: 0 0 auto;
}

.parts-vat-control--inline .parts-vat-select {
  --parts-vat-select-w: 12ch;
}

.parts-add-row > .catalog-combo {
  flex: 1 1 12rem;
  min-width: 0;
}

.parts-add-row > .parts-add-inline-field:has(> .catalog-combo) {
  flex: 1 1 12rem;
  min-width: 0;
}

.parts-add-row > .catalog-combo input {
  width: 100%;
  min-height: var(--control-h-sm);
  margin: 0;
}

.parts-card .parts-add-warehouse,
.parts-card-embedded .parts-add-warehouse,
.parts-card .parts-add-qty-label,
.parts-card-embedded .parts-add-qty-label,
.parts-card .parts-add-sale-label,
.parts-card-embedded .parts-add-sale-label {
  margin: 0;
}

.parts-add-warehouse {
  flex: 0 1 auto;
  min-width: 0;
  max-width: min(12rem, 100%);
}

.parts-add-warehouse select {
  min-height: var(--control-h-sm);
  width: 100%;
  max-width: 100%;
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.parts-add-warehouse-hint {
  display: block;
  margin-top: var(--sp-1);
  max-width: 18rem;
}

.parts-add-warehouse-hint.value-summary-strip {
  max-width: none;
  width: 100%;
  box-sizing: border-box;
}

.parts-card .parts-add-field-label,
.parts-card-embedded .parts-add-field-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.parts-add-sale-field {
  position: relative;
  display: block;
  width: 10ch;
  min-width: 10ch;
  max-width: 100%;
  flex-shrink: 0;
}

.parts-add-sale-field .parts-add-sale-price {
  width: 100%;
  margin: 0;
}

.parts-add-sale-suffix {
  position: absolute;
  inset-inline-end: var(--sp-2);
  top: 0;
  height: var(--control-h-sm);
  display: flex;
  align-items: center;
  color: var(--muted);
  font-size: var(--fs-sm);
  font-weight: var(--fw-normal);
  pointer-events: none;
}

.line-editor--parts .invoice-cell-price .parts-add-sale-field,
.parts-line-edit-price .parts-add-sale-field {
  width: 100%;
  min-width: 11ch;
  max-width: 12rem;
}

.line-editor--parts .invoice-cell-price .parts-add-sale-field .invoice-input-price,
.parts-line-edit-price .parts-add-sale-field input {
  width: 100%;
  padding-inline-end: 1.75em;
}

.line-editor--parts .invoice-cell-price .parts-add-sale-suffix,
.parts-line-edit-price .parts-add-sale-suffix {
  height: 100%;
}

.mobile-sheet-form.parts-add-form .parts-add-warehouse-hint {
  margin-top: var(--sp-1);
  max-width: none;
}

.parts-add-results { margin: 0; }

.parts-add-results:not([hidden]) { display: grid; }

.result-add { color: var(--pine-deep); font-weight: var(--fw-semibold); }

.parts-add-meta-panel { margin: 0; font-size: var(--fs-sm); }

.parts-add-form--new-item .parts-add-meta-panel:not([hidden]) {
  display: block;
}

.parts-add-meta-panel-body {
  display: grid;
  gap: var(--sp-2);
  margin-top: var(--sp-2);
  padding-top: var(--sp-2);
  border-top: 1px solid var(--line);
}

.parts-add-meta-panel-body .split { gap: var(--sp-2); }

.catalog-meta-fields {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: var(--sp-2);
  align-items: start;
}

.catalog-meta-field {
  display: grid;
  gap: var(--sp-1);
  margin: 0;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
}

.catalog-meta-field input,
.catalog-meta-field select {
  min-height: var(--control-h-sm);
  font-size: var(--fs-input);
}

.catalog-meta-field--unit { grid-column: 1; }

.catalog-meta-field--category { grid-column: 2; }

.catalog-meta-field--ean { grid-column: 1 / -1; }

.catalog-meta-ean-help { margin: 0; }

.parts-name-line {
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
  min-width: 0;
}

.parts-name-text {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
}

.parts-name-meta {
  flex: 0 0 auto;
  font-size: var(--fs-xs);
  color: var(--muted);
  line-height: var(--lh-tight);
  white-space: nowrap;
}

:is(.line-editor--parts, .line-editor--stock) .invoice-lines-table {
  font-size: var(--fs-sm);
}

:is(.line-editor--parts, .line-editor--stock) .invoice-cell-line-total,
:is(.line-editor--parts, .line-editor--stock) .invoice-line-total,
:is(.line-editor--parts, .line-editor--stock) .invoice-lines-total td {
  font-size: var(--fs-sm);
}

.parts-add-catalog-confirm .parts-add-qty,
.parts-add-catalog-confirm .parts-add-catalog-qty,
.parts-add-new-item-fields .parts-add-qty,
.parts-add-new-item-fields .parts-add-sale-price {
  max-width: 100%;
  min-height: var(--control-h-sm);
  margin: 0;
  font-weight: var(--fw-normal);
  text-align: right;
  box-sizing: border-box;
}

.parts-add-new-item-fields .parts-add-qty,
.parts-add-catalog-confirm .parts-add-catalog-qty {
  width: 5.5rem;
}

.parts-add-new-item-fields .parts-add-sale-price,
.parts-add-catalog-confirm .parts-add-catalog-sale-price {
  width: 10ch;
  min-width: 10ch;
}

:is(.line-editor--parts, .line-editor--stock) .invoice-cell-desc {
  min-width: 0;
}

.parts-vat-select,
.parts-add-row input,
.parts-add-row select,
.parts-add-submit {
  min-height: var(--control-h-sm);
  box-sizing: border-box;
}

.parts-add-submit {
  flex-shrink: 0;
}

.parts-add-form:has(.parts-add-results:not([hidden]) .catalog-combo-create) button[type="submit"] {
  visibility: hidden;
  pointer-events: none;
}

:is(.line-editor--parts, .line-editor--stock) .invoice-cell-actions {
  width: calc(var(--row-btn) + var(--sp-2));
  text-align: right;
  padding-right: var(--sp-1);
}

.line-editor--parts .invoice-cell-actions {
  width: auto;
  min-width: calc(2 * var(--hit-min));
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: calc(var(--hit-min) - var(--row-btn));
}

:is(.line-editor--parts, .line-editor--stock) .parts-line-delete-trigger,
.line-editor--parts .parts-line-edit {
  margin: 0;
  width: var(--row-btn);
  height: var(--row-btn);
  min-width: var(--row-btn);
  min-height: var(--row-btn);
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-btn);
  background: transparent;
  transition: var(--btn-transition);
}

.parts-line-delete-trigger .ico,
.parts-line-edit .ico {
  font-size: var(--row-icon);
  width: var(--row-icon);
  height: var(--row-icon);
  line-height: 1;
}

.parts-line-delete-trigger:hover,
.parts-line-edit:hover {
  background: var(--pine-soft);
  border-color: transparent;
}

.parts-line-delete-trigger:focus-visible,
.parts-line-edit:focus-visible {
  background: var(--pine-soft);
  border-color: transparent;
  outline: 2px solid var(--pine);
  outline-offset: 2px;
}

.parts-hit {
  position: relative;
}

.parts-hit::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--hit-min);
  height: var(--hit-min);
  transform: translate(-50%, -50%);
}

:is(.line-editor--parts, .line-editor--stock) .invoice-lines-total td {
  border-bottom: 0;
  font-weight: var(--fw-semibold);
}

.line-editor--stock .invoice-lines-total td {
  padding-top: var(--sp-3);
}

.line-editor--parts .invoice-lines-total td.num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  overflow-wrap: normal;
}

@media (min-width: 640px) {
  .parts-card .parts-add-catalog-summary,
  .parts-card-embedded .parts-add-catalog-summary {
    display: none;
  }
}

@media (min-width: 640px) {
  .parts-card .parts-add-row > .catalog-combo input,
  .parts-card-embedded .parts-add-row > .catalog-combo input,
  .parts-card .parts-add-warehouse select,
  .parts-card-embedded .parts-add-warehouse select,
  .parts-card .parts-add-submit,
  .parts-card-embedded .parts-add-submit {
    height: var(--control-h-sm);
    min-height: var(--control-h-sm);
    box-sizing: border-box;
    border-radius: var(--radius-control);
    font-size: var(--fs-input);
  }

  .parts-card .parts-vat-select,
  .parts-card-embedded .parts-vat-select {
    height: var(--control-h-sm);
    min-height: var(--control-h-sm);
    box-sizing: border-box;
    border-radius: var(--radius-control);
    font-size: var(--fs-xs);
  }

  .parts-card .parts-add-row > .catalog-combo input,
  .parts-card-embedded .parts-add-row > .catalog-combo input,
  .parts-card .parts-add-warehouse select,
  .parts-card-embedded .parts-add-warehouse select,
  .parts-card .parts-add-qty,
  .parts-card-embedded .parts-add-qty,
  .parts-card .parts-add-sale-price,
  .parts-card-embedded .parts-add-sale-price {
    border-radius: var(--radius-control);
    font-size: var(--fs-input);
    font-weight: var(--fw-normal);
    padding-block: 0;
  }

  .parts-card .parts-vat-select.parts-hit::after,
  .parts-card-embedded .parts-vat-select.parts-hit::after,
  .parts-card .parts-add-submit.parts-hit::after,
  .parts-card-embedded .parts-add-submit.parts-hit::after,
  .parts-card .parts-save-btn.parts-hit::after,
  .parts-card-embedded .parts-save-btn.parts-hit::after {
    inset: 0;
    left: auto;
    top: auto;
    width: auto;
    height: auto;
    transform: none;
  }

  .parts-vat-select {
    height: var(--control-h-sm);
    min-height: var(--control-h-sm);
  }

  :is(.line-editor--parts, .line-editor--stock) .invoice-lines-table .parts-hit::after {
    inset: calc((var(--row-h-compact) - var(--hit-min)) / 2 * -1);
    left: auto;
    top: auto;
    width: auto;
    height: auto;
    transform: none;
  }

  :is(.line-editor--parts, .line-editor--stock) .invoice-line-remove.parts-hit::after,
  :is(.line-editor--parts, .line-editor--stock) .parts-line-delete-trigger.parts-hit::after,
  .line-editor--parts .parts-line-edit.parts-hit::after {
    inset: auto;
    left: 50%;
    top: 50%;
    width: var(--hit-min);
    height: var(--hit-min);
    transform: translate(-50%, -50%);
  }

  .line-editor--stock .invoice-lines-table .stock-history-toggle.parts-hit {
    width: var(--row-btn);
    height: var(--row-btn);
    min-width: var(--row-btn);
    max-width: var(--row-btn);
    min-height: var(--row-btn);
    max-height: var(--row-btn);
  }

  .line-editor--stock .invoice-lines-table .stock-history-toggle.parts-hit::after {
    inset: auto;
    left: 50%;
    top: 50%;
    width: var(--hit-min);
    height: var(--hit-min);
    transform: translate(-50%, -50%);
  }

  .parts-card .parts-add-warehouse-hint,
  .parts-card-embedded .parts-add-warehouse-hint {
    max-width: none;
    margin-top: 0;
  }

  .parts-card .parts-add-field-label,
  .parts-card-embedded .parts-add-field-label {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: nowrap;
    font-size: var(--fs-meta);
    font-weight: var(--fw-normal);
    color: var(--muted);
    line-height: var(--lh-tight);
  }

  .parts-card-embedded .parts-add-submit-field .parts-add-field-label--spacer {
    display: block;
    visibility: hidden;
    min-height: var(--lh-tight);
    font-size: var(--fs-meta);
    line-height: var(--lh-tight);
  }

  .parts-card-embedded .parts-add-row {
    align-items: flex-end;
  }

  .parts-card-embedded .parts-add-new-item-fields,
  .parts-card-embedded .parts-add-catalog-confirm {
    align-items: flex-end;
  }

  .parts-card-embedded .parts-add-inline-field .catalog-combo input,
  .parts-card-embedded .parts-add-warehouse select,
  .parts-card-embedded .parts-add-qty,
  .parts-card-embedded .parts-add-sale-price,
  .parts-card-embedded .parts-vat-select,
  .parts-card-embedded .parts-add-submit {
    height: var(--control-h-sm);
    min-height: var(--control-h-sm);
    box-sizing: border-box;
    margin: 0;
    line-height: var(--lh-tight);
  }

  .parts-card .parts-add-qty-label,
  .parts-card-embedded .parts-add-qty-label,
  .parts-card .parts-add-sale-label,
  .parts-card-embedded .parts-add-sale-label {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-1);
    margin: 0;
    width: max-content;
    max-width: 100%;
    flex-shrink: 0;
  }

  .parts-card .parts-add-sale-field .parts-add-sale-price,
  .parts-card-embedded .parts-add-sale-field .parts-add-sale-price {
    padding-inline-end: 1.75em;
    text-align: right;
  }
}

@media (min-width: 640px) and (max-width: 899px) {
  .parts-card .parts-add-row,
  .parts-card-embedded .parts-add-row {
    display: grid;
    gap: var(--sp-2);
  }

  .parts-card .parts-add-row {
    align-items: center;
    grid-template-columns: minmax(12ch, 28rem) minmax(0, max-content) auto auto auto;
    grid-template-areas: "name wh qty price submit";
  }

  .parts-card-embedded .parts-add-row {
    align-items: end;
    grid-template-columns: minmax(12ch, 16rem) minmax(0, max-content) auto auto auto auto;
    grid-template-areas: "name wh qty price vat submit";
  }

  .parts-card .parts-add-form--new-item .parts-add-row,
  .parts-card .parts-add-form--catalog-picked .parts-add-row {
    align-items: end;
  }

  .parts-card .parts-add-form:not(.parts-add-form--new-item):not(.parts-add-form--catalog-picked) .parts-add-row {
    grid-template-columns: minmax(12ch, 28rem) minmax(0, max-content) auto;
    grid-template-areas: "name wh submit";
  }

  .parts-card-embedded .parts-add-form:not(.parts-add-form--new-item):not(.parts-add-form--catalog-picked) .parts-add-row {
    grid-template-columns: minmax(12ch, 16rem) minmax(0, max-content) auto auto;
    grid-template-areas: "name wh vat submit";
  }

  .parts-card .parts-add-row > .catalog-combo,
  .parts-card-embedded .parts-add-row > .parts-add-inline-field:has(> .catalog-combo) {
    grid-area: name;
    flex: none;
    min-width: 0;
  }

  .parts-card .parts-add-warehouse,
  .parts-card-embedded .parts-add-warehouse {
    grid-area: wh;
    flex: none;
    max-width: none;
    min-width: 0;
  }

  .parts-card .parts-add-form.parts-add-form--new-item .parts-add-new-item-fields,
  .parts-card-embedded .parts-add-form.parts-add-form--new-item .parts-add-new-item-fields,
  .parts-card .parts-add-form.parts-add-form--catalog-picked .parts-add-catalog-confirm,
  .parts-card-embedded .parts-add-form.parts-add-form--catalog-picked .parts-add-catalog-confirm {
    display: contents;
  }

  .parts-card .parts-add-qty-label,
  .parts-card-embedded .parts-add-qty-label {
    grid-area: qty;
  }

  .parts-card .parts-add-sale-label,
  .parts-card-embedded .parts-add-sale-label {
    grid-area: price;
  }

  .parts-card-embedded .parts-add-vat-inline {
    grid-area: vat;
    flex: none;
    min-width: 0;
  }

  .parts-card .parts-add-submit,
  .parts-card-embedded .parts-add-submit-field {
    grid-area: submit;
    justify-self: end;
    margin-inline-start: 0;
  }

  .parts-card-embedded .parts-add-submit-field .parts-add-submit {
    margin-inline-start: 0;
  }
}

@media (min-width: 900px) {
  .parts-card .parts-add-row,
  .parts-card-embedded .parts-add-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: var(--sp-2);
  }

  .parts-card .parts-add-form--new-item .parts-add-row,
  .parts-card .parts-add-form--catalog-picked .parts-add-row {
    align-items: flex-end;
  }

  .parts-card-embedded .parts-add-row {
    align-items: flex-end;
  }

  .parts-card .parts-add-row > .catalog-combo,
  .parts-card .parts-add-row > .parts-add-inline-field:has(> .catalog-combo) {
    flex: 1 1 20rem;
    max-width: 28rem;
    min-width: 12ch;
  }

  .parts-card-embedded .parts-add-row > .parts-add-inline-field:has(> .catalog-combo) {
    flex: 0 1 auto;
    max-width: 16rem;
    min-width: 12ch;
  }

  .parts-card .parts-add-warehouse,
  .parts-card-embedded .parts-add-warehouse {
    flex: 0 1 auto;
    max-width: min(12rem, 100%);
    min-width: 0;
  }

  .parts-card-embedded .parts-add-vat-inline {
    flex: 0 0 auto;
    flex-shrink: 0;
  }

  .parts-card .parts-add-new-item-fields,
  .parts-card-embedded .parts-add-new-item-fields,
  .parts-card .parts-add-catalog-confirm,
  .parts-card-embedded .parts-add-catalog-confirm {
    flex: 0 0 auto;
    flex-shrink: 0;
    flex-wrap: nowrap;
    align-items: flex-end;
  }

  .parts-card .parts-add-submit,
  .parts-card-embedded .parts-add-submit {
    flex: 0 0 auto;
    flex-shrink: 0;
    margin-inline-start: var(--sp-1);
  }
}

@media (min-width: 1024px) {
  .parts-card-embedded .parts-add-row {
    flex-wrap: nowrap;
    align-items: flex-end;
  }

  .parts-card-embedded .btn.parts-add-submit {
    align-self: flex-end;
    height: var(--control-h-sm);
    min-height: var(--control-h-sm);
    box-sizing: border-box;
  }

  .parts-card-embedded .parts-add-row > .parts-add-inline-field:has(> .catalog-combo) {
    flex: 1 1 12rem;
    min-width: 0;
    max-width: none;
  }
}

@media (min-width: 700px) {
  .parts-card input:not([type="hidden"]),
  .parts-card select,
  .parts-card textarea,
  .parts-card-embedded input:not([type="hidden"]),
  .parts-card-embedded select,
  .parts-card-embedded textarea,
  .parts-card .btn.parts-add-submit,
  .parts-card-embedded .btn.parts-add-submit {
    min-height: var(--control-h-sm);
  }

  .parts-card .invoice-line-remove.btn,
  .parts-card-embedded .invoice-line-remove.btn,
  .parts-card .parts-line-delete-trigger.btn,
  .parts-card-embedded .parts-line-delete-trigger.btn {
    min-height: var(--row-btn);
    height: var(--row-btn);
    min-width: var(--row-btn);
  }
}

.parts-line-save { margin: 0; min-width: 0; }

.parts-save-btn { margin-top: var(--sp-3); }

.parts-card .parts-save-btn,
.parts-card-embedded .parts-save-btn {
  height: var(--btn-h);
  min-height: var(--btn-h);
  font-size: var(--fs-input);
  font-weight: var(--fw-semibold);
  align-self: start;
}

.parts-empty { margin: var(--sp-2) 0 0; }

.parts-line-delete-confirm { margin-top: var(--sp-3); }

.parts-line-edit-panel:not(:target):not(.is-open),
.parts-line-edit-panel:not(:target):not(.is-open) > td { display: none; }

.parts-line-edit-panel {
  margin-top: var(--sp-3);
  scroll-margin-top: 5rem;
}

.parts-line-edit-form {
  display: grid;
  gap: var(--sp-2);
  max-width: min(36rem, 100%);
  min-width: 0;
}

.parts-line-edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.parts-line-edit-price input {
  width: calc(7ch + 2 * var(--sp-2));
  padding-inline: var(--sp-2);
}

@media (min-width: 640px) {
  .parts-line-edit-form {
    grid-template-columns: minmax(12ch, 16rem) 7rem minmax(0, 1fr);
    align-items: end;
  }

  .parts-line-edit-form > label:first-of-type,
  .parts-line-edit-form > .parts-line-edit-unit {
    display: grid;
    gap: var(--sp-1);
    margin: 0;
  }

  .parts-line-edit-form > label:first-of-type {
    grid-column: 1;
    grid-row: 1;
  }

  .parts-line-edit-form .catalog-meta-fields {
    display: contents;
  }

  .parts-line-edit-form .catalog-meta-field--unit,
  .parts-line-edit-form > .parts-line-edit-unit {
    grid-column: 2;
    grid-row: 1;
  }

  .parts-line-edit-form .catalog-meta-field--category,
  .parts-line-edit-form > p.tiny:not(.parts-line-edit-code) {
    grid-column: 3;
    grid-row: 1;
  }

  .parts-line-edit-form > p.tiny:not(.parts-line-edit-code) + p.tiny,
  .parts-line-edit-form .catalog-meta-field--ean,
  .parts-line-edit-form > .parts-line-edit-price,
  .parts-line-edit-form .parts-line-edit-actions,
  .parts-line-edit-form > .parts-line-edit-code {
    grid-column: 1 / -1;
  }

  .parts-line-edit-form > .parts-line-edit-code {
    grid-row: 2;
  }
}

@media (min-width: 1024px) {
  .parts-line-edit-form input:not([type="hidden"]),
  .parts-line-edit-form select {
    height: var(--control-h-sm);
    min-height: var(--control-h-sm);
    padding: var(--sp-1) var(--sp-2);
    border-color: transparent;
    background: transparent;
    box-shadow: none;
  }

  .parts-line-edit-form input:not([type="hidden"]):not(:disabled):hover,
  .parts-line-edit-form select:not(:disabled):hover,
  .parts-line-edit-form input:not([type="hidden"]):not(:disabled):focus-visible,
  .parts-line-edit-form select:not(:disabled):focus-visible {
    border-color: var(--line);
    background: var(--paper);
  }

  .parts-line-edit-form input:not([type="hidden"]):not(:disabled):invalid {
    border-color: var(--danger);
    background: var(--paper);
  }

  .parts-line-edit-form input:disabled,
  .parts-line-edit-form select:disabled {
    border-color: transparent;
    background: transparent;
    box-shadow: none;
    color: var(--ink);
    cursor: default;
    opacity: 1;
  }

  .parts-line-edit-actions .btn {
    height: var(--control-h-sm);
    min-height: var(--control-h-sm);
  }
}

.share-active { min-width: 0; }

.share-url-block { margin-top: var(--sp-3); min-width: 0; }

.share-url-block input {
  width: 100%;
  min-height: var(--btn-h-sm);
  padding: var(--sp-2) var(--sp-3);
  box-sizing: border-box;
}

@media (max-width: 699.98px) {
  .share-url-block input {
    min-height: var(--hit-min);
  }
}

.btn.btn-ghost.share-copy-copied,
.btn.btn-ghost.share-copy-copied:hover,
.btn.btn-ghost.share-copy-copied:active,
.btn.btn-ghost.share-copy-copied:focus,
.btn.btn-ghost.share-copy-copied:focus-visible {
  background: var(--pine-soft);
  border-color: var(--border-field-focus);
}

.share-toolbar-head { align-items: center; }

.share-toolbar-head .share-toolbar-title { flex: 1 1 auto; min-width: 0; }

.share-toolbar-head .btn-small {
  min-height: var(--btn-h);
  padding: 0 var(--sp-3);
  font-size: var(--fs-sm);
}

.time-show-form {
  margin-top: var(--sp-3);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--line);
  align-items: center;
  gap: var(--sp-2) var(--sp-3);
}

.time-show-check-form {
  flex: 1 1 100%;
  min-width: 0;
  margin: 0;
  display: flex;
  align-items: center;
}

.time-show-check-form .check { margin: 0; }

.time-show-check-form label.check {
  flex: 1 1 auto;
  min-width: 0;
}

.time-show-form .time-add-toggle { margin-left: auto; }

.narrow { width: min(var(--form-max), 100%); max-width: var(--form-max); margin-inline: auto; }

.project-layout, .stack { display: grid; min-width: 0; }

.filter-empty { margin: var(--sp-3) 0; max-width: var(--measure-prose); }

.filter-empty > p:first-child { margin: 0 0 var(--sp-2); }

.filter-empty > p:only-child { margin: 0; }

.inbox-empty { margin: var(--sp-2) 0 0; max-width: 36rem; }

.jobs { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--sp-3); }

.period-nav { margin: 0 0 var(--sp-4); display: grid; gap: var(--sp-2); }

.period-nav-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1);
  align-items: center;
}

.period-nav--jobs .period-nav-combined {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  align-items: stretch;
}

.period-nav--jobs .period-nav-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1);
  align-items: center;
}

.period-nav--jobs .period-nav-months-scroll {
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  padding-bottom: var(--sp-1);
  scrollbar-width: none;
}

.period-nav--jobs .period-nav-months-scroll::-webkit-scrollbar {
  display: none;
}

.period-nav-months-scroll--overflow {
  position: relative;
}

.period-nav-months-scroll--overflow:not(.period-nav-months-scroll--at-end)::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--sp-5);
  pointer-events: none;
  background: linear-gradient(to left, var(--bg) 15%, transparent);
}

.list-filter-toolbar .period-nav-months-scroll--overflow:not(.period-nav-months-scroll--at-end)::after {
  background: linear-gradient(to left, var(--bg) 15%, transparent);
}

.period-nav--jobs .period-nav-months-scroll .period-link {
  scroll-snap-align: center;
  flex-shrink: 0;
}

.period-nav--jobs .period-nav-divider {
  display: none;
}

@media (min-width: 640px) {
  .period-nav--jobs .period-nav-combined {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--sp-3) var(--sp-4);
  }
  .period-nav--jobs .period-nav-divider {
    display: block;
    width: 1px;
    align-self: stretch;
    min-height: 28px;
    background: var(--line);
    flex-shrink: 0;
  }
  .period-nav--jobs .period-nav-months-scroll {
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: wrap;
    overflow-x: visible;
    scroll-snap-type: none;
  }
}

.period-nav--jobs .period-nav-year-archive {
  display: inline-flex;
  max-width: 100%;
  min-width: 0;
}

.period-nav--jobs .period-nav-year-archive[open] {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1);
  align-items: center;
}

.period-nav--jobs .period-nav-year-archive > summary {
  list-style: none;
  cursor: pointer;
}

.period-nav--jobs .period-nav-year-archive > summary::-webkit-details-marker {
  display: none;
}

.period-nav--jobs .period-nav-year-archive > summary::marker {
  content: "";
}

.period-nav--jobs .period-nav-year-archive-menu {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1);
  align-items: center;
  min-width: 0;
  max-width: 100%;
}

.period-nav-label {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--muted);
  margin-right: var(--sp-1);
}

.period-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--period-chip-min-h);
  padding: 0 var(--period-chip-padding-x);
  border-radius: var(--radius-sm);
  color: var(--ink);
  text-decoration: none;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
}

.period-link:hover { background: var(--pine-soft); }

.period-link[aria-current="true"],
.period-link[aria-current="page"] { background: var(--pine-soft); color: var(--pine-deep); }

.period-link--dim:not([aria-current="true"]) {
  color: var(--muted);
}

.period-link--dim:not([aria-current="true"]):hover {
  background: var(--pine-soft);
  color: var(--ink);
}

.list-filter-toolbar {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-3);
  margin: 0 0 var(--sp-3);
  min-width: 0;
  width: 100%;
}

.trips-vehicles-inline {
  --card-pad-inline: var(--pad-card-inline);
  width: 100%;
  margin: 0 0 var(--sp-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--paper);
  box-shadow: var(--shadow-card);
}

@media (max-width: 639px) {
  .list-filter-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .list-filter-toolbar .period-nav {
    flex: 0 0 auto;
    max-width: 100%;
    min-width: 0;
  }
  .list-filter-toolbar .period-nav-combined {
    max-width: 100%;
    min-width: 0;
  }
  .list-filter-toolbar .period-nav-group.period-nav-months-scroll {
    max-width: 100%;
    min-width: 0;
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .list-filter-toolbar .period-nav--jobs,
  .list-filter-toolbar .period-nav-combined {
    max-width: 100%;
    min-width: 0;
  }

  .customer-list-search {
    max-width: 100%;
    width: 100%;
  }
  .customers-page .empty-state p {
    max-width: none;
  }
  .customers-page .filter-empty .empty-state-cta .btn-small {
    min-height: var(--hit-min);
    height: auto;
  }
}

.trips-vehicles-inline[open] + .trips-list-toolbar {
  margin-top: var(--sp-4);
}

.trips-vehicle-select-wrap {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  margin-left: auto;
}

.trips-vehicle-filter-row select {
  min-height: var(--control-h-sm);
  font-size: var(--fs-input);
}

@media (min-width: 640px) {
  .list-filter-toolbar .period-nav {
    flex: 1 1 12rem;
    min-width: 0;
    margin: 0;
  }

}

.customer-list-search input {
  min-height: var(--control-h-sm);
  font-size: var(--fs-input);
}

.ref-search-field {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  display: block;
}

.ref-search-field input {
  width: 100%;
  padding-right: 2.4rem;
  box-sizing: border-box;
}

.ref-search-clear {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
}

.customer-list-search .btn-small {
  flex-shrink: 0;
  min-height: var(--control-h);
}

.done-ref-filter-empty {
  margin: 0 0 var(--sp-4);
}

.letter-bar {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--sp-1);
  margin: 0 0 var(--sp-4);
  align-items: center;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.letter-bar::-webkit-scrollbar {
  display: none;
}

.letter-bar .period-link {
  position: relative;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .letter-bar {
    flex-wrap: wrap;
    overflow-x: visible;
  }

  .letter-bar .period-link {
    padding-inline: var(--sp-2);
  }
}

@media (max-width: 639px) {
  .letter-bar {
    padding-block: calc((var(--hit-min) - var(--period-chip-min-h)) / 2);
    padding-bottom: calc((var(--hit-min) - var(--period-chip-min-h)) / 2 + var(--sp-1));
    scroll-snap-type: x proximity;
  }

  .letter-bar .period-link {
    scroll-snap-align: center;
    min-height: var(--hit-min);
  }

  .period-link {
    min-height: var(--hit-min);
  }

  .letter-bar .period-link::after {
    content: "";
    position: absolute;
    top: calc((var(--period-chip-min-h) - var(--hit-min)) / 2);
    bottom: calc((var(--period-chip-min-h) - var(--hit-min)) / 2);
    left: -4px;
    right: -4px;
  }

  .period-nav--jobs .period-nav-months-scroll .period-link,
  .period-nav--jobs .period-nav-years .period-link {
    position: relative;
  }

  .period-nav--jobs .period-nav-months-scroll .period-link::after,
  .period-nav--jobs .period-nav-years .period-link::after {
    content: "";
    position: absolute;
    top: calc((var(--period-chip-min-h) - var(--hit-min)) / 2);
    bottom: calc((var(--period-chip-min-h) - var(--hit-min)) / 2);
    left: -4px;
    right: -4px;
  }

  .period-nav--jobs,
  .period-nav--jobs .period-nav-months-scroll {
    max-width: 100%;
    min-width: 0;
  }
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-3) var(--sp-4);
  margin: var(--sp-4) 0 0;
}

.pagination-meta { margin: 0; color: var(--muted); font-size: var(--fs-sm); }

.pagination [aria-disabled="true"] { opacity: 0.45; pointer-events: none; }

.job {
  display: grid;
  gap: var(--sp-1);
  text-decoration: none;
  color: inherit;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: var(--sp-3);
  min-height: var(--control-h);
}

.job:hover { border-color: var(--pine); }

.job-title { font-weight: var(--fw-semibold); font-size: var(--fs-base); }

.job-list,
.customer-list,
.trip-list,
.list-card {
  list-style: none;
  padding: 0;
  margin: 0;
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--paper);
}

.trip-list {
  --card-pad-inline: var(--pad-card-inline);
}

@media (max-width: 639px) {
  .job-list-with-fab,
  .jobs-calendar-with-fab {
    padding-bottom: calc(
      var(--bottom-nav-h) + var(--fab-size) + 2 * var(--sp-4) + env(safe-area-inset-bottom, 0px)
    );
  }
}

.job-list-item { margin: 0; padding: 0; }

.job-list-item:last-child .job-row-shell { border-bottom: 0; }

.job-row-shell {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--line);
}

.job-row-shell .job-row {
  flex: 1;
  min-width: 0;
  border-bottom: 0;
}

.job-row-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  padding-right: var(--sp-2);
  gap: var(--sp-1);
}

.job-row,
.customer-row,
.warehouse-row,
.feedback-row {
  min-height: var(--control-h);
  padding: var(--sp-2) var(--sp-3);
}

.job-row-title,
.customer-row-name,
.warehouse-row-name,
.feedback-row-title-text {
  font-weight: var(--fw-semibold);
  font-size: var(--fs-sm);
}

.job-row-customer,
.job-row-date,
.job-row-meta,
.customer-row-sub,
.warehouse-row-meta,
.feedback-row-meta {
  font-size: var(--fs-sm);
  color: var(--muted);
}

.job-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) 6.5rem 9rem;
  align-items: center;
  gap: 0 var(--sp-3);
  text-decoration: none;
  color: inherit;
  box-sizing: border-box;
  font-size: var(--fs-list);
  line-height: var(--lh-list);
  font-weight: var(--fw-normal);
}

.job-row-customer,
.job-row-date,
.job-row-meta,
.job-row-stat,
.job-row-stats {
  font-size: var(--fs-list-compact);
  line-height: var(--lh-list);
}

.job-row:hover { background: var(--pine-soft); }

.job-row-title {
  grid-column: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.job-row-title-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--fs-list);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-list);
}

.job-row-sub {
  grid-column: 2 / -1;
  display: grid;
  grid-template-columns: subgrid;
  align-items: center;
  min-width: 0;
}

@supports not (grid-template-columns: subgrid) {
  .job-row-sub {
    grid-template-columns: minmax(0, 1.2fr) 6.5rem 9rem;
  }
}

.job-row-customer {
  grid-column: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-row-date {
  grid-column: 2;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.job-row-meta {
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.job-row-sep {
  display: none;
}

.job-row-sample {
  border-left: 3px solid var(--blue-deep);
  background: color-mix(in srgb, var(--blue-soft) 28%, var(--paper));
}

.job-row-sample:hover {
  background: color-mix(in srgb, var(--blue-soft) 40%, var(--paper));
}

.job-row-sample-star {
  display: inline-flex;
  flex-shrink: 0;
  color: var(--blue-deep);
}

.job-row-sample-star .ico {
  width: 0.95rem;
  height: 0.95rem;
}

@media (max-width: 639px) {
  .job-row {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    gap: var(--sp-1) 0;
    min-height: auto;
    padding: var(--sp-3) var(--sp-3);
    width: 100%;
  }
  .job-row-title {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    min-width: 0;
  }
  .job-row-sub {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    row-gap: var(--sp-1);
    column-gap: var(--sp-3);
    grid-column: 1;
    grid-row: 2;
    grid-template-columns: unset;
    width: 100%;
    min-width: 0;
    font-size: var(--fs-list);
    color: var(--muted);
  }
  .job-row-sub > .job-row-customer,
  .job-row-sub > .job-row-date,
  .job-row-sub > .job-row-stats,
  .job-row-sub > .job-row-stat,
  .job-row-sub > .job-row-meta {
    grid-column: auto;
    grid-row: auto;
  }
  .job-row-stats {
    display: contents;
  }
  .job-row-customer,
  .job-row-date,
  .job-row-stat,
  .job-row-meta {
    flex: 0 0 auto;
    max-width: 100%;
    min-width: auto;
    overflow: visible;
    white-space: normal;
  }
  .job-row-sep {
    display: none;
  }
  .job-row-date:empty { display: none; }
  .job-row-stat-hours:empty { display: none; }
}

.customer-list-item { margin: 0; padding: 0; }

.customer-list-item:last-child .customer-row { border-bottom: 0; }

.customer-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  align-items: center;
  gap: 0 var(--sp-3);
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--line);
  box-sizing: border-box;
}

.customer-row:has(.customer-row-sub) {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(6.5rem, max-content);
}

.customer-row:has(.customer-row-phone):not(:has(.customer-row-sub)) {
  grid-template-columns: minmax(0, 1fr) max-content;
}

.customer-row:hover { background: var(--pine-soft); }

.customer-row {
  font-size: var(--fs-list);
  line-height: var(--lh-list);
  font-weight: var(--fw-normal);
}

.customer-row-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--fs-list);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-list);
}

.customer-row-sub {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 0 var(--sp-2);
  grid-column: 2;
  min-width: 0;
  font-size: var(--fs-list-compact);
  line-height: var(--lh-list);
}

.customer-row-address {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--fs-list-compact);
}

.customer-row-phone {
  grid-column: -1;
  justify-self: end;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-size: var(--fs-list-compact);
  line-height: var(--lh-list);
}

.customer-row-dot { flex-shrink: 0; color: var(--muted); }

@media (max-width: 639px) {
  .customer-row,
  .customer-row:has(.customer-row-sub),
  .customer-row:has(.customer-row-phone):not(:has(.customer-row-sub)) {
    grid-template-columns: 1fr;
    gap: var(--sp-1) 0;
    align-items: start;
    min-height: var(--hit-min);
    padding: var(--sp-3) var(--sp-3);
  }

  .customer-row-sub {
    grid-column: 1;
    flex-direction: column;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: var(--sp-1);
  }

  .customer-row-address {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    max-width: none;
  }

  .customer-row-phone {
    grid-column: 1;
    justify-self: start;
  }
}

.warehouse-create h2 { margin: 0 0 var(--sp-1); font-size: var(--fs-base); }

.warehouse-create label:first-of-type { margin-top: 0; }

label,
.field-label,
.profile-field-label {
  display: grid;
  gap: var(--sp-1);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  margin: var(--sp-2) 0;
}

.field-phone input { max-width: 14rem; }

.customer-form .split { align-items: end; }

.customer-form .split--name-number { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }

.customer-form .split--postal { grid-template-columns: minmax(0, 120px) minmax(0, 1fr); }

.customer-form-split-spacer { min-width: 0; }

.customer-form .btn-primary { box-shadow: var(--shadow-control); }

@media (max-width: 639px) {
  .customer-form .split,
  .customer-form .split--name-number,
  .customer-form .split--postal {
    grid-template-columns: 1fr;
  }
  .customer-form-split-spacer {
    display: none;
  }
}

.customer-list-search { margin: 0 0 var(--sp-3); max-width: 28rem; }

.customer-list-search input { width: 100%; }

.customer-row-number { font-weight: var(--fw-normal); }

.field { position: relative; display: block; }

.field .ico {
  position: absolute;
  left: 12px;
  top: 50%;
  margin-top: calc(-1 * var(--sp-2) - 1px);
  color: var(--muted);
  pointer-events: none;
}

.field input { padding-left: calc(var(--sp-6) + var(--sp-2)); }

input, textarea, select {
  font: inherit;
  font-size: var(--fs-input);
  font-weight: var(--fw-normal);
  line-height: var(--lh-base);
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--border-field);
  border-radius: var(--radius-control);
  min-height: var(--control-h);
  padding: var(--sp-2) var(--sp-3);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:hover:not(:disabled):not(:focus),
textarea:hover:not(:disabled):not(:focus),
select:hover:not(:disabled):not(:focus) {
  border-color: color-mix(in srgb, var(--muted) 25%, var(--border-field));
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--border-field-focus);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--pine) 18%, transparent);
}

label.check input[type="checkbox"],
label.check input[type="radio"],
.trip-return-trip input[type="checkbox"] {
  width: auto;
  height: auto;
  min-height: 0;
  padding: 0;
  flex-shrink: 0;
  box-shadow: none;
}

input:disabled,
textarea:disabled,
select:disabled {
  background: var(--bg);
  color: var(--muted);
  border-color: var(--line);
  cursor: not-allowed;
  box-shadow: none;
}

textarea { min-height: 120px; resize: vertical; }

#description form textarea + .btn { margin-top: var(--sp-3); }

.form-error {
  color: var(--danger);
  background: var(--danger-soft);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-control);
  font-size: var(--fs-sm);
  line-height: var(--lh-base);
}

.check { display: flex; align-items: center; gap: var(--sp-2); font-weight: var(--fw-semibold); }

.check input { width: 20px; height: 20px; min-height: 0; }

.grid-form, .split, .add-grid, .side-cards { display: grid; gap: var(--sp-3); min-width: 0; align-items: start; }

.grid-form > *, .split > *, .add-grid > *, .side-cards > * { min-width: 0; }

.grid-form-schedule {
  display: grid;
  gap: var(--sp-3);
}

.grid-form-schedule label {
  min-width: 0;
}

.grid-form-schedule input {
  width: 100%;
  max-width: 100%;
}

@media (min-width: 640px) {
  .grid-form-schedule {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .grid-form-schedule label:last-child {
    grid-column: 1 / -1;
  }
}

@media (min-width: 700px) {
  .grid-form > .grid-form-schedule {
    grid-column: 1 / -1;
  }
}

@media (min-width: 900px) {
  .grid-form-schedule {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.9fr) minmax(0, 0.85fr);
  }

  .grid-form-schedule label:last-child {
    grid-column: auto;
  }
}

.side-cards .empty,
.side-cards > .card { margin: var(--sp-3) 0; }

.banner {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-3);
  align-items: center;
  background: var(--pine-soft);
  border-radius: var(--radius-control);
  padding: var(--sp-2) var(--sp-3);
  margin: var(--sp-2) 0 var(--sp-3);
  font-size: var(--fs-sm);
}

.banner ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.banner li + li {
  margin-top: var(--sp-1);
}

.banner p { margin: 0; }

.banner-warn { background: var(--danger-soft); }

.banner-info {
  background: var(--blue-soft);
  color: var(--blue-deep);
}

.banner-amber {
  background: var(--amber-soft);
  color: var(--amber-deep);
}

.value-summary-strip {
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-control);
  background: var(--blue-soft);
  color: var(--blue-deep);
}

.invoiced-locked-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.invoiced-locked-banner__body {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  min-width: 0;
}

.invoiced-locked-banner__body > p {
  margin: 0;
}

.invoiced-locked-banner a.btn {
  min-height: var(--hit-min);
}

@media (min-width: 640px) {
  .invoiced-locked-banner {
    align-items: center;
    justify-content: space-between;
  }

  .invoiced-locked-banner__body {
    flex: 1 1 auto;
  }
}

@media (max-width: 639.98px) {
  .invoiced-locked-banner {
    flex-direction: column;
    align-items: stretch;
  }
}

.invoice-draft-missing-banner__content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  min-width: 0;
  width: 100%;
}

.invoice-draft-missing-banner__lead,
.invoice-draft-missing-banner__list {
  margin: 0;
}

.invoice-draft-missing-banner__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--sp-2);
  padding: 0;
  list-style: none;
}

.invoice-draft-missing-banner__list li + li::before {
  content: "· ";
}

.invoice-draft-missing-banner[hidden] {
  display: none !important;
}

.invoice-draft-missing-banner a.btn {
  flex: 0 0 auto;
  align-self: center;
  height: auto;
  margin: 0;
}

@media (max-width: 639.98px) {
  .invoice-draft-missing-banner__content {
    align-items: flex-start;
  }

  .invoice-draft-missing-banner a.btn {
    flex-basis: 100%;
    align-self: flex-start;
    width: fit-content;
    max-width: 100%;
    justify-content: flex-start;
  }
}

.notes-readonly { white-space: pre-wrap; margin: 0; font-weight: var(--fw-normal); }

.time-entry-readonly .time-entry-times {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.lines { list-style: none; padding: 0; margin: 0; }

.line-warehouse { display: block; }

.line-save > .btn-primary { margin-top: var(--sp-3); }

.line {
  display: grid;
  gap: var(--sp-2);
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--line);
}

.qty { display: flex; gap: var(--sp-2); align-items: center; flex-wrap: wrap; min-width: 0; }

.qty input { width: 7rem; max-width: 100%; }

.qty .btn { flex: 0 0 auto; }

.stock-total { margin: var(--sp-3) 0 0; }

.stock-list-head { display: none; }

.warehouse-goods-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  align-items: center;
  gap: var(--sp-3) var(--sp-3);
  margin-bottom: var(--sp-3);
}

.warehouse-goods-add {
  min-width: 0;
  margin: 0;
  padding: 0;
}

.warehouse-goods-toolbar .warehouse-goods-add-label,
.warehouse-goods-toolbar .warehouse-goods-filter-label {
  margin: 0;
  min-width: 0;
  gap: 0;
}

.warehouse-goods-toolbar input {
  min-height: var(--control-h);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-control);
  box-sizing: border-box;
}

.warehouse-goods-toolbar .catalog-combo-field input {
  padding-right: 2.4rem;
}

.warehouse-goods-filter-label input {
  width: 100%;
}

.warehouse-goods-add .catalog-combo-clear[hidden] {
  display: none !important;
}

@media (max-width: 399px) {
  .warehouse-goods-toolbar {
    grid-template-columns: 1fr;
  }
}

.warehouse-title-row {
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  gap: var(--sp-3);
}

.warehouse-title-row .warehouse-title-display {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: var(--sp-1) var(--sp-2);
  min-width: 0;
  flex: 0 1 auto;
}

.warehouse-title-row .warehouse-title-display h1 {
  margin: 0;
  flex: 0 1 auto;
}

.warehouse-rename-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 0;
  background: transparent;
  box-shadow: var(--shadow-control);
  min-width: var(--btn-h-xs);
  min-height: var(--btn-h-xs);
  padding: var(--sp-1);
  margin: 0;
  border-radius: var(--radius-btn);
  color: var(--muted);
  cursor: pointer;
  transition: var(--btn-transition);
}

.warehouse-rename-open:hover,
.warehouse-rename-open:focus-visible {
  color: var(--pine);
  background: transparent;
}

.warehouse-rename-open .ico {
  width: 20px;
  height: 20px;
}

.warehouse-title-row .title-actions {
  flex-shrink: 0;
}

.warehouse-title-row .title-actions .btn {
  width: auto;
  min-width: 0;
  min-height: var(--btn-h-xs);
  height: auto;
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-btn);
}

.warehouse-title-row .title-actions .btn .ico {
  width: var(--ico-title-action);
  height: var(--ico-title-action);
}

@media (max-width: 639px) {
  .warehouse-title-row + .page-header-actions,
  .page-header-custom .page-header-actions {
    flex-wrap: wrap;
    max-width: 100%;
  }
  .warehouse-title-row .title-actions .btn,
  .page-header-custom .page-header-actions .btn {
    min-height: var(--hit-min);
    flex-shrink: 0;
    white-space: nowrap;
  }
  .page-header-custom .page-header-actions .trip-csv-btn-label {
    display: none;
  }
  .page-header-custom .page-header-actions .trip-csv-btn {
    width: var(--hit-min);
    min-width: var(--hit-min);
    height: var(--hit-min);
    min-height: var(--hit-min);
    padding-inline: 0;
    justify-content: center;
    gap: 0;
  }
  .page-header-custom .page-header-actions .trip-csv-btn .ico {
    width: 1.35rem;
    height: 1.35rem;
  }
}

.warehouse-rename-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: var(--sp-2) var(--sp-3);
  margin-top: var(--sp-3);
  padding: var(--sp-3) 0 0;
  border-top: 1px solid var(--line);
}

.warehouse-rename-form[hidden] {
  display: none;
}

.warehouse-rename-label {
  flex: 1 1 12rem;
  margin: 0;
  min-width: 0;
}

.stock-inventory-wrap { min-width: 0; }

.line-editor--stock .stock-list-scroll {
  overflow: visible;
  max-height: none;
}

.line-editor--stock .stock-lines-table {
  min-width: 40rem;
}

.stock-list-scroll { position: relative; }

.stock-list-head,
.stock-row {
  font-size: var(--fs-list);
  line-height: var(--lh-list);
}

.stock-name { display: grid; gap: var(--sp-1); min-width: 0; }

.stock-name-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0;
  min-width: 0;
  line-height: var(--lh-list);
  font-size: var(--fs-list);
}

.stock-name-inline strong {
  font-size: var(--fs-list);
  font-weight: var(--fw-semibold);
  overflow-wrap: anywhere;
}

.stock-name-sep {
  flex-shrink: 0;
  margin-inline: 0.35em;
  font-size: var(--fs-list-compact);
  color: var(--muted);
}

.stock-name-code {
  font-size: var(--fs-list-compact);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.stock-qty {
  font-size: var(--fs-list);
  font-variant-numeric: tabular-nums;
}

.stock-field {
  display: flex;
  gap: var(--sp-2);
  align-items: center;
  flex-wrap: wrap;
  min-width: 0;
  margin: 0;
  font-size: var(--fs-list);
  font-weight: var(--fw-normal);
}

.stock-field input {
  width: 5.5rem;
  max-width: 100%;
  min-width: 0;
  min-height: var(--control-h-sm);
  padding: var(--sp-1) var(--sp-2);
  font-size: var(--fs-list);
}

.stock-row-compact.line { padding: var(--sp-2) 0; }

.stock-qty-field.qty-neg input { border-color: var(--danger); color: var(--danger); }

.stock-row-neg .stock-value { color: var(--danger); }

.stock-price {
  display: flex;
  gap: var(--sp-2);
  align-items: center;
  flex-wrap: wrap;
  min-width: 0;
}

.stock-price input {
  width: 6.5rem;
  max-width: 100%;
  min-width: 0;
  min-height: var(--control-h-sm);
  padding: var(--sp-1) var(--sp-2);
  font-size: var(--fs-list);
}

.stock-value {
  font-size: var(--fs-list);
  font-weight: var(--fw-normal);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.stock-list-head {
  font-size: var(--fs-list-compact);
  font-weight: var(--fw-semibold);
  color: var(--muted);
}

.unit {
  font-size: var(--fs-list-compact);
  color: var(--muted);
  min-width: 2.2rem;
}

.stock-col-value { text-align: right; }

.stock-list-head .stock-col-value { justify-self: end; }

.stock-save-bar {
  display: none;
  position: sticky;
  bottom: calc(56px + env(safe-area-inset-bottom));
  z-index: 20;
  margin: 0 calc(-1 * var(--sp-1));
  padding: var(--sp-3) var(--sp-1) var(--sp-2);
  background: linear-gradient(to top, var(--paper) 72%, transparent);
}

.stock-inventory.is-dirty .stock-save-bar {
  display: flex;
  justify-content: stretch;
}

.stock-inventory.is-dirty .stock-save-bar .btn-primary {
  width: 100%;
  margin: 0;
}

@media (min-width: 800px) {
  .stock-inventory.is-dirty .stock-save-bar { bottom: 12px; }
}

.qty-neg { color: var(--danger); font-weight: var(--fw-semibold); }

.chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin: var(--sp-2) 0; }

.chip {
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: var(--sp-2) var(--sp-3);
  min-height: var(--btn-h-sm);
  display: inline-flex;
  align-items: center;
  background: #fff;
  font-size: var(--fs-sm);
  transition: var(--btn-transition);
}

.chip.is-on { background: var(--pine); color: #f4fbf7; border-color: var(--pine); }

.chip--empty:not(.is-on) { opacity: 0.55; color: var(--muted); border-color: var(--line); }

.results { display: grid; gap: var(--sp-2); }

.catalog-combo { position: relative; }

.catalog-combo-field { position: relative; display: block; }

.catalog-combo-field input { width: 100%; padding-right: 2.4rem; }

.catalog-combo-clear {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-size: var(--fs-base);
  line-height: 1;
  cursor: pointer;
}

.catalog-combo-clear:hover { color: var(--ink); background: var(--pine-soft); }

.catalog-combo-list {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  top: calc(100% - 2px);
  margin: 0;
  padding: var(--sp-1);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  box-shadow: var(--shadow-card);
  max-height: 320px;
  overflow-y: auto;
  display: grid;
  gap: var(--sp-1);
}

.catalog-combo-list[hidden] { display: none; }

.catalog-combo-group-label {
  padding: var(--sp-2) var(--sp-3) var(--sp-1);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: var(--fs-xs);
}

.stock-name-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-1);
  min-width: 0;
}

.stock-history {
  display: inline-block;
  vertical-align: top;
  max-width: 100%;
}

.stock-history-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  list-style: none;
  cursor: pointer;
  width: 28px;
  height: 28px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  box-shadow: var(--shadow-control);
  color: var(--muted);
  flex-shrink: 0;
}

.stock-history-toggle:hover,
.stock-history-toggle:focus-visible {
  color: var(--pine);
  background: transparent;
}

.stock-history-toggle::-webkit-details-marker { display: none; }

.stock-history-toggle .ico {
  font-size: 22px;
  width: 22px;
  height: 22px;
}

.stock-history-col {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-width: 28px;
}

.stock-row-compact.stock-row:not(:has(.stock-history)) .stock-history-col {
  min-height: 0;
}

.stock-history-panel {
  margin-top: var(--sp-1);
  padding: var(--sp-2) var(--sp-3);
  border: 0;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-control);
  width: 100%;
  max-width: none;
  min-width: 0;
}

.stock-history-panel-row {
  display: none;
}

.line-editor--stock tr.stock-row.is-history-open + tr.stock-history-panel-row {
  display: table-row;
}

.stock-movements {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: var(--fs-sm);
  font-weight: normal;
}

.warehouse-depleted {
  margin-top: var(--sp-4);
  border-top: 1px solid var(--line);
  padding-top: var(--sp-3);
}

.warehouse-depleted > summary {
  cursor: pointer;
  list-style: none;
  padding: var(--sp-1) 0 var(--sp-2);
}

.warehouse-depleted > summary::-webkit-details-marker { display: none; }

.warehouse-depleted-wrap {
  margin-top: var(--sp-2);
}

.warehouse-depleted-table .warehouse-depleted-add {
  margin: 0;
  display: flex;
  justify-content: flex-end;
}

.line-editor--stock .stock-field {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  flex-wrap: nowrap;
  margin: 0;
  min-width: 0;
}

.line-editor--stock .stock-qty-field input.invoice-input-qty {
  width: auto;
  flex: 1 1 auto;
  min-width: 6ch;
  max-width: 100%;
  margin: 0;
}

.line-editor--stock .stock-field input.invoice-input-price {
  width: 100%;
  max-width: 100%;
  margin: 0;
}

.line-editor--stock .stock-qty-field .unit {
  flex-shrink: 0;
}

@media (max-width: 639px) {
  .line-editor--stock .invoice-lines-table tr.invoice-lines-row td.invoice-cell-qty {
    gap: var(--sp-2);
  }

  .line-editor--stock .stock-qty-field {
    gap: var(--sp-2);
    min-width: 0;
  }

  .line-editor--stock .stock-qty-field input.invoice-input-qty {
    width: 100%;
    min-width: 3.5rem;
    flex: 1 1 3.5rem;
    max-width: 100%;
  }

  .line-editor--stock .stock-qty-field .unit {
    margin-inline-start: var(--sp-1);
  }
}

.line-editor--stock .stock-save-btn {
  margin-top: var(--sp-3);
}

.stock-history-panel-cell {
  padding: var(--sp-2);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.stock-history-panel-cell .stock-history-panel--full {
  margin-top: 0;
}

.line-editor--stock .invoice-cell-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: calc(var(--hit-min) - var(--row-btn));
  width: auto;
}

.line-editor--stock .invoice-cell-actions .stock-history-toggle {
  margin-inline-start: 0;
  width: var(--row-btn);
  height: var(--row-btn);
  min-width: var(--row-btn);
  max-width: var(--row-btn);
  min-height: var(--row-btn);
  max-height: var(--row-btn);
}

@media (min-width: 640px) {
  .line-editor--stock .invoice-lines-table td.invoice-cell-actions {
    display: table-cell;
    vertical-align: middle;
    text-align: right;
    white-space: nowrap;
  }

  .line-editor--stock .invoice-lines-table td.invoice-cell-actions > .stock-history,
  .line-editor--stock .invoice-lines-table td.invoice-cell-actions > form {
    display: inline-flex;
    vertical-align: middle;
  }
}

@media (max-width: 639px) {
  .line-editor--stock tr.stock-row.is-history-open + tr.stock-history-panel-row {
    display: block;
  }

  .stock-history-panel-cell {
    display: block;
    padding: 0 0 var(--sp-2);
    border-bottom: 1px solid var(--line);
  }
}

.stock-movement-row {
  display: grid;
  grid-template-columns: 7rem 6rem 1fr;
  gap: 0 var(--sp-2);
  align-items: baseline;
  margin: var(--sp-1) 0;
  font-weight: normal;
}

.stock-movement-date {
  color: var(--muted);
}

.stock-movement-qty {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.stock-move-in .stock-movement-qty {
  color: var(--pine);
}

.stock-movement-reason {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stock-movement-reason a,
.warehouse-depleted .parts-name-meta a {
  color: var(--pine-deep);
  text-decoration: none;
  font-weight: inherit;
}

.stock-movement-reason a:hover,
.stock-movement-reason a:focus-visible,
.warehouse-depleted .parts-name-meta a:hover,
.warehouse-depleted .parts-name-meta a:focus-visible {
  color: var(--pine);
}

.stock-movements-more {
  display: inline-block;
  margin-top: var(--sp-1);
}

.catalog-combo-option {
  min-height: var(--control-h);
  display: flex;
  align-items: center;
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.catalog-combo-option[aria-selected="true"] { background: var(--pine-soft); }

.catalog-combo-label {
  min-width: 0;
  line-height: var(--lh-tight);
  overflow-wrap: anywhere;
}

.catalog-combo-label strong { font-weight: var(--fw-semibold); }

.catalog-combo-option mark {
  background: color-mix(in srgb, var(--pine) 24%, white);
  color: inherit;
  font: inherit;
  font-weight: inherit;
  padding: 0 1px;
  border-radius: 2px;
}

.catalog-combo-create { color: var(--pine-deep); font-weight: var(--fw-semibold); }

.warehouse-add-line {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-2) var(--sp-3);
  align-items: end;
  margin-top: var(--sp-3);
}

.warehouse-add-line[hidden] { display: none; }

.warehouse-add-line label { margin: 0; min-width: 0; }

.warehouse-add-line > .btn { grid-column: 1 / -1; }

@media (min-width: 700px) {
  .warehouse-add-line { grid-template-columns: 6.5rem minmax(8rem, 1fr) auto; }
  .warehouse-add-line > .btn { grid-column: auto; width: auto; }
}

.result {
  width: 100%;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  min-height: var(--hit-min);
  padding: var(--sp-2) var(--sp-3);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-2);
  font: inherit;
  color: inherit;
}

.photos, .doc-photos, .gallery { list-style: none; padding: 0; margin: var(--sp-3) 0 0; display: grid; gap: var(--sp-3); grid-template-columns: 1fr 1fr; }

.photos li, .doc-photos li, .gallery li { display: grid; gap: var(--sp-2); align-content: start; }

.gallery-item-media { position: relative; }

.gallery-item-frame {
  display: block;
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.gallery-item-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: var(--radius-sm);
}

.gallery-item-tools {
  position: absolute;
  top: var(--sp-1);
  right: var(--sp-1);
  z-index: 1;
  display: flex;
  gap: 2px;
}

.gallery-item-delete {
  display: contents;
}

.gallery-item-delete-btn {
  position: relative;
  width: var(--btn-h-xs);
  height: var(--btn-h-xs);
  min-width: var(--btn-h-xs);
  min-height: var(--btn-h-xs);
  padding: 0;
  border: 0;
  border-radius: var(--radius-control);
  background: color-mix(in srgb, var(--ink) 55%, transparent);
  color: var(--paper);
  box-shadow: var(--shadow-card);
}

.gallery-item-delete-btn.btn-icon {
  min-width: var(--btn-h-xs);
  min-height: var(--btn-h-xs);
  padding: 0;
}

.gallery-item-delete-btn .ico {
  font-size: 16px;
  width: 16px;
  height: 16px;
}

.gallery-item-delete-btn:hover {
  background: color-mix(in srgb, var(--ink) 70%, transparent);
}

.gallery-item-move-btn {
  position: relative;
  width: var(--btn-h-xs);
  height: var(--btn-h-xs);
  min-width: var(--btn-h-xs);
  min-height: var(--btn-h-xs);
  padding: 0;
  border: 0;
  border-radius: var(--radius-control);
  background: color-mix(in srgb, var(--ink) 55%, transparent);
  color: var(--paper);
  box-shadow: var(--shadow-card);
}

.gallery-item-move-btn.btn-icon {
  min-width: var(--btn-h-xs);
  min-height: var(--btn-h-xs);
  padding: 0;
}

.gallery-item-move-btn .ico {
  font-size: 16px;
  width: 16px;
  height: 16px;
}

.gallery-item-move-btn:hover {
  background: color-mix(in srgb, var(--ink) 70%, transparent);
}

.gallery-item-move-btn[hidden] {
  display: none !important;
}

.gallery-item-caption input {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.gallery li,
.gallery-item {
  min-width: 0;
}

.gallery-item .head-delete-confirm--inline {
  margin-top: var(--sp-1);
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.gallery-item .head-delete-confirm--inline form {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.gallery-item .head-delete-confirm-actions {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.gallery-item .head-delete-confirm-actions .btn {
  flex: 1 1 7rem;
  min-width: 0;
}

.photos img, .doc-photos img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.file input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.file .btn { pointer-events: none; }

.share-row { align-items: stretch; }

.share-row input { flex: 1 1 12rem; width: auto; min-width: 0; }

.file { position: relative; display: inline-flex; max-width: 100%; align-items: stretch; }

.file:has(.btn-small) { align-items: center; }

.time-photo-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: stretch; }

.time-photo-camera { display: none; }

.time-photo-actions .file .btn { justify-content: center; }

.sheet, .doc { max-width: 100%; }

.job-title, .job, h1, h2, p { overflow-wrap: anywhere; }

.danger-zone { margin: var(--sp-5) 0 var(--sp-2); }

.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.auth-wrap {
  width: min(460px, 100%);
  margin: 0 auto;
  padding: 32px max(16px, env(safe-area-inset-right)) 64px max(16px, env(safe-area-inset-left));
  display: grid;
  gap: var(--sp-4);
}

.auth-card h1 { font-size: 1.85rem; }

.doc-wrap { padding: 24px max(16px, env(safe-area-inset-right)) 64px max(16px, env(safe-area-inset-left)); }

.doc-lang { justify-content: flex-end; width: min(760px, 100%); margin: 0 auto 8px; }

.doc {
  width: min(760px, 100%);
  margin: 0 auto;
  background: var(--paper);
  border-radius: var(--radius-card);
  border-top: 4px solid #5c6460;
  padding: 28px 20px;
  box-shadow: var(--shadow-card);
}

.doc .kicker { color: #4a524e; }

.report-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--sp-3) var(--sp-5);
  align-items: flex-start;
  margin-bottom: 1rem;
}

.report-head-brand { min-width: 0; flex: 1 1 12rem; }

.report-head-meta .report-logo {
  display: block;
  margin: 0 0 6px auto;
  max-height: 56px;
  max-width: 200px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.report-head-meta .report-logo.report-logo--square { max-height: 80px; }

.report-company { font-weight: var(--fw-semibold); font-size: var(--fs-base); }

.report-head-meta {
  flex: 0 1 auto;
  text-align: right;
  line-height: var(--lh-base);
}

.report-head-meta a { font-weight: var(--fw-semibold); }

.report-head-meta a.report-website-link {
  display: inline-block;
  max-width: min(100%, 14rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}

.report-section-label {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0 0 var(--sp-2);
}

.report-job-date { display: inline-block; margin-top: var(--sp-1); }

.doc .report-meta { margin: 0 0 1rem; line-height: 1.45; }

.profile-reports-lead { margin: var(--sp-1) 0 var(--sp-3); }

.profile-field { margin: var(--sp-2) 0; }

.profile-form-col > .profile-field:first-child { margin-top: 0; }

.profile-field > label { margin: 0; }

.profile-field-hint {
  margin: var(--sp-1) 0 0;
  font-size: var(--fs-sm);
  font-weight: var(--fw-normal);
  color: var(--muted);
  line-height: var(--lh-base);
}

.profile-field-label {
  display: block;
  margin-bottom: var(--sp-1);
}

.profile-logo-block { margin: 0 0 var(--sp-3); }

.profile-logo-block .profile-field-label:first-child { margin-top: 0; }

.profile-logo-block .ico { font-size: 18px; }

.profile-logo-block > .profile-field-hint { margin-top: var(--sp-1); }

.profile-logo-label {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0 0 var(--sp-1);
}

.profile-logo-label .profile-field-label { margin: 0; }

.profile-logo-pick {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2) var(--sp-3);
}

.profile-logo-filename {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-logo-preview {
  display: inline-flex;
  max-width: min(260px, 100%);
}

.profile-logo-preview img {
  max-height: 80px;
  max-width: min(260px, 100%);
  min-width: 0;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: left center;
  display: block;
}

.profile-timer-reminder label.check:has(+ .profile-timer-reminder-hint:not([hidden])) {
  margin-bottom: 0;
}

.profile-timer-reminder-hint {
  margin: var(--sp-1) 0 var(--sp-5);
}

.profile-check-group label.check:has(+ p.tiny) {
  margin-bottom: 0;
}

.profile-check-group label.check + p.tiny {
  margin: var(--sp-1) 0 var(--sp-5);
}

.profile-timer-reminder.is-disabled label.check {
  color: var(--muted);
  cursor: not-allowed;
}

.profile-timer-reminder.is-disabled label.check:has(input[type="checkbox"]:disabled) {
  color: var(--muted);
  cursor: not-allowed;
}

@media (min-width: 640px) {
  .profile-timer-reminder-hint {
    padding-left: calc(20px + var(--sp-2));
  }
}

.profile-page-form {
  display: block;
  min-width: 0;
}

.profile-billing-fields label {
  display: block;
  margin: var(--sp-3) 0 0;
}

.profile-billing-fields label.check {
  display: flex;
  align-items: center;
  min-height: var(--hit-min);
}

.profile-check-group label.check {
  display: flex;
  align-items: center;
  min-height: var(--hit-min);
}

.profile-billing-fields label:first-child {
  margin-top: 0;
}

.profile-billing-fields .profile-field-hint {
  margin: var(--sp-1) 0 0;
}

.profile-billing-fields label.check + .profile-field-hint,
.profile-billing-fields label.check + .profile-field-error[hidden] + .profile-field-hint {
  margin-top: var(--sp-1);
  margin-bottom: var(--sp-5);
}

.profile-input-unit-row {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  min-width: 0;
}

.profile-input-unit-row input,
.profile-input-unit-row select {
  flex: 1 1 auto;
  min-width: 0;
}

.profile-input-unit {
  flex: 0 0 auto;
  white-space: nowrap;
}

.profile-vat-suggest {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
}

.profile-field-hint.profile-vat-suggest.value-summary-strip {
  color: var(--blue-deep);
}

.profile-vat-suggest[hidden] {
  display: none !important;
}

.profile-vat-id-input.is-field-highlight {
  outline: 2px solid var(--pine);
  outline-offset: 3px;
}

.profile-billing-fields {
  --billing-field-wide: 24rem;
  --billing-field-rate: 8rem;
  --billing-field-short: 6rem;
  --billing-field-select: 16rem;
  --billing-field-start: 8rem;
}

.profile-billing-field--wide {
  max-width: var(--billing-field-wide);
}

.profile-billing-field--select {
  max-width: var(--billing-field-select);
}

.profile-billing-field--start {
  max-width: var(--billing-field-start);
}

.profile-billing-field--rate .profile-input-unit-row input,
.profile-billing-field--short .profile-input-unit-row input {
  flex: 0 0 var(--billing-field-rate);
  width: var(--billing-field-rate);
  max-width: 100%;
}

.profile-billing-field--short .profile-input-unit-row input {
  flex-basis: var(--billing-field-short);
  width: var(--billing-field-short);
}

.profile-billing-rate-row {
  margin-top: var(--sp-3);
}

.profile-billing-rate-field .profile-billing-field--rate {
  margin-top: 0;
}

.profile-billing-rate-field + .profile-billing-rate-field .profile-billing-field--rate {
  margin-top: var(--sp-3);
}

.profile-billing-short-row {
  display: grid;
  gap: var(--sp-3);
  margin-top: var(--sp-3);
}

.profile-billing-short-row .profile-billing-compact-label {
  margin: 0;
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto;
  gap: var(--sp-1);
  align-content: end;
}

@media (min-width: 640px) {
  .profile-billing-rate-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-3) var(--sp-5);
  }

  .profile-billing-rate-field + .profile-billing-rate-field .profile-billing-field--rate {
    margin-top: 0;
  }

  .profile-billing-short-row {
    grid-template-columns: repeat(3, max-content);
    align-items: end;
    gap: var(--sp-3) var(--sp-5);
  }

  .profile-billing-compact-label {
    white-space: nowrap;
  }
}

@media (max-width: 639px) {
  .profile-billing-field--wide,
  .profile-billing-field--select,
  .profile-billing-field--start {
    max-width: none;
  }

  .profile-billing-field--rate .profile-input-unit-row input,
  .profile-billing-field--short .profile-input-unit-row input {
    flex: 1 1 auto;
    width: 100%;
  }

  .profile-billing-fields input:not([type="checkbox"]),
  .profile-billing-fields select {
    min-height: var(--hit-min);
  }

  .profile-billing-fields label.check,
  .profile-check-group label.check,
  .profile-timer-reminder label.check {
    position: relative;
  }

  .profile-billing-fields label.check::after,
  .profile-check-group label.check::after,
  .profile-timer-reminder label.check::after {
    content: "";
    position: absolute;
    inset: -12px 0;
  }
}

.profile-login-email { margin: var(--sp-2) 0 0; }

.profile-account-actions > .profile-account-row + .profile-account-row {
  margin-top: var(--sp-3);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--line);
}

.profile-account-danger {
  margin-top: var(--sp-4);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--line);
}

.profile-account-danger > .profile-account-row {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.profile-account-email-notice {
  margin: var(--sp-2) 0 0;
  font-size: var(--fs-sm);
  font-weight: var(--fw-normal);
}

.profile-email-change-details {
  margin-top: var(--sp-3);
}

.profile-email-change-details > summary {
  list-style: none;
}

.profile-email-change-details > summary::-webkit-details-marker {
  display: none;
}

.profile-account-row--login-email:has(.profile-email-change-details[open]) .profile-account-row-action {
  visibility: hidden;
  pointer-events: none;
}

.profile-email-change-form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  max-width: var(--form-max);
  width: 100%;
}

.profile-email-change-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
}

.profile-email-change-pending { margin-top: var(--sp-2); }

.profile-email-change-cancel-form {
  display: inline;
  margin: 0;
}

.profile-email-change-cancel-btn {
  display: inline;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  color: var(--pine);
  text-decoration: none;
  font-weight: var(--fw-semibold);
  cursor: pointer;
}

.profile-email-change-cancel-btn:hover { color: var(--pine-deep); }

.field--password {
  position: relative;
  padding-right: 2.75rem;
}

.field--password .password-toggle {
  position: absolute;
  right: var(--sp-1);
  top: 50%;
  transform: translateY(-50%);
  min-height: var(--btn-h-sm);
  min-width: var(--btn-h-sm);
  padding: 0;
  border-color: transparent;
  border-radius: var(--radius-btn);
  background: transparent;
  transition: var(--btn-transition);
}

.field--password .password-toggle:hover {
  background: var(--pine-soft);
  border-color: transparent;
}

.field--password input {
  width: 100%;
  min-width: 0;
}

.password-field-label { display: block; }

.profile-password-change-details {
  margin-top: var(--sp-3);
}

.profile-password-change-details > summary {
  list-style: none;
}

.profile-password-change-details > summary::-webkit-details-marker {
  display: none;
}

.profile-account-row--password:has(.profile-password-change-details[open]) .profile-account-row-action {
  visibility: hidden;
  pointer-events: none;
}

.profile-password-change-form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  max-width: var(--form-max);
  width: 100%;
}

.profile-password-change-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
}

.profile-login-email-value {
  display: block;
  font-size: var(--fs-base);
  line-height: var(--lh-base);
}

@media (max-width: 639px) {
  .report-head-meta { text-align: left; flex-basis: 100%; }
  .report-head-meta .report-logo { margin-left: 0; }
}

.doc h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }

.doc > h2 { margin-top: 1.5rem; }

.doc-wrap--report .doc > h1 {
  font-size: var(--doc-report-title-size);
  font-weight: var(--doc-section-weight);
  line-height: var(--doc-text-lh);
  margin: 0 0 var(--doc-block-gap);
}

.doc-wrap--report .doc > h2:not(.report-section-heading) {
  margin-top: 0;
}

.doc-table + h2 { margin-top: 1.75rem; }

.doc-table { width: 100%; border-collapse: collapse; margin-bottom: 0.25rem; }

.doc-table th, .doc-table td { text-align: left; padding: var(--sp-2) var(--sp-1); border-bottom: 1px solid var(--line); font-weight: var(--fw-medium); }

.doc-table th { font-size: 0.82rem; color: var(--muted); }

.legal-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

.legal-cookie-table,
.legal-sub-table {
  hyphens: auto;
}

.legal-cookie-table th,
.legal-cookie-table td,
.legal-sub-table th,
.legal-sub-table td {
  overflow-wrap: break-word;
}

.doc-wrap--report .doc-table th,
.doc-wrap--report .doc-table td {
  padding: var(--doc-table-cell-py) var(--doc-table-cell-pr) var(--doc-table-cell-py) 0;
  font-size: var(--doc-table-size);
  font-weight: var(--fw-normal);
}

.doc-wrap--report .doc-table th {
  font-size: var(--doc-table-th-size);
  font-weight: var(--doc-section-weight);
}

body.report-page {
  --report-wrap-pad-left: max(16px, env(safe-area-inset-left));
  --report-wrap-pad-right: max(16px, env(safe-area-inset-right));
  --report-doc-pad-x: 20px;
}

.sample-doc-stack {
  width: min(760px, 100%);
  margin-inline: auto;
  box-sizing: border-box;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

@media (max-width: 759px) {
  body.report-page {
    --report-wrap-pad-left: max(var(--space-section), env(safe-area-inset-left));
    --report-wrap-pad-right: max(var(--space-section), env(safe-area-inset-right));
  }
}

.sample-doc-nav {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--sp-2);
  width: 100%;
  margin: 0 0 var(--sp-3);
  box-sizing: border-box;
}

.sample-doc-nav .period-link {
  position: relative;
  flex-shrink: 1;
  min-width: 0;
  font-size: var(--period-chip-fs);
  font-weight: var(--fw-semibold);
  white-space: nowrap;
}

.sample-doc-nav .period-link--cta {
  background: var(--pine);
  color: #f4fbf7;
}

.sample-doc-nav .period-link--cta:hover {
  background: var(--pine-deep);
  color: #f4fbf7;
}

.sample-doc-nav.letter-bar {
  margin-bottom: var(--sp-3);
  flex-wrap: wrap;
  overflow-x: visible;
}

@media (max-width: 639px) {
  .sample-doc-nav.letter-bar {
    gap: var(--period-chip-gap);
  }

  .sample-doc-nav .period-link {
    padding-inline: var(--sp-2);
    font-size: var(--fs-xs);
  }

  .sample-doc-nav .period-link::after {
    content: "";
    position: absolute;
    top: calc((var(--period-chip-min-h) - var(--hit-min)) / 2);
    bottom: calc((var(--period-chip-min-h) - var(--hit-min)) / 2);
    left: -2px;
    right: -2px;
  }
}

@media (max-width: 359.98px) {
  .sample-doc-nav.letter-bar {
    padding-inline-end: 24px;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent);
  }
}

@media (min-width: 1280px) {
  body.report-page {
    --report-doc-pad-x: 36px;
  }
}

.invoice-public-sample {
  padding: 24px max(16px, env(safe-area-inset-right)) 64px max(16px, env(safe-area-inset-left));
}

.doc-wrap--report {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  box-sizing: border-box;
}

@media (max-width: 759px) {
  .doc-wrap.doc-wrap--report {
    padding-left: var(--report-wrap-pad-left);
    padding-right: var(--report-wrap-pad-right);
  }
}

.doc-wrap--report > .doc-lang { flex: none; }

.doc-wrap--report > .doc,
.doc-wrap--report > .sample-doc-stack > .doc {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  font-family: var(--sans);
  font-weight: var(--fw-normal);
  position: relative;
  overflow: hidden;
  border-top: none;
  box-shadow: var(--shadow-card);
  padding-inline: var(--report-doc-pad-x);
}

.doc-wrap--report > .doc::before,
.doc-wrap--report > .sample-doc-stack > .doc::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--pine);
  border-radius: var(--radius-card) var(--radius-card) 0 0;
  pointer-events: none;
}

.doc-wrap--report + .site-foot {
  max-width: min(760px, 100%);
  margin-inline: auto;
  padding-top: var(--sp-3);
  padding-bottom: max(48px, env(safe-area-inset-bottom));
  padding-left: calc(var(--report-wrap-pad-left) + var(--report-doc-pad-x));
  padding-right: calc(var(--report-wrap-pad-right) + var(--report-doc-pad-x));
  box-sizing: border-box;
}

@media (min-width: 760px) {
  .doc-wrap--report + .site-foot {
    padding-left: var(--report-doc-pad-x);
    padding-right: var(--report-doc-pad-x);
  }
}

.doc-wrap--report + .site-foot .foot-legal {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: var(--sp-2) var(--sp-3);
  width: 100%;
}

.doc-wrap--report + .site-foot .foot-legal a {
  flex: 0 0 auto;
  white-space: nowrap;
  font-weight: var(--fw-normal);
}

@media (max-width: 639.98px) {
  .doc-wrap--report + .site-foot .foot-legal {
    flex-wrap: wrap;
    gap: 0;
  }
}

@media (max-width: 359.98px) {
  .doc-wrap--report + .site-foot .foot-legal {
    flex-wrap: wrap;
  }
}

.mobile-actions {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  display: flex;
  gap: var(--sp-2);
  padding: var(--sp-3) max(var(--sp-3), env(safe-area-inset-right)) calc(var(--sp-3) + env(safe-area-inset-bottom)) max(var(--sp-3), env(safe-area-inset-left));
  background: var(--paper);
  border-top: 1px solid var(--line);
  z-index: 6;
}

.mobile-actions .btn { flex: 1; }

.head-actions { display: none; }

@media (max-width: 639px) {
  .title-actions { gap: var(--sp-2); }
}

@media (max-width: 699px) {
  .page-header-actions .csv-header-btn .csv-header-btn-label,
  .page-header-actions .trip-csv-btn .trip-csv-btn-label {
    display: none;
  }
  .page-header-actions .csv-header-btn,
  .page-header-actions .trip-csv-btn {
    width: var(--hit-min);
    min-width: var(--hit-min);
    height: var(--hit-min);
    min-height: var(--hit-min);
    padding-inline: 0;
    justify-content: center;
    gap: 0;
    flex-wrap: nowrap;
    white-space: nowrap;
  }
  .page-header-actions .csv-header-btn .ico,
  .page-header-actions .trip-csv-btn .ico {
    width: 1.35rem;
    height: 1.35rem;
  }
  .topbar { display: grid; grid-template-columns: 1fr auto; gap: var(--sp-3) var(--sp-3); align-items: center; }
  .top-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-2);
  }
  .top-actions .lang { grid-column: 1 / -1; justify-content: flex-start; }
  .top-actions .lang + .btn:last-child { grid-column: 1 / -1; }
  .top-actions .btn {
    width: 100%;
    min-width: 0;
    white-space: normal;
    text-align: center;
    line-height: var(--lh-tight);
    padding-inline: var(--sp-3);
  }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn, .row-actions .btn { width: 100%; }
  .card-compact > .btn,
  .card-compact form > .btn,
  .card-compact .toolbar-row .btn,
  .card-compact .share-toolbar .btn,
  .card-compact .project-foot-row-btn { width: auto; }
  .card > .btn,
  .card form > .btn:not(.btn-small),
  .subcard > .btn,
  .subcard form > .btn:not(.btn-small),
  .danger-zone .btn,
  .narrow > .btn,
  .file,
  .file .btn { width: 100%; }
  .time-photo-actions .file { flex: 1 1 calc(50% - 4px); min-width: 0; }
  .time-photo-camera { display: inline-flex; }
  .side { padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }
  .side-nav {
    flex: 1 1 100%;
    min-width: 0;
    flex-wrap: wrap;
    overflow: visible;
    max-width: 100%;
  }
  .side-foot { margin-left: 0; }
  .sheet, .doc, .card, .subcard { padding-left: var(--pad-card-inline-mobile); padding-right: var(--pad-card-inline-mobile); }
  .card, .card-compact, .subcard { --card-pad-inline: var(--pad-card-inline-mobile); }
  .meta { grid-template-columns: 1fr; }
  .modal { width: min(480px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow: auto; }
}

@media (min-width: 700px) {
  h2 { font-size: var(--fs-lg); }
  h3 { font-size: var(--fs-base); }
  .btn { min-height: var(--hit-min); }
  input, textarea, select { min-height: var(--hit-min); }
  .time-entry-label input { min-height: var(--control-h); }
  .timer-toggle { min-height: 52px; font-size: var(--fs-base); }
  .timer-elapsed { font-size: 1.65rem; }
  .split { grid-template-columns: 1fr 1fr; }
  .grid-form { grid-template-columns: 1fr 1fr; }
  .grid-form > button { grid-column: 1 / -1; justify-self: start; width: auto; }
  .grid-form > .address-block { grid-column: 1 / -1; }
  .side-cards { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .side-cards-aside { grid-column: 2; }
  .warehouse-list.jobs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .warehouses-page .warehouse-list.jobs { grid-template-columns: 1fr; }
}

@media (min-width: 700px) and (max-width: 959px) {
  .main { padding: var(--sp-6) var(--sp-6) calc(96px + env(safe-area-inset-bottom)); margin-inline: auto; }
  .hero { gap: var(--sp-6); }
  .auth-wrap { padding-top: 56px; }
}

@media (max-width: 639.98px) {
  .auth-card > .btn {
    width: 100%;
  }

  .auth-card-note a {
    display: inline-flex;
    align-items: center;
    min-height: var(--hit-min);
  }
}

@media (max-width: 799px) {
  ul.stock-list .stock-row-compact.stock-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto auto;
    align-items: center;
    gap: var(--sp-2) var(--sp-3);
  }
  ul.stock-list .stock-row-compact .stock-name { grid-column: 1; grid-row: 1; }
  ul.stock-list .stock-row-compact .stock-value {
    grid-column: 2;
    grid-row: 1;
    text-align: right;
    font-weight: var(--fw-semibold);
  }
  ul.stock-list .stock-row-compact .stock-qty-field input {
    min-width: 3.5rem;
    flex: 1 1 3.5rem;
  }
  ul.stock-list .stock-row-compact .stock-qty-field { grid-column: 1; grid-row: 2; }
  ul.stock-list .stock-row-compact .stock-field:not(.stock-qty-field) {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
  }
  ul.stock-list .stock-row-compact .stock-history-col {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
    margin-left: var(--sp-2);
  }
  ul.stock-list .stock-row-compact .stock-history {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
  }
  ul.stock-list .stock-row-compact:has(.stock-history) .stock-field:not(.stock-qty-field) {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
  }
  ul.stock-list .stock-row-compact:has(.stock-history) .stock-qty-field { grid-column: 1; grid-row: 2; }
  ul.stock-list .stock-row-compact:has(.stock-history) .stock-history-col {
    grid-column: 2;
    grid-row: 2;
  }
  ul.stock-list .stock-row-compact .stock-history-panel--full {
    grid-column: 1 / -1;
    grid-row: 3;
  }
  .stock-movement-row {
    grid-template-columns: 7rem 6rem;
  }
  .stock-movement-reason {
    grid-column: 1 / -1;
  }
  .csv-import-row {
    flex-direction: column;
    align-items: stretch;
  }
  .csv-import-row-meta {
    margin-left: 0;
    text-align: left;
  }
}

@media (min-width: 800px) {
  .top-nav { display: flex; }
  .hero { padding-top: var(--sp-6); }
  .customer-list { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .add-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .line { grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; }
  ul.stock-list .stock-list-head,
  ul.stock-list .stock-row {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.75fr) minmax(0, 1.15fr) minmax(0, 0.7fr) 32px;
    align-items: center;
    gap: var(--sp-2) var(--sp-3);
  }
  ul.stock-list .stock-row-compact.line { min-height: var(--hit-min); padding: var(--sp-1) 0; }
  ul.stock-list.stock-list-scroll .stock-list-head {
    position: sticky;
    top: 0;
    z-index: 5;
    background: var(--paper);
    padding-top: var(--sp-1);
    margin-top: calc(-1 * var(--sp-1));
  }
  ul.stock-list .stock-row .stock-history-col:not(:has(.stock-history)) {
    grid-column: 5;
    grid-row: 1;
    justify-self: center;
  }
  ul.stock-list .stock-row .stock-history {
    grid-column: 5;
    grid-row: 1;
    justify-self: center;
  }
  ul.stock-list .stock-row .stock-history-panel--full {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    max-width: none;
    min-width: 0;
  }
  ul.stock-list .stock-history-col {
    display: block;
    margin-top: 0;
  }
  ul.stock-list .stock-list-head { align-items: center; }
  ul.stock-list .stock-list-head {
    display: grid;
    padding: 0 0 var(--sp-2);
    margin-bottom: var(--sp-1);
    border-bottom: 1px solid var(--line);
  }
  ul.stock-list .stock-row { border-bottom: 1px solid var(--line); }
  .head-actions { display: flex; }
  .mobile-actions { display: none; }
  .main { padding-bottom: calc(var(--sp-6) + var(--sp-4)); }
  .flag-fab { bottom: 22px; }
  .toast { bottom: 88px; }
  .shell:not(:has(.mobile-actions)) .flag-fab { bottom: calc(16px + env(safe-area-inset-bottom)); }
}

@media (min-width: 900px) {
  .how-panel { padding: var(--sp-6) var(--sp-6) var(--sp-6); }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-6); align-items: stretch; }
  .steps li {
    grid-template-columns: 1fr;
    padding: var(--sp-5) var(--sp-5) var(--sp-5);
    align-content: start;
  }
  .step-mark {
    display: flex;
    align-items: flex-start;
    min-height: 72px;
  }
  .step-no-bg { font-size: clamp(96px, 10vw, 120px); }
  .steps li:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 46px;
    right: -20px;
    width: 10px;
    height: 10px;
    border-top: 2.5px solid var(--pine);
    border-right: 2.5px solid var(--pine);
    transform: rotate(45deg);
  }
}

@media (min-width: 960px) {
  .shell { display: grid; grid-template-columns: 228px minmax(0, 1fr); }
  .side {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: var(--sp-1);
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100dvh;
    border-bottom: 0;
    border-right: 1px solid var(--line);
    padding: var(--sp-4) var(--sp-3) var(--sp-3);
    background: rgba(255, 255, 255, 0.92);
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
  }

  .shell .side::-webkit-scrollbar {
    width: var(--scrollbar-size);
  }

  .shell .side::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
  }

  .shell .side::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: var(--radius-pill);
    border: calc(var(--sp-1) / 2) solid transparent;
    background-clip: content-box;
  }

  .shell .side::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
  }

  .shell .side::-webkit-scrollbar-button {
    display: none;
  }

  .side .brand.brand--app {
    margin-bottom: var(--sp-1);
    flex: none;
  }
  .side-nav { flex-direction: column; overflow: visible; width: 100%; gap: 0; }
  .side-nav a {
    width: 100%;
    min-height: 38px;
    padding: 0 var(--sp-2);
    border-radius: var(--radius-sm);
    font-size: var(--fs-sm);
  }
  .side-nav a .count { margin-left: auto; font-size: var(--fs-xs); }
  /* flex-basis 100% is width on mobile .side (row); on column .side it becomes height and wraps a 2nd column */
  .side-nav-group {
    flex: 0 0 auto;
    width: 100%;
    margin-top: var(--sp-1);
    padding-top: var(--sp-2);
  }
  .side-nav-group-label {
    margin-bottom: var(--sp-1);
    padding: 0 var(--sp-2);
    font-size: 0.75rem;
  }
  .side-nav-sub { gap: 0; }
  .side-nav-sub a {
    width: 100%;
    min-height: 36px;
    padding: 0 var(--sp-2) 0 var(--sp-4);
    font-size: var(--fs-sm);
    border-radius: var(--radius-sm);
  }
  .side-nav-sub a .count { margin-left: auto; }
  .side-running { flex: 0 0 auto; margin-top: var(--sp-1); }
  .side-running-link { width: 100%; min-height: 38px; padding: var(--sp-2) var(--sp-2); }
  .side-foot {
    margin-top: auto;
    margin-left: 0;
    flex-direction: column;
    align-items: stretch;
    gap: var(--sp-2);
    padding-top: var(--sp-2);
  }
  .main { padding: var(--sp-6) var(--sp-6) calc(var(--sp-6) * 2); }
  .warehouse-list.jobs { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .warehouses-page .warehouse-list.jobs { grid-template-columns: 1fr; }
}

@media (min-width: 960px) and (max-height: 820px) {
  .side { padding: var(--sp-3) var(--sp-3) var(--sp-2); gap: var(--sp-1); }
  .side-nav a { min-height: 34px; font-size: var(--fs-sm); }
  .side-nav-sub a { min-height: var(--btn-h-xs); font-size: var(--fs-sm); }
  .side-nav-group { padding-top: var(--sp-2); }
  .side-foot .btn,
  .side-foot .lang a { min-height: var(--btn-h-xs); font-size: var(--fs-sm); }
}

@media (min-width: 1100px) {
  .project-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-section);
    align-items: start;
  }
  .project-layout .line { grid-template-columns: minmax(0, 1fr); }
  .project-foot-compact {
    display: block;
  }
}

@media (min-width: 1280px) {
  .topbar, .hero, .band, .site-foot { max-width: 1180px; }
  .project-layout .photos { grid-template-columns: 1fr 1fr; }
  .jobs { grid-template-columns: 1fr 1fr; }
  .warehouse-list.jobs { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .warehouses-page .warehouse-list.jobs { grid-template-columns: 1fr 1fr; }
  .doc { padding: 40px 36px; }
}

@media (min-width: 1600px) {
  .shell { grid-template-columns: 280px minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

.flag-fab {
  position: fixed;
  right: 16px;
  bottom: calc(78px + env(safe-area-inset-bottom));
  z-index: 25;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--pine);
  box-shadow: var(--shadow-card);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 640px) {
  .flag-fab { bottom: calc(16px + env(safe-area-inset-bottom)); }
}

@media (min-width: 640px) and (max-width: 799px) {
  .shell .main { padding-right: calc(48px + 16px + var(--sp-2)); }
}

@media (min-width: 1024px) {
  .shell .main {
    padding-bottom: calc(48px + 32px + env(safe-area-inset-bottom, 0px));
  }
}

.flag-fab:hover { border-color: var(--pine); }

.count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  margin-left: var(--sp-2);
  padding: 0 5px;
  border-radius: var(--radius-pill);
  background: var(--pine);
  color: #f4fbf7;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
}

.modal {
  width: min(480px, calc(100% - 24px));
  max-width: calc(100vw - 24px);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: var(--sp-4) var(--sp-4) var(--sp-2);
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow-card);
}

.modal::backdrop { background: rgba(30, 26, 22, 0.45); }

.modal h2 { font-size: var(--fs-xl); }

.feedback-image-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: var(--sp-2);
}

.feedback-image-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.feedback-image-label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  margin: 0;
}

.feedback-image-hint {
  margin: 0;
  width: 100%;
  max-width: none;
}

.feedback-image-picker { display: flex; flex-direction: column; gap: 6px; }

@media (min-width: 640px) {
  .feedback-image-row { flex-wrap: nowrap; }
  .feedback-image-label { flex: 0 0 auto; }
}

.feedback-image-field .file { display: inline-flex; width: auto; }

.feedback-image-field .file .btn { width: auto; justify-content: flex-start; }

.feedback-image-selected {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2) var(--sp-3);
}

.feedback-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-2);
}

.feedback-attachment-thumb {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--paper);
  cursor: pointer;
  overflow: hidden;
  line-height: 0;
}

.feedback-attachment-thumb img {
  display: block;
  width: 4.5rem;
  height: 4.5rem;
  object-fit: cover;
}

.feedback-lightbox {
  padding: 0;
  border: none;
  max-width: min(96vw, 56rem);
  width: 100%;
  background: transparent;
}

.feedback-lightbox::backdrop {
  background: color-mix(in srgb, var(--ink) 55%, transparent);
}

.feedback-lightbox-inner {
  margin: 0;
  padding: var(--sp-2);
  background: var(--paper);
  border-radius: var(--radius-control);
  position: relative;
}

.feedback-lightbox-close {
  position: absolute;
  top: var(--sp-2);
  right: var(--sp-2);
  z-index: 1;
}

.feedback-lightbox-img {
  display: block;
  max-width: 100%;
  max-height: min(80vh, 40rem);
  max-height: min(80dvh, 40rem);
  margin: 0 auto;
  border-radius: var(--radius-control);
}

@media (min-width: 640px) {
  .feedback-attachment-thumb img {
    width: 5.5rem;
    height: 5.5rem;
  }
}

.feedback-reply-form--with-images {
  flex-direction: column;
  align-items: stretch;
}

.feedback-form-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3) var(--sp-3);
  margin-top: var(--sp-4);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--line);
  min-width: 0;
  max-width: 100%;
}

.feedback-form-foot-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  margin-left: auto;
  min-width: 0;
}

#feedback-dialog {
  box-sizing: border-box;
  width: min(480px, calc(100vw - 24px));
}

#feedback-dialog fieldset {
  position: relative;
  min-width: 0;
  max-width: 100%;
}

#feedback-form {
  min-width: 0;
  max-width: 100%;
}

#feedback-dialog .feedback-image-row {
  flex-wrap: wrap;
  min-width: 0;
}

#feedback-dialog .feedback-image-field {
  min-width: 0;
  max-width: 100%;
}

#feedback-form .feedback-form-foot .btn { width: auto; }

.segmented {
  border: 0;
  margin: var(--sp-2) 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  align-items: center;
}

.segmented legend:not(.sr) { width: 100%; font-size: var(--fs-sm); font-weight: var(--fw-semibold); padding: 0; }

.segmented label {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  margin: 0;
  min-height: var(--hit-min);
  padding: 0 var(--sp-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: #fff;
  font-weight: var(--fw-semibold);
}

.segmented input { width: 18px; min-height: 18px; height: 18px; }

.segmented--control {
  flex-wrap: nowrap;
  gap: var(--sp-1);
  padding: var(--sp-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--bg);
}

.segmented--control .segmented-option {
  flex: 1 1 0;
  justify-content: center;
  min-height: var(--hit-min);
  padding: 0 var(--sp-3);
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  font-weight: var(--fw-semibold);
  font-size: var(--fs-sm);
}

.segmented--control .segmented-option:has(input:checked) {
  background: var(--pine-soft);
  color: var(--pine-deep);
}

.segmented--control .segmented-option:focus-within {
  outline: 2px solid var(--pine);
  outline-offset: 1px;
}

#feedback-dialog .segmented--control .segmented-option {
  white-space: nowrap;
  padding: 0 var(--sp-1);
}

@media (min-width: 640px) {
  #feedback-dialog .segmented--control .segmented-option {
    padding: 0 var(--sp-3);
  }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(140px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 40;
  width: max-content;
  max-width: min(420px, calc(100% - 32px));
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-control);
  background: var(--ink);
  color: var(--paper);
  box-shadow: var(--shadow-card);
}

body:has(#cookie-notice:not([hidden])) .toast {
  z-index: 50;
}

.badge-bug, .badge-dismissed { background: var(--danger-soft); color: var(--danger); }

.badge-idea, .badge-received { background: var(--brass-soft); color: var(--brass); }

.badge-new { background: var(--bg); color: var(--muted); }

.badge-in_progress { background: var(--pine-soft); color: var(--pine-deep); }

.badge-done { background: var(--pine); color: #f4fbf7; }

.badge-question { background: var(--blue-soft); color: var(--blue-deep); }

.badge.badge-feedback-bug,
.badge.badge-feedback-idea,
.badge.badge-feedback-question {
  border-radius: var(--radius-sm);
}

.badge.badge-feedback-bug {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid color-mix(in srgb, var(--danger) 45%, var(--line));
}

.badge.badge-feedback-idea {
  background: var(--brass-soft);
  color: var(--brass);
  border: 1px solid color-mix(in srgb, var(--brass) 45%, var(--line));
}

.badge.badge-feedback-question {
  background: var(--blue-soft);
  color: var(--blue-deep);
  border: 1px solid color-mix(in srgb, var(--blue-deep) 45%, var(--line));
}

.shot {
  max-height: 420px;
  width: auto;
  border-radius: var(--radius-control);
  border: 1px solid var(--line);
  margin: var(--sp-2) 0;
}

.meta {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: var(--sp-2) var(--sp-3);
  margin: 0;
}

.meta dt { color: var(--muted); font-size: var(--fs-sm); }

.meta dd { margin: 0; overflow-wrap: anywhere; }

.note-fresh .job-action-card { border-color: var(--pine); }

.list-with-actions { display: grid; gap: var(--space-section); }

.list-with-actions-item { min-width: 0; }

.job-action-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--sp-2);
  align-items: start;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  padding: var(--pad-card);
  min-height: var(--btn-h-sm);
  min-width: 0;
}

.job-action-card:hover { border-color: var(--pine); }

.job-action-hit {
  display: grid;
  gap: var(--sp-1);
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

a.job-action-hit:hover { color: inherit; }

.job-action { margin: 0; align-self: start; }

.job-action .btn-icon {
  min-height: var(--hit-min);
  min-width: var(--hit-min);
  padding: 0;
  border-color: transparent;
  background: transparent;
}

.job-action .btn-icon:hover { background: var(--pine-soft); border-color: transparent; }

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding-inline: var(--sp-3);
  flex-shrink: 0;
}

.btn-icon .ico { width: 1.35rem; height: 1.35rem; }

@media (max-width: 639px) {
  .btn,
  .btn-primary,
  .btn-ghost,
  .btn-danger,
  .btn-small {
    min-height: var(--hit-min);
    height: auto;
    font-size: var(--fs-base);
    padding: 0 var(--btn-pad-x);
    border-radius: var(--radius-btn);
    box-sizing: border-box;
  }

  .customer-list-search .btn-small {
    min-height: var(--hit-min);
  }

  .btn-icon {
    min-width: var(--hit-min);
    min-height: var(--hit-min);
    padding: 0;
    border-radius: var(--radius-btn);
  }

  .btn-icon .ico {
    width: var(--row-icon);
    height: var(--row-icon);
    font-size: var(--row-icon);
  }
}

@media (min-width: 640px) and (max-width: 699.98px) {
  .btn,
  .btn-primary,
  .btn-ghost,
  .btn-danger,
  .btn-small {
    min-height: var(--hit-min);
    height: auto;
    font-size: var(--fs-base);
    padding: 0 var(--btn-pad-x);
    border-radius: var(--radius-btn);
    box-sizing: border-box;
  }

  .btn-icon {
    min-width: var(--hit-min);
    min-height: var(--hit-min);
    padding: 0;
  }
}

.item-delete { margin-top: var(--sp-4); padding-top: var(--sp-4); border-top: 1px solid var(--line); }

.page-head-tight { margin-bottom: var(--sp-2); }

.account-page-stack {
  max-width: min(42rem, 100%);
  min-width: 0;
}

.account-page-stack > .card:first-child,
.account-page-stack > form:first-child {
  margin-top: 0;
}

.profile-card-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--sp-2) var(--sp-3);
  font-size: var(--fs-section);
}

.profile-subscription-card .profile-subscription-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-2);
}

.profile-subscription-card .profile-subscription-stack > * {
  margin: 0;
}

.profile-subscription-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2) var(--sp-3);
  width: 100%;
}

.profile-subscription-heading .profile-card-heading {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}

.profile-subscription-tier {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--sp-2) var(--sp-3);
  flex: 0 1 auto;
  min-width: 0;
}

.profile-subscription-pitch-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2) var(--sp-3);
  width: 100%;
}

.profile-subscription-pitch-row .profile-subscription-pitch {
  flex: 1 1 12rem;
  min-width: 0;
  margin: 0;
}

.profile-subscription-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  flex: 0 0 auto;
}

.profile-subscription-card .profile-billing-portal-form,
.profile-subscription-card .profile-billing-checkout-form {
  margin: 0;
}

.profile-field-saved {
  font-weight: var(--fw-normal);
}

.profile-field-error {
  margin: var(--sp-1) 0 var(--sp-2);
}

.profile-vat-block.is-hidden {
  display: none;
}

.admin-settings-card > .card-heading {
  font-size: var(--fs-lg);
  margin-bottom: var(--sp-2);
}

.admin-setting-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-3) var(--sp-4);
}

.admin-settings-card .admin-setting-row {
  align-items: center;
  gap: var(--sp-2) var(--sp-3);
  padding: var(--sp-2) 0;
  border-bottom: 1px solid var(--line);
}

.admin-settings-card .admin-setting-row:first-of-type {
  padding-top: 0;
}

.admin-settings-card .admin-setting-row:last-of-type {
  border-bottom: 0;
  padding-bottom: 0;
}

.admin-setting-label {
  flex: 1 1 12rem;
  min-width: 0;
}

.admin-setting-name {
  display: block;
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
}

.admin-setting-label .tiny {
  margin: var(--sp-1) 0 0;
}

.admin-setting-num {
  width: 6.5rem;
  min-width: 6.5rem;
  max-width: 6.5rem;
  flex: 0 0 6.5rem;
  box-sizing: border-box;
  margin: 0;
  min-height: var(--control-h);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.admin-setting-num[type="date"] {
  min-width: 11rem;
  max-width: none;
}

.admin-settings-card > .card-heading .admin-settings-saved {
  margin-left: var(--sp-2);
  font-weight: var(--fw-normal);
}

.admin-settings-foot {
  display: flex;
  justify-content: flex-end;
  margin-top: var(--sp-4);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--line);
}

.csv-import-file-block {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2) var(--sp-3);
  margin: var(--sp-3) 0 0;
}

.csv-import-filename {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.csv-import-note { margin: 0 0 var(--sp-2); }

.csv-import-preview-list { list-style: none; padding: 0; margin: 0; }

.csv-import-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-2) var(--sp-3);
  padding: var(--sp-2) 0;
  border-bottom: 1px solid var(--line);
}

.csv-import-preview-list .csv-import-row:last-child { border-bottom: 0; }

.csv-import-row-name {
  flex: 1 1 auto;
  min-width: 0;
}

.csv-import-row-detail {
  display: block;
  margin-top: var(--sp-1);
  color: var(--danger);
}

.csv-import-row-meta {
  flex: 0 0 auto;
  margin-left: auto;
  text-align: right;
}

.csv-import-row-meta.num { font-variant-numeric: tabular-nums; }

.csv-import-row--error,
.csv-import-row--error .csv-import-row-name { color: var(--danger); }

.csv-import-mode-rows { margin-bottom: 0; }

.csv-import-preview-foot {
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.admin-settings-foot .btn-primary {
  box-shadow: var(--shadow-control);
}

.admin-settings-card--brand > .tiny.muted {
  margin: 0;
  line-height: var(--lh-base);
}

.admin-brand-files {
  list-style: none;
  margin: var(--sp-1) 0 0;
  padding: 0;
  display: grid;
  gap: var(--sp-1);
  font-size: var(--fs-sm);
  line-height: var(--lh-base);
  color: var(--muted);
}

.admin-brand-files code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: inherit;
  font-weight: var(--fw-semibold);
  color: var(--muted);
}

.profile-form-grid {
  display: grid;
  gap: var(--sp-3) var(--sp-5);
  align-items: start;
}

@media (max-width: 1099px) {
  .profile-form-grid {
    row-gap: var(--sp-2);
  }
}

@media (max-width: 699.98px) {
  .profile-logo-block {
    position: relative;
  }

  .profile-logo-block .help-tip-wrap {
    position: static;
  }

  .profile-logo-block .help-tip-popover {
    left: 0;
    right: var(--sp-4);
    width: auto;
    min-width: 0;
    max-width: none;
  }
}

@media (max-width: 699px) {
  .profile-form-save .btn-primary[type="submit"] {
    width: 100%;
  }
}

@media (max-width: 639.98px) {
  .profile-logo-block .help-tip-popover {
    scroll-margin-bottom: calc(
      var(--bottom-nav-h, 0px) + 2 * var(--sp-2) + 1px + env(safe-area-inset-bottom, 0px) + var(--sp-2)
    );
  }
}

@media (max-width: 639px) {
  .profile-account-row {
    min-height: var(--hit-min);
    align-items: center;
  }

  .profile-account-row-action .btn {
    position: relative;
    min-height: var(--hit-min);
  }

  .field--password .password-toggle {
    min-height: var(--hit-min);
    min-width: var(--hit-min);
  }

  .profile-account-row-action .btn::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: var(--hit-min);
    height: var(--hit-min);
    transform: translate(-50%, -50%);
  }

  .profile-logo-block .help-tip-open,
  .profile-vehicle-actions .btn-icon,
  .profile-form-col .btn-small.btn-icon {
    position: relative;
  }

  .profile-logo-block .help-tip-open::after,
  .profile-vehicle-actions .btn-icon::after,
  .profile-form-col .btn-small.btn-icon::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: var(--hit-min);
    height: var(--hit-min);
    transform: translate(-50%, -50%);
  }
}

@media (min-width: 700px) {
  .profile-form-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "main aside";
  }
  .profile-form-main { grid-area: main; }
  .profile-form-aside { grid-area: aside; }
}

.profile-form-col label:first-child { margin-top: 0; }

.trips-vehicles-panel {
  margin-bottom: var(--sp-3);
}

.trips-vehicles-panel-summary {
  cursor: pointer;
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
}

.trips-vehicles-panel-summary::-webkit-details-marker { display: none; }

.trips-vehicles-panel-title {
  font-weight: var(--fw-semibold);
  font-size: var(--fs-base);
}

.trips-vehicles-panel-manage {
  font-size: var(--fs-btn-compact);
  font-weight: var(--fw-semibold);
  flex-shrink: 0;
}

.trips-vehicles-lead { margin: 0 0 var(--sp-3); }

.trips-vehicles-panel-body {
  margin-top: var(--sp-3);
}

.trips-vehicles-inline .trips-vehicles-panel-body {
  padding: 0 var(--card-pad-inline) var(--card-pad-inline);
  box-sizing: border-box;
}

.trips-vehicles-empty-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
}

.trips-vehicles-empty-card .empty-state--compact {
  margin: 0;
  width: 100%;
}

.trips-vehicles-archived {
  margin: var(--sp-3) 0 var(--sp-3);
  font-size: var(--fs-sm);
}

.trips-vehicles-panel-body .vehicle-create-open { margin-top: var(--sp-3); }

.vehicle-create-row { margin-top: var(--sp-3); }

.vehicle-create-form {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-3);
  align-items: flex-end;
}

.vehicle-create-no-reg {
  flex: 1 1 100%;
  margin: 0;
}

.vehicle-create-reg,
.vehicle-create-name {
  flex: 1 1 10rem;
  min-width: 0;
  margin: 0;
}

.vehicle-create-reg input,
.vehicle-create-name input {
  width: 100%;
  min-height: var(--hit-min);
  font-size: var(--fs-input);
}

.vehicle-create-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  flex-shrink: 0;
}

.profile-vehicles-list {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--sp-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--paper);
}

.profile-vehicles-list > li {
  list-style: none;
}

.profile-vehicles-list > li::marker {
  content: "";
}

.profile-vehicles-item { margin: 0; }

.profile-vehicles-item:not(:last-child) {
  border-bottom: 1px solid var(--line);
}

.profile-vehicle-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--sp-2) var(--sp-3);
  align-items: center;
  padding: var(--sp-2) var(--sp-3);
  min-height: var(--hit-min);
  box-sizing: border-box;
}

.profile-vehicle-row-archived {
  grid-template-columns: minmax(0, 1fr) auto;
  font-size: var(--fs-sm);
}

.profile-vehicle-archived-label { min-width: 0; }

.profile-vehicle-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  justify-self: end;
}

.profile-vehicle-restore { margin: 0; }

.profile-vehicle-reg { font-weight: var(--fw-semibold); white-space: nowrap; }

.profile-vehicle-rename {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  margin: 0;
  min-width: 0;
}

.profile-vehicle-reg-locked-hint {
  flex: 1 1 100%;
  margin: 0;
}

.profile-vehicle-rename input {
  min-width: 0;
  min-height: var(--btn-h-sm);
  box-sizing: border-box;
}

.profile-vehicle-rename input[name="registration"] {
  flex: 0 1 auto;
  width: 7.5rem;
  max-width: 100%;
}

.profile-vehicle-rename input[name="name"] {
  flex: 1 1 6rem;
  min-width: 0;
  max-width: 11rem;
}

.profile-vehicle-rename input:disabled {
  color: var(--muted);
  background: var(--bg);
  cursor: not-allowed;
  opacity: 1;
}

.profile-vehicle-archive-trigger {
  color: var(--muted);
  white-space: nowrap;
}

.profile-vehicle-archive-trigger:hover {
  color: var(--ink);
}

.profile-vehicles-list-archived { margin: 0; }

.vehicle-archive-confirm { margin-bottom: var(--sp-3); }

.profile-vehicles-list { margin-top: 0; }

@media (max-width: 639px) {
  .profile-vehicle-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "fields actions";
    gap: var(--sp-2);
    align-items: center;
  }
  .profile-vehicle-row-archived {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "label actions";
  }
  .profile-vehicle-rename {
    grid-area: fields;
    gap: var(--sp-1);
  }
  .profile-vehicle-rename input[name="registration"],
  .profile-vehicle-rename input[name="name"] {
    flex: 1 1 6rem;
    width: auto;
    max-width: 9rem;
  }
  .profile-vehicle-actions {
    grid-area: actions;
    flex-wrap: nowrap;
    justify-self: end;
  }
  .profile-vehicle-archived-label { grid-area: label; }
  .profile-form-col label {
    margin: var(--sp-3) 0;
  }
  .profile-form-col label:first-child {
    margin-top: 0;
  }
  .profile-field {
    margin: var(--sp-3) 0;
  }
  .profile-form-col .btn-primary[type="submit"] {
    width: 100%;
  }
}

.settings-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2) var(--sp-3);
  min-height: var(--hit-min);
  margin: 0 0 var(--sp-2);
  padding: 0;
  min-width: 0;
}

.settings-row-label {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-base);
  flex: 1 1 auto;
  min-width: 0;
}

.settings-hint {
  color: var(--muted);
  font-size: var(--fs-sm);
  line-height: 1;
  cursor: help;
  flex-shrink: 0;
}

.settings-row-controls {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  flex: 0 0 auto;
}

.settings-row-controls input[type="number"] {
  width: 4.5rem;
  flex: 0 0 auto;
  margin: 0;
}

@media (max-width: 639px) {
  .settings-row {
    flex-direction: column;
    align-items: stretch;
    gap: var(--sp-2);
  }
  .settings-row-label { flex: none; }
  .settings-row-controls { width: 100%; }

  #sheet-part[open] {
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  #sheet-part .sheet-bottom-inner {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow: hidden;
  }

  #parts-add-form-mobile {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
  }

  #parts-add-form-mobile button[type="submit"].parts-hit {
    position: sticky;
    bottom: 0;
    z-index: 1;
    width: 100%;
    min-height: var(--hit-min);
    height: var(--hit-min);
    margin-top: var(--sp-2);
    box-sizing: border-box;
  }

  #parts-add-form-mobile button[type="submit"].parts-hit::after {
    inset: 0;
    left: auto;
    top: auto;
    width: auto;
    height: auto;
    transform: none;
  }

  :is(.line-editor--parts, .line-editor--stock) .invoice-lines-table {
    table-layout: auto;
  }
  :is(.line-editor--parts, .line-editor--stock) .invoice-lines-table colgroup {
    display: none;
  }
  :is(.line-editor--parts, .line-editor--stock) .invoice-lines-table thead {
    display: none;
  }
  :is(.line-editor--parts, .line-editor--stock) .invoice-lines-table tbody {
    display: block;
    width: 100%;
  }
  .line-editor--stock .invoice-lines-table {
    overflow-x: clip;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  .line-editor--stock .invoice-lines-table tr.invoice-lines-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: var(--sp-1) var(--sp-2);
    align-items: center;
    padding: var(--sp-1) 0;
    border-bottom: 1px solid var(--line);
    height: auto;
    min-width: 0;
  }

  .line-editor--parts .invoice-lines-table {
    overflow-x: clip;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .line-editor--parts .invoice-lines-table tr.invoice-lines-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    grid-template-areas:
      "desc desc act"
      "qty price total";
    gap: var(--sp-1) var(--sp-2);
    align-items: center;
    padding: var(--sp-1) 0;
    border-bottom: 1px solid var(--line);
    height: auto;
    min-width: 0;
  }

  :is(.line-editor--parts, .line-editor--stock) .invoice-lines-table tr.invoice-lines-row td {
    display: block;
    border: 0;
    padding: 0;
    text-align: left;
    min-width: 0;
  }

  .line-editor--stock .invoice-lines-table tr.invoice-lines-row td.invoice-cell-desc {
    grid-column: 1 / 3;
    grid-row: 1;
    padding-bottom: 0;
    min-width: 0;
  }

  .line-editor--stock .invoice-lines-table tr.invoice-lines-row td.invoice-cell-actions {
    grid-column: 3;
    grid-row: 1;
    display: flex;
    gap: calc(var(--hit-min) - var(--row-btn));
    width: auto;
    justify-self: end;
    padding: 0;
  }

  .line-editor--stock .invoice-lines-table tr.invoice-lines-row td.invoice-cell-qty {
    grid-column: 1;
    grid-row: 2;
  }

  .line-editor--stock .invoice-lines-table tr.invoice-lines-row td.invoice-cell-price {
    grid-column: 2;
    grid-row: 2;
  }

  .line-editor--stock .invoice-lines-table tr.invoice-lines-row td.invoice-cell-line-total {
    grid-column: 1 / -1;
    grid-row: 3;
  }

  .line-editor--stock .invoice-lines-table tr.invoice-lines-row td.invoice-cell-qty,
  .line-editor--stock .invoice-lines-table tr.invoice-lines-row td.invoice-cell-price,
  .line-editor--stock .invoice-lines-table tr.invoice-lines-row td.invoice-cell-line-total {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--sp-1);
    font-variant-numeric: tabular-nums;
    min-width: 0;
  }

  .line-editor--parts .invoice-lines-table tr.invoice-lines-row td.invoice-cell-desc {
    grid-area: desc;
    min-width: 0;
    padding-bottom: 0;
  }

  .line-editor--parts .invoice-lines-table tr.invoice-lines-row td.invoice-cell-actions {
    grid-area: act;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: calc(var(--hit-min) - var(--row-btn));
    width: auto;
    justify-self: end;
    padding: 0;
  }

  .line-editor--parts .invoice-lines-table tr.invoice-lines-row td.invoice-cell-qty {
    grid-area: qty;
  }

  .line-editor--parts .invoice-lines-table tr.invoice-lines-row td.invoice-cell-price {
    grid-area: price;
  }

  .line-editor--parts .invoice-lines-table tr.invoice-lines-row td.invoice-cell-line-total {
    grid-area: total;
    white-space: nowrap;
  }

  .line-editor--parts .invoice-lines-table tr.invoice-lines-row td.invoice-cell-qty,
  .line-editor--parts .invoice-lines-table tr.invoice-lines-row td.invoice-cell-price,
  .line-editor--parts .invoice-lines-table tr.invoice-lines-row td.invoice-cell-line-total {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--sp-1);
    font-variant-numeric: tabular-nums;
    min-width: 0;
  }

  :is(.line-editor--parts, .line-editor--stock) .invoice-lines-table .invoice-input-qty {
    width: auto;
    flex: 1 1 0;
    min-width: 3rem;
    max-width: 100%;
  }

  :is(.line-editor--parts, .line-editor--stock) .invoice-lines-table .invoice-input-price {
    width: auto;
    flex: 0 1 auto;
    min-width: 11ch;
    max-width: 100%;
  }

  .line-editor--parts .invoice-lines-table .invoice-input-qty,
  .line-editor--parts .invoice-lines-table .invoice-input-price {
    width: auto;
    min-width: 0;
    flex: 1 1 auto;
  }

  .line-editor--stock .invoice-lines-table tr.invoice-lines-row td.invoice-cell-line-total {
    flex: 1 1 auto;
    justify-content: flex-end;
  }

  .line-editor--parts .invoice-lines-table tr.invoice-lines-row td.invoice-cell-desc .parts-name-line {
    align-items: baseline;
    min-width: 0;
  }

  .line-editor--parts .invoice-lines-table tr.invoice-lines-row td.invoice-cell-desc .parts-name-text {
    white-space: normal;
    overflow-wrap: anywhere;
    min-width: 0;
  }
  .parts-save-btn.parts-hit,
  .parts-vat-select,
  .line-editor--parts .invoice-lines-table .invoice-input-qty,
  .line-editor--parts .invoice-lines-table .invoice-input-price {
    min-height: var(--hit-min);
    height: var(--hit-min);
    box-sizing: border-box;
  }
  .line-editor--stock .invoice-lines-table .invoice-input-qty,
  .line-editor--stock .invoice-lines-table .invoice-input-price {
    width: 100%;
    min-width: 0;
    flex: 1 1 0;
    min-height: var(--control-h-sm);
    height: var(--control-h-sm);
    box-sizing: border-box;
  }
  .line-editor--stock .stock-qty-field .unit,
  .line-editor--stock .invoice-lines-table tr.invoice-lines-row td.invoice-cell-qty::after,
  .line-editor--stock .invoice-lines-table tr.invoice-lines-row td.invoice-cell-price::after {
    flex: 0 0 auto;
  }
  .parts-vat-label .parts-vat-select.parts-hit {
    width: 100%;
  }
  .parts-vat-select.parts-hit::after,
  .parts-save-btn.parts-hit::after {
    inset: 0;
    left: auto;
    top: auto;
    width: auto;
    height: auto;
    transform: none;
  }
  :is(.line-editor--parts, .line-editor--stock) .invoice-lines-table .parts-hit::after {
    inset: calc((var(--control-h-sm) - var(--hit-min)) / 2 * -1);
    left: auto;
    top: auto;
    width: auto;
    height: auto;
    transform: none;
  }
  :is(.line-editor--parts, .line-editor--stock) .invoice-line-remove.parts-hit::after,
  :is(.line-editor--parts, .line-editor--stock) .parts-line-delete-trigger.parts-hit::after,
  .line-editor--parts .parts-line-edit.parts-hit::after {
    inset: auto;
    left: 50%;
    top: 50%;
    width: var(--hit-min);
    height: var(--hit-min);
    transform: translate(-50%, -50%);
  }
  .line-editor--stock .invoice-lines-table .stock-history-toggle.parts-hit {
    width: var(--row-btn);
    height: var(--row-btn);
    min-width: var(--row-btn);
    max-width: var(--row-btn);
    min-height: var(--row-btn);
    max-height: var(--row-btn);
  }
  .line-editor--stock .invoice-lines-table .stock-history-toggle.parts-hit::after {
    inset: auto;
    left: 50%;
    top: 50%;
    width: var(--hit-min);
    height: var(--hit-min);
    transform: translate(-50%, -50%);
  }
  :is(.line-editor--parts, .line-editor--stock) .invoice-lines-table tr.invoice-lines-row td.invoice-cell-qty::before,
  :is(.line-editor--parts, .line-editor--stock) .invoice-lines-table tr.invoice-lines-row td.invoice-cell-price::before,
  :is(.line-editor--parts, .line-editor--stock) .invoice-lines-table tr.invoice-lines-row td.invoice-cell-line-total::before {
    display: none;
  }
  :is(.line-editor--parts, .line-editor--stock) .invoice-lines-table tr.invoice-lines-row td.invoice-cell-qty::after {
    content: "×";
    color: var(--muted);
    font-weight: var(--fw-normal);
    flex-shrink: 0;
    margin-inline-end: var(--sp-1);
  }
  :is(.line-editor--parts, .line-editor--stock) .invoice-lines-table tr.invoice-lines-row td.invoice-cell-price::after {
    content: "=";
    color: var(--muted);
    font-weight: var(--fw-normal);
    flex-shrink: 0;
  }
  .line-editor--stock .invoice-line-remove,
  .line-editor--stock .parts-line-delete-trigger {
    width: auto;
    height: auto;
    min-width: var(--hit-min);
    min-height: var(--hit-min);
  }
  .line-editor--parts .invoice-line-remove,
  .line-editor--parts .parts-line-delete-trigger,
  .line-editor--parts .parts-line-edit {
    width: var(--row-btn);
    height: var(--row-btn);
    min-width: var(--row-btn);
    min-height: var(--row-btn);
  }
  .line-editor--stock .invoice-lines-table--readonly tr.invoice-lines-row {
    grid-template-columns: minmax(0, 1fr) auto auto auto;
  }

  .line-editor--stock .invoice-lines-table--readonly tr.invoice-lines-row td.invoice-cell-desc {
    grid-column: 1 / -1;
    grid-row: 1;
  }
  :is(.line-editor--parts, .line-editor--stock) .invoice-lines-table tfoot { display: block; }
  :is(.line-editor--parts, .line-editor--stock) .invoice-lines-table tfoot tr.invoice-lines-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-3) 0 0;
    border-bottom: 0;
  }
  :is(.line-editor--parts, .line-editor--stock) .invoice-lines-table tfoot tr.invoice-lines-total td {
    display: block;
    border: 0;
    padding: 0;
  }
  .line-editor--parts .invoice-lines-table tfoot tr.invoice-lines-total td.invoice-cell-actions:empty {
    display: none;
  }
  .line-editor--parts tr.parts-line-edit-row:target,
  .line-editor--parts tr.parts-line-edit-row.is-open {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
  .line-editor--parts tr.parts-line-edit-row:target > td,
  .line-editor--parts tr.parts-line-edit-row.is-open > td {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    border: 0;
    padding: 0;
  }
  .line-editor--parts .parts-line-edit-form,
  .line-editor--parts .parts-line-edit-form > * {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
  .line-editor--parts .parts-line-edit-form input,
  .line-editor--parts .parts-line-edit-form select {
    min-width: 0;
    max-width: 100%;
  }
  .line-editor--parts .parts-line-edit-form .catalog-meta-fields {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .line-editor--parts .parts-line-edit-form .catalog-meta-field,
  .line-editor--parts .parts-line-edit-form .catalog-meta-field--unit,
  .line-editor--parts .parts-line-edit-form .catalog-meta-field--category,
  .line-editor--parts .parts-line-edit-form .catalog-meta-field--ean {
    min-width: 0;
    max-width: 100%;
  }
  .line-editor--parts .parts-line-edit-form .catalog-meta-field--ean {
    grid-column: 1 / -1;
  }
  .line-editor--parts .parts-line-edit-form .catalog-meta-field input,
  .line-editor--parts .parts-line-edit-form .catalog-meta-field select {
    width: 100%;
    box-sizing: border-box;
  }
}

.admin-news-lead { margin: 0 0 var(--sp-2); max-width: 40rem; }

.admin-news-form { display: grid; gap: var(--sp-3); }

.admin-news-form label { margin: 0; }

.admin-news-form label:not(.check) { display: grid; gap: var(--sp-1); font-weight: var(--fw-semibold); }

.admin-news-fieldgroup {
  display: grid;
  gap: var(--sp-3);
}

.admin-news-body-block {
  display: grid;
  gap: var(--sp-1);
}

.admin-news-publish {
  display: grid;
  gap: var(--sp-1);
}

.admin-news-field-hint {
  margin: 0;
  font-weight: var(--fw-normal);
}

.admin-guide-slug-preview-link {
  color: inherit;
  text-decoration: underline;
}

.admin-guide-slug-preview-link:hover {
  color: var(--pine);
}

.admin-news-form textarea { min-height: 8rem; }

@media (min-width: 1280px) {
  .jobs > .job:has(.admin-news-edit) {
    grid-column: 1 / -1;
  }
}

.admin-news-list.job-list--compact .job-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 6.75rem 11.5rem;
  align-items: center;
  column-gap: var(--sp-3);
  row-gap: var(--sp-1);
  min-width: 0;
}

.admin-news-list.job-list--compact .job-row-title {
  grid-column: 1;
  min-width: 0;
}

.admin-news-list.job-list--compact .job-row-sub {
  display: contents;
}

.admin-news-list.job-list--compact .job-row-sub > .badge {
  grid-column: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: stretch;
  align-self: center;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
}

.admin-news-list.job-list--compact .job-row-date {
  grid-column: 3;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  justify-self: start;
}

.admin-news-list.job-list--compact .job-row-actions {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  flex: 0 0 auto;
}

.admin-news-list.job-list--compact .job-row-actions > a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: var(--btn-h-sm);
  height: var(--btn-h-sm);
  white-space: nowrap;
}

.admin-news-list.job-list--compact .job-row-actions > a.btn-icon {
  width: var(--btn-h-sm);
  height: var(--btn-h-sm);
  min-width: var(--btn-h-sm);
  min-height: var(--btn-h-sm);
  padding: 0;
  position: relative;
}

.admin-news-list.job-list--compact .job-row-actions > a.btn-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--hit-min);
  height: var(--hit-min);
  transform: translate(-50%, -50%);
}

@media (max-width: 639px) {
  .admin-news-list.job-list--compact .job-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-news-list.job-list--compact .job-row-title {
    grid-column: 1;
  }

  .admin-news-list.job-list--compact .job-row-sub {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: var(--sp-2);
    grid-column: 1;
    min-width: 0;
  }

  .admin-news-list.job-list--compact .job-row-sub > .badge {
    grid-column: auto;
    width: auto;
    flex: 0 0 auto;
    justify-content: center;
  }

  .admin-news-list.job-list--compact .job-row-date {
    grid-column: auto;
  }

  .admin-news-list.job-list--compact .job-row-actions > a.btn {
    min-height: var(--hit-min);
    height: var(--hit-min);
  }

  .admin-news-list.job-list--compact .job-row-actions > a.btn-icon {
    width: var(--hit-min);
    height: var(--hit-min);
    min-width: var(--hit-min);
    min-height: var(--hit-min);
  }
}

.job-list-item > .admin-news-edit {
  grid-column: 1 / -1;
  margin: 0;
  border: none;
  box-shadow: var(--shadow-control);
  border-radius: 0;
}

.job-row-actions:has(> .admin-user-delete) > a {
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  min-height: var(--hit-min);
  white-space: nowrap;
}

.admin-user-delete { margin: 0; }

.admin-user-delete .btn-icon {
  box-sizing: border-box;
  width: var(--hit-min);
  height: var(--hit-min);
  min-width: var(--hit-min);
  min-height: var(--hit-min);
  padding: 0;
}

.job-row-shell:has(.admin-user-delete) .job-row-sub {
  justify-content: flex-start;
  justify-items: start;
}

.job-row-shell:has(.admin-user-delete) .job-row-sub > .badge {
  display: inline-flex;
  width: auto;
  justify-self: start;
  align-self: center;
  flex: 0 0 auto;
}

.admin-feedback-lead { margin: var(--sp-1) 0 0; font-size: var(--fs-sm); max-width: 52rem; }

.admin-feedback-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--sp-3) var(--sp-5);
  margin-bottom: var(--sp-3);
}

.admin-feedback-filter-group { flex: 1 1 12rem; min-width: 0; }

.admin-feedback-filter-label {
  margin: 0 0 var(--sp-2);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.admin-feedback-filters-divider {
  align-self: stretch;
  width: 1px;
  min-height: 2.5rem;
  background: var(--line);
  flex: 0 0 1px;
}

.admin-feedback-type-chips,
.admin-feedback-status-chips {
  margin: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--sp-1);
}

.admin-feedback-type-chips .chip {
  border-radius: var(--radius-sm);
  min-height: var(--badge-min-h);
  padding: 0 var(--badge-padding-x);
  font-size: var(--badge-fs);
  line-height: var(--badge-lh);
}

.admin-feedback-type-chips .chip.badge-bug {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 45%, var(--line));
}

.admin-feedback-type-chips .chip.badge-bug.is-on {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

.admin-feedback-type-chips .chip.badge-idea {
  background: var(--brass-soft);
  color: var(--brass);
  border-color: color-mix(in srgb, var(--brass) 45%, var(--line));
}

.admin-feedback-type-chips .chip.badge-idea.is-on {
  background: var(--brass);
  color: var(--paper);
  border-color: var(--brass);
}

.admin-feedback-type-chips .chip--empty:not(.is-on) {
  opacity: 0.65;
}

.admin-feedback-type-chips .chip.badge-question {
  background: var(--blue-soft);
  color: var(--blue-deep);
  border-color: color-mix(in srgb, var(--blue-deep) 45%, var(--line));
}

.admin-feedback-type-chips .chip.badge-question.is-on {
  background: var(--blue-deep);
  color: #fff;
  border-color: var(--blue-deep);
}

.chip-small { font-size: var(--fs-xs); padding: 0 var(--sp-2); min-height: var(--btn-h-xs); border-radius: var(--radius-btn); }

.admin-feedback-purge {
  margin: var(--sp-3) 0 var(--sp-2);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 var(--sp-2);
  border-radius: var(--radius-pill);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
  border: none;
  white-space: nowrap;
}

.status-pill.status-new { background: var(--blue-soft); color: var(--blue-deep); }

.status-pill.status-received { background: var(--bg); color: var(--muted); }

.status-pill.status-read { background: var(--bg); color: var(--muted); }

.status-pill.status-in_progress { background: var(--amber-soft); color: var(--amber-deep); }

.status-pill.status-done { background: var(--pine-soft); color: var(--pine-deep); }

.status-pill.status-dismissed { background: var(--danger-soft); color: var(--danger); }

.feedback-list { list-style: none; padding: 0; margin: 0; }

.feedback-list-item { border-bottom: 1px solid var(--line); }

.feedback-row,
.feedback-inbox-orphan-summary {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0 var(--sp-3);
  text-decoration: none;
  color: inherit;
}

.feedback-row:hover,
.feedback-inbox-orphan-summary:hover {
  background: var(--pine-soft);
}

.feedback-row-fresh .feedback-row-title-text { font-weight: var(--fw-semibold); }

.feedback-row-unread {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-pill);
  justify-self: center;
  align-self: center;
}

.feedback-row-unread--on { background: var(--pine); }

.feedback-row-body {
  display: grid;
  gap: var(--sp-1);
  min-width: 0;
}

.feedback-row-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  min-width: 0;
}

.feedback-row-title-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1 1 auto;
}

.feedback-row-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  min-width: 0;
}

.feedback-row-sep { color: var(--muted); user-select: none; flex-shrink: 0; }

.feedback-row-user { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }

.feedback-row-trail {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  color: var(--muted);
  flex-shrink: 0;
  justify-self: end;
  margin-inline-start: auto;
}

.feedback-row-msgs {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--sp-1);
  font-size: var(--fs-sm);
  min-width: calc(var(--row-icon) + var(--sp-1) + 2ch);
  flex-shrink: 0;
}

.feedback-row-msgs--empty { visibility: hidden; }

.feedback-row-msgs-n { font-variant-numeric: tabular-nums; }

.feedback-row-msgs .ico { width: 1.1rem; height: 1.1rem; font-size: 1.1rem; }

.feedback-row-chevron { font-size: var(--fs-lg); line-height: 1; opacity: 0.45; }

.feedback-list-item-row {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  min-width: 0;
}

.feedback-list-item--orphan .feedback-inbox-orphan {
  flex: 1;
  min-width: 0;
}

.feedback-list-item--orphan .feedback-list-item-row > .feedback-row {
  flex: 1;
  min-width: 0;
}

.feedback-list-item-row > .feedback-row-menu {
  flex: 0 0 auto;
}

.feedback-row-menu { flex-shrink: 0; }

.feedback-list-item-row--admin .feedback-row {
  flex: 1;
  min-width: 0;
}

.feedback-row-chevron-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-inline-start: auto;
  min-width: var(--hit-min);
  min-height: var(--hit-min);
  color: var(--muted);
  text-decoration: none;
  font-size: var(--fs-lg);
  line-height: 1;
  opacity: 0.45;
}

.feedback-row-chevron-link:hover,
.feedback-row-chevron-link:focus-visible {
  opacity: 0.75;
  outline: 2px solid var(--pine);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.banner-inline-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2) var(--sp-3);
  margin: 0;
}

.banner-inline-form { margin: 0; }

.feedback-inbox-orphan-summary {
  cursor: pointer;
  list-style: none;
  box-sizing: border-box;
}

.feedback-inbox-orphan-summary::-webkit-details-marker { display: none; }

.feedback-inbox-orphan-summary::marker { content: ""; }

.feedback-inbox-orphan[open] .feedback-row-chevron {
  transform: rotate(90deg);
}

.feedback-inbox-orphan-body {
  padding: var(--sp-2) var(--sp-3) var(--sp-3);
  margin: 0;
  border-top: 1px solid var(--line);
}

@media (min-width: 640px) {
  .feedback-inbox-orphan-summary .feedback-row-title {
    flex-wrap: nowrap;
  }
}

.feedback-thread { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--sp-3); }

.feedback-thread-event { margin: 0; padding: 0; }

.feedback-thread-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  padding: var(--pad-card);
}

.feedback-thread-card-head { margin: 0 0 var(--sp-2); display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2) var(--sp-2); }

.feedback-thread-card-head .feedback-thread-sender {
  font-weight: var(--fw-semibold);
  color: var(--ink);
}

.feedback-thread-card .feedback-thread-body {
  margin: 0;
  font-weight: var(--fw-normal);
  font-size: inherit;
  line-height: var(--lh-base);
}

.feedback-thread-body a,
.feedback-inbox-orphan-body a {
  overflow-wrap: anywhere;
}

.feedback-thread-card .feedback-thread-context { margin-top: var(--sp-3); }

.feedback-thread-context > summary.feedback-thread-context-summary {
  font-weight: var(--fw-normal);
  color: var(--muted);
  font-size: var(--fs-sm);
  cursor: pointer;
  list-style: none;
}

.feedback-thread-context > summary.feedback-thread-context-summary::-webkit-details-marker {
  display: none;
}

.feedback-thread-context .feedback-thread-context-meta {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 2px 12px;
  margin: var(--sp-1) 0 0;
  padding: 0;
  font-size: var(--fs-sm);
  line-height: var(--lh-tight);
  font-weight: var(--fw-normal);
}

.feedback-thread-context .feedback-thread-context-meta dt {
  color: color-mix(in srgb, var(--ink) 55%, var(--muted));
  font-weight: var(--fw-normal);
  margin: 0;
}

.feedback-thread-context .feedback-thread-context-meta dd {
  margin: 0;
  color: var(--muted);
  font-weight: var(--fw-normal);
  overflow-wrap: anywhere;
  min-width: 0;
}

@media (min-width: 640px) {
  .feedback-thread-context .feedback-thread-context-meta {
    gap: 2px var(--sp-3);
  }
}

.feedback-thread-system { margin: 0; padding: var(--sp-1) 0 var(--sp-1) var(--sp-2); border-left: 2px solid var(--line); }

.feedback-thread-card--user {
  margin-inline-start: auto;
  margin-inline-end: 0;
  max-width: 100%;
}

@media (min-width: 640px) {
  .feedback-thread-card--user {
    max-width: 80%;
  }
}

.feedback-thread-card--kvolio {
  background: var(--pine-soft);
  border-color: color-mix(in srgb, var(--pine) 22%, var(--line));
}

.feedback-thread-card--kvolio:not(.feedback-thread-card--user) {
  margin-inline-start: 0;
  margin-inline-end: auto;
  max-width: 100%;
}

@media (min-width: 640px) {
  .feedback-thread-card--kvolio:not(.feedback-thread-card--user) {
    max-width: 80%;
  }
}

.feedback-thread-card--kvolio.feedback-thread-card--user {
  margin-inline-start: auto;
  margin-inline-end: 0;
}

.feedback-thread-card--from-reporter {
  margin-inline-start: 0;
  margin-inline-end: auto;
  max-width: 100%;
}

@media (min-width: 640px) {
  .feedback-thread-card--from-reporter {
    max-width: 80%;
  }
}

.feedback-thread-wrap { margin-bottom: var(--sp-4); }

.feedback-reply-form {
  display: flex;
  gap: var(--sp-2);
  align-items: flex-end;
  margin-inline-start: auto;
  margin-bottom: max(16px, env(safe-area-inset-bottom));
}

@media (min-width: 640px) {
  .feedback-reply-form { max-width: min(85%, 36rem); }
}

.feedback-admin-reply-form {
  flex-direction: column;
  align-items: stretch;
  margin-inline-start: 0;
  max-width: none;
  margin-top: var(--sp-4);
}

.feedback-admin-reply-main {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.feedback-admin-reply-compose {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.feedback-admin-reply-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-2);
}

.feedback-reply-form textarea,
#feedback-body,
#feedback-admin-note {
  flex: 1 1 auto;
  min-width: 0;
  min-height: calc(1.4em * 3 + 1rem);
  max-height: calc(1.4em * 12 + 1rem);
  overflow-y: auto;
  resize: none;
  field-sizing: fixed;
}

.char-count {
  margin: var(--sp-1) 0 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.char-count.is-warn { color: var(--amber-deep); }

.char-count.is-full { color: var(--danger); }

.badge-new-reply {
  font-size: var(--badge-fs);
  font-weight: var(--fw-semibold);
  padding: var(--sp-1) var(--badge-padding-x);
  border-radius: var(--radius-pill);
  background: var(--pine-soft);
  color: var(--pine);
  border: 1px solid color-mix(in srgb, var(--pine) 28%, var(--line));
}

.feedback-admin-save { width: auto; flex-shrink: 0; }

.warehouse-page-total { margin: var(--sp-1) 0 0; font-size: var(--fs-sm); }

.warehouse-create-row { margin-bottom: var(--sp-3); }

.warehouse-create-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--sp-3) var(--sp-3);
}

.warehouse-create-name { flex: 1 1 12rem; min-width: 0; margin: 0; }

.warehouse-create-name input { width: 100%; font-size: var(--fs-input); min-height: var(--hit-min); }

.warehouse-create-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); flex-shrink: 0; }

.warehouse-list { margin-bottom: var(--sp-4); }

.warehouse-list-item,
.warehouse-system-list .warehouse-list-item { margin: 0; padding: 0; min-width: 0; }

.warehouse-list-item:last-child .warehouse-row,
.warehouse-system-list .warehouse-list-item:last-child .warehouse-row { border-bottom: 0; }

.warehouse-row {
  display: grid;
  grid-template-columns: minmax(0, auto) auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0 var(--sp-3);
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--line);
  box-sizing: border-box;
}

.warehouse-row:hover { background: var(--pine-soft); }

.warehouse-row a {
  text-decoration: none;
  color: inherit;
}

.warehouse-row-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.warehouse-row-main {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}

.warehouse-row-subline {
  display: contents;
}

.warehouse-alert-pill {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  display: inline-block;
  align-self: flex-start;
  width: fit-content;
  max-width: 100%;
  margin: 0;
  padding: var(--sp-1) var(--sp-2);
  border-radius: var(--radius-control);
  font-size: var(--fs-xs);
  font-weight: var(--fw-normal);
  line-height: var(--lh-tight);
}

.warehouse-row a.warehouse-alert-pill--negative {
  background: var(--danger-soft);
  color: var(--danger);
}

.warehouse-row-meta {
  grid-column: 4;
  grid-row: 1;
  align-self: center;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  text-align: right;
  line-height: var(--lh-base);
}

.warehouse-row-sep { user-select: none; }

.warehouse-row-trail {
  grid-column: 5;
  grid-row: 1;
  align-self: center;
  flex-shrink: 0;
  width: 1.25rem;
  text-align: center;
  color: var(--muted);
}

.warehouse-row-trail::after {
  content: "›";
  font-size: var(--fs-lg);
  line-height: 1;
  opacity: 0.45;
}

.warehouse-row--system {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: auto;
  padding: var(--sp-3) var(--sp-3);
}

@media (min-width: 720px) {
  .warehouse-row--system {
    min-height: var(--row-h-compact);
    padding: var(--sp-1) var(--sp-2);
    box-sizing: border-box;
  }

  .warehouse-row--system .warehouse-row-body {
    display: flex;
    flex-wrap: nowrap;
    align-items: baseline;
    gap: var(--sp-2);
    min-width: 0;
  }

  .warehouse-row--system .warehouse-row-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1 1 auto;
    min-width: 0;
    font-size: var(--fs-list-compact);
    font-weight: var(--fw-semibold);
  }

  .warehouse-row--system .warehouse-row-sub {
    flex: 0 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: var(--fs-meta);
  }
}

.warehouse-row-body {
  display: grid;
  gap: var(--sp-1);
  min-width: 0;
}

.warehouse-row--system .warehouse-row-name { white-space: normal; }

.warehouse-row-sub {
  font-size: var(--fs-sm);
  color: var(--muted);
  line-height: var(--lh-base);
}

.warehouse-system { margin-top: var(--sp-5); }

.warehouse-system-label { margin: 0 0 var(--sp-2); padding: 0; }

.warehouse-system-list { margin: 0; }

.empty-state {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: var(--pad-card);
  margin: var(--sp-3) 0;
  box-shadow: var(--shadow-control);
  text-align: left;
}

.empty-state h2 {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-section);
  margin: 0 0 var(--sp-1);
}

.empty-state h2 .ico {
  font-size: 1.25em;
  width: 1em;
  height: 1em;
  color: inherit;
}

.empty-state p {
  margin: 0;
  font-size: var(--fs-meta);
  line-height: var(--lh-base);
  max-width: var(--measure-prose);
}

.empty-state--compact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  padding: 0;
  margin: 0;
  border: 0;
  box-shadow: var(--shadow-control);
  background: transparent;
  text-align: left;
}

.filter-empty.empty-state--compact {
  margin: var(--sp-3) 0;
  max-width: var(--measure-prose);
}

.empty-state--compact > p.muted {
  margin: 0;
}

.empty-state-cta {
  margin: var(--sp-2) 0 0;
}

.projects-view-toggle {
  position: relative;
  margin: 0;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--bg);
  padding: var(--sp-1);
}

.projects-view-toggle .segmented-option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-1);
  min-width: var(--hit-min);
  min-height: var(--hit-min);
  text-decoration: none;
  color: inherit;
}

.projects-view-toggle .segmented-option--active {
  background: var(--pine-soft);
  color: var(--pine-deep);
}

.jobs-calendar-week-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-3);
  margin-bottom: var(--sp-4);
}

.jobs-calendar-week-controls {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: transparent;
}

.jobs-calendar-week-btn,
.jobs-calendar-week-today {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--hit-min);
  min-height: var(--hit-min);
  padding: 0 var(--sp-2);
  border: 0;
  background: transparent;
  text-decoration: none;
  color: inherit;
  font-size: var(--fs-sm);
  font-weight: var(--fw-normal);
}

.jobs-calendar-week-btn:hover,
.jobs-calendar-week-today:hover {
  background: var(--bg);
}

.jobs-calendar-week-today--hidden {
  display: none;
}

.jobs-calendar-week-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--sp-1) var(--sp-2);
  margin: 0;
  min-width: 0;
  flex: 1 1 12rem;
  font-size: var(--fs-base);
  font-weight: var(--fw-normal);
  line-height: var(--lh-tight);
}

.jobs-calendar-week-number {
  font-weight: var(--fw-normal);
}

.jobs-calendar-day {
  margin-bottom: var(--sp-4);
  padding: var(--sp-3);
  border-radius: var(--radius-card);
  border: 1px solid var(--line);
  background: var(--paper);
}

.jobs-calendar-day--today {
  background: var(--pine-soft);
}

.jobs-calendar-day--today .jobs-calendar-day-head,
.jobs-calendar-day--today .jobs-calendar-day-new,
.jobs-calendar-head-cell.jobs-calendar-day--today {
  color: var(--pine-deep);
}

.jobs-calendar-day-new {
  text-decoration: none;
  color: inherit;
}

.jobs-calendar-day-new:hover,
.jobs-calendar-day-new:focus {
  color: var(--pine-deep);
}

.jobs-calendar-day-new:focus-visible {
  outline: 2px solid var(--pine);
  outline-offset: 3px;
}

.jobs-calendar-day-head {
  margin: calc(-1 * var(--sp-3)) calc(-1 * var(--sp-3)) var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-card) var(--radius-card) 0 0;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  display: flex;
  gap: var(--sp-2);
  align-items: baseline;
  min-height: var(--hit-min);
  text-decoration: none;
  color: inherit;
  box-sizing: border-box;
}

.jobs-calendar-day-empty {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--muted);
  display: block;
  padding: var(--sp-1) 0;
  min-height: 0;
  text-decoration: none;
}

.jobs-calendar-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  padding: var(--sp-3);
  min-height: var(--hit-min);
  border: 1px solid var(--line);
  border-left-width: 3px;
  border-left-color: var(--brand);
  border-radius: var(--radius-sm);
  background: var(--surface, #fff);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.06);
  text-decoration: none;
  color: inherit;
  margin-bottom: var(--sp-2);
}

.jobs-calendar-card:hover {
  box-shadow: 0 2px 4px rgb(0 0 0 / 0.08);
}

.jobs-calendar-day--today .jobs-calendar-card {
  background: var(--surface, #fff);
}

.jobs-calendar-card-title {
  font-weight: var(--fw-semibold);
  font-size: var(--fs-sm);
  min-width: 0;
  overflow-wrap: anywhere;
}

.jobs-calendar-job-time {
  color: var(--muted);
  font-weight: var(--fw-normal);
}

@media (min-width: 640px) and (max-width: 1199px) {
  .jobs-calendar-job-time {
    display: block;
  }

  .jobs-calendar-card-name {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

.jobs-calendar-card-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.jobs-calendar-card-meta > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.jobs-calendar-undated {
  margin-top: var(--sp-6);
}

.jobs-calendar-undated-title {
  margin: 0 0 var(--sp-3);
  padding: var(--sp-3) var(--card-pad-inline);
  border-radius: var(--radius-card);
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
}

.jobs-calendar-desktop {
  display: none;
}

.jobs-calendar-head-row {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: var(--sp-1);
  margin-bottom: var(--sp-2);
}

.jobs-calendar-head-cell {
  text-align: center;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  padding: var(--sp-2);
  border-radius: var(--radius-sm);
}

.jobs-calendar-bars-wrap {
  display: grid;
  gap: var(--sp-1);
  margin-bottom: var(--sp-2);
}

.jobs-calendar-bar-lane {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: var(--sp-1);
  min-height: var(--btn-h-sm);
}

.jobs-calendar-bar {
  grid-column-start: var(--cal-col-start);
  grid-column-end: span var(--cal-col-span);
  display: flex;
  flex-direction: column;
  gap: 2px;
  justify-content: center;
  min-height: var(--hit-min);
  padding: var(--sp-2);
  border-radius: var(--radius-sm);
  background: var(--surface, #fff);
  border: 1px solid var(--line);
  border-left-width: 3px;
  border-left-color: var(--brand);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.06);
  text-decoration: none;
  color: inherit;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
}

.jobs-calendar-bar:hover {
  box-shadow: 0 2px 4px rgb(0 0 0 / 0.08);
}

.jobs-calendar-day-columns {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: var(--sp-1);
  align-items: start;
}

.jobs-calendar-day-col {
  min-width: 0;
  padding: var(--sp-1);
  border-radius: var(--radius-sm);
}

@media (min-width: 640px) {
  .page-header-actions .projects-view-toggle {
    flex: 0 1 auto;
    max-width: 22rem;
  }

  .job-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) 7.5rem 9rem;
  }

  .job-list--compact .job-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 15ch 7ch 14ch 9ch;
  }

  .job-row-stats {
    grid-column: 4;
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: baseline;
    gap: 0;
    min-width: 0;
    max-width: 100%;
    font-size: var(--fs-list-compact);
    color: var(--muted);
    white-space: nowrap;
  }

  .job-row-stat {
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .job-list--compact .job-row-stats {
    display: contents;
  }

  .job-list--compact .job-row-stat-hours {
    min-width: 0;
    text-align: end;
    font-variant-numeric: tabular-nums;
  }

  .job-list--compact .job-row-date {
    min-width: 0;
  }

  .job-list--compact .job-row-stat + .job-row-stat::before {
    content: none;
  }

  .job-row-stat + .job-row-stat::before {
    content: "·";
    margin-inline: var(--sp-2);
    flex: none;
  }

  .job-row-date {
    white-space: nowrap;
  }

  @supports not (grid-template-columns: subgrid) {
    .job-row-sub {
      grid-template-columns: minmax(0, 1.2fr) 7.5rem 9rem;
    }
    .job-list--compact .job-row-sub {
      grid-template-columns: minmax(0, 1fr) 15ch 7ch 14ch 9ch;
    }
  }

  .jobs-calendar-week-nav {
    flex-wrap: nowrap;
  }

  .jobs-calendar-week-title {
    flex: 1 1 auto;
    min-width: 0;
  }

  .jobs-calendar-mobile {
    display: none;
  }

  .jobs-calendar-desktop {
    display: block;
    width: 100%;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    overflow: hidden;
  }

  .jobs-calendar-bar-lane,
  .jobs-calendar-day-columns {
    gap: 0;
  }

  .jobs-calendar-head-row,
  .jobs-calendar-bars-wrap {
    gap: 0;
    margin-bottom: 0;
  }

  .jobs-calendar-head-cell,
  .jobs-calendar-day-col,
  .jobs-calendar-bar-col {
    border-right: 1px solid var(--line);
    border-radius: 0;
  }

  .jobs-calendar-head-cell:nth-child(7n),
  .jobs-calendar-day-col:nth-child(7n),
  .jobs-calendar-bar-col--last {
    border-right: 0;
  }

  .jobs-calendar-head-cell {
    border-bottom: 1px solid var(--line);
    padding: var(--sp-2);
  }

  .jobs-calendar-bar-col {
    align-self: stretch;
    min-height: 0;
  }

  .jobs-calendar-bar {
    grid-row: 1;
    position: relative;
    z-index: 1;
    margin: 2px 4px;
    align-self: center;
  }

  .jobs-calendar-day-columns {
    min-height: clamp(16rem, 50vh, 32rem);
    align-items: stretch;
  }

  .jobs-calendar-day-col {
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: var(--sp-2);
  }

  a.jobs-calendar-head-cell {
    display: block;
    box-sizing: border-box;
  }

  .jobs-calendar-day-new-slot {
    flex: 1 1 auto;
    min-height: 2rem;
    margin: calc(-1 * var(--sp-2));
    margin-bottom: 0;
    padding: var(--sp-2);
    border-radius: 0;
  }

  .jobs-calendar-day--weekend {
    background: color-mix(in srgb, var(--bg) 70%, var(--paper));
  }

  .jobs-calendar-day--today {
    background: var(--pine-soft);
    color: var(--pine-deep);
  }

  .jobs-calendar-card-title,
  .jobs-calendar-bar-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .jobs-calendar-card-meta > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (min-width: 1200px) {
  .job-list--compact .job-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 15ch 7ch 14ch 9ch;
  }

  @supports not (grid-template-columns: subgrid) {
    .job-list--compact .job-row-sub {
      grid-template-columns: minmax(0, 1fr) 15ch 7ch 14ch 9ch;
    }
  }
}

.job-list--compact .job-row-actions .btn-icon .ico {
  font-size: var(--row-icon);
  width: var(--row-icon);
  height: var(--row-icon);
  line-height: 1;
  overflow: visible;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 640px) {
  .job-list--compact .job-row-shell {
    min-height: var(--row-h-compact);
    align-items: center;
  }

  .job-list--compact .job-row {
    min-height: 0;
    padding: var(--sp-1) var(--sp-2);
    font-weight: var(--fw-normal);
    font-size: var(--fs-list-compact);
  }

  .job-list--compact .job-row-title-text,
  .job-list--compact .job-row-date {
    font-weight: var(--fw-semibold);
    font-size: var(--fs-list-compact);
  }

  .job-list--compact .job-row-title {
    flex-wrap: wrap;
    align-items: center;
    row-gap: var(--sp-1);
    min-width: 0;
  }

  .job-list--compact .job-row-title-text {
    flex: 0 1 auto;
    max-width: 100%;
    min-width: 0;
  }

  .job-list--compact .job-row-title .badge,
  .job-list--compact .job-row-title .job-row-timer-status {
    flex-shrink: 0;
  }

  .job-list--compact .job-row-customer,
  .job-list--compact .job-row-meta,
  .job-list--compact .job-row-stats {
    font-size: var(--fs-list-compact);
  }

  .job-list--compact .job-row-sub {
    white-space: nowrap;
    align-items: center;
    flex-wrap: nowrap;
  }

  .job-list--compact .job-row-stats {
    flex-wrap: nowrap;
  }

  .job-list--compact .job-row-actions {
    flex-shrink: 0;
  }

  .job-list--compact .job-row-actions .btn-icon,
  .job-list--compact .feedback-row-menu .btn-icon {
    flex-shrink: 0;
    width: var(--row-btn);
    height: var(--row-btn);
    min-width: var(--row-btn);
    min-height: var(--row-btn);
    padding: 0;
    border: 1px solid transparent;
    border-radius: var(--radius-btn);
    background: transparent;
    transition: var(--btn-transition);
  }

  .job-list--compact .job-row-actions .btn-icon:hover,
  .job-list--compact .feedback-row-menu .btn-icon:hover {
    background: var(--pine-soft);
    border-color: transparent;
  }

  .job-list--compact .job-row-actions .btn-icon:focus-visible,
  .job-list--compact .feedback-row-menu .btn-icon:focus-visible {
    background: var(--pine-soft);
    border-color: transparent;
    outline: 2px solid var(--pine);
    outline-offset: 2px;
  }

  .customer-list.job-list--compact .customer-row {
    min-height: var(--row-h-compact);
    padding: var(--sp-1) var(--sp-2);
    font-weight: var(--fw-normal);
  }

  .customer-list.job-list--compact .customer-row-name {
    font-weight: var(--fw-semibold);
    font-size: var(--fs-list-compact);
  }

  .customer-list.job-list--compact .customer-row-sub {
    font-size: var(--fs-list-compact);
  }
}

@media (min-width: 640px) and (max-width: 1279px) {
  .job-list--compact .job-row-actions .btn-icon {
    min-width: var(--hit-min);
    min-height: var(--hit-min);
  }
}

@media (max-width: 639px) {
  .job-list--compact .job-row {
    padding: var(--sp-2) var(--sp-2);
    font-size: var(--fs-list);
  }

  .job-list--compact .job-row-actions .btn-icon,
  .job-list--compact .feedback-row-menu .btn-icon {
    padding: 0;
  }

  .customer-list.job-list--compact .customer-row {
    min-height: var(--hit-min);
    padding: var(--sp-2) var(--sp-2);
  }
}

@media (max-width: 719px) {
  .page-header .warehouse-create-open,
  .page-header .btn-primary { flex: 0 1 auto; max-width: 100%; }
  .warehouse-row {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: var(--sp-1) var(--sp-3);
    min-height: auto;
    padding: var(--sp-3) var(--sp-3);
  }
  .warehouse-row-main { grid-column: 1; grid-row: 1; }
  .warehouse-row-subline {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: var(--sp-1) var(--sp-2);
    grid-column: 1;
    grid-row: 2;
    min-width: 0;
  }
  .warehouse-alert-pill {
    grid-column: auto;
    grid-row: auto;
    align-self: auto;
  }
  .warehouse-row-meta {
    grid-column: auto;
    grid-row: auto;
    align-self: auto;
    text-align: left;
    white-space: normal;
  }
  .warehouse-row-trail { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
}

.warehouse-my-products {
  margin-top: var(--sp-5);
}

.warehouse-my-products-panel {
  --card-pad-inline: var(--pad-card-inline);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--paper);
  box-shadow: var(--shadow-card);
}

@media (max-width: 699px) {
  .warehouse-my-products-panel {
    --card-pad-inline: var(--pad-card-inline-mobile);
  }
}

.warehouse-my-products-body {
  padding: var(--sp-3) var(--card-pad-inline) var(--card-pad-inline);
  box-sizing: border-box;
}

.my-catalog-search {
  margin: 0 0 var(--sp-3);
  max-width: 28rem;
}

body.landing .faq-guide-link {
  margin: var(--sp-5) 0 0;
  font-weight: var(--fw-normal);
}

body.landing .faq-guide-link .text-link-cta {
  color: var(--pine-deep);
  font-weight: var(--fw-semibold);
  text-decoration: none;
}

body.landing .faq-guide-link .text-link-cta:hover,
body.landing .faq-guide-link .text-link-cta:focus-visible {
  color: var(--pine);
  text-decoration: none;
}

body.landing .faq-guide-link .cta-arrow {
  display: inline-block;
  margin-inline-start: var(--sp-1);
}

@media (prefers-reduced-motion: no-preference) {
  body.landing .faq-guide-link .cta-arrow {
    transition: transform 0.15s ease;
  }

  body.landing .faq-guide-link .text-link-cta:hover .cta-arrow,
  body.landing .faq-guide-link .text-link-cta:focus-visible .cta-arrow {
    transform: translateX(2px);
  }
}

.my-catalog-search input {
  width: 100%;
  min-height: var(--hit-min);
  box-sizing: border-box;
}

body.help-public .help-public-main {
  max-width: var(--measure-wide, 48rem);
  margin: 0 auto;
  padding: var(--sp-4) var(--sp-3) var(--sp-6);
}

body.help-public .help-back-home a,
body.help-public .help-section-body a {
  color: var(--pine-deep);
  font-weight: var(--fw-semibold);
  text-decoration: none;
}

body.help-public .help-back-home a:hover,
body.help-public .help-back-home a:focus-visible,
body.help-public .help-section-body a:hover,
body.help-public .help-section-body a:focus-visible {
  color: var(--pine);
}

.my-catalog-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: block;
  width: 100%;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--paper);
}

@media (max-width: 639px) {
  .admin-feedback-filters {
    flex-direction: column;
    align-items: stretch;
  }
  .admin-feedback-filters-divider {
    width: 100%;
    height: 1px;
    min-height: 0;
  }
}

body.help-public .help-toc {
  margin: 0 0 var(--sp-5);
  padding: var(--sp-3);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}

body.help-public .help-toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

body.help-public .help-toc li {
  break-inside: avoid;
}

body.help-public .help-toc a {
  display: inline-flex;
  align-items: center;
  min-height: var(--hit-min);
  color: var(--pine-deep);
  font-weight: var(--fw-semibold);
  text-decoration: none;
}

@media (min-width: 640px) {
  body.help-public .help-toc ul {
    display: block;
    columns: 2;
    column-gap: var(--sp-4);
  }

  body.help-public .help-toc li {
    margin-block-end: 0;
  }

  body.help-public .help-toc a {
    min-height: var(--control-h-sm);
    padding-block: 0;
  }
}

body.help-public .help-toc a:hover {
  color: var(--pine);
}

.my-catalog-item {
  margin: 0;
  padding: 0;
}

.trip-list {
  margin: var(--sp-3) 0 0;
}

.trip-list:has(.trip-row-actions-menu[open]),
.job-list:has(.mobile-overflow-menu[open]) {
  overflow: visible;
}

body.help-public .help-section {
  margin: 0 0 var(--sp-6);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--line);
  scroll-margin-top: calc(72px + env(safe-area-inset-top, 0px));
}

body.help-public .help-section:last-child {
  border-bottom: 0;
  margin-bottom: 0;
}

body.help-public .help-section-title {
  margin: 0 0 var(--sp-3);
  font-size: var(--fs-lg);
}

body.help-public .help-section-legacy-anchor {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.my-catalog-item:last-child .my-catalog-row {
  border-bottom: 0;
}

.trip-list-item { margin: 0; }

body.help-public .help-section-layout {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  align-items: flex-start;
}

@media (min-width: 640px) {
  body.help-public .help-section-layout {
    flex-direction: row;
    align-items: flex-start;
  }

  body.help-public .help-section-media {
    flex: 0 0 auto;
  }

  body.help-public .help-section-body {
    flex: 1 1 auto;
    min-width: 0;
  }
}

.my-catalog-list > .my-catalog-head {
  display: none;
  margin: 0;
  border-bottom: 1px solid var(--line);
  box-sizing: border-box;
}

.trip-row {
  display: grid;
  grid-template-columns: 6.5rem 5.5rem minmax(0, 0.9fr) 4.5rem minmax(0, 1.2fr) minmax(0, 0.9fr) auto;
  gap: var(--sp-2) var(--sp-3);
  align-items: center;
  padding: var(--sp-2) var(--sp-3);
  border-bottom: 0;
  font-size: var(--fs-list);
}

.trip-list-item {
  border-bottom: 1px solid var(--line);
}

.trip-list-item:last-child {
  border-bottom: 0;
}

.trip-row-odometer {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.trip-row-warnings {
  grid-column: 1 / -1;
  margin: 0;
  padding: 0;
}

.trip-row-warning {
  margin: 0;
  color: var(--amber-deep);
  font-weight: var(--fw-normal);
  line-height: var(--lh-tight);
}

.trip-change-history {
  margin: var(--sp-2) 0 var(--sp-3);
}

.trip-change-history-groups {
  margin: var(--sp-2) 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: var(--sp-2);
}

.trip-change-history-group {
  display: grid;
  gap: var(--sp-1);
}

.trip-change-history-group-label {
  font-weight: var(--fw-semibold);
}

.trip-change-history-lines {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: var(--sp-1);
}

.trip-change-history-when {
  font-variant-numeric: tabular-nums;
}

.trips-filter-selects {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--sp-2) var(--sp-3);
  align-items: center;
  margin: 0 0 var(--sp-3);
  min-width: 0;
}

.trips-filter-selects form {
  flex: 0 1 auto;
  min-width: 0;
}

.trips-filter-selects select {
  min-height: var(--control-h-sm);
  max-width: 100%;
}

@media (max-width: 639px) {
  .trips-filter-selects {
    flex-direction: column;
    align-items: stretch;
    gap: var(--sp-2);
  }

  .trips-filter-selects form,
  .trips-vehicle-filter-row {
    width: 100%;
  }

  .trips-filter-selects select {
    width: 100%;
    min-height: var(--hit-min);
  }
}

.trip-row-edit-mobile {
  display: none;
}

.trip-row-actions-menu .mobile-overflow-item--danger {
  width: 100%;
}

body.help-public .help-section-media {
  margin: 0;
  margin-inline: auto;
  width: 100%;
  max-width: min(360px, 100%);
}

body.help-public .help-section-media img,
body.help-public .help-section-body img {
  display: block;
  width: 100%;
  max-width: min(360px, 100%);
  height: auto;
  margin-inline: auto;
  border-radius: var(--radius-card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}

body.help-public .help-section-body {
  font-weight: var(--fw-normal);
  line-height: var(--lh-base);
  min-width: 0;
  flex: 1 1 auto;
}

body.help-public .help-section-body p {
  margin: 0 0 var(--sp-2);
  font-weight: var(--fw-normal);
}

body.help-public .help-section-body ol {
  margin: 0;
  padding-left: 1.25em;
}

body.help-public .help-section-body li {
  margin: var(--sp-1) 0;
  font-weight: var(--fw-normal);
}

body.help-public .help-section-meta {
  margin: var(--sp-3) 0 0;
}

body.help-public .help-section-stale {
  margin-top: var(--sp-2);
}

.my-catalog-row {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  min-width: 0;
  padding: 0 var(--sp-2);
  border-bottom: 1px solid var(--line);
  box-sizing: border-box;
}

@media print {
  body.help-public .no-print {
    display: none !important;
  }

  body.help-public .help-toc {
    display: none !important;
  }

  body.help-public .help-section {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}

.my-catalog-row-main {
  flex: 1;
  min-width: 0;
}

.trip-row-compact {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto 36px;
  grid-template-areas:
    "date time km btn"
    "route route route route";
  row-gap: 6px;
  column-gap: var(--sp-2);
}

.trip-row-compact .trip-row-date {
  grid-area: date;
  min-width: 0;
}

.trip-row-compact .trip-row-time {
  grid-area: time;
  justify-self: end;
}

.trip-row-compact .trip-row-route {
  grid-area: route;
  white-space: normal;
}

.trip-row-compact .trip-row-km {
  grid-area: km;
  justify-self: end;
}

.trip-row-compact .trip-row-actions {
  grid-area: btn;
  justify-self: end;
}

@media (max-width: 639px) {
  .trip-row-compact {
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas:
      "date km btn"
      "time km btn"
      "route route route";
    row-gap: var(--sp-1);
    column-gap: var(--sp-2);
  }

  .trip-row-compact .trip-row-time {
    justify-self: start;
  }

  .trip-row-compact .trip-row-km {
    align-self: start;
  }
}

.my-catalog-name,
.my-catalog-code {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: var(--fw-normal);
  font-size: var(--fs-list-compact);
  line-height: var(--lh-tight);
}

.trip-list-item-editing { background: var(--pine-soft); }

.my-catalog-meta {
  margin: 0;
  font-size: var(--fs-list-compact);
  line-height: var(--lh-tight);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trip-list-item-editing .trip-row { background: transparent; }

.my-catalog-meta-sep {
  color: var(--muted);
}

.trip-list-edit { padding: 0 var(--sp-3) var(--sp-3); border-top: 1px dashed var(--line); }

.my-catalog-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: var(--sp-1);
}

.trip-form-inline { margin: 0; padding: var(--sp-2) 0 0; border: 0; box-shadow: var(--shadow-control); background: transparent; }

.my-catalog-delete,
.my-catalog-edit {
  position: relative;
  margin: 0;
  width: var(--row-btn);
  height: var(--row-btn);
  min-width: var(--row-btn);
  min-height: var(--row-btn);
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-btn);
  background: transparent;
  transition: var(--btn-transition);
}

.trip-row-time {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.my-catalog-delete:hover,
.my-catalog-edit:hover {
  background: var(--pine-soft);
  border-color: transparent;
}

.my-catalog-delete:focus-visible,
.my-catalog-edit:focus-visible {
  background: var(--pine-soft);
  border-color: transparent;
  outline: 2px solid var(--pine);
  outline-offset: 2px;
}

.my-catalog-delete .ico,
.my-catalog-edit .ico {
  font-size: var(--row-icon);
  width: var(--row-icon);
  height: var(--row-icon);
  line-height: 1;
}

.trip-row-route {
  text-align: left;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.my-catalog-delete::after,
.my-catalog-edit::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--hit-min);
  height: var(--hit-min);
  transform: translate(-50%, -50%);
}

.trip-row-km {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.my-catalog-item .head-delete-confirm {
  margin: var(--sp-2) var(--sp-3) var(--sp-3);
}

@media (max-width: 639px) {
  .my-catalog-list.job-list--compact .my-catalog-row {
    min-height: var(--hit-min);
    padding: var(--sp-2) var(--sp-2);
  }

  .warehouse-my-products-body .mobile-list-scroll:has(:target) {
    max-height: none;
    -webkit-mask-image: none;
    mask-image: none;
  }
}

.trip-row-actions { display: flex; gap: var(--sp-1); justify-content: flex-end; }

.trip-list .trip-row-project a,
.trip-form .trip-form-wide a {
  color: var(--pine-deep);
  font-weight: var(--fw-semibold);
  text-decoration: none;
}

.trip-list .trip-row-project a:hover,
.trip-list .trip-row-project a:focus-visible,
.trip-form .trip-form-wide a:hover,
.trip-form .trip-form-wide a:focus-visible {
  color: var(--pine);
}

@media (min-width: 640px) {
  .my-catalog-list > .my-catalog-head,
  .my-catalog-list.job-list--compact .my-catalog-row {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr) 4.5rem 5.5rem calc(var(--row-btn) * 2 + var(--sp-2));
    gap: 0 var(--sp-3);
    align-items: center;
    min-height: var(--row-h-compact);
    padding: var(--sp-1) var(--sp-2);
    box-sizing: border-box;
    font-size: var(--fs-list-compact);
  }

  .my-catalog-list.job-list--compact .my-catalog-row {
    font-weight: var(--fw-normal);
  }

  .my-catalog-list.job-list--compact .my-catalog-actions {
    justify-self: end;
  }

  .my-catalog-col-end,
  .my-catalog-unit,
  .my-catalog-price {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }

  .my-catalog-meta-price {
    font-variant-numeric: tabular-nums;
  }
}

@media (max-width: 699.98px) {
  .my-catalog-list {
    overflow: clip;
    overflow-clip-margin: 8px;
  }

  .my-catalog-actions {
    gap: calc(var(--hit-min) - var(--row-btn));
  }

  .my-catalog-list.job-list--compact .my-catalog-row {
    min-height: var(--hit-min);
  }

  .my-catalog-delete,
  .my-catalog-edit,
  .stock-history-toggle,
  .warehouse-title-row .title-actions .btn-icon {
    position: relative;
  }

  .my-catalog-delete::after,
  .my-catalog-edit::after,
  .stock-history-toggle::after,
  .warehouse-title-row .title-actions .btn-icon::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: var(--hit-min);
    height: var(--hit-min);
    transform: translate(-50%, -50%);
  }
}

.trip-row-compact .trip-row-actions .btn-icon {
  width: var(--row-btn);
  height: var(--row-btn);
  min-width: var(--row-btn);
  min-height: var(--row-btn);
  padding: 0;
  border-radius: var(--radius-btn);
  transition: var(--btn-transition);
}

@media (min-width: 640px) {
  .my-catalog-item .parts-line-edit-form {
    grid-template-columns: minmax(12ch, 16rem) 7rem minmax(0, 1fr) max-content;
  }

  .my-catalog-item .parts-line-edit-form > .parts-line-edit-price {
    display: grid;
    gap: var(--sp-1);
    margin: 0;
    grid-column: 4;
    grid-row: 1;
  }
}

.trip-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--sp-2) var(--sp-3);
  margin-bottom: var(--sp-3);
}

.trip-form-row-vehicle-date {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-2) var(--sp-3);
}

@media (max-width: 339px) {
  .trip-form-row-vehicle-date {
    grid-template-columns: minmax(0, 1fr);
  }
}

.trip-form-row-readings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-2) var(--sp-3);
}

.trip-form-row-project-note {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-2) var(--sp-3);
}

@media (min-width: 640px) {
  .trip-form-row-readings {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.trip-form-wide { grid-column: 1 / -1; }

.trip-return-trip {
  justify-self: start;
  width: auto;
}

.project-trip-add-open {
  margin-top: var(--sp-4);
}

.project-section-body > .project-trip-add-open {
  margin-bottom: var(--sp-4);
}

.trip-form-row-project-note > label {
  align-self: start;
}

.trip-form-row-project-note select {
  height: auto;
  min-height: var(--control-h);
}

.trip-form-add { margin: 0; padding: 0; border: 0; box-shadow: var(--shadow-control); background: transparent; }

.trips-filter-toolbar { flex-direction: column; align-items: stretch; }

.trips-filter-toolbar-row2 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2) var(--sp-3);
  margin-top: var(--sp-3);
}

.trips-filter-toolbar-row2 .trip-vehicle-filter {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
}

.trip-summary-inline { margin: 0 0 var(--sp-3); }

.trip-add-panel { margin: 0 0 var(--sp-3); }

.trip-add-panel-summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: 0;
  margin: 0;
}

.trip-add-panel-summary::-webkit-details-marker { display: none; }

.trip-add-panel-title { font-weight: var(--fw-semibold); }

.trip-add-panel-body { margin-top: var(--sp-3); }

.trip-route-pair {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--sp-2) var(--sp-3);
  align-items: end;
}

.trip-route-pair label { min-width: 0; }

.trip-route-swap {
  font-size: var(--fs-lg);
  line-height: 1;
}

@media (min-width: 640px) {
  .trip-route-pair > label {
    margin-block: 0;
  }
  .trip-route-swap-col {
    display: grid;
    gap: var(--sp-1);
    align-content: end;
    align-self: center;
    min-width: 0;
  }
  .trip-route-label-spacer {
    display: block;
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    line-height: var(--lh-tight);
    visibility: hidden;
    user-select: none;
    pointer-events: none;
  }
  .trip-route-pair .trip-route-swap {
    height: var(--hit-min);
    min-height: var(--hit-min);
  }
  .trip-route-swap {
    margin: 0;
    justify-self: center;
    box-sizing: border-box;
    padding-block: 0;
  }
}

@media (max-width: 639px) {
  .trip-route-pair {
    grid-template-columns: 1fr;
    gap: var(--sp-1);
  }
  .trip-route-label-spacer {
    display: none;
  }
  .trip-route-swap-col {
    display: contents;
  }
  .trip-route-swap {
    justify-self: center;
    align-self: center;
    margin: var(--sp-1) 0;
  }
  .trip-form-row-project-note {
    grid-template-columns: 1fr;
  }

  .trip-form input,
  .trip-form select,
  .trip-form textarea {
    min-height: var(--hit-min);
  }

  .trip-form .btn-small {
    min-height: var(--hit-min);
  }

  .trip-route-swap {
    min-height: var(--hit-min);
    padding-inline: var(--sp-3);
    box-sizing: border-box;
  }

  .trip-row-list .trip-row-project a {
    position: relative;
    display: inline-block;
    max-width: 100%;
  }

  .trip-row-list .trip-row-project a::after {
    content: "";
    position: absolute;
    top: calc((1em * var(--lh-tight) - var(--hit-min)) / 2);
    bottom: calc((1em * var(--lh-tight) - var(--hit-min)) / 2);
    left: -4px;
    right: -4px;
  }
}

.trip-export { margin: var(--sp-3) 0; }

.trip-export-form { margin: var(--sp-3) 0 0; }

.trip-export-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: var(--sp-3) var(--sp-3);
  align-items: end;
}

.trip-export-grid label { margin: 0; min-width: 0; }

.trip-export-actions { display: flex; align-items: flex-end; }

.trip-export-presets { margin: var(--sp-3) 0 0; }

.trip-summary { margin: var(--sp-3) 0; }

.trip-summary-title { font-size: var(--fs-base); margin: 0 0 var(--sp-2); }

.trip-summary-vehicles { list-style: none; padding: 0; margin: var(--sp-2) 0 0; }

.trip-vehicle-filter { margin-bottom: var(--sp-3); }

@media (min-width: 640px) {
  .trip-row-actions-menu .trip-row-edit-mobile {
    display: none;
  }
}

.trip-row-list .trip-row-actions .btn-icon .ico,
.trip-row-list .trip-row-actions-menu > summary.btn-icon .ico {
  font-size: var(--row-icon);
  width: var(--row-icon);
  height: var(--row-icon);
  line-height: 1;
  overflow: visible;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 639px) {
  .trip-row-actions-menu .trip-row-edit-mobile {
    display: none;
  }

  .trip-row-list {
    padding-block: var(--sp-2);
    padding-inline: var(--card-pad-inline, var(--pad-card-inline));
    min-height: var(--hit-min);
  }

  .trip-row-list .trip-row-actions .trip-row-edit-desktop,
  .trip-row-actions-menu summary.btn-icon {
    min-width: var(--hit-min);
    min-height: var(--hit-min);
    padding: 0;
  }

  .trip-row-list .trip-row-time.muted:empty,
  .trip-row-list .trip-row-time.muted {
    display: none;
  }

  .trip-row-list .trip-row-actions .btn-icon,
  .trip-row-list .trip-row-actions-menu > summary.btn-icon {
    position: relative;
  }

  .trip-row-list .trip-row-actions .btn-icon::after,
  .trip-row-list .trip-row-actions-menu > summary.btn-icon::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: var(--hit-min);
    height: var(--hit-min);
    transform: translate(-50%, -50%);
  }

  .trips-list-toolbar .period-nav--jobs,
  .trips-list-toolbar .period-nav-combined {
    max-width: 100%;
    min-width: 0;
  }
}

@media (max-width: 800px) {
  .trip-row:not(.trip-row-compact):not(.trip-row-list) { grid-template-columns: 1fr 1fr; }
  .trip-row-list {
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas:
      "date km actions"
      "time time actions"
      "vehicle vehicle vehicle"
      "odometer odometer odometer"
      "route route route"
      "project project project"
      "warnings warnings warnings";
    gap: var(--sp-1) var(--sp-2);
    align-items: center;
  }
  .trip-row-list .trip-row-date { grid-area: date; }
  .trip-row-list .trip-row-time { grid-area: time; }
  .trip-row-list .trip-row-km { grid-area: km; }
  .trip-row-list .trip-row-actions { grid-area: actions; justify-content: flex-end; }
  .trip-row-list .trip-row-vehicle { grid-area: vehicle; }
  .trip-row-list .trip-row-odometer { grid-area: odometer; min-width: 0; white-space: normal; }
  .trip-row-list .trip-row-route { grid-area: route; }
  .trip-row-list .trip-row-project { grid-area: project; }
  .trip-row-list .trip-row-warnings { grid-area: warnings; }
  .trip-row-list .trip-row-route,
  .trip-row-list .trip-row-project,
  .trip-row-list .trip-row-vehicle {
    grid-column: 1 / -1;
  }
  .trip-row-list .trip-row-actions {
    justify-content: flex-end;
  }
  .trip-row-list .trip-row-odometer {
    min-width: 0;
    white-space: normal;
  }
  .trip-row-list .trip-row-date,
  .trip-row-list .trip-row-time,
  .trip-row-list .trip-row-km,
  .trip-row-list .trip-row-vehicle {
    min-width: 0;
  }
  .trip-row:not(.trip-row-compact):not(.trip-row-list) .trip-row-time { grid-column: 2; justify-self: end; }
  .trip-row:not(.trip-row-compact):not(.trip-row-list) .trip-row-km { grid-column: 2; justify-self: end; }
  .trip-row:not(.trip-row-compact):not(.trip-row-list) .trip-row-route { grid-column: 1 / -1; white-space: normal; }
  .trip-row:not(.trip-row-compact):not(.trip-row-list) .trip-row-project { grid-column: 1 / -1; }
  .trip-row:not(.trip-row-compact):not(.trip-row-list) .trip-row-actions { grid-column: 1 / -1; }
}

.trips-vehicle-groups {
  display: grid;
  gap: var(--sp-3);
  margin: var(--sp-3) 0 0;
}

.trips-vehicle-group {
  --card-pad-inline: var(--pad-card-inline);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--paper);
  box-shadow: var(--shadow-card);
}

:is(
  .trip-change-history,
  .trips-vehicles-archived
) {
  --card-pad-inline: var(--pad-card-inline);
}

@media (max-width: 699px) {
  :is(
    .trip-list,
    .trips-vehicle-group,
    .trips-vehicles-inline,
    .trip-change-history,
    .trips-vehicles-archived
  ) {
    --card-pad-inline: var(--pad-card-inline-mobile);
  }
}

:is(.project-section-body, .mobile-section-body) .trips-vehicle-groups {
  margin-top: 0;
}

.project-section > .project-section-body .trips-vehicle-groups {
  margin-inline: calc(-1 * var(--card-pad-inline));
}

.mobile-section-body .trips-vehicle-groups {
  margin-inline: calc(-1 * var(--sp-4));
}

:is(.project-section > .project-section-body, .mobile-section-body) .trips-vehicle-group {
  border-inline: 0;
  border-radius: 0;
  box-shadow: none;
}

:is(.project-section > .project-section-body, .mobile-section-body) .trips-vehicle-group > .section-disclosure-trigger {
  border-radius: 0;
}

.trip-list--grouped {
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.trip-list--grouped > .trip-list-item:last-child .trip-row-list {
  border-radius: 0 0 var(--radius-card-inner) var(--radius-card-inner);
}

.trip-list--grouped > .trip-list-head {
  display: none;
  margin: 0;
  list-style: none;
}

.trip-list .trip-row,
.trip-list .trip-row-list {
  padding-inline: var(--card-pad-inline, var(--pad-card-inline));
}

@media (min-width: 801px) {
  .trip-row-list {
    grid-template-columns:
      5.5rem minmax(5.25rem, max-content) minmax(0, 0.55fr) minmax(17ch, 22ch) minmax(5ch, max-content)
      minmax(0, 1fr) minmax(10rem, 1.2fr) auto;
    padding-block: var(--sp-1);
    padding-inline: var(--card-pad-inline, var(--pad-card-inline));
    box-sizing: border-box;
    min-height: var(--row-h-compact);
    gap: var(--sp-1) var(--sp-2);
    font-size: var(--fs-list-compact);
    font-weight: var(--fw-normal);
    border-bottom: 0;
  }

  .trip-row-list.trip-row-list--no-vehicle,
  .trip-list--grouped > .trip-list-head {
    grid-template-columns:
      5.5rem minmax(5.25rem, max-content) minmax(17ch, 22ch) minmax(5ch, max-content)
      minmax(0, 1fr) minmax(10rem, 1.2fr) auto;
  }

  .trip-list--grouped > .trip-list-head {
    display: grid;
    align-items: center;
    gap: var(--sp-1) var(--sp-2);
    padding-block: var(--sp-1);
    padding-inline: var(--card-pad-inline, var(--pad-card-inline));
    box-sizing: border-box;
    min-height: var(--row-h-compact);
    border-bottom: 1px solid var(--line);
    font-size: var(--fs-list-compact);
    font-weight: var(--fw-normal);
  }

  .trip-list--grouped > .trip-list-head .trip-row-km {
    justify-self: end;
    text-align: right;
  }

  .trip-row-list .trip-row-date {
    font-weight: var(--fw-semibold);
  }

  .trip-row-list .trip-row-actions .btn-icon,
  .trip-row-list .trip-row-actions-menu > summary.btn-icon {
    width: var(--row-btn);
    height: var(--row-btn);
    min-width: var(--row-btn);
    min-height: var(--row-btn);
    padding: 0;
    border: 1px solid transparent;
    background: transparent;
  }

  .trip-row-list .trip-row-actions .btn-icon:hover,
  .trip-row-list .trip-row-actions-menu > summary.btn-icon:hover {
    background: var(--pine-soft);
    border-color: transparent;
  }

  .trip-row-list .trip-row-actions .btn-icon:focus-visible,
  .trip-row-list .trip-row-actions-menu > summary.btn-icon:focus-visible {
    background: var(--pine-soft);
    border-color: transparent;
    outline: 2px solid var(--pine);
    outline-offset: 2px;
  }

  .trip-row-list .trip-row-odometer {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }

  .trip-row-list .trip-row-warnings {
    grid-column: 1 / -1;
    padding-top: 0;
  }

  .trip-row-list .trip-row-warning {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .trip-row-list .trip-row-km {
    justify-self: end;
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
  }

  .trip-row-list .trip-row-route,
  .trip-row-list .trip-row-vehicle,
  .trip-row-list .trip-row-project {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .trip-row-list .trip-row-project a {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .trip-row-actions-menu .trip-row-edit-mobile {
    display: none;
  }
}

@media (min-width: 801px) and (max-width: 1279px) {
  .trip-row-list {
    grid-template-columns:
      5.5rem minmax(5.25rem, max-content) minmax(6ch, 0.55fr) minmax(max-content, 11ch) max-content
      minmax(6rem, 1fr) minmax(8rem, 1fr) auto;
  }

  .trip-row-list.trip-row-list--no-vehicle,
  .trip-list--grouped > .trip-list-head {
    grid-template-columns:
      5.5rem minmax(5.25rem, max-content) minmax(max-content, 11ch) max-content
      minmax(6rem, 1fr) minmax(8rem, 1fr) auto;
  }
}

@media (min-width: 640px) {
  .trip-row-compact {
    grid-template-columns: 92px 104px minmax(0, 1fr) 64px 36px;
    grid-template-areas: none;
    row-gap: 0;
    column-gap: var(--sp-3);
    gap: var(--sp-3);
  }
  .trip-row-compact .trip-row-date,
  .trip-row-compact .trip-row-time,
  .trip-row-compact .trip-row-route,
  .trip-row-compact .trip-row-km,
  .trip-row-compact .trip-row-actions {
    grid-area: auto;
    justify-self: stretch;
  }
  .trip-row-compact .trip-row-time {
    justify-self: stretch;
  }
  .trip-row-compact .trip-row-route {
    white-space: nowrap;
  }
  .trip-row-compact .trip-row-km {
    justify-self: end;
  }
  .trip-row-compact .trip-row-actions {
    justify-self: end;
  }
}

.feedback-thread-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-2);
}

.feedback-thread-card-top .feedback-thread-card-head { flex: 1; min-width: 0; margin-bottom: var(--sp-2); }

.feedback-thread-event-menu { flex-shrink: 0; }

.feedback-attachment-wrap {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--sp-1);
}

.feedback-thread-redacted { font-style: italic; }

.feedback-redact-dialog {
  border: none;
  border-radius: var(--radius-control);
  padding: var(--sp-4);
  max-width: min(100vw - var(--sp-4), 28rem);
}

body.landing {
  --landing-scroll-margin-top: 84px;
  background:
    radial-gradient(1100px 520px at 8% -8%, rgba(21, 122, 82, 0.14) 0%, transparent 58%),
    radial-gradient(900px 480px at 92% 4%, rgba(255, 243, 196, 0.55) 0%, transparent 52%),
    radial-gradient(640px 320px at 50% 100%, rgba(21, 122, 82, 0.06) 0%, transparent 70%),
    var(--bg);
}

@media (min-width: 700px) and (max-width: 1439px) {
  body.landing {
    --landing-scroll-margin-top: 84px;
  }
}

@media (min-width: 1440px) {
  body.landing {
    --landing-scroll-margin-top: 73px;
  }
}

.feedback-redact-form { display: grid; gap: var(--sp-3); }

.feedback-redact-title { font-size: var(--fs-base); margin: 0; }

.feedback-redact-field { display: grid; gap: var(--sp-1); }

.feedback-redact-field select,
.feedback-redact-field textarea { width: 100%; font-size: var(--fs-input); }

.feedback-redact-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); }

.feedback-edit-dialog {
  border: none;
  border-radius: var(--radius-control);
  padding: var(--sp-4);
  max-width: min(100vw - var(--sp-4), 28rem);
}

.feedback-edit-form { display: grid; gap: var(--sp-3); }

.feedback-edit-title { font-size: var(--fs-base); margin: 0; }

.feedback-edit-field { display: grid; gap: var(--sp-1); }

.feedback-edit-field textarea { width: 100%; font-size: var(--fs-input); min-height: 88px; }

.feedback-edit-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); }

.feedback-thread-edited { font-style: italic; }

.feedback-thread-event-menu summary,
.feedback-edit-save,
.feedback-edit-cancel {
  min-height: var(--hit-min);
}

.feedback-thread-redact-all { margin-bottom: var(--sp-3); }

.feedback-archived-banner { margin-top: var(--sp-2); }

.title-action-form { display: inline; margin: 0; }

@media (min-width: 640px) {
  .feedback-redact-dialog { padding: var(--sp-5); }
  .feedback-edit-dialog { padding: var(--sp-5); }
  .feedback-thread-event-menu summary,
  .feedback-edit-save,
  .feedback-edit-cancel {
    min-height: auto;
  }
}

ul.job-list--compact .feedback-row {
  box-sizing: border-box;
}

ul.job-list--compact .feedback-row-body {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: var(--sp-2);
  min-width: 0;
}

ul.job-list--compact .feedback-row-title {
  flex: 1 1 auto;
  min-width: 0;
  flex-wrap: nowrap;
}

ul.job-list--compact .feedback-row-meta {
  flex: 0 1 auto;
  min-width: 0;
  flex-wrap: nowrap;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: var(--fs-meta);
  color: var(--muted);
}

ul.job-list--compact.feedback-list .feedback-row-trail {
  flex-shrink: 0;
}

ul.job-list--compact.feedback-list .feedback-list-item-row--admin {
  gap: 0;
}

ul.job-list--compact.feedback-list .feedback-row-msgs {
  font-size: var(--fs-meta);
}

ul.job-list--compact.feedback-list .feedback-row-msgs .ico {
  font-size: var(--row-icon);
  width: var(--row-icon);
  height: var(--row-icon);
  line-height: 1;
  overflow: visible;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

ul.job-list--compact.feedback-list .feedback-row-menu .btn-icon {
  color: var(--muted);
  position: relative;
  align-self: center;
  box-sizing: border-box;
}

ul.job-list--compact.feedback-list .feedback-row-menu .btn-icon .ico {
  font-size: var(--row-icon);
  width: var(--row-icon);
  height: var(--row-icon);
  line-height: 1;
  overflow: visible;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

ul.job-list--compact.feedback-list .feedback-list-item-row--admin .feedback-row-chevron-link {
  position: relative;
  align-self: center;
  box-sizing: border-box;
}

ul.job-list--compact.feedback-list .feedback-list-item--orphan .feedback-row-menu .btn-icon {
  color: var(--muted);
  position: relative;
  align-self: center;
  box-sizing: border-box;
}

ul.job-list--compact.feedback-list .feedback-list-item--orphan .feedback-row-menu .btn-icon .ico {
  font-size: var(--row-icon);
  width: var(--row-icon);
  height: var(--row-icon);
  line-height: 1;
  overflow: visible;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 640px) {
  ul.job-list--compact .feedback-row,
  ul.job-list--compact .feedback-inbox-orphan-summary {
    min-height: var(--row-h-compact);
    padding: var(--sp-1) var(--sp-2);
    align-items: center;
    font-size: var(--fs-list-compact);
    box-sizing: border-box;
  }

  ul.job-list--compact.feedback-list .feedback-list-item-row--admin .feedback-row-menu .btn-icon {
    width: var(--row-btn);
    height: var(--row-btn);
    min-width: var(--hit-min);
    min-height: var(--hit-min);
    padding: 0;
    margin-block: calc((var(--row-h-compact) - var(--hit-min)) / 2);
  }

  ul.job-list--compact.feedback-list .feedback-list-item-row--admin .feedback-row-chevron-link {
    width: var(--row-btn);
    height: var(--row-btn);
    min-width: var(--hit-min);
    min-height: var(--hit-min);
    margin-block: calc((var(--row-h-compact) - var(--hit-min)) / 2);
  }

  ul.job-list--compact.feedback-list .feedback-list-item--orphan .feedback-row-menu .btn-icon {
    width: var(--row-btn);
    height: var(--row-btn);
    min-width: var(--hit-min);
    min-height: var(--hit-min);
    padding: 0;
    margin-block: calc((var(--row-h-compact) - var(--hit-min)) / 2);
  }
}

@media (max-width: 639px) {
  ul.job-list--compact .feedback-row,
  ul.job-list--compact .feedback-inbox-orphan-summary {
    padding: var(--sp-2) var(--sp-2);
    font-size: var(--fs-list);
    min-height: var(--hit-min);
    box-sizing: border-box;
  }

  ul.job-list--compact.feedback-list .feedback-list-item-row--admin .feedback-row-menu .btn-icon {
    width: auto;
    height: auto;
    min-width: var(--hit-min);
    min-height: var(--hit-min);
    padding: 0;
  }

  ul.job-list--compact.feedback-list .feedback-list-item-row--admin .feedback-row-chevron-link {
    min-width: var(--hit-min);
    min-height: var(--hit-min);
  }

  ul.job-list--compact.feedback-list .feedback-list-item-row--admin .feedback-row-date,
  ul.job-list--compact.feedback-list .feedback-list-item-row--admin .feedback-row-msgs {
    display: none;
  }
}

@media (max-width: 639.98px) {
  .admin-feedback-filter-group {
    flex: 0 0 auto;
  }

  .admin-feedback-type-chips,
  .admin-feedback-status-chips {
    scrollbar-width: none;
  }

  .admin-feedback-type-chips::-webkit-scrollbar,
  .admin-feedback-status-chips::-webkit-scrollbar {
    display: none;
  }

  .admin-feedback-type-chips .chip,
  .admin-feedback-status-chips .chip {
    white-space: nowrap;
  }

  .admin-feedback-status-chips .chip {
    font-size: var(--fs-xs);
    padding: 0 var(--sp-2);
    min-height: var(--hit-min);
  }

  ul.job-list--compact.feedback-list--admin-mobile .feedback-list-item-row--admin {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--sp-2);
  }

  ul.job-list--compact.feedback-list--admin-mobile .feedback-list-item-row--admin .feedback-row {
    grid-column: 1;
    min-width: 0;
  }

  ul.job-list--compact.feedback-list--admin-mobile .feedback-list-item-row--admin .feedback-row-menu {
    grid-column: 2;
    align-self: center;
  }

  ul.job-list--compact.feedback-list--admin-mobile .feedback-list-item-row--admin .feedback-row-chevron-link {
    display: none;
  }

  ul.job-list--compact.feedback-list--admin-mobile .feedback-list-item-row--admin .feedback-row {
    min-height: auto;
    padding: var(--sp-2);
  }

  ul.job-list--compact.feedback-list--admin-mobile .feedback-list-item-row--admin .feedback-row-body {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: var(--sp-1);
  }

  ul.job-list--compact.feedback-list--admin-mobile .feedback-list-item-row--admin .feedback-row-title {
    flex-wrap: nowrap;
    align-items: flex-start;
    font-size: var(--fs-list);
  }

  ul.job-list--compact.feedback-list--admin-mobile .feedback-list-item-row--admin .feedback-row-title .badge {
    flex-shrink: 0;
  }

  ul.job-list--compact.feedback-list--admin-mobile .feedback-list-item-row--admin .feedback-row-title-text {
    white-space: normal;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    font-weight: var(--fw-semibold);
  }

  ul.job-list--compact.feedback-list--admin-mobile .feedback-list-item-row--admin .feedback-row-meta {
    flex-wrap: nowrap;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: var(--fs-meta);
    color: var(--muted);
  }

  ul.job-list--compact.feedback-list--admin-mobile .feedback-list-item-row--admin .feedback-row-trail {
    display: none;
  }

  ul.job-list--compact.feedback-list--admin-mobile .feedback-list-item-row--admin .feedback-row-date {
    display: inline;
  }

  ul.job-list--compact.feedback-list--admin-mobile .feedback-list-item-row--admin .feedback-row-menu .btn-icon {
    width: var(--hit-min);
    height: var(--hit-min);
    min-width: var(--hit-min);
    min-height: var(--hit-min);
    padding: 0;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  ul.job-list--compact.feedback-list--admin-mobile .feedback-list-item-row--admin .feedback-row-menu .btn-icon .ico {
    font-size: var(--row-icon);
    width: var(--row-icon);
    height: var(--row-icon);
    line-height: 1;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

}

.admin-stats-page {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  min-width: 0;
  overflow-x: clip;
}

.admin-stats-page .card {
  margin: 0;
  padding: var(--sp-3);
  box-shadow: var(--shadow-control);
  border: 1px solid var(--line);
}

.admin-stats-page .card-heading {
  font-size: var(--fs-base);
  margin: 0 0 var(--sp-1);
}

.admin-stats-page .card-heading + .tiny {
  margin: 0;
  font-size: var(--fs-xs);
}

.admin-stats-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-2);
  align-items: stretch;
}

.admin-stats-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.admin-stats-page .admin-stats-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: var(--sp-1);
  height: 100%;
  min-width: 0;
  padding: var(--sp-2) var(--sp-3);
}

.admin-stats-card-label {
  margin: 0;
  font-size: var(--fs-2xs);
  font-weight: var(--fw-normal);
  line-height: var(--lh-tight);
  color: var(--muted);
}

.admin-stats-card-value {
  margin: 0;
  font-size: clamp(var(--fs-lg), 1rem + 0.4vw, 1.375rem);
  white-space: nowrap;
  font-weight: var(--fw-semibold);
  font-variant-numeric: tabular-nums;
  line-height: var(--lh-tight);
}

.admin-stats-card-delta {
  margin: 0;
  font-size: var(--fs-2xs);
  line-height: var(--lh-tight);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

a.admin-stats-card-link {
  color: inherit;
  text-decoration: none;
  min-height: var(--hit-min);
}

a.admin-stats-card-link:hover {
  border-color: var(--pine);
}

a.admin-stats-card-link:focus-visible {
  outline: 2px solid var(--pine);
  outline-offset: 2px;
}

.page-header-actions:has(.admin-stats-year) {
  flex-wrap: wrap;
  flex-shrink: 1;
  min-width: 0;
  max-width: 100%;
}

.admin-stats-year {
  margin: 0;
  min-width: 0;
}

.admin-stats-year-select {
  font: inherit;
  font-size: var(--fs-sm);
  min-height: var(--hit-min);
  padding: 0 var(--sp-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  color: var(--ink);
}

.admin-stats-charts {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.admin-stats-bar-chart {
  margin-top: var(--sp-1);
  font-size: var(--fs-2xs);
  min-width: 0;
}

.admin-stats-bar-chart-row {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  width: 100%;
  gap: var(--sp-1);
  min-width: 0;
}

.admin-stats-bar-chart-cell {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.admin-stats-bar-chart-values {
  min-height: 1rem;
  margin-bottom: var(--sp-1);
}

.admin-stats-bar-chart-value {
  font-variant-numeric: tabular-nums;
}

.admin-stats-bar-chart-plot {
  position: relative;
  height: 6.5rem;
  max-height: 6.5rem;
}

.admin-stats-bar-chart-bars {
  height: 100%;
}

.admin-stats-bar-chart-bar-cell {
  height: 100%;
  align-items: flex-end;
}

.admin-stats-chart-baseline {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--line);
  pointer-events: none;
}

.admin-stats-bar {
  display: block;
  width: 100%;
  max-width: 32px;
  min-height: 1px;
  background: var(--pine);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.admin-stats-bar--past {
  opacity: 0.5;
}

.admin-stats-bar-pair {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  width: 100%;
  height: 100%;
}

.admin-stats-bar--active {
  background: var(--pine-deep);
}

.admin-stats-bar-label--zero,
.admin-stats-bar-chart-cell--future .admin-stats-bar-label {
  opacity: 0.45;
}

.admin-stats-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1) var(--sp-3);
  margin: 0;
  font-size: var(--fs-2xs);
}

.admin-stats-legend-item {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
}

.admin-stats-legend-swatch {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: var(--radius-sm);
  background: var(--pine);
}

.admin-stats-legend-swatch--active {
  background: var(--pine-deep);
}

.admin-stats-bar-label {
  font-variant-numeric: tabular-nums;
}

.admin-stats-bar-label--now {
  font-weight: var(--fw-bold);
  color: var(--ink);
}

.admin-stats-bar-chart .admin-stats-bar-label--hide-sm {
  visibility: hidden;
}

.admin-stats-bucket-list {
  list-style: none;
  margin: var(--sp-2) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  font-size: var(--fs-sm);
}

.admin-stats-bucket {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  line-height: var(--lh-tight);
}

.admin-stats-bucket-label {
  flex: 0 0 5.5rem;
}

.admin-stats-bucket-track {
  flex: 1 1 auto;
  height: 6px;
  background: var(--line);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.admin-stats-bucket-fill {
  display: block;
  height: 100%;
  background: var(--pine);
  border-radius: var(--radius-pill);
}

.admin-stats-bucket-value {
  flex: 0 0 2.5rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: var(--fw-semibold);
}

.admin-stats-invoicing {
  min-width: 0;
}

.admin-stats-invoicing-heading {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  min-width: 0;
}

.admin-stats-invoicing-heading .card-heading {
  margin: 0;
}

.admin-stats-invoicing-heading .help-tip-open {
  min-width: var(--hit-min);
  min-height: var(--hit-min);
}

.admin-stats-invoicing .admin-stats-bar-chart-value {
  font-size: var(--fs-xs);
  line-height: var(--lh-tight);
  overflow-wrap: anywhere;
}

.admin-stats-invoicing-empty {
  margin: var(--sp-2) 0 0;
  color: var(--muted);
}

.admin-stats-invoice-list {
  list-style: none;
  margin: var(--sp-2) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
  font-size: var(--fs-sm);
  line-height: var(--lh-tight);
}

.admin-stats-invoice-month {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-2);
  min-width: 0;
  padding: var(--sp-1) 0;
  border-top: 1px solid var(--line);
}

.admin-stats-invoice-label {
  font-weight: var(--fw-semibold);
  min-width: 0;
  flex: 0 1 auto;
}

.admin-stats-invoice-details {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: flex-end;
  gap: var(--sp-1) var(--sp-2);
  min-width: 0;
  flex: 1 1 auto;
}

.admin-stats-invoice-amount {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex: 0 0 auto;
}

.admin-stats-invoice-meta {
  color: var(--muted);
  font-size: var(--fs-2xs);
  white-space: nowrap;
  flex: 0 0 auto;
}

@media (min-width: 1100px) {
  .admin-stats-page .admin-stats-cards {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (min-width: 640px) {
  /* Dense KPI grid: 3 per row on tablets, 5 on laptops/desktop (9 cards
     fill 3+3+3 / 5+4 rows, never a lone tile). */
  .admin-stats-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-stats-card:last-child:nth-child(odd) {
    grid-column: auto;
  }

  .admin-stats-bar-chart-plot {
    height: 7.5rem;
    max-height: 7.5rem;
  }

  .admin-stats-bar-chart .admin-stats-bar-label--hide-sm {
    visibility: visible;
  }

  .admin-stats-invoice-month {
    display: grid;
    grid-template-columns: 4.5rem minmax(6rem, 1fr) auto auto auto;
    align-items: baseline;
    gap: var(--sp-1) var(--sp-3);
  }

  .admin-stats-invoice-details {
    display: contents;
  }

  .admin-stats-invoice-label {
    grid-column: 1;
  }

  .admin-stats-invoice-amount {
    grid-column: 2;
    text-align: right;
  }

  .admin-stats-invoice-meta {
    white-space: nowrap;
  }
}

body.landing .topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  margin-bottom: 4px;
  min-height: 72px;
  padding-top: max(14px, env(safe-area-inset-top));
  padding-bottom: 14px;
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
}

body.landing .top-nav a {
  padding: 8px 12px;
  border-radius: var(--radius-btn);
  font-weight: var(--fw-medium);
  font-size: 0.95rem;
  color: var(--ink);
  overflow-wrap: normal;
  word-break: normal;
  transition: background 0.18s ease, color 0.18s ease;
}

body.landing .top-nav a:hover {
  background: var(--pine-soft);
  color: var(--pine-deep);
}

body.landing .top-nav a[aria-current="page"] {
  background: var(--pine-soft);
  color: var(--pine-deep);
  font-weight: var(--fw-semibold);
}

body.landing .lang {
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  gap: 2px;
}

body.landing .lang a {
  min-width: 40px;
  min-height: 36px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  box-shadow: none;
  transition: background 0.18s ease, color 0.18s ease;
}

body.landing .lang a[aria-current="true"] {
  background: var(--pine);
  color: #f4fbf7;
  box-shadow: 0 4px 12px rgba(21, 122, 82, 0.22);
}

body.landing .lang a:not([aria-current="true"]):hover {
  background: var(--pine-soft);
  color: var(--pine-deep);
}

body.landing .hero {
  position: relative;
  isolation: isolate;
  display: block;
  padding-top: 20px;
  padding-bottom: 40px;
}

body.landing .hero-accent {
  position: absolute;
  top: -40px;
  left: 0;
  right: 0;
  height: min(420px, 55vw);
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 70% at 20% 40%, rgba(21, 122, 82, 0.12), transparent 65%),
    radial-gradient(ellipse 60% 50% at 85% 20%, rgba(230, 179, 37, 0.12), transparent 60%);
  filter: blur(2px);
}

body.landing .hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 30px;
  align-items: center;
}

body.landing .hero-media {
  width: 100%;
  max-width: 520px;
  margin-inline: auto;
}

body.landing .hero-media picture {
  display: block;
}

@keyframes hero-art-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

body.landing .hero-art {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 24px;
}

body.landing .hero-art.is-float-ready {
  will-change: transform;
  animation: hero-art-float 6s ease-in-out infinite;
}

body.landing .hero-copy { max-width: 42rem; }

body.landing .kicker {
  display: inline-block;
  margin-bottom: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--pine-soft);
  border: 1px solid color-mix(in srgb, var(--pine) 28%, transparent);
  color: var(--pine-deep);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: var(--fw-semibold);
}

body.landing .hero h1 {
  font-size: clamp(2.4rem, 1.5rem + 3.4vw, 3.6rem);
  font-weight: var(--fw-bold);
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 0.55em;
  color: var(--ink);
}

body.landing .hero .lead {
  font-weight: var(--fw-normal);
  font-size: 1.14rem;
  line-height: 1.6;
  color: color-mix(in srgb, var(--ink) 78%, var(--muted));
}

body.landing .hero-help {
  margin: var(--sp-2) 0 0;
  font-size: var(--fs-sm);
  font-weight: var(--fw-normal);
  line-height: var(--lh-base);
  color: var(--muted);
}

body.landing .hero-cta {
  margin-top: 28px;
}

body.landing .hero-actions {
  gap: 10px;
}

body.landing .hero-login {
  margin: var(--sp-3) 0 0;
}

body.landing .hero-login-link {
  color: var(--muted);
  font-size: var(--fs-sm);
  font-weight: var(--fw-normal);
  text-decoration: none;
}

body.landing .hero-login-link:hover {
  color: var(--pine-deep);
}

body.landing .band.landing-news-band {
  margin-top: var(--sp-3);
  padding-top: 0;
}

body.landing .band.landing-news-band .landing-news {
  max-width: none;
  margin-inline: 0;
}

.landing-news {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  padding: var(--sp-3);
  box-shadow: var(--shadow-control);
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  box-sizing: border-box;
}

.news-public-list {
  display: grid;
  gap: var(--sp-3);
}

body.landing.news-public .news-public-main > h1,
body.landing.news-public .news-public-list,
body.landing.news-public .news-public-main > nav.list-show-more,
body.landing.news-public .news-public-main > p.muted {
  width: 100%;
  box-sizing: border-box;
}

body.landing.news-public .landing-news {
  margin-inline: 0;
  max-width: none;
  scroll-margin-top: calc(var(--landing-scroll-margin-top) + env(safe-area-inset-top, 0px));
}

@media (min-width: 640px) {
  body.landing.news-public {
    --news-public-column-max: 760px;
  }
  body.landing.news-public .news-public-main > h1,
  body.landing.news-public .news-public-list,
  body.landing.news-public .news-public-main > nav.list-show-more,
  body.landing.news-public .news-public-main > p.muted {
    max-width: var(--news-public-column-max);
    margin-inline: auto;
  }
  body.landing.news-public .landing-news-prose {
    max-width: 100%;
  }
}

.landing-news--compact {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--sp-1);
  padding: var(--sp-1) var(--sp-2);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-control);
}

.landing-news-item-link {
  display: flex;
  align-items: center;
  min-height: var(--hit-min);
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.landing-news-item-link:hover h2 {
  color: var(--pine-deep);
}

.landing-news--compact .landing-news-head {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  column-gap: 10px;
  width: 100%;
  margin-bottom: 0;
  min-width: 0;
}

.landing-news--compact .landing-news-item-link {
  flex: 1 1 auto;
  min-width: 0;
  gap: 0.35em 0.45em;
}

.landing-news--compact .landing-news-kicker {
  flex: 0 0 auto;
}

.landing-news--compact .landing-news-head h2 {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  white-space: normal;
}

.landing-news--compact .landing-news-dateline {
  flex: 0 0 auto;
  white-space: nowrap;
}

.landing-news-all-link {
  flex: 0 0 auto;
  margin-left: auto;
  align-self: center;
  display: inline-flex;
  align-items: center;
  min-height: var(--hit-min);
  font-size: var(--fs-sm);
  font-weight: var(--fw-normal);
  color: var(--pine-deep);
  text-decoration: none;
  white-space: nowrap;
}

.landing-news-all-link:hover {
  color: var(--pine);
}

.landing-news-all-link-icon {
  display: none;
}

body.landing .landing-news-kicker {
  display: inline-block;
  margin: 0;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--pine-soft);
  border: 1px solid rgba(21, 122, 82, 0.18);
  color: var(--pine-deep);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: normal;
  text-transform: none;
}

.landing-news-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35em 0.45em;
  margin-bottom: var(--sp-2);
}

.landing-news-head h2 {
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  margin: 0;
  letter-spacing: -0.02em;
  line-height: var(--lh-tight);
}

.landing-news-title-link {
  color: inherit;
  text-decoration: none;
}

.landing-news-title-link:hover {
  color: var(--pine-deep);
  text-decoration: underline;
}

.landing-news-sep {
  color: var(--muted);
  font-weight: var(--fw-normal);
  user-select: none;
}

.landing-news-date {
  margin: 0;
  white-space: nowrap;
}

.landing-news-prose {
  max-width: var(--measure-prose);
}

.landing-news-prose p {
  margin: 0 0 var(--sp-2);
  font-size: var(--fs-sm);
  line-height: var(--lh-base);
}

.landing-news-prose p:last-child {
  margin-bottom: 0;
}

.landing-news-prose .news-list {
  margin: var(--sp-1) 0;
  padding-left: 1.25em;
  font-size: var(--fs-sm);
  line-height: var(--lh-base);
  color: inherit;
}

.landing-news-prose .news-list li {
  margin-bottom: var(--sp-1);
}

.landing-news-prose .news-list li:last-child {
  margin-bottom: 0;
}

.landing-news-prose ul,
.landing-news-prose ol {
  margin: var(--sp-1) 0;
  padding-left: 1.25em;
  font-size: var(--fs-sm);
  line-height: var(--lh-base);
  color: inherit;
}

.landing-news-prose li {
  margin: var(--sp-1) 0;
  font-weight: var(--fw-normal);
}

.landing-news-prose li:last-child {
  margin-bottom: 0;
}

.landing-news-prose a {
  color: var(--pine-deep);
  font-weight: var(--fw-semibold);
  text-decoration: none;
}

.landing-news-prose a:hover {
  color: var(--pine);
}

.landing-news-body {
  margin: 0;
}

body.landing .landing-news-body,
body.landing .guide-prose,
body.landing .steps .step-copy p {
  font-weight: var(--fw-normal);
}

@media (max-width: 639px) {
  .landing-news--full .landing-news-head {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 10px;
    row-gap: 4px;
  }
  .landing-news--full .landing-news-kicker {
    grid-column: 1;
    grid-row: 1;
    justify-self: start;
  }
  .landing-news--full .landing-news-dateline {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    font-size: var(--fs-xs);
  }
  .landing-news--full .landing-news-head h2 {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .landing-news--full .landing-news-dateline .landing-news-sep {
    display: none;
  }

  .landing-news-all-link {
    position: relative;
    justify-content: center;
    min-width: var(--hit-min);
    padding-inline: var(--sp-2);
  }
  .landing-news-all-link-text {
    display: none;
  }
  .landing-news-all-link-icon {
    display: inline;
  }
}

body.landing .hero-actions .btn-primary {
  min-height: var(--btn-h-lg);
  padding-inline: 18px;
  border-radius: var(--radius-btn);
  font-size: var(--fs-base);
  box-shadow: 0 8px 20px rgba(21, 122, 82, 0.28);
}

body.landing .hero-actions .btn-ghost {
  min-height: var(--btn-h-lg);
  padding-inline: 16px;
  border-radius: var(--radius-btn);
  background: var(--paper);
  border-color: var(--line);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(23, 33, 28, 0.04);
}

body.landing .hero-actions .btn-ghost:hover {
  background: var(--paper);
  border-color: color-mix(in srgb, var(--pine) 40%, var(--line));
  color: var(--pine-deep);
}

body.landing .top-actions .btn-primary {
  box-shadow: var(--shadow-btn-primary);
}

@media (min-width: 800px) {
  body.landing .topbar.topbar--public {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    flex-wrap: nowrap;
    column-gap: var(--sp-3);
  }
  body.landing .topbar.topbar--public .top-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0;
    min-width: 0;
  }
  body.landing .topbar.topbar--public .top-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    width: auto;
    grid-column: unset;
    grid-template-columns: unset;
  }
  body.landing .public-menu {
    display: none;
  }
}

@media (min-width: 800px) and (max-width: 1099px) {
  body.landing .topbar.topbar--public .top-nav a {
    padding-inline: 8px;
    font-size: 0.9rem;
  }
}

body.landing .public-menu {
  position: static;
  flex: 0 0 auto;
}

body.landing .public-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--hit-min);
  height: var(--hit-min);
  min-width: var(--hit-min);
  min-height: var(--hit-min);
  padding: 0;
  border-radius: var(--radius-btn);
  list-style: none;
  cursor: pointer;
  color: var(--ink);
}

body.landing .public-menu-toggle::-webkit-details-marker {
  display: none;
}

body.landing .public-menu-toggle::marker {
  content: "";
}

body.landing .public-menu-toggle:hover,
body.landing .public-menu-toggle:focus-visible {
  background: var(--pine-soft);
  color: var(--pine-deep);
}

body.landing .public-menu-icon--close {
  display: none;
}

body.landing .public-menu[open] .public-menu-icon--open {
  display: none;
}

body.landing .public-menu[open] .public-menu-icon--close {
  display: inline-flex;
}

body.landing .public-menu-panel {
  position: absolute;
  z-index: 20;
  top: 100%;
  left: 0;
  right: 0;
  max-height: calc(100dvh - 56px - env(safe-area-inset-top, 0px));
  overflow-y: auto;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 12px 28px rgba(23, 33, 28, 0.08);
  padding: 8px max(var(--sp-4), env(safe-area-inset-right)) 16px max(var(--sp-4), env(safe-area-inset-left));
}

body.landing .public-menu-links {
  display: flex;
  flex-direction: column;
}

body.landing .public-menu-links a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 8px 4px;
  color: var(--ink);
  text-decoration: none;
  font-weight: var(--fw-medium);
  overflow-wrap: normal;
  word-break: normal;
  border-bottom: 1px solid var(--line);
}

body.landing .public-menu-links a[aria-current="page"],
body.landing .public-menu-links a:hover {
  color: var(--pine-deep);
}

body.landing .public-menu-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 12px;
}

body.landing .public-menu-actions .btn {
  width: 100%;
  justify-content: center;
  min-height: 48px;
}

body.public-menu-open {
  overflow: hidden;
}

@media (prefers-reduced-motion: no-preference) {
  body.landing .public-menu[open] .public-menu-panel {
    animation: public-menu-in 180ms ease;
  }
}

@keyframes public-menu-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 799px) {
  body.landing .topbar.topbar--public {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 56px;
    padding-top: max(8px, env(safe-area-inset-top));
    padding-bottom: 8px;
    margin-bottom: 0;
  }
  body.landing .topbar.topbar--public .brand {
    flex: 0 1 auto;
    min-width: 0;
  }
  body.landing .topbar.topbar--public .top-actions {
    display: flex;
    flex-wrap: nowrap;
    flex: 0 1 auto;
    width: auto;
    min-width: 0;
    grid-column: unset;
    grid-template-columns: unset;
    gap: 10px;
  }
  body.landing .topbar.topbar--public .top-actions .lang {
    flex: 0 0 auto;
    width: auto;
    grid-column: unset;
    justify-content: flex-start;
  }
  body.landing .topbar.topbar--public .lang a {
    min-width: 32px;
    min-height: 32px;
    padding-inline: 8px;
  }
  body.landing .topbar.topbar--public .topbar-signup {
    display: none;
  }
  body.landing .topbar.topbar--public .topbar-login {
    width: auto;
    min-width: 0;
    min-height: var(--hit-min);
    padding: 6px 4px;
    white-space: nowrap;
    background: transparent;
    border: none;
    box-shadow: none;
    color: var(--ink);
    font-weight: 650;
    font-size: 0.9rem;
    line-height: 1.2;
  }
  body.landing .topbar.topbar--public .topbar-login:hover {
    background: transparent;
    color: var(--pine-deep);
  }
  body.landing .topbar.topbar--public .topbar-app,
  body.landing .topbar.topbar--public .topbar-login,
  body.landing .topbar.topbar--public .lang a {
    position: relative;
  }

  body.landing .topbar.topbar--public .topbar-app::after,
  body.landing .topbar.topbar--public .topbar-login::after,
  body.landing .topbar.topbar--public .lang a::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: var(--hit-min);
    height: var(--hit-min);
    transform: translate(-50%, -50%);
  }

  body.landing .topbar.topbar--public .topbar-app {
    width: auto;
    min-width: 0;
    min-height: 36px;
    padding: 6px 12px;
    font-size: 0.88rem;
    white-space: nowrap;
  }
}

@media (max-width: 359.98px) {
  body.landing .topbar.topbar--public {
    padding-inline: 8px;
    gap: 4px;
  }

  body.landing .topbar.topbar--public .brand--landing {
    flex-shrink: 1;
    min-width: 0;
  }

  body.landing .topbar.topbar--public .top-actions {
    flex-shrink: 0;
    gap: 4px;
  }

  body.landing .topbar.topbar--public .topbar-login {
    flex-shrink: 0;
    min-width: max-content;
    padding-inline: 2px;
    white-space: nowrap;
  }
}

@media (min-width: 360px) and (max-width: 390px) {
  body.landing .topbar.topbar--public .brand--landing {
    flex-shrink: 1;
    min-width: 0;
  }

  body.landing .topbar.topbar--public .top-actions {
    gap: 4px;
  }

  body.landing .topbar.topbar--public .topbar-login {
    flex-shrink: 0;
    min-width: max-content;
    padding-inline: 2px;
  }
}

body.landing .band {
  padding-top: 8px;
  padding-bottom: 36px;
}

body.landing .band[id] {
  scroll-margin-top: calc(var(--landing-scroll-margin-top) + env(safe-area-inset-top, 0px));
}

body.landing .how-panel {
  background:
    radial-gradient(520px 220px at 0% 0%, rgba(21, 122, 82, 0.2), transparent 72%),
    linear-gradient(165deg, #dff5eb 0%, #f4fbf8 48%, #ffffff 100%);
  border: 1px solid rgba(201, 228, 214, 0.85);
  border-radius: 28px;
  padding: 32px 22px 24px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 24px 48px rgba(14, 92, 61, 0.07);
}

body.landing .how-head .landing-news-kicker,
body.landing .faq-head .landing-news-kicker {
  margin-bottom: var(--sp-2);
}

body.landing .how-head h2,
body.landing .faq-head h2 {
  font-size: clamp(1.85rem, 1.2rem + 2vw, 2.6rem);
  font-weight: var(--fw-bold);
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 0 0 0.75em;
  max-width: 18em;
}

body.landing .landing-steps {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

body.landing .how-panel ol.steps.landing-steps > li {
  box-sizing: border-box;
  display: flex;
  grid-template-columns: unset;
  flex-direction: row;
  align-items: flex-start;
  gap: var(--sp-3);
  padding: var(--sp-3);
  position: relative;
  overflow: visible;
  border-radius: var(--radius-card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  background: var(--paper);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

body.landing .landing-steps li::after {
  display: none;
}

body.landing .landing-flow-art {
  display: block;
  width: 100%;
  height: auto;
  max-width: 1100px;
  margin: 0 auto var(--space-section);
}

@media (max-width: 639.98px) {
  body.landing .landing-flow {
    display: none;
  }
}

body.landing .landing-step-media {
  flex: 0 0 auto;
  width: 0;
  min-height: 0;
  overflow: visible;
  gap: 0;
  position: static;
  z-index: 1;
}

body.landing .landing-steps .step-num {
  position: absolute;
  top: var(--sp-1);
  right: var(--sp-1);
  bottom: auto;
  left: auto;
  z-index: 2;
  margin: 0;
  font-family: var(--display);
  font-size: 4.5rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  color: color-mix(in srgb, var(--pine) 6%, transparent);
  pointer-events: none;
  user-select: none;
}

body.landing .landing-steps .step-copy {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
}

body.landing .landing-steps .step-copy h3 {
  font-size: var(--fs-base);
  font-weight: 650;
  letter-spacing: -0.015em;
  margin: 0 0 var(--sp-1);
}

body.landing .how-panel ol.steps.landing-steps > li:hover {
  transform: translateY(-2px);
  border-color: rgba(21, 122, 82, 0.28);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.95) inset,
    0 12px 28px rgba(14, 92, 61, 0.08);
}

@media (min-width: 640px) {
  body.landing .landing-steps {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: var(--sp-3);
  }

  body.landing .how-panel ol.steps.landing-steps > li {
    grid-column: span 2;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--sp-4);
    overflow: visible;
  }

  body.landing .how-panel ol.steps.landing-steps > li:nth-child(4) {
    grid-column: 2 / span 2;
  }

  body.landing .how-panel ol.steps.landing-steps > li:nth-child(5) {
    grid-column: 4 / span 2;
  }

  body.landing .landing-steps .step-copy {
    text-align: center;
    width: 100%;
  }

  body.landing .landing-steps .step-copy h3 {
    font-size: var(--fs-lg);
  }
}

@media (min-width: 1024px) {
  body.landing .landing-steps {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  body.landing .how-panel ol.steps.landing-steps > li,
  body.landing .how-panel ol.steps.landing-steps > li:nth-child(4),
  body.landing .how-panel ol.steps.landing-steps > li:nth-child(5) {
    grid-column: auto;
  }
}

@media (min-width: 1024px) and (max-width: 1199px) {
  body.landing .how-panel ol.steps.landing-steps > li {
    padding: var(--sp-3);
  }

  body.landing .landing-steps .step-copy,
  body.landing .landing-steps .step-copy p {
    hyphens: auto;
    -webkit-hyphens: auto;
  }
}

body.landing .faq details {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  margin-bottom: var(--sp-2);
  padding: 0;
  overflow: hidden;
  transition: border-color 0.15s ease;
}

body.landing .faq details:last-child {
  margin-bottom: 0;
}

body.landing .faq details[open] {
  border-color: rgba(21, 122, 82, 0.35);
}

body.landing .faq details > p {
  margin: 0;
  padding: 0 var(--sp-3) var(--sp-2);
  color: var(--muted);
  line-height: var(--lh-relaxed);
}

body.landing .faq details > p a {
  color: var(--pine-deep);
  font-weight: var(--fw-semibold);
  text-decoration: none;
}

body.landing .faq details > p a:hover {
  color: var(--pine);
}

body.landing .faq details[open] > p:first-of-type {
  padding-top: var(--sp-1);
}

body.landing .faq details > p:last-child {
  padding-bottom: var(--sp-3);
}

body.landing .faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  width: 100%;
  min-height: var(--hit-min);
  font-weight: var(--fw-semibold);
  padding: var(--sp-2) var(--sp-6) var(--sp-2) var(--sp-3);
  position: relative;
  box-sizing: border-box;
  transition: color 0.15s ease, background-color 0.15s ease;
}

body.landing .faq summary::-webkit-details-marker { display: none; }

body.landing .faq summary::after {
  content: "";
  position: absolute;
  right: var(--sp-3);
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -6px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 150ms ease, border-color 150ms ease;
}

body.landing .faq details[open] summary::after {
  transform: rotate(-135deg);
  margin-top: -2px;
  border-color: var(--pine);
}

body.landing .faq summary:hover {
  background: rgba(21, 122, 82, 0.04);
  color: var(--pine-deep);
}

body.landing .faq summary:focus-visible {
  outline: none;
}

body.landing .faq details:has(> summary:focus-visible) {
  outline: 2px solid var(--pine);
  outline-offset: -2px;
}

body.landing .site-foot {
  margin-top: 12px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  background: transparent;
}

body.landing .foot-rev {
  opacity: 0.75;
}

@media (max-width: 639px) {
  body.landing .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  body.landing .hero-actions .btn {
    width: 100%;
  }
  body.landing .hero-media {
    display: none;
    margin: 0;
    padding: 0;
    min-height: 0;
  }
  body.landing .step-mark { height: 60px; }
}

@media (min-width: 1000px) {
  body.landing .hero-layout {
    grid-template-columns: 52fr 48fr;
    gap: clamp(24px, 3vw, 40px);
  }
  body.landing .hero-media {
    max-width: none;
    margin-inline: 0;
    justify-self: end;
  }
  body.landing .hero-copy { justify-self: start; }
}

@media (min-width: 800px) {
  body.landing .hero { padding-top: 36px; padding-bottom: 52px; }
}

body.landing.not-found-public .not-found-main {
  max-width: 36rem;
  margin: 0 auto;
  padding: var(--sp-4) var(--sp-3) var(--sp-6);
  text-align: center;
}

body.landing.not-found-public .not-found-kicker {
  margin: 0 0 var(--sp-2);
}

body.landing.not-found-public .not-found-title {
  margin: 0 0 var(--sp-2);
  font-size: var(--fs-xl);
  letter-spacing: -0.02em;
}

body.landing.not-found-public .not-found-lead {
  margin: 0 0 var(--sp-4);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--muted);
}

body.landing.not-found-public .not-found-illustration {
  display: block;
  width: 100%;
  max-width: 200px;
  height: auto;
  margin: 0 auto var(--sp-4);
}

body.landing.not-found-public .not-found-home {
  margin: 0;
  font-size: var(--fs-sm);
  font-weight: var(--fw-normal);
  line-height: var(--lh-base);
}

body.landing.not-found-public .not-found-home a {
  color: var(--pine-deep);
  text-decoration: none;
  font-weight: var(--fw-semibold);
}

body.landing.not-found-public .not-found-home a:hover {
  color: var(--pine);
}

@media (max-width: 639.98px) {
  body.landing.not-found-public .not-found-home a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--hit-min);
    padding-inline: var(--sp-3);
  }
}

body.landing.not-found-public .not-found-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--sp-2);
  max-width: 20rem;
  margin: 0 auto;
}

body.landing.not-found-public .not-found-actions .btn {
  width: 100%;
  min-height: var(--hit-min);
  justify-content: center;
}

@media (min-width: 640px) {
  body.landing .faq summary {
    padding-left: var(--sp-4);
    padding-right: var(--sp-6);
  }
  body.landing .faq details > p {
    max-width: 46rem;
    padding-left: var(--sp-4);
    padding-right: var(--sp-4);
  }
  body.landing.not-found-public .not-found-illustration {
    max-width: 260px;
  }
  body.landing.not-found-public .not-found-actions {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    max-width: none;
  }
  body.landing.not-found-public .not-found-actions .btn {
    width: auto;
    min-width: 10rem;
  }
}

@media (min-width: 900px) {
  body.landing .how-panel { padding: 40px 36px 32px; }
}

@media (prefers-reduced-motion: reduce) {
  body.landing .how-panel ol.steps.landing-steps > li:hover { transform: none; }
  body.landing .hero-art.is-float-ready { animation: none; will-change: auto; }
  body.landing .faq summary::after { transition: none; }
}

.vp-mobile-only { display: none !important; }

body.landing .pricing-band .pricing-head .pricing-sub {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-lg);
  line-height: var(--lh-base);
  max-width: 40rem;
}

body.landing .pricing-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4);
  max-width: 880px;
  margin: var(--sp-6) auto 0;
}

@media (min-width: 768px) {
  body.landing .pricing-cards {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-5);
  }
}

body.landing .pricing-card {
  display: grid;
  grid-row: span 4;
  grid-template-rows: subgrid;
  row-gap: 0;
  margin: 0;
  padding: 0;
  position: relative;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
}

body.landing .pricing-card > * {
  padding-inline: 28px;
}

body.landing .pricing-card-head {
  padding-top: 28px;
}

body.landing .pricing-card-head h3 {
  margin: 0;
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  letter-spacing: -0.01em;
}

body.landing .pricing-card-desc {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: var(--fs-sm);
}

body.landing .pricing-price-block {
  padding-block: var(--sp-5);
  font-variant-numeric: tabular-nums;
}

body.landing .pricing-price {
  margin: 0;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  column-gap: var(--sp-2);
}

body.landing .pricing-amount {
  font-size: clamp(2.25rem, 1.6rem + 1.6vw, 2.75rem);
  font-weight: var(--fw-bold);
  letter-spacing: -0.03em;
  line-height: 1;
  white-space: nowrap;
}

body.landing .pricing-vat {
  font-size: var(--fs-base);
  font-weight: var(--fw-medium);
  color: var(--muted);
}

body.landing .pricing-price-note {
  margin: var(--sp-2) 0 0;
  font-size: var(--fs-sm);
  color: var(--muted);
}

body.landing .pricing-list {
  list-style: none;
  margin: 0;
  padding-block: var(--sp-5);
  border-top: 1px solid var(--line);
  display: grid;
  gap: var(--sp-3);
  align-content: start;
}

body.landing .pricing-list li {
  display: flex;
  gap: var(--sp-3);
  align-items: flex-start;
  line-height: var(--lh-tight);
}

body.landing .pricing-list .ico {
  font-size: 18px;
  color: var(--pine);
  stroke-width: 2.25px;
  margin-top: -1px;
}

body.landing .pricing-foot {
  padding-bottom: 28px;
  display: flex;
  align-items: flex-end;
}

body.landing .pricing-foot > p {
  margin: 0;
}

body.landing .pricing-foot > * {
  flex: 1;
}

body.landing .pricing-foot .btn {
  min-height: var(--btn-h-lg);
  height: auto;
  align-self: stretch;
  justify-content: center;
  font-size: var(--fs-base);
}

body.landing .pricing-soon {
  display: flex;
  gap: var(--sp-2);
  align-items: center;
  padding: var(--sp-2) var(--sp-3);
  min-height: var(--btn-h-lg);
  box-sizing: border-box;
  border: 1px dashed color-mix(in srgb, var(--pine) 40%, var(--line));
  border-radius: var(--radius-btn);
  color: var(--pine-deep);
  font-size: var(--fs-xs);
  line-height: var(--lh-tight);
}

body.landing .pricing-soon .ico {
  font-size: 18px;
  stroke-width: 1.75px;
}

@media (max-width: 639px) {
  body.landing .pricing-card > * {
    padding-inline: 20px;
  }
  body.landing .pricing-card-head {
    padding-top: 22px;
  }
  body.landing .pricing-foot {
    padding-bottom: 22px;
  }
  body.landing .pricing-cards {
    margin-top: var(--sp-5);
  }
}

body.landing .pricing-band--A .pricing-head {
  text-align: center;
}

body.landing .pricing-band--A .pricing-head h2,
body.landing .pricing-band--A .pricing-head .pricing-sub {
  margin-inline: auto;
}

body.landing .pricing-band .pricing-head h2 {
  margin-bottom: 0.45em;
}

body.landing .pricing-band--A .pricing-card--pro {
  background: linear-gradient(
    180deg,
    var(--pine-soft) 0%,
    color-mix(in srgb, var(--pine-soft) 45%, var(--paper)) 100%
  );
  border: 1.5px solid var(--pine);
  box-shadow: var(--shadow-card);
}

body.landing .pricing-band--A .pricing-card--pro h3 {
  color: var(--pine-deep);
}

body.landing .pricing-band--A .pricing-card--pro .pricing-list {
  border-top-color: color-mix(in srgb, var(--pine) 22%, transparent);
}

body.landing .pricing-band--A .pricing-card--pro .pricing-soon {
  background: color-mix(in srgb, var(--paper) 70%, transparent);
}

body.landing .guide-list { display: grid; gap: var(--sp-5); }

body.landing .guide-card {
  display: grid;
  gap: var(--sp-2);
  width: 100%;
  max-width: 40rem;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  padding: var(--sp-3);
  box-shadow: var(--shadow-control);
}

body.landing .guide-card:hover {
  border-color: color-mix(in srgb, var(--pine) 40%, var(--line));
}

body.landing .guide-card:has(.guide-card-stretched-link:focus-visible) {
  outline: 2px solid var(--pine);
  outline-offset: 2px;
}

body.landing .guide-card-title {
  margin: 0;
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  letter-spacing: -0.02em;
  line-height: var(--lh-tight);
}

body.landing .guide-card-stretched-link {
  color: inherit;
  text-decoration: none;
}

body.landing .guide-card-stretched-link:hover,
body.landing .guide-card-stretched-link:focus-visible {
  color: var(--pine-deep);
  text-decoration: underline;
}

body.landing .guide-card-stretched-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
}

body.landing .guide-card-excerpt {
  margin: 0;
  font-size: var(--fs-sm);
  line-height: var(--lh-base);
}

body.landing .guide-card-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

body.landing .guide-card .landing-news-all-link {
  position: relative;
  z-index: 1;
  margin-top: 0;
}

@media (prefers-reduced-motion: no-preference) {
  body.landing .guide-card:hover .guide-card-cover {
    transform: scale(1.02);
  }
}

body.landing .guide-prose img { max-width: 100%; height: auto; border-radius: var(--radius-sm); }

body.landing .guide-cover,
body.landing .guide-card-cover {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

body.landing .guide-cover { margin-bottom: 28px; }

body.landing .guide-card-cover { margin-bottom: calc(28px - var(--sp-2)); }

body.landing.guides-public .guide-card { max-width: none; }

@media (min-width: 768px) {
  body.landing.guides-public .guide-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--sp-5);
  }
}

body.landing .guide-pager {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-3);
  margin-top: var(--sp-6);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--line);
}

body.landing .guide-pager-link {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: var(--hit-min);
  padding: var(--sp-2) var(--sp-3);
  color: inherit;
  text-decoration: none;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
}

body.landing .guide-pager-next {
  grid-column: 2;
  justify-content: flex-end;
  text-align: end;
}

body.landing .guide-pager-link .ico { flex: none; color: var(--muted); }

body.landing .guide-pager-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

body.landing .guide-pager-label {
  font-size: var(--fs-xs);
  color: var(--muted);
}

body.landing .guide-pager-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
}

body.landing .guide-pager-link:hover {
  border-color: color-mix(in srgb, var(--pine) 40%, var(--line));
}

body.landing .guide-pager-link:hover .guide-pager-title,
body.landing .guide-pager-link:focus-visible .guide-pager-title {
  color: var(--pine-deep);
  text-decoration: underline;
}

body.landing .guide-pager-link:focus-visible {
  outline: 2px solid var(--pine);
  outline-offset: 2px;
}

.vp-desktop-only { display: block; }

@media (min-width: 640px) {
  body.landing.guide-public {
    --news-public-column-max: 760px;
  }
  body.landing.guide-public .guide-public-main > .page-header-back,
  body.landing.guide-public .guide-public-main > article,
  body.landing.guide-public .guide-public-main > .guide-pager {
    max-width: var(--news-public-column-max);
    margin-inline: auto;
  }
  body.landing.guide-public .guide-prose.landing-news-prose {
    max-width: 100%;
  }
}

.btn.vp-desktop-only { display: inline-flex; }

@media (max-width: 699.98px) {
  .sheet-foot .sheet-logout-link,
  .side-foot .side-logout-link {
    display: inline-flex;
    align-items: center;
    min-height: var(--hit-min);
  }
}

@media (max-width: 639px) {
  .vp-mobile-only:not(.bottom-nav):not(.fab-new-job) { display: block !important; }
  .vp-desktop-only { display: none !important; }
  .bottom-nav.vp-mobile-only { display: flex !important; }
  a.fab-new-job.vp-mobile-only { display: inline-flex !important; }
  .shell .side { display: none; }
  .shell .main {
    padding-bottom: calc(56px + 16px + 56px + 16px + env(safe-area-inset-bottom));
  }
  body:has(.timer-sticky-bar--shown) .fab-new-job {
    bottom: calc(56px + var(--timer-bar-h, 60px) + 16px + env(safe-area-inset-bottom));
  }
  body:has(.timer-sticky-bar--shown) .shell .main {
    padding-bottom: calc(56px + var(--timer-bar-h, 60px) + 88px + env(safe-area-inset-bottom));
  }
  .flag-fab { display: none !important; }
  .shell .cookie-notice {
    bottom: calc(56px + env(safe-area-inset-bottom));
    padding-bottom: var(--sp-2);
    font-size: var(--fs-sm);
  }
  .cookie-notice-inner {
    flex-direction: column;
    align-items: stretch;
  }
  .cookie-notice .cookie-notice-accept.btn {
    width: 100%;
    min-height: var(--hit-min);
    align-self: stretch;
  }
  body.sheet-open { overflow: hidden; }
  .shell {
    --bottom-nav-h: 56px;
    --timer-bar-h: calc(var(--hit-min) + 2 * var(--sp-2) + 3px);
    min-width: 0;
    max-width: 100%;
  }
  .bottom-nav,
  .bottom-nav-item {
    min-height: var(--bottom-nav-h);
  }
  .main { min-width: 0; max-width: 100%; }
  .page-header { min-width: 0; max-width: 100%; }
  .page-header-actions {
    flex-shrink: 1;
    min-width: 0;
    flex-wrap: nowrap;
    align-items: center;
  }
  .page-header-actions > .btn-primary,
  .page-header-actions > a.btn-primary {
    flex-shrink: 0;
  }
  .page-header-actions .mobile-overflow-menu {
    flex-shrink: 0;
  }
  .page-header-actions .mobile-overflow-menu > summary {
    display: inline-flex;
  }
}

@media (max-width: 639px) {
  .page-header-actions .btn,
  .page-header-actions > a.btn {
    min-height: var(--hit-min);
  }
  .page-header-actions .mobile-overflow-menu > summary {
    min-height: var(--hit-min);
    min-width: var(--hit-min);
  }
  .page-header-actions .trip-add-open {
    min-height: var(--hit-min);
    min-width: var(--hit-min);
  }
  .sheet-bottom-head .btn,
  .sheet-bottom-close {
    min-height: var(--hit-min);
  }
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 35;
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  gap: 0;
  box-sizing: border-box;
  max-width: 100%;
  min-height: 56px;
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(255, 255, 255, 0.94);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.bottom-nav-item {
  flex: 1 1 0;
  min-width: 0;
  min-height: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-1);
  padding: var(--sp-2) var(--sp-1);
  border: 0;
  background: transparent;
  color: var(--muted);
  text-decoration: none;
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  font-family: inherit;
  line-height: var(--lh-base);
  cursor: pointer;
}

.bottom-nav-item .ico {
  width: var(--ico-header);
  height: var(--ico-header);
  font-size: var(--ico-header);
}

.bottom-nav-item[aria-current="page"],
.bottom-nav-item.is-current {
  color: var(--pine-deep);
  background: var(--pine-soft);
  font-weight: var(--fw-semibold);
}

.bottom-nav-icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bottom-nav-unread-dot {
  position: absolute;
  top: 0;
  right: 0;
  width: 8px;
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--amber);
  pointer-events: none;
}

.sheet-bottom {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  top: auto;
  margin: 0;
  max-width: none;
  width: 100%;
  max-height: min(85dvh, 640px);
  border: 0;
  border-radius: var(--radius-card) var(--radius-card) 0 0;
  padding: 0;
  transform: translateY(100%);
  transition: transform 0.22s ease;
  box-shadow: var(--shadow-card);
}

.sheet-bottom[open] {
  transform: translateY(0);
}

.sheet-bottom::backdrop { background: rgba(30, 26, 22, 0.4); }

.sheet-bottom-inner {
  display: flex;
  flex-direction: column;
  max-height: min(85dvh, 640px);
  overflow: auto;
  padding: var(--sp-3) var(--sp-4) calc(var(--sp-4) + env(safe-area-inset-bottom));
}

.sheet-bottom-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-2);
}

.sheet-bottom-title {
  margin: 0;
  font-family: var(--display);
  font-size: var(--fs-section);
  font-weight: var(--fw-bold);
  letter-spacing: -0.01em;
}

.sheet-nav {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.page-header-title-row {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  max-width: 100%;
}

.page-header-title-row h1 {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}

.sheet-nav a,
.sheet-nav-btn {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: 48px;
  padding: 0 var(--sp-2);
  border: 0;
  border-radius: var(--radius-control);
  background: transparent;
  color: var(--ink);
  text-decoration: none;
  font-size: var(--fs-base);
  font-weight: var(--fw-medium);
  font-family: inherit;
  line-height: var(--lh-base);
  text-align: left;
  width: 100%;
  cursor: pointer;
}

.tier-badge {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-1);
  max-width: 100%;
  min-width: 0;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius-control);
}

.tier-badge:focus-visible {
  outline: 2px solid var(--border-field-focus);
  outline-offset: 2px;
}

.tier-badge--static {
  cursor: default;
}

.tier-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  max-width: 100%;
  padding: var(--sp-1) var(--sp-2);
  border-radius: var(--radius-pill);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
  white-space: nowrap;
}

.tier-pill--basic {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
}

.tier-pill--pro {
  border: 1px solid transparent;
  background: var(--brand);
  color: var(--on-brand);
}

.tier-pill--admin {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font-weight: var(--fw-semibold);
}

.tier-badge__meta {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.tier-badge__meta--warn {
  color: var(--amber-deep);
}

.side-foot .tier-badge,
.sheet-foot .tier-badge {
  margin-bottom: var(--sp-1);
}

@media (max-width: 639px) {
  .tier-badge:has(.tier-pill--pro) {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: var(--sp-1) var(--sp-2);
  }

  .tier-badge:has(.tier-pill--pro) .tier-badge__meta {
    overflow-wrap: normal;
    white-space: nowrap;
    flex-shrink: 1;
    min-width: 0;
  }

  .shell .side-nav a {
    position: relative;
  }

  .shell .side-nav a::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: var(--hit-min);
    height: var(--hit-min);
    transform: translate(-50%, -50%);
  }
}

.sheet-nav a[aria-current="page"] {
  font-weight: var(--fw-semibold);
}

.sheet-nav a:hover,
.sheet-nav-btn:hover { background: var(--pine-soft); }

.sheet-nav-btn .ico {
  font-size: 22px;
  width: 1em;
  height: 1em;
}

.sheet-nav-group-label {
  margin: var(--sp-3) 0 var(--sp-1);
  padding: 0 var(--sp-2);
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.sheet-running-link {
  align-items: flex-start;
  gap: var(--sp-2);
  margin-bottom: var(--sp-2);
}

.sheet-foot {
  margin-top: var(--sp-3);
  padding-top: var(--sp-2);
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.sheet-foot .side-foot-row {
  width: 100%;
}

.fab-new-job {
  position: fixed;
  right: 16px;
  bottom: calc(68px + env(safe-area-inset-bottom));
  z-index: 30;
  width: 56px;
  height: 56px;
  min-width: 56px;
  min-height: 56px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-card);
  padding: 0;
}

.fab-new-job .ico { width: 26px; height: 26px; }

.side-more-open { display: none; }

@media (min-width: 640px) and (max-width: 959.98px) {
  .shell .side {
    flex-wrap: nowrap;
    align-items: center;
    gap: var(--sp-2);
    padding: var(--sp-2) max(var(--sp-3), env(safe-area-inset-right)) var(--sp-2) max(var(--sp-3), env(safe-area-inset-left));
  }

  .shell .side .brand.brand--app {
    flex-shrink: 0;
  }

  .shell .side-nav {
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent);
  }

  .shell .side-nav::-webkit-scrollbar {
    display: none;
  }

  .shell .side-nav a {
    flex-shrink: 0;
    min-height: var(--hit-min);
    padding: 0 var(--sp-2);
    font-size: var(--fs-sm);
  }

  .shell .side-nav-group,
  .shell .side-foot {
    display: none;
  }

  .shell .side-running {
    flex: 0 0 auto;
    min-width: 0;
    margin: 0;
  }

  .shell .side-running-link {
    min-height: var(--hit-min);
    padding: 0 var(--sp-2);
  }

  .shell .side-running-paused-label,
  .shell .side-running-title,
  .shell .side-running-title--paused {
    display: none;
  }

  .shell .side-more-open {
    display: inline-flex;
    flex-shrink: 0;
    min-width: var(--hit-min);
    min-height: var(--hit-min);
  }

  .shell .side-more-open-icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .sheet-bottom {
    left: auto;
    right: max(var(--sp-3), env(safe-area-inset-right));
    width: min(28rem, calc(100vw - 2 * max(var(--sp-3), env(safe-area-inset-left))));
    max-width: 28rem;
  }
}

@media (min-width: 768px) and (max-width: 900px) {
  .shell .side-nav {
    scroll-snap-type: x mandatory;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 48px), transparent);
  }

  .shell .side-nav a {
    scroll-snap-align: start;
  }
}

.project-mobile-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--sp-2);
  margin-bottom: var(--sp-2);
}

.project-mobile-title-group {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--sp-2);
}

.project-mobile-title-group h1 {
  flex: 1 1 auto;
  min-width: min(100%, 12rem);
  margin: 0;
  line-height: var(--lh-tight);
  overflow-wrap: anywhere;
}

.project-mobile-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  flex: 0 0 auto;
  flex-shrink: 0;
}

.project-mobile-actions .btn {
  width: var(--btn-h);
  height: var(--btn-h);
  min-width: max(var(--btn-h), var(--hit-min));
  min-height: max(var(--btn-h), var(--hit-min));
  padding: 0;
  justify-content: center;
}

.project-mobile-meta {
  margin: 0 0 var(--sp-3);
  font-size: var(--fs-sm);
  color: var(--muted);
  line-height: var(--lh-tight);
}

.project-mobile-meta a { color: var(--pine); font-weight: var(--fw-semibold); }

.project-mobile-meta.value-summary-strip {
  color: var(--blue-deep);
}

.project-mobile-meta.value-summary-strip a,
.project-mobile-meta.value-summary-strip .project-job-meta-map-link {
  color: var(--blue-deep);
  font-weight: var(--fw-semibold);
}

.project-mobile-meta.value-summary-strip .project-job-meta-map-link:hover,
.project-mobile-meta.value-summary-strip .project-job-meta-map-link:focus-visible {
  color: var(--ink);
}

#agent-api {
  scroll-margin-top: calc(72px + env(safe-area-inset-top, 0px));
}

#agent-api > * + * {
  margin-top: var(--sp-3);
}

.agent-api-user-on-form label.check {
  margin-bottom: 0;
  display: flex;
  align-items: center;
  min-height: var(--hit-min);
}

#agent-api > .agent-api-user-on-form + p.tiny {
  margin-top: var(--sp-1);
  margin-bottom: var(--sp-5);
}

.agent-api-card--no-pro {
  color: var(--muted);
  background: color-mix(in srgb, var(--muted) 8%, var(--paper));
}

.agent-api-card--no-pro > .card-heading {
  background: color-mix(in srgb, var(--muted) 12%, var(--paper));
  color: var(--muted);
}

.agent-api-card > .card-heading.profile-subscription-heading {
  width: auto;
  box-sizing: border-box;
}

.agent-api-card--no-pro .agent-api-user-on-form.is-disabled label.check {
  color: var(--muted);
  cursor: not-allowed;
}

.agent-api-connect-lead,
.agent-api-one-key-hint,
.agent-api-connect-hint,
.agent-api-scope-desc {
  margin: 0;
  font-size: var(--fs-sm);
  font-weight: var(--fw-normal);
  color: var(--muted);
  line-height: var(--lh-base);
}

.agent-api-connect-lead {
  margin-bottom: var(--sp-1);
}

.agent-api-connect {
  display: grid;
  gap: var(--sp-3);
  padding: var(--pad-card-loose);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--paper);
  box-shadow: var(--shadow-control);
}

.agent-api-connect-row {
  display: grid;
  gap: var(--sp-1);
  min-width: 0;
}

.agent-api-connect-row--agent-key.agent-api-connect-row--after-manual {
  padding-top: var(--sp-3);
  margin-top: var(--sp-1);
  border-top: 1px solid var(--line);
}

.agent-api-connect-label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--ink);
  margin: 0;
}

.agent-api-copy-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  align-items: center;
  min-width: 0;
}

.agent-api-copy-row input,
.agent-api-copy-field {
  flex: 1 1 auto;
  min-width: 0;
  min-height: var(--control-h);
  padding: 0 var(--sp-3);
  border: 1px solid var(--border-field);
  border-radius: var(--radius-control);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
  box-sizing: border-box;
}

.agent-api-copy-field {
  display: flex;
  align-items: center;
  overflow-x: auto;
  white-space: nowrap;
}

.agent-api-copy-row .btn {
  flex: 0 0 auto;
  min-height: var(--btn-h-sm);
  padding: 0 var(--btn-pad-x-sm);
  font-size: var(--fs-btn-compact);
}

.agent-api-key-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  min-width: 0;
}

.agent-api-key-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: var(--sp-1) var(--sp-2);
  border-radius: var(--radius-btn);
  border: 1px solid transparent;
  line-height: var(--lh-tight);
}

.agent-api-key-badge--on {
  background: var(--pine-soft);
  color: var(--pine-deep);
  border-color: color-mix(in srgb, var(--pine) 22%, transparent);
}

.agent-api-key-badge--off {
  background: var(--bg);
  color: var(--muted);
  border-color: var(--line);
}

.agent-api-revoke-form {
  margin: 0 0 0 auto;
  display: inline-flex;
  align-items: center;
}

.agent-api-revoke-form .btn {
  min-height: var(--btn-h-sm);
  padding: 0 var(--btn-pad-x-sm);
  font-size: var(--fs-btn-compact);
  color: var(--danger);
  border-color: transparent;
  background: transparent;
}

.agent-api-revoke-form .btn:hover {
  background: color-mix(in srgb, var(--danger) 8%, transparent);
  border-color: transparent;
}

.agent-api-create {
  display: grid;
  gap: var(--sp-2);
  justify-items: start;
  margin-top: var(--sp-1);
}

.agent-api-create .btn {
  min-height: var(--btn-h);
}

.agent-api-scope-option {
  display: grid;
  gap: var(--sp-1);
}

.agent-api-scope-label {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  min-height: var(--btn-h-sm);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  margin: 0;
  cursor: pointer;
}

.agent-api-scope-label input[type="checkbox"],
.agent-api-scope-label input[type="radio"] {
  width: 1.05rem;
  height: 1.05rem;
  flex-shrink: 0;
  accent-color: var(--pine);
}

.agent-api-scope-desc {
  padding-inline-start: calc(1.05rem + var(--sp-2));
}

.agent-actor-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: var(--row-icon);
  height: var(--row-icon);
  margin-left: var(--sp-1);
  vertical-align: middle;
  color: var(--muted);
}

.agent-actor-mark .ico {
  font-size: var(--row-icon);
  width: var(--row-icon);
  height: var(--row-icon);
  line-height: 1;
}

.agent-actor-mark--section {
  vertical-align: baseline;
}

.agent-api-actor-hint .agent-actor-mark {
  margin-left: 0;
  margin-inline: var(--sp-1);
}

.agent-api-admin-page {
  display: grid;
  gap: var(--sp-3);
}

.agent-api-admin-stats.admin-stats-cards {
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 640px) {
  .agent-api-admin-stats.admin-stats-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1280px) {
  .agent-api-admin-stats.admin-stats-cards {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

.agent-api-admin-stats .admin-stats-card {
  position: relative;
  padding: var(--sp-1) var(--sp-2);
}

.agent-api-admin-stats .admin-stats-card-value {
  font-size: var(--fs-lg);
}

.agent-api-admin-stats .admin-stats-card--warn {
  box-shadow: inset 3px 0 0 var(--danger);
}

.agent-api-admin-stats .admin-stats-card--warn .admin-stats-card-value {
  color: var(--danger);
}

.agent-api-admin-stats .admin-stats-card > .help-tip-wrap {
  position: absolute;
  top: var(--sp-1);
  right: var(--sp-1);
  z-index: 2;
}

.agent-api-admin-stats .admin-stats-card > .help-tip-wrap .help-tip-open {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
}

.agent-api-admin-stats .admin-stats-card > .help-tip-wrap .help-tip-open .ico {
  font-size: 18px;
}

.agent-api-admin-stats .admin-stats-card-label {
  padding-right: 2.25rem;
  min-height: calc(2em * var(--lh-tight));
  overflow-wrap: anywhere;
}

.agent-api-admin-stats .admin-stats-card-value {
  margin-top: auto;
}

.agent-api-admin-stats .admin-stats-card .help-tip-popover {
  top: calc(100% + var(--sp-1));
  left: auto;
  right: 0;
  max-width: min(18rem, calc(100vw - 2rem));
}

.agent-api-admin-alert-badge {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 1.1rem;
  min-height: auto;
  padding: 0 var(--sp-1);
  font-size: var(--fs-2xs);
  line-height: var(--lh-tight);
  transform: translate(35%, -35%);
}

.agent-api-nav-alert-count {
  justify-content: center;
  min-width: 1.25rem;
  min-height: 1.25rem;
  height: 1.25rem;
  margin-left: auto;
  padding: 0 5px;
  font-size: var(--fs-xs);
  line-height: var(--lh-tight);
}

.side-nav a .agent-api-nav-alert-count,
.side-nav-sub a .agent-api-nav-alert-count,
.sheet-nav a .agent-api-nav-alert-count {
  margin-left: auto;
}

a:where(:not(.btn)):has(> .ico):hover > .agent-api-nav-alert-count,
a:where(:not(.btn)):has(> .ico):focus-visible > .agent-api-nav-alert-count,
.sheet-nav a:hover > .agent-api-nav-alert-count {
  color: var(--amber-deep);
}

.page-header-actions .btn-icon {
  position: relative;
}

.agent-api-timeline-path {
  font-weight: var(--fw-semibold);
  min-width: 0;
}

a.agent-api-timeline-path:hover {
  color: var(--pine);
}

.status-pill.status-active {
  background: var(--pine-soft);
  color: var(--pine-deep);
}

.status-pill.status-frozen {
  background: var(--danger-soft);
  color: var(--danger);
}

.status-pill.status-cooldown {
  background: var(--amber-soft);
  color: var(--amber-deep);
}

.status-pill.status-no_pro {
  background: var(--bg);
  color: var(--muted);
}

.status-pill.status-no_key {
  background: var(--bg);
  color: var(--muted);
}

.status-pill.status-blocked {
  background: var(--danger-soft);
  color: var(--danger);
}

.agent-api-admin-list-block {
  min-width: 0;
  container-type: inline-size;
}

.agent-api-admin-list.job-list--compact {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
  max-width: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--paper);
}

.agent-api-admin-list > .agent-api-admin-list-head {
  display: none;
  margin: 0;
  list-style: none;
  border-bottom: 1px solid var(--line);
  box-sizing: border-box;
}

.agent-api-admin-list .agent-api-admin-row {
  display: grid;
  gap: var(--sp-1);
  align-items: center;
  min-width: 0;
}

.agent-api-admin-list .status-pill {
  justify-self: start;
  margin: 0;
}

.agent-api-admin-cell-label {
  display: none;
}

.agent-api-admin-cell--warn {
  color: var(--danger);
}

.agent-api-admin-filters,
.agent-api-admin-filter-links,
.agent-api-audit-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  min-width: 0;
}

.agent-api-admin-search {
  width: min(100%, 20rem);
  min-height: var(--hit-min);
}

.agent-api-admin-filter-links .btn,
.agent-api-ip-toggle,
.agent-api-admin-actions .btn,
.agent-api-admin-key-restore .btn {
  min-height: var(--hit-min);
}

.agent-api-admin-filter-links .btn.is-current {
  background: var(--pine-soft);
  color: var(--pine-deep);
}

.agent-api-admin-keys {
  display: grid;
  gap: var(--sp-2);
}

.agent-api-admin-key-card {
  display: grid;
  gap: var(--sp-1);
  min-width: 0;
  padding: var(--sp-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}

.agent-api-admin-key-card p {
  margin: 0;
}

.agent-api-chart {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 4.5rem;
  min-width: 0;
  overflow: hidden;
}

.agent-api-chart-col {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  justify-content: flex-end;
  min-width: 0;
  height: 100%;
}

.agent-api-chart-bar {
  display: block;
  width: 100%;
  min-height: 2px;
  background: var(--pine);
  border-radius: 2px 2px 0 0;
}

.agent-api-chart-label {
  font-size: var(--fs-2xs);
  color: var(--muted);
  text-align: center;
}

.agent-api-chart--month .agent-api-chart-label {
  display: none;
}

.agent-api-audit-panel:not(:has(.agent-api-ip-toggle-input:checked)) .agent-api-audit-ip {
  display: none;
}

.agent-api-ip-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  min-width: var(--hit-min);
}

.http-status--ok {
  background: var(--pine-soft);
  color: var(--pine-deep);
}

.http-status--client {
  background: var(--amber-soft);
  color: var(--amber-deep);
}

.http-status--error {
  background: var(--danger-soft);
  color: var(--danger);
}

.agent-api-audit-head {
  display: none;
}

.agent-api-admin-list.job-list--compact .job-row.agent-api-admin-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
  align-items: start;
  gap: var(--sp-1) var(--sp-3);
  min-height: var(--hit-min);
  padding: var(--sp-2) var(--sp-3);
}

.agent-api-admin-list .agent-api-admin-row > .agent-api-admin-cell:first-child {
  grid-column: 1 / -1;
}

.agent-api-admin-cell {
  min-width: 0;
  overflow-wrap: anywhere;
}

.agent-api-admin-list > .agent-api-admin-list-head {
  display: none;
}

.agent-api-admin-cell-label {
  display: block;
  font-size: var(--fs-2xs);
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@container (min-width: 59rem) {
  .agent-api-admin-list {
    --agent-api-admin-cols: minmax(8.5rem, 1fr) 6.5rem 3.5rem 8.5rem 5.5rem 4.5rem 8.25rem 8.5rem;
  }

  .agent-api-admin-list > .agent-api-admin-list-head,
  .agent-api-admin-list.job-list--compact .job-row.agent-api-admin-row {
    display: grid;
    grid-template-columns: var(--agent-api-admin-cols);
    align-items: center;
    gap: var(--sp-2);
    padding: var(--sp-2) var(--sp-3);
  }

  .agent-api-admin-list .agent-api-admin-row > .agent-api-admin-cell:first-child {
    grid-column: auto;
  }

  .agent-api-admin-list-head-cell {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .agent-api-admin-cell-label {
    display: none;
  }

  /* Calls, error %, strikes and last call: numbers and dates right-aligned. */
  .agent-api-admin-list-head-cell:nth-child(n + 5),
  .agent-api-admin-list .agent-api-admin-row > .agent-api-admin-cell:nth-child(n + 5) {
    text-align: right;
    justify-self: stretch;
  }

  .agent-api-admin-list .agent-api-admin-row > .agent-api-admin-cell:nth-child(n + 5) {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }

  .agent-api-admin-list .agent-api-admin-row > .agent-api-admin-cell:nth-child(4) .muted {
    display: block;
  }
}

@media (min-width: 900px) {
  .agent-api-audit-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto auto;
    gap: var(--sp-2);
    margin: 0 0 var(--sp-2);
    list-style: none;
  }
}

@media (max-width: 899.98px) {
  .agent-api-admin-page,
  .agent-api-admin-user-page {
    overflow-x: clip;
  }

}

.agent-api-admin-user-page {
  display: grid;
  gap: var(--sp-3);
}

.agent-api-admin-panel {
  display: grid;
  gap: var(--sp-2);
  margin-bottom: 0;
}

.agent-api-admin-panel.card-compact {
  padding: var(--sp-2) var(--sp-3);
}

.agent-api-admin-panel-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-1);
  justify-content: space-between;
}

.agent-api-admin-panel-top .status-pill {
  margin: 0;
  min-height: 0;
  padding: 2px var(--sp-2);
  font-size: var(--fs-2xs);
}

.agent-api-admin-actions,
.agent-api-admin-keys li {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  align-items: center;
}

.agent-api-admin-actions {
  margin: 0;
  flex: 1 1 auto;
  gap: var(--sp-1);
  justify-content: flex-end;
}

.agent-api-admin-keys {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--sp-1);
}

.agent-api-admin-keys li.agent-api-admin-key-card {
  display: grid;
  align-items: start;
}

.agent-api-history-title {
  margin: 0 0 var(--sp-2);
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
}

.agent-api-timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 var(--sp-3);
  border-left: 1px solid var(--line);
  display: grid;
  gap: var(--sp-2);
}

.agent-api-timeline--compact {
  gap: var(--sp-1);
}

.agent-api-timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: var(--sp-2);
  align-items: start;
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
}

.agent-api-timeline--compact .agent-api-timeline-item {
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  padding: var(--sp-1) var(--sp-2);
  border: 0;
  border-radius: 0;
  background: transparent;
}

.agent-api-timeline-item::before {
  content: "";
  position: absolute;
  left: calc(-1 * var(--sp-3) - 0.5px);
  top: 50%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--pine);
  border: 2px solid var(--paper);
  transform: translate(-50%, -50%);
}

.agent-api-timeline--compact .agent-api-timeline-item::before {
  border-color: var(--bg);
}

.agent-api-timeline-method {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.02em;
  color: var(--pine-deep);
}

.agent-api-timeline-path {
  min-width: 0;
  font-weight: var(--fw-semibold);
  overflow-wrap: anywhere;
}

.agent-api-timeline-meta {
  display: grid;
  grid-template-columns: 2.75rem 5rem 9.5rem;
  gap: var(--sp-2);
  align-items: center;
}

.agent-api-timeline-chip {
  font-size: var(--fs-xs);
  color: var(--muted);
  padding: 0 var(--sp-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
}

.agent-api-timeline-time {
  font-size: var(--fs-xs);
  color: var(--muted);
  white-space: nowrap;
}

.agent-api-timeline--compact .agent-api-timeline-path {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--fs-list-compact);
  font-weight: var(--fw-semibold);
}

.agent-api-timeline--compact .agent-api-timeline-meta {
  gap: var(--sp-1);
}

.agent-api-timeline--compact .agent-api-timeline-chip {
  padding: 0 var(--sp-1);
  font-size: var(--fs-2xs);
  justify-self: start;
  white-space: nowrap;
}

.agent-api-timeline--compact .agent-api-timeline-method {
  align-self: center;
}

.agent-api-timeline-item--flagged {
  background: var(--danger-soft);
  border-color: var(--danger);
  color: var(--danger);
}

.agent-api-timeline--compact .agent-api-timeline-item--flagged {
  background: color-mix(in srgb, var(--danger-soft) 55%, transparent);
  border-radius: var(--radius-sm);
}

.agent-api-timeline-item--flagged .agent-api-timeline-method,
.agent-api-timeline-item--flagged .agent-api-timeline-chip,
.agent-api-timeline-item--flagged .agent-api-timeline-time {
  color: var(--danger);
}

.agent-api-timeline-item--flagged::before {
  background: var(--danger);
}

@media (max-width: 639px) {
  .agent-api-connect {
    padding: var(--pad-card);
  }

  .agent-api-copy-row {
    flex-direction: column;
    align-items: stretch;
  }

  .agent-api-copy-row input,
  .agent-api-copy-field {
    width: 100%;
    min-height: var(--hit-min);
    font-size: var(--fs-base);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .agent-api-key-row .agent-api-key-sep {
    display: none;
  }

  .agent-api-copy-row .btn {
    width: 100%;
    min-height: var(--hit-min);
  }

  .agent-api-key-row {
    flex-direction: column;
    align-items: stretch;
  }

  .agent-api-key-row .agent-api-revoke-form {
    margin-left: 0;
    width: 100%;
  }

  .agent-api-key-row .agent-api-revoke-form .btn {
    width: 100%;
    min-height: var(--hit-min);
  }

  .agent-api-create .btn {
    width: 100%;
    min-height: var(--hit-min);
  }

  .agent-api-scope-label {
    min-height: var(--hit-min);
  }

  .agent-api-timeline-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .agent-api-timeline-time {
    grid-column: 2;
  }

  .agent-api-timeline--compact .agent-api-timeline-item {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    align-items: center;
  }

  .agent-api-timeline--compact .agent-api-timeline-path {
    grid-column: 2;
    grid-row: 1;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .agent-api-timeline--compact .agent-api-timeline-meta {
    grid-column: 2;
    grid-row: 2;
  }

  .agent-api-timeline--compact .agent-api-timeline-time {
    grid-column: 3;
    grid-row: 1;
    align-self: center;
  }

  .agent-api-admin-panel-top {
    flex-direction: row;
    align-items: center;
  }

  .agent-api-admin-actions .btn {
    flex: 0 0 auto;
  }

  .agent-api-user-on-form label.check {
    position: relative;
  }

  .agent-api-user-on-form label.check::after {
    content: "";
    position: absolute;
    inset: -12px 0;
  }
}

@media (max-width: 699.98px) {
  .agent-api-copy-row input,
  .agent-api-copy-field {
    font-size: var(--fs-input);
  }
}

.mobile-quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}

summary.details-caret {
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  width: 100%;
  box-sizing: border-box;
}

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

summary.details-caret > .ico {
  flex: none;
  order: 2;
  margin-left: auto;
  font-size: 1em;
  width: 1em;
  height: 1em;
  transition: transform 0.15s ease;
}

details[open] > summary.details-caret > .ico {
  transform: rotate(90deg);
}

.mobile-quick-btn {
  min-height: 64px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: #fff;
  color: var(--ink);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  font-family: inherit;
  cursor: pointer;
}

.mobile-quick-btn .ico { width: 24px; height: 24px; }

html.js-enabled .project-section.is-collapsed .project-section-body {
  display: none;
}

html.js-enabled .project-section:not(.is-collapsed) .project-section-summary,
:is(
  .mobile-section,
  .trips-vehicle-group,
  .trips-vehicles-inline,
  .trip-change-history,
  .trips-vehicles-archived
)[open] > summary .project-section-summary {
  display: none;
}

.project-section-heading {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
}

.project-section-body,
.mobile-section-body {
  font-weight: var(--fw-normal);
  color: var(--ink);
}

:is(.project-section-body, .mobile-section-body) > .time-list,
:is(.project-section-body, .mobile-section-body) > .trip-list {
  border-radius: var(--radius-card-inner);
}

:is(.project-section-body, .mobile-section-body) > .trip-list {
  margin-top: 0;
}

:is(.project-section-body, .mobile-section-body) > .time-list > .time-list-item:last-child .time-list-row,
:is(.project-section-body, .mobile-section-body) > .trip-list > .trip-list-item:last-child .trip-row {
  border-radius: 0 0 var(--radius-card-inner) var(--radius-card-inner);
}

:is(.project-section-body, .mobile-section-body) .parts-card-embedded .invoice-lines-wrap {
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: transparent;
}

.mobile-section-body .trip-row {
  font-weight: var(--fw-normal);
}

.notes-read-view {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  font-family: var(--sans);
  font-weight: var(--fw-normal);
  font-size: inherit;
  line-height: var(--lh-base);
  color: var(--ink);
  text-align: left;
  white-space: pre-wrap;
  cursor: pointer;
}

.notes-read-view--empty {
  font-style: italic;
  color: var(--muted);
}

.notes-edit-view textarea {
  font-family: var(--sans);
  font-weight: var(--fw-normal);
  font-size: inherit;
  line-height: var(--lh-base);
  min-height: calc(6 * var(--lh-base) * 1em);
  overflow: hidden;
  resize: none;
}

.parts-card-embedded {
  padding: 0;
  border: 0;
  box-shadow: 0;
  background: transparent;
}

.mobile-section {
  --card-pad-inline: var(--pad-card-inline);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  margin-bottom: var(--sp-3);
  background: var(--paper);
}

.project-section-body .project-section-row-action,
.mobile-section-body .project-section-row-action {
  position: relative;
  box-shadow: var(--shadow-control);
}

.mobile-section > summary:not(.card-heading) {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  min-height: 48px;
  padding: var(--sp-3) var(--sp-4);
  font-weight: var(--fw-semibold);
  cursor: pointer;
}

.project-section-body .time-list-actions .btn-icon,
.mobile-section-body .time-list-actions .btn-icon,
.project-section-body .trip-row-compact .trip-row-actions .btn-icon,
.mobile-section-body .trip-row-compact .trip-row-actions .btn-icon,
.project-section-body .project-section-row-action,
.mobile-section-body .project-section-row-action {
  position: relative;
  width: var(--row-btn);
  height: var(--row-btn);
  min-width: var(--row-btn);
  min-height: var(--row-btn);
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-btn);
  background: transparent;
  transition: var(--btn-transition);
}

.mobile-section > summary::-webkit-details-marker { display: none; }

.project-section-body .time-list-actions .btn-icon .ico,
.mobile-section-body .time-list-actions .btn-icon .ico,
.project-section-body .trip-row-compact .trip-row-actions .btn-icon .ico,
.mobile-section-body .trip-row-compact .trip-row-actions .btn-icon .ico,
.project-section-body .project-section-row-action .ico,
.mobile-section-body .project-section-row-action .ico {
  font-size: var(--row-icon);
  width: var(--row-icon);
  height: var(--row-icon);
  line-height: 1;
}

.mobile-section-body {
  padding: 0 var(--sp-4) var(--sp-4);
  border-top: 1px solid var(--line);
}

.project-section-body .time-list-actions .btn-icon:hover,
.mobile-section-body .time-list-actions .btn-icon:hover,
.project-section-body .trip-row-compact .trip-row-actions .btn-icon:hover,
.mobile-section-body .trip-row-compact .trip-row-actions .btn-icon:hover,
.project-section-body .project-section-row-action:hover,
.mobile-section-body .project-section-row-action:hover {
  background: var(--pine-soft);
  border-color: transparent;
}

.mobile-section-body .card-compact {
  border: 0;
  padding: var(--sp-3) 0 0;
  box-shadow: var(--shadow-control);
}

:is(
  .card > .card-heading,
  .jobs-calendar-day-head,
  .jobs-calendar-head-cell,
  .jobs-calendar-undated-title,
  .parts-card > .parts-head,
  .stock-history-panel,
  .invoice-credit-banner
) {
  background: color-mix(in srgb, var(--pine) 6%, var(--paper));
}

:is(
  .invoice-list-head,
  .my-catalog-head,
  .stock-list-head,
  .invoice-lines-table thead th
) {
  color: var(--muted);
  font-weight: var(--fw-semibold);
}

.feedback-inbox-orphan-summary:focus-visible {
  outline: 2px solid var(--pine);
  outline-offset: -2px;
}

.project-section-body .time-list-actions .btn-icon:focus-visible,
.mobile-section-body .time-list-actions .btn-icon:focus-visible,
.project-section-body .trip-row-compact .trip-row-actions .btn-icon:focus-visible,
.mobile-section-body .trip-row-compact .trip-row-actions .btn-icon:focus-visible,
.project-section-body .project-section-row-action:focus-visible,
.mobile-section-body .project-section-row-action:focus-visible {
  background: var(--pine-soft);
  border-color: transparent;
  outline: 2px solid var(--pine);
  outline-offset: 2px;
}

.card > .card-heading {
  margin: calc(-1 * var(--card-pad-block)) calc(-1 * var(--card-pad-inline)) var(--sp-3);
  padding: var(--sp-3) var(--card-pad-inline);
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius-card-inner) var(--radius-card-inner) 0 0;
}

.mobile-section-body .card-compact > .card-heading {
  margin: 0 0 var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-control);
}

.project-section > .card-heading {
  padding: 0;
}

.project-section > .card-heading .project-section-heading {
  margin: 0;
}

html.js-enabled .project-section.is-collapsed > .card-heading {
  margin-bottom: calc(-1 * var(--card-pad-block));
  border-bottom-color: transparent;
  border-radius: var(--radius-card-inner);
}

.section-disclosure-trigger {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  width: 100%;
  margin: 0;
  min-height: var(--hit-min);
  padding: var(--sp-3) var(--card-pad-inline, var(--pad-card-inline));
  box-sizing: border-box;
  list-style: none;
  cursor: pointer;
  border: 0;
  background: color-mix(in srgb, var(--pine) 6%, var(--paper));
  color: var(--ink);
  font: inherit;
  font-weight: inherit;
  text-align: left;
}

.section-disclosure-trigger:hover {
  background: color-mix(in srgb, var(--pine) 10%, var(--paper));
}

.section-disclosure-trigger:focus-visible {
  outline: 2px solid var(--pine);
  outline-offset: -2px;
}

summary.section-disclosure-trigger::-webkit-details-marker {
  display: none;
}

:is(
  .mobile-section:not([open]) > summary.section-disclosure-trigger,
  .trips-vehicle-group:not([open]) > .section-disclosure-trigger,
  .warehouse-my-products-panel:not([open]) > .section-disclosure-trigger,
  .trips-vehicles-inline:not([open]) > summary.section-disclosure-trigger,
  .trip-change-history:not([open]) > summary.section-disclosure-trigger,
  .trips-vehicles-archived:not([open]) > .section-disclosure-trigger
) {
  border-bottom: 0;
  border-radius: var(--radius-card-inner);
}

:is(
  .mobile-section[open] > summary.section-disclosure-trigger,
  .trips-vehicle-group[open] > .section-disclosure-trigger,
  .warehouse-my-products-panel[open] > .section-disclosure-trigger,
  .trips-vehicles-inline[open] > summary.section-disclosure-trigger,
  .trip-change-history[open] > summary.section-disclosure-trigger,
  .trips-vehicles-archived[open] > .section-disclosure-trigger
) {
  border-bottom: 1px solid var(--line);
  border-radius: var(--radius-card-inner) var(--radius-card-inner) 0 0;
}

.project-section-title {
  flex: 0 0 auto;
  margin: 0;
  font-size: var(--fs-section);
  color: var(--ink);
}

.project-section-summary {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--fs-sm);
  font-weight: var(--fw-normal);
}

.project-section-chevron {
  flex-shrink: 0;
  margin-left: auto;
  transition: transform 0.15s ease;
}

:is(
  .project-section.is-collapsed,
  .mobile-section:not([open]),
  .trips-vehicle-group:not([open]),
  .warehouse-my-products-panel:not([open]),
  .trips-vehicles-inline:not([open]),
  .trip-change-history:not([open]),
  .trips-vehicles-archived:not([open])
) .project-section-chevron {
  transform: rotate(-90deg);
}

:is(
  .project-section:not(.is-collapsed),
  .mobile-section[open],
  .trips-vehicle-group[open],
  .warehouse-my-products-panel[open],
  .trips-vehicles-inline[open],
  .trip-change-history[open],
  .trips-vehicles-archived[open]
) .project-section-chevron {
  transform: none;
}

@media (max-width: 699px) {
  .mobile-section {
    --card-pad-inline: var(--pad-card-inline-mobile);
  }
}

@media (max-width: 639px) {
  .section-disclosure-trigger .project-section-title {
    font-size: var(--fs-base);
  }
}

.mobile-overflow-menu {
  position: relative;
}

.project-section-body .time-list-actions .btn-icon::after,
.mobile-section-body .time-list-actions .btn-icon::after,
.project-section-body .trip-row-compact .trip-row-actions .btn-icon::after,
.mobile-section-body .trip-row-compact .trip-row-actions .btn-icon::after,
.project-section-body .project-section-row-action::after,
.mobile-section-body .project-section-row-action::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--hit-min);
  height: var(--hit-min);
  transform: translate(-50%, -50%);
}

.mobile-overflow-menu:not([open]) .mobile-overflow-panel {
  display: none;
}

@media (min-width: 640px) {
  .project-section-body .time-list-row,
  .mobile-section-body .time-list-row {
    min-height: var(--row-h-compact);
    height: auto;
    padding: var(--sp-1) var(--sp-2);
    font-size: var(--fs-list-compact);
    align-items: center;
  }

  .project-section-body .time-list-note,
  .mobile-section-body .time-list-note {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow-wrap: normal;
  }

  .project-section-body .trip-row-compact,
  .mobile-section-body .trip-row-compact {
    min-height: var(--row-h-compact);
    padding-block: var(--sp-1);
    padding-inline: var(--card-pad-inline, var(--pad-card-inline));
    font-size: var(--fs-list-compact);
    align-items: center;
    grid-template-columns: 92px 104px minmax(0, 1fr) minmax(0, 1.2fr) auto auto;
    grid-template-areas: none;
    row-gap: 0;
    column-gap: var(--sp-3);
    gap: var(--sp-3);
  }

  .project-section-body .trip-row-compact .trip-row-vehicle-odometer {
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: 0.25em;
    overflow: hidden;
    white-space: nowrap;
  }

  .project-section-body .trip-row-compact .trip-row-vehicle {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .project-section-body .trip-row-compact .trip-row-vehicle::after {
    content: "·";
    margin-inline: 0.2em;
  }

  :is(.project-section-body, .mobile-section-body) .trip-row-compact--no-vehicle .trip-row-vehicle {
    display: none;
  }

  :is(.project-section-body, .mobile-section-body) .trip-row-compact--no-vehicle .trip-row-vehicle::after {
    content: none;
  }

  .project-section-body .trip-row-compact .trip-row-odometer {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .project-section-body .trip-row-compact .trip-row-date,
  .mobile-section-body .trip-row-compact .trip-row-date,
  .project-section-body .trip-row-compact .trip-row-time,
  .mobile-section-body .trip-row-compact .trip-row-time,
  .project-section-body .trip-row-compact .trip-row-route,
  .mobile-section-body .trip-row-compact .trip-row-route,
  .project-section-body .trip-row-compact .trip-row-km,
  .mobile-section-body .trip-row-compact .trip-row-km,
  .project-section-body .trip-row-compact .trip-row-actions,
  .mobile-section-body .trip-row-compact .trip-row-actions {
    grid-area: auto;
    justify-self: stretch;
  }

  .project-section-body .trip-row-compact .trip-row-km,
  .mobile-section-body .trip-row-compact .trip-row-km {
    justify-self: end;
  }

  .project-section-body .trip-row-compact .trip-row-actions,
  .mobile-section-body .trip-row-compact .trip-row-actions {
    justify-self: end;
    margin-inline-start: var(--sp-2);
  }

  :is(.project-section-body, .mobile-section-body) .line-editor--parts .invoice-lines-table thead th {
    font-size: var(--fs-list-compact);
    font-weight: var(--fw-semibold);
    padding: var(--sp-1) var(--sp-2);
  }

  :is(.project-section-body, .mobile-section-body) .line-editor--parts .invoice-lines-table tr.invoice-lines-row {
    min-height: var(--row-h-compact);
    font-size: var(--fs-list-compact);
  }

  :is(.project-section-body, .mobile-section-body) .line-editor--parts .invoice-lines-table tr.invoice-lines-row > td,
  :is(.project-section-body, .mobile-section-body) .line-editor--parts .invoice-lines-table tr.invoice-lines-total > td {
    padding: var(--sp-1) var(--sp-2);
    vertical-align: middle;
  }

  .project-section-body .time-list-actions .btn-icon::after,
  .mobile-section-body .time-list-actions .btn-icon::after,
  .project-section-body .trip-row-compact .trip-row-actions .btn-icon::after,
  .mobile-section-body .trip-row-compact .trip-row-actions .btn-icon::after,
  .project-section-body .project-section-row-action::after,
  .mobile-section-body .project-section-row-action::after {
    left: 50%;
    top: 50%;
    width: var(--hit-min);
    height: var(--hit-min);
    transform: translate(-50%, -50%);
  }
}

.mobile-overflow-panel {
  position: absolute;
  right: 0;
  top: 100%;
  margin: var(--sp-1) 0 0;
  min-width: 10rem;
  max-width: calc(100vw - 32px);
  width: max-content;
  z-index: 10;
  padding: var(--sp-1) 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  box-shadow: var(--shadow-card);
  background: var(--paper);
  overflow: hidden;
}

.mobile-overflow-panel--dropup {
  top: auto;
  bottom: 100%;
  margin: 0 0 var(--sp-1);
}

@media (max-width: 639px) {
  .project-section-body .trip-row-compact {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(3.5rem, auto) auto;
    grid-template-areas:
      "date time km btn"
      "route route route route";
  }

  .mobile-section-body .trip-row-compact {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto auto;
    grid-template-areas:
      "date km km btn"
      "time time time btn"
      "vehicle vehicle vehicle vehicle"
      "odometer odometer odometer odometer"
      "route route route route";
    row-gap: var(--sp-1);
    column-gap: var(--sp-2);
  }

  .mobile-section-body .trip-row-compact .trip-row-date {
    grid-area: date;
  }

  .mobile-section-body .trip-row-compact .trip-row-time {
    grid-area: time;
  }

  .mobile-section-body .trip-row-compact .trip-row-vehicle-odometer {
    display: contents;
  }

  .mobile-section-body .trip-row-compact .trip-row-vehicle {
    grid-area: vehicle;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-section-body .trip-row-compact .trip-row-vehicle::after {
    content: none;
  }

  .mobile-section-body .trip-row-compact .trip-row-odometer {
    grid-area: odometer;
    justify-self: stretch;
    min-width: 0;
    overflow: visible;
    text-overflow: unset;
    white-space: normal;
  }

  .mobile-section-body .trip-row-compact .trip-row-km {
    grid-area: km;
    justify-self: end;
    white-space: nowrap;
  }

  .mobile-section-body .trip-row-compact .trip-row-actions {
    grid-area: btn;
    grid-row: 1 / 5;
    align-self: start;
    gap: calc(var(--hit-min) - var(--row-btn));
  }

  .mobile-section-body .trip-row-compact .trip-row-route {
    grid-area: route;
  }

  .project-section-body .time-list-actions,
  .mobile-section-body .time-list-actions {
    display: flex;
    gap: calc(var(--hit-min) - var(--row-btn));
  }

  .project-section-body .trip-row-compact .trip-row-actions,
  .mobile-section-body .trip-row-compact .trip-row-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: calc(var(--hit-min) - var(--row-btn));
    justify-self: end;
  }

  .parts-card .parts-save-btn,
  .parts-card-embedded .parts-save-btn {
    height: var(--btn-h);
    min-height: var(--btn-h);
  }

}

.project-foot-action-rows {
  margin: 0;
}

.project-foot-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--sp-2);
  position: relative;
  container-type: size;
  box-sizing: border-box;
  padding: var(--sp-1) 0;
  min-height: var(--hit-min);
}

.project-foot-row--share,
.project-foot-row--share-head {
  border-bottom: 1px solid var(--line);
}

.project-foot-share-active {
  border-bottom: 1px solid var(--line);
}

.project-foot-row--billing {
  border-bottom: 0;
}

.project-foot-row--billing-compact {
  grid-template-columns: 1fr;
}

.project-foot-compact .project-foot-share-active .share-url-block {
  margin-top: var(--sp-2);
  margin-bottom: var(--sp-2);
}

.project-foot-row-title {
  margin: 0;
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
}

.project-foot-row-main {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--sp-2);
}

.project-foot-row-status {
  margin: 0;
  min-width: 0;
}

.project-setting-invoiced-label-main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--sp-2);
  min-width: 0;
}

.project-setting-invoiced-title {
  flex: 0 0 auto;
}

.project-setting-invoiced-hint {
  margin: 0;
  min-width: 0;
}

.project-setting-invoiced-hint.value-summary-strip {
  flex: 1 1 100%;
  display: block;
}

.project-follow-up .project-setting-invoiced-hint {
  margin-bottom: var(--sp-3);
}

.project-foot-row-action {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.project-foot-row-action form {
  margin: 0;
}

.project-foot-row-action--cluster {
  gap: var(--sp-1);
  flex-wrap: nowrap;
}

.project-foot-compact .project-foot-row-btn {
  position: relative;
  box-sizing: border-box;
  height: var(--row-btn);
  min-height: var(--row-btn);
  padding: 0 var(--sp-3);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
  white-space: nowrap;
}

.project-foot-compact .project-foot-row-btn::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: max(100%, var(--hit-min));
  height: 100cqh;
}

.project-foot-compact .project-foot-settings .project-setting-row {
  box-sizing: border-box;
  padding: var(--sp-1) 0;
  min-height: var(--hit-min);
}

@media (max-width: 639px) {
  .project-foot-compact .project-foot-row-btn {
    min-height: var(--hit-min);
    height: auto;
  }
}

@media (min-width: 640px) {
  .project-foot-compact .project-foot-row--billing-compact {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .project-foot-compact .project-foot-row,
  .project-foot-compact .project-foot-settings .project-setting-row {
    min-height: var(--row-h-compact);
  }

  .project-foot-compact .project-foot-row--billing-compact.project-foot-row {
    min-height: var(--hit-min);
  }

  .project-foot-compact .project-foot-row-main {
    flex-wrap: nowrap;
    align-items: baseline;
  }

  .project-foot-compact .project-foot-row-status {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .project-foot-compact .project-foot-row-action:not(.project-foot-row-action--cluster) .project-foot-row-btn {
    min-width: var(--project-foot-single-btn-min);
  }

}

@media (max-width: 639px) {
  .project-foot-compact > .project-foot-actions + .project-foot-settings {
    margin-top: var(--sp-3);
  }

  .project-foot-settings .project-setting-row--invoiced:not(:has(input[name="invoiced"]:checked)) {
    flex-wrap: nowrap;
    align-items: center;
  }

  .project-foot-settings .project-setting-row--invoiced:not(:has(input[name="invoiced"]:checked)) .admin-setting-label {
    flex: 1 1 auto;
    min-width: 0;
  }

  .project-foot-settings .project-setting-row--invoiced:not(:has(input[name="invoiced"]:checked)) .project-setting-control--invoiced {
    flex: 0 0 auto;
    width: auto;
  }

  .project-foot-compact .project-foot-action-rows {
    gap: var(--sp-2);
  }

  .project-foot-compact .project-foot-row {
    container-type: normal;
  }

  .project-foot-compact .project-foot-row-btn::after {
    pointer-events: none;
    inset: 0;
    left: 0;
    top: 0;
    transform: none;
    width: auto;
    height: auto;
    max-height: none;
  }

  .project-foot-compact .project-foot-row:not(.project-foot-row--billing) {
    grid-template-rows: auto auto;
  }

  .project-foot-compact .project-foot-row:not(.project-foot-row--billing) .project-foot-row-main {
    grid-column: 1;
    grid-row: 1 / -1;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    justify-content: center;
  }

  .project-foot-compact .project-foot-row:not(.project-foot-row--billing) .project-foot-row-action {
    grid-column: 2;
    grid-row: 1 / -1;
    align-self: center;
  }

  .project-foot-compact .project-foot-row--billing {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    gap: var(--sp-3);
    padding-top: var(--sp-2);
  }

  .project-foot-compact .project-foot-row--billing-compact {
    grid-template-rows: auto;
    gap: 0;
  }

  .project-foot-compact .project-foot-row--billing .project-foot-row-main {
    grid-column: 1;
    grid-row: 1;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-1);
    justify-content: flex-start;
    position: relative;
  }

  .project-foot-compact .project-foot-row--billing .project-foot-row-action {
    grid-column: 1;
    grid-row: 2;
    justify-content: stretch;
    width: 100%;
    position: static;
    align-self: stretch;
  }

  .project-foot-compact .project-foot-row--billing .project-foot-row-action form,
  .project-foot-compact .project-foot-row--billing .project-foot-row-action .btn,
  .project-foot-compact .project-foot-row--billing .project-foot-row-action a.btn {
    width: 100%;
  }

  .project-foot-compact
    .project-foot-row--billing:not(.project-foot-row--billing-compact):has(
      a.btn-ghost.project-foot-row-btn
    ) {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto;
    gap: var(--sp-2);
    align-items: start;
  }

  .project-foot-compact
    .project-foot-row--billing:not(.project-foot-row--billing-compact):has(
      a.btn-ghost.project-foot-row-btn
    )
    .project-foot-row-action {
    grid-column: 2;
    grid-row: 1;
    width: auto;
    justify-content: flex-end;
    align-self: start;
  }

  .project-foot-compact
    .project-foot-row--billing:not(.project-foot-row--billing-compact):has(
      a.btn-ghost.project-foot-row-btn
    )
    .project-foot-row-action
    a.btn-ghost.project-foot-row-btn {
    width: auto;
    min-height: var(--btn-h-xs);
    height: auto;
    padding: 0 var(--sp-2);
    font-size: var(--fs-xs);
  }

}

.project-job-meta-map-link {
  text-decoration: none;
  color: inherit;
}

.project-job-meta-map-link:hover,
.project-job-meta-map-link:focus-visible {
  color: var(--ink);
}

.project-job-meta-map-tail {
  white-space: nowrap;
}

.project-job-meta-map-tail .ico {
  font-size: var(--fs-2xs);
  vertical-align: -0.15em;
  margin-left: 0.15em;
}

@media (max-width: 639px) {
  .gallery-item-tools {
    gap: calc(var(--hit-min) - var(--btn-h-xs));
  }

  .project-section-body .project-section-row-action,
  .mobile-section-body .project-section-row-action {
    position: relative;
  }

  .project-section-body .project-section-row-action::after,
  .mobile-section-body .project-section-row-action::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: var(--hit-min);
    height: var(--hit-min);
    transform: translate(-50%, -50%);
  }

  .gallery-item-delete-btn::after,
  .gallery-item-move-btn::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: var(--hit-min);
    height: var(--hit-min);
    transform: translate(-50%, -50%);
  }
}

@media (min-width: 640px) and (max-width: 699.98px) {
  .project-section-body .trip-row-compact .trip-row-actions,
  .mobile-section-body .trip-row-compact .trip-row-actions {
    gap: calc(var(--hit-min) - var(--row-btn));
  }

  .gallery-item-tools {
    gap: calc(var(--hit-min) - var(--btn-h-xs));
  }

  .gallery-item-delete-btn::after,
  .gallery-item-move-btn::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: var(--hit-min);
    height: var(--hit-min);
    transform: translate(-50%, -50%);
  }
}

.mobile-overflow-form {
  margin: 0;
  display: block;
}

.mobile-overflow-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  width: 100%;
  min-height: var(--hit-min);
  padding: 0 var(--sp-4);
  margin: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  box-sizing: border-box;
}

.mobile-overflow-item[aria-current="page"],
.mobile-overflow-item.is-current {
  font-weight: var(--fw-semibold);
}

.mobile-overflow-item .ico {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.mobile-overflow-item:hover,
.mobile-overflow-item:focus-visible {
  background: var(--pine-soft);
  outline: none;
}

.mobile-overflow-sep {
  height: 1px;
  margin: var(--sp-1) 0;
  background: var(--line);
}

.mobile-overflow-item--danger {
  color: var(--danger);
}

.mobile-overflow-item--danger:hover,
.mobile-overflow-item--danger:focus-visible {
  background: var(--danger-soft);
  color: var(--danger);
}

.mobile-overflow-item--disabled {
  color: var(--muted);
  cursor: not-allowed;
  pointer-events: none;
}

.mobile-overflow-item--disabled:hover,
.mobile-overflow-item--disabled:focus-visible {
  background: transparent;
}

.mobile-sheet-form label {
  display: block;
  margin-bottom: var(--sp-3);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
}

.mobile-sheet-form input,
.mobile-sheet-form textarea,
.mobile-sheet-form select {
  width: 100%;
  font-size: var(--fs-input);
  min-height: var(--hit-min);
  margin-top: var(--sp-1);
}

.mobile-sheet-form textarea { min-height: 120px; }

.mobile-sheet-form .results { margin-top: var(--sp-1); }

@media (max-width: 639px) {
  .mobile-section-body .parts-lead,
  .mobile-section-body .parts-add-details,
  .mobile-section-body .parts-add-form { display: none; }
}

.title-action-form { display: inline; }

.trip-draft-field-hint {
  width: 100%;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  gap: var(--sp-1) var(--sp-2);
  margin: 0 0 var(--sp-2);
  padding: var(--sp-1) var(--sp-2);
  line-height: var(--lh-list);
}

.trip-draft-field-hint__text {
  flex: 1;
  min-width: 0;
  color: inherit;
}

.trip-draft-stale {
  margin-bottom: var(--sp-2);
}

.trip-form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  margin-top: var(--sp-1);
}

#trips .project-section-body .trip-form-grid,
.project-section-body .trip-form-add .trip-form-grid {
  gap: var(--sp-2);
  margin-bottom: var(--sp-2);
}

#trips .project-section-body > .project-trip-add-open,
.project-section-body > .project-trip-add-open {
  margin-top: var(--sp-3);
  margin-bottom: var(--sp-2);
}

.project-section-body > .trip-add-form-wrap {
  margin-top: var(--sp-2);
}

@media (max-width: 639px) {
  #sheet-trip .sheet-bottom-inner {
    padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom) + var(--sp-4));
  }
  #sheet-trip .head-delete-confirm:target {
    scroll-margin-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom) + var(--sp-4));
  }
}

.trip-form input.trip-field-needs-data,
.trip-form select.trip-field-needs-data,
.trip-form textarea.trip-field-needs-data {
  background-color: var(--amber-soft);
  border-color: color-mix(in srgb, var(--amber) 55%, var(--border-field));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--amber) 25%, transparent);
}

.trip-form input.trip-field-needs-data:focus,
.trip-form select.trip-field-needs-data:focus,
.trip-form textarea.trip-field-needs-data:focus {
  background-color: var(--amber-soft);
  border-color: var(--pine);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--amber) 25%, transparent);
}

.trip-field-reason {
  margin: var(--sp-1) 0 0;
  color: var(--ink);
}

.trip-add-hint {
  margin: var(--sp-1) 0 var(--sp-2);
}

.trip-form .trip-add-hint.trip-field-needs-data {
  padding: var(--sp-1) var(--sp-2);
  border-radius: var(--radius-control);
  background-color: var(--amber-soft);
  border: 1px solid color-mix(in srgb, var(--amber) 55%, var(--border-field));
  color: var(--amber-deep);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--amber) 25%, transparent);
}

.copy-review-highlight { background: var(--pine-soft); border-radius: var(--radius-sm); padding: var(--sp-2); }

.copy-review-highlight.copy-review-cleared { background: transparent; padding: 0; }

.copy-line-draft-list { list-style: none; margin: var(--sp-2) 0 0; padding: 0; }

.copy-line-draft-item { margin-top: var(--sp-2); }

.copy-line-draft-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
}

.copy-line-draft-label { font-weight: var(--fw-semibold); }

@media (max-width: 699.98px) {
  input:where(:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]):not([type="range"])),
  textarea,
  select {
    min-height: var(--hit-min);
  }

  .invoice-lines-table input,
  .invoice-lines-table select,
  .time-entry-label input,
  .stock-price input {
    min-height: var(--control-h-sm);
  }

  .time-entry-label input,
  .stock-price input,
  .stock-field input,
  .invoice-lines-table input:not([type="hidden"]),
  .invoice-lines-table select {
    font-size: var(--fs-input);
  }

  label.check input[type="checkbox"],
  label.check input[type="radio"],
  .trip-return-trip input[type="checkbox"] {
    width: 20px;
    height: 20px;
  }

  .project-section label.check,
  .mobile-section-body label.check {
    min-height: var(--hit-min);
    min-width: 0;
    display: flex;
    align-items: center;
    overflow-wrap: anywhere;
  }

  .project-foot-settings label.check {
    min-width: 0;
    min-height: var(--hit-min);
    display: flex;
    overflow-wrap: anywhere;
    align-items: center;
    justify-content: center;
  }

  .customer-form,
  .project-create-form {
    display: flex;
    flex-direction: column;
    gap: var(--sp-3);
  }

  .customer-form > label,
  .customer-form > .split,
  .project-create-form > label,
  .project-create-form > .address-block,
  .project-create-form > .grid-form-schedule {
    margin: 0;
  }
}

.copy-parts-drafts-banner { margin-bottom: var(--sp-3); }

.invoice-page-head {
  align-items: flex-start;
}

.invoice-page-head-main {
  flex: 1 1 auto;
  min-width: 0;
}

.invoice-page-head-main .tiny {
  margin: var(--sp-1) 0 0;
}

.invoice-page-head-badges {
  flex: 0 0 auto;
  max-width: 100%;
}

.page-head .invoice-status-badges .badge,
.invoice-mobile-summary-badges .invoice-status-badges .badge,
.feedback-type-badges .badge {
  min-height: var(--badge-min-h);
  padding: 0 var(--badge-padding-x);
  font-size: var(--badge-fs);
  line-height: var(--badge-lh);
  border-radius: var(--radius-sm);
}

.invoice-form {
  --invoice-date-field: 10rem;
  --invoice-col-qty: 4.5rem;
  --invoice-col-unit: 4rem;
  --invoice-col-price: 6rem;
  --invoice-col-vat: 5.25rem;
  --invoice-col-line-total: 6rem;
  --invoice-col-actions: calc(var(--row-btn) + 4px);
  --invoice-vat-select: 14rem;
}

.line-editor {
  --invoice-col-qty: 4.5rem;
  --invoice-col-unit: 4rem;
  --invoice-col-price: 6rem;
  --invoice-col-vat: 5.25rem;
  --invoice-col-line-total: 6rem;
  --invoice-col-actions: calc(var(--row-btn) + 4px);
}

.line-editor.line-editor--stock {
  --invoice-col-actions: var(--hit-min);
}

.line-editor.line-editor--parts {
  --invoice-col-actions: calc(2 * var(--hit-min));
}

.invoice-edit-head {
  display: grid;
  gap: var(--sp-2);
  grid-template-columns: 1fr 1fr;
  margin-bottom: var(--sp-3);
}

.invoice-edit-head .invoice-edit-field--date {
  min-width: 0;
}

.invoice-edit-head .invoice-edit-field--select {
  grid-column: 1 / -1;
}

.invoice-edit-head .invoice-edit-field input,
.invoice-edit-head .invoice-edit-field select {
  width: 100%;
  box-sizing: border-box;
}

.invoice-form .invoice-edit-head .invoice-edit-field input,
.invoice-form .invoice-edit-head .invoice-edit-field select {
  height: var(--control-h-sm);
  min-height: var(--control-h-sm);
  padding: var(--sp-1) var(--sp-2);
}

.invoice-edit-meta {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
}

.invoice-edit-report-options {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.invoice-edit-report-options .check {
  display: flex;
  align-items: center;
  margin: 0;
}

.invoice-lines-wrap {
  margin: 0;
  min-width: 0;
}

.invoice-lines-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-variant-numeric: tabular-nums;
}

.invoice-lines-table th,
.invoice-lines-table td {
  text-align: left;
  padding: var(--sp-2);
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.invoice-lines-table th {
  font-size: var(--fs-sm);
  color: var(--muted);
  font-weight: var(--fw-semibold);
  padding-block: var(--sp-1);
}

.invoice-lines-table th.invoice-col-price {
  white-space: normal;
  vertical-align: bottom;
}

.invoice-price-th-label {
  display: block;
}

.invoice-price-th-subhints {
  display: block;
  font-weight: var(--fw-normal);
  line-height: 1.2;
}

.invoice-lines-table .num {
  text-align: right;
}

.invoice-col-desc {
  width: auto;
  min-width: 0;
}

.invoice-col-qty { width: var(--invoice-col-qty); }

.invoice-col-unit { width: var(--invoice-col-unit); }

.invoice-col-price { width: var(--invoice-col-price); }

.invoice-col-vat { width: var(--invoice-col-vat); }

.invoice-col-line-total { width: var(--invoice-col-line-total); }

.invoice-col-actions { width: var(--invoice-col-actions); }

.invoice-lines-total td.num {
  text-align: right;
  padding-inline: var(--sp-2);
}

.invoice-cell-desc {
  min-width: 0;
}

.invoice-input-desc {
  width: 100%;
  min-width: 0;
}

.invoice-lines-table {
  font-size: var(--fs-sm);
}

.invoice-lines-table input,
.invoice-lines-table select {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  font-size: var(--fs-sm);
  min-height: var(--control-h-sm);
  padding: var(--sp-1) var(--sp-2);
}

.invoice-input-qty,
.invoice-input-price {
  text-align: right;
}

.invoice-lines-total td {
  border-bottom: 0;
  font-weight: var(--fw-semibold);
  font-size: var(--fs-sm);
  padding-top: var(--sp-2);
}

.invoice-cell-line-total,
.invoice-line-total {
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.invoice-lines-total--grand td {
  padding-top: var(--sp-1);
}

.invoice-doc,
.invoice-job-status {
  font-variant-numeric: tabular-nums;
}

.invoice-doc-pre {
  white-space: pre-line;
}

.invoice-doc-logo {
  max-height: 40px;
  max-width: 260px;
  width: auto;
  margin-bottom: 11px;
}

.invoice-doc-head {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin-bottom: var(--sp-3);
}

.invoice-doc-meta {
  text-align: left;
  min-width: 12rem;
}

.invoice-doc-meta-list {
  display: table;
  border-collapse: separate;
  border-spacing: 0 0;
  margin: 0;
  font-size: var(--fs-2xs);
}

.invoice-doc-meta-list > div {
  display: table-row;
}

.invoice-doc-meta-list dt,
.invoice-doc-meta-list dd {
  display: table-cell;
  vertical-align: baseline;
  margin: 0;
  padding: 0;
}

.invoice-doc-meta-list dt {
  text-align: left;
  padding-right: var(--sp-2);
  color: var(--muted, #4d5c54);
  font-weight: var(--fw-normal, 400);
  white-space: nowrap;
}

.invoice-doc-meta-list dd {
  text-align: left;
}

.invoice-doc-meta-list dd.tabular-nums {
  white-space: nowrap;
}

.invoice-doc-meta-list dd:not(.tabular-nums) {
  white-space: normal;
  overflow-wrap: break-word;
}

.invoice-doc-window {
  margin-top: var(--sp-6);
}

.invoice-doc-main {
  margin-top: var(--sp-6);
}

.invoice-doc-totals-box {
  margin: var(--sp-3) 0 var(--sp-3) auto;
  max-width: 18rem;
  border: 1px solid var(--line);
  padding: var(--sp-2) var(--sp-3);
}

.invoice-form .invoice-edit-totals {
  margin-top: var(--sp-3);
  margin-bottom: var(--sp-4);
  font-variant-numeric: tabular-nums;
}

.invoice-doc-totals-box p {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-2);
  margin: var(--sp-1) 0;
}

.invoice-doc-totals-grand {
  font-weight: var(--fw-semibold);
  border-top: 1px solid var(--line);
  padding-top: var(--sp-1);
}

.invoice-doc-tail {
  margin-top: var(--sp-4);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--line);
}

.invoice-doc-seller-foot {
  font-size: var(--fs-2xs);
  color: var(--muted);
}

.invoice-slip-virtual {
  font-variant-numeric: tabular-nums;
  word-break: break-all;
  font-size: var(--fs-2xs);
}

.invoice-doc-virtual {
  font-variant-numeric: tabular-nums;
  word-break: break-all;
}

@media (min-width: 1024px) and (max-width: 1279.98px) {
  .invoice-form.line-editor {
    --invoice-col-price: 6.25rem;
    --invoice-col-actions: var(--hit-min);
  }

  .invoice-form.line-editor .invoice-lines-table th.invoice-col-price,
  .invoice-form.line-editor .invoice-lines-table td.invoice-cell-price {
    padding-inline-end: 0;
  }

  .invoice-form.line-editor .invoice-lines-table .invoice-input-price {
    padding-inline-end: var(--sp-1);
  }
}

@media (min-width: 1024px) {
  .invoice-form.line-editor {
    --invoice-col-actions: var(--hit-min);
  }

  .invoice-form.line-editor .invoice-lines-table thead th {
    vertical-align: bottom;
  }

  .invoice-form.line-editor .invoice-lines-table td.invoice-cell-price {
    display: table-cell;
    vertical-align: top;
    text-align: right;
  }

  .invoice-form.line-editor .invoice-lines-table td.invoice-cell-desc,
  .invoice-form.line-editor .invoice-lines-table td.invoice-cell-qty,
  .invoice-form.line-editor .invoice-lines-table td.invoice-cell-unit,
  .invoice-form.line-editor .invoice-lines-table td.invoice-cell-price,
  .invoice-form.line-editor .invoice-lines-table td.invoice-cell-vat,
  .invoice-form.line-editor .invoice-lines-table td.invoice-cell-line-total {
    padding-block-start: calc((var(--hit-min) - var(--control-h-sm)) / 2);
  }

  .invoice-form.line-editor .invoice-lines-table td.invoice-cell-price .invoice-input-price {
    display: block;
    width: 100%;
    height: var(--control-h-sm);
    min-height: var(--control-h-sm);
    line-height: var(--lh-tight);
  }

  .invoice-form.line-editor .invoice-lines-table td.invoice-cell-price .invoice-line-price-vat-hint {
    display: block;
    margin-top: calc(var(--sp-1) / 2);
    text-align: end;
    line-height: var(--lh-tight);
  }
}

.invoice-show-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  min-width: 0;
}

.invoice-show-mark-paid,
.invoice-show-mark-unpaid {
  flex: 0 0 auto;
  margin: 0;
}

.invoice-show-mark-paid-fields {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
}

.invoice-show-toolbar label:not(.check) {
  flex: 0 0 auto;
  margin: 0;
}

.invoice-show-paid-date-label {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--muted);
}

.invoice-show-paid-date {
  width: auto;
  max-width: 12rem;
  min-height: var(--hit-min);
}

.invoice-show-toolbar-secondary {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
}

@media (max-width: 639.98px) {
  .invoice-mobile-toolbar-row {
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
  }

  .invoice-mobile-toolbar-row .invoice-show-mark-paid,
  .invoice-mobile-toolbar-row .invoice-show-mark-unpaid {
    width: 100%;
  }

  .invoice-mobile-toolbar-row .invoice-show-mark-paid-fields {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .invoice-mobile-toolbar-row .invoice-show-mark-paid-fields .btn {
    width: 100%;
  }

  .invoice-mobile-toolbar-secondary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: var(--sp-2);
    width: 100%;
  }

  .invoice-mobile-toolbar-secondary .btn,
  .invoice-mobile-toolbar-secondary form {
    min-width: 0;
    min-height: var(--hit-min);
  }

  .invoice-mobile-toolbar-secondary .btn {
    justify-content: center;
    white-space: nowrap;
    width: 100%;
  }

  .invoice-mobile-toolbar-secondary form {
    display: flex;
  }

  .invoice-mobile-toolbar-secondary form .btn {
    flex: 1 1 auto;
  }

  .invoice-mobile-toolbar-secondary--stack {
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
  }

  .invoice-mobile-toolbar-secondary--stack .btn,
  .invoice-mobile-toolbar-secondary--stack form {
    width: 100%;
    flex: 0 0 auto;
  }
}

.invoice-show-toolbar .btn,
.invoice-show-toolbar .invoice-show-paid-date {
  min-height: var(--hit-min);
}

.invoice-show-paid-info {
  flex: 0 1 auto;
  min-width: 0;
}

@media (min-width: 640px) {
  .invoice-show-toolbar,
  .invoice-show-mark-paid-fields {
    align-items: flex-end;
  }

  .invoice-show-toolbar {
    flex-wrap: nowrap;
  }

  .invoice-show-paid-date {
    box-sizing: border-box;
    height: var(--btn-h);
    min-height: var(--btn-h);
    padding-block: 0;
  }
}

@media (min-width: 640px) {
  .invoice-form .toolbar-row,
  .invoice-form .invoice-edit-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--sp-1);
    min-width: 0;
  }
  .invoice-form .toolbar-row > a.btn-primary,
  .invoice-form .invoice-edit-toolbar > a.btn-primary {
    margin-left: auto;
  }
}

@media (max-width: 639px) {
  .invoice-form .toolbar-row,
  .invoice-form .invoice-edit-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    align-content: flex-start;
    gap: var(--sp-1);
    min-width: 0;
  }
  .invoice-form .toolbar-row .btn,
  .invoice-form .toolbar-row a.btn,
  .invoice-form .invoice-edit-toolbar .btn,
  .invoice-form .invoice-edit-toolbar a.btn {
    width: auto;
    flex: 0 1 auto;
    max-width: 100%;
  }
  .invoice-form .invoice-edit-toolbar > a.btn-primary {
    margin-left: 0;
  }
  .invoice-form .invoice-edit-toolbar .invoice-edit-overflow {
    margin-left: auto;
    flex-shrink: 0;
  }
}

.invoice-form .invoice-edit-toolbar .btn {
  min-height: var(--hit-min);
  font-size: var(--fs-btn-compact);
  line-height: var(--lh-tight);
  padding: var(--sp-1) var(--sp-2);
  gap: var(--sp-1);
}

.invoice-form .invoice-edit-toolbar-secondary {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-1);
}

@media (max-width: 639px) {
  .invoice-form .invoice-edit-toolbar .btn {
    min-height: var(--control-h-sm);
    font-size: var(--fs-btn-compact);
    padding: var(--sp-1) var(--sp-2);
  }
}

.invoice-form .invoice-edit-toolbar .btn {
  position: relative;
}

.invoice-form .invoice-edit-toolbar .btn::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--hit-min);
  height: var(--hit-min);
  transform: translate(-50%, -50%);
}

@media (max-width: 1023.98px) {
  .invoice-input-desc::placeholder {
    color: transparent;
  }
  .line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table {
    table-layout: auto;
  }
  .line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table colgroup {
    display: none;
  }
  .line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table thead {
    display: none;
  }
  .line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table tbody {
    display: block;
    width: 100%;
  }
  .line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table tr.invoice-lines-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--sp-1) var(--sp-2);
    align-items: center;
    padding: var(--sp-2) 0;
    border-bottom: 1px solid var(--line);
    height: auto;
    min-width: 0;
  }
  .line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table tr.invoice-lines-row td {
    display: block;
    border: 0;
    padding: 0;
    text-align: left;
    min-width: 0;
  }
  .line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table tr.invoice-lines-row td.invoice-cell-desc {
    grid-column: 1;
    grid-row: 1;
    padding-bottom: var(--sp-1);
  }
  .line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table tr.invoice-lines-row td.invoice-cell-actions {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }
  .line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table tr.invoice-lines-row td.invoice-cell-qty {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table tr.invoice-lines-row td.invoice-cell-unit {
    grid-column: 1 / -1;
    grid-row: 3;
  }
  .line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table tr.invoice-lines-row td.invoice-cell-price {
    grid-column: 1 / -1;
    grid-row: 4;
  }
  .line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table tr.invoice-lines-row td.invoice-cell-vat {
    grid-column: 1 / -1;
    grid-row: 5;
  }
  .line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table tr.invoice-lines-row td.invoice-cell-line-total {
    grid-column: 1 / -1;
    grid-row: 6;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-2);
    font-variant-numeric: tabular-nums;
  }
  .line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table tr.invoice-lines-row td[data-label]::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: var(--fs-sm);
    font-weight: var(--fw-normal);
    flex-shrink: 0;
  }
  .line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table tr.invoice-lines-row td.invoice-cell-qty,
  .line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table tr.invoice-lines-row td.invoice-cell-unit,
  .line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table tr.invoice-lines-row td.invoice-cell-price,
  .line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table tr.invoice-lines-row td.invoice-cell-vat {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    min-width: 0;
  }
  .line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table tr.invoice-lines-row td.invoice-cell-qty input,
  .line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table tr.invoice-lines-row td.invoice-cell-unit input,
  .line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table tr.invoice-lines-row td.invoice-cell-price input {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }
  .line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table tr.invoice-lines-row td.invoice-cell-vat select {
    flex: 0 0 var(--invoice-col-vat);
    width: var(--invoice-col-vat);
    min-width: var(--invoice-col-vat);
    max-width: 100%;
    margin-inline-start: auto;
    box-sizing: border-box;
  }
  .line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table tr.invoice-lines-row input:not([type="hidden"]),
  .line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table tr.invoice-lines-row select {
    min-height: var(--control-h-sm);
    height: var(--control-h-sm);
  }
  .line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table tr.invoice-lines-row td.invoice-cell-price {
    flex-wrap: wrap;
  }
  .line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table tr.invoice-lines-row td.invoice-cell-price .invoice-line-price-vat-hint {
    flex: 1 0 100%;
    text-align: end;
  }

  .line-editor .invoice-line-remove {
    position: relative;
    overflow: visible;
    width: var(--hit-min);
    height: var(--hit-min);
    min-width: var(--hit-min);
    min-height: var(--hit-min);
    padding: 0;
    box-shadow: none;
    border-color: transparent;
  }
  .line-editor .invoice-line-remove .ico {
    font-size: var(--row-icon);
    width: var(--row-icon);
    height: var(--row-icon);
  }

  .line-editor .invoice-line-remove.parts-hit::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: var(--hit-min);
    height: var(--hit-min);
    transform: translate(-50%, -50%);
  }

  .invoice-form .invoice-edit-totals {
    max-width: none;
    width: 100%;
  }
}

.invoice-summary-inline {
  margin: 0 0 var(--sp-3);
}

.invoices-filter-legend {
  margin: 0 0 var(--sp-2);
}

.invoices-filter-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2) var(--sp-3);
  margin: 0 0 var(--sp-3);
  min-width: 0;
}

.invoices-filter-field {
  display: contents;
}

.invoices-filter-toolbar select,
.invoices-filter-toolbar input[type="search"] {
  height: var(--control-h);
  min-height: var(--control-h);
  max-width: 100%;
  font-size: var(--fs-input);
  box-sizing: border-box;
}

.invoices-filter-field--year select {
  width: 7.3rem;
  flex: 0 0 auto;
}

.invoices-filter-field--status select {
  width: 8.75rem;
  flex: 0 0 auto;
}

.invoices-filter-toolbar input[type="search"] {
  flex: 1 1 10rem;
  min-width: 0;
  max-width: 20rem;
}

@media (max-width: 639px) {
  .invoices-filter-toolbar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: end;
  }

  .invoices-filter-field {
    display: flex;
    flex-direction: column;
    gap: var(--sp-1);
    min-width: 0;
  }

  .invoices-filter-field--search {
    grid-column: 1 / -1;
  }

  .invoices-filter-toolbar .sr-only {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
  }

  .invoices-filter-toolbar select,
  .invoices-filter-toolbar input[type="search"] {
    width: 100%;
    max-width: none;
    height: var(--hit-min);
    min-height: var(--hit-min);
    flex: none;
  }
}

.invoice-list {
  list-style: none;
  padding: 0;
  margin: var(--sp-4) 0 0;
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--paper);
}

.invoice-list-item {
  margin: 0;
  border-bottom: 1px solid var(--line);
}

.invoice-list-item:last-child {
  border-bottom: 0;
}

.invoice-list-head {
  display: none;
  margin: 0;
  border-bottom: 1px solid var(--line);
  box-sizing: border-box;
}

.invoice-row {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: var(--sp-2);
  box-sizing: border-box;
}

.invoice-row:hover {
  background: var(--pine-soft);
}

.invoice-row-icon {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.invoice-row-icon .ico {
  width: var(--row-icon);
  height: var(--row-icon);
  font-size: var(--row-icon);
}

.invoice-row-main {
  min-width: 0;
  display: grid;
  gap: var(--sp-1);
}

.invoice-row-title-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  min-width: 0;
}

.invoice-row-job {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: var(--fw-semibold);
}

.invoice-row-customer-line {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--fs-sm);
}

.invoice-row-meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  min-width: 0;
  font-size: var(--fs-sm);
}

.invoice-row-meta-sep {
  flex-shrink: 0;
  color: var(--muted);
}

.invoice-row-trail {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-shrink: 0;
  color: var(--muted);
}

.invoice-row-amount {
  font-weight: var(--fw-semibold);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.invoice-row-chevron {
  font-size: var(--fs-lg);
  line-height: 1;
}

.invoice-list-col-customer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  min-width: 0;
}

.invoice-list-customer {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invoice-list-col-job {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 640px) {
  .invoice-list > .invoice-list-head,
  .invoice-list .invoice-row {
    display: grid;
    grid-template-columns: 4.5rem minmax(0, 1.2fr) minmax(0, 1fr) 6.5rem 5.5rem;
    gap: 0 var(--sp-3);
    align-items: center;
    min-height: var(--row-h-compact);
    padding: var(--sp-1) var(--sp-2);
    font-size: var(--fs-list-compact);
  }

  .invoice-list .invoice-row {
    font-weight: var(--fw-normal);
  }

  .invoice-list-col-amount,
  .invoice-list .invoice-list-col-amount {
    justify-self: end;
    text-align: right;
  }

  .invoice-list-col-customer {
    flex-wrap: nowrap;
  }

  .invoice-list .badge {
    flex-shrink: 0;
  }
}

@media (max-width: 639px) {
  .invoice-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: var(--sp-2);
    align-items: center;
    padding: var(--sp-2) var(--sp-3);
    min-height: var(--hit-min);
    font-size: var(--fs-list);
  }

  .invoice-row-main .badge {
    flex-shrink: 0;
  }
}

@media (min-width: 640px) {
  .invoice-edit-head {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: var(--sp-2);
  }
  .invoice-edit-head .invoice-edit-field--select {
    grid-column: auto;
    flex: 0 0 auto;
    max-width: var(--invoice-vat-select);
  }
  .invoice-edit-head .invoice-edit-field--date {
    flex: 0 0 auto;
    max-width: var(--invoice-date-field);
  }
  .invoice-edit-meta {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--sp-3);
  }
  .invoice-edit-report-options {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--sp-3);
  }
}

@media (min-width: 1024px) {
  .line-editor {
    --invoice-col-vat: 5.25rem;
    --invoice-col-price: 7rem;
    --invoice-col-line-total: 7.25rem;
    --invoice-col-qty: 4rem;
    --invoice-col-unit: 5.5rem;
  }

  .line-editor .invoice-col-desc {
    width: auto;
    min-width: 0;
  }

  .invoice-lines-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .invoice-lines-table {
    width: 100%;
    max-width: 100%;
    table-layout: fixed;
  }

  .invoice-lines-row {
    height: auto;
    min-height: var(--row-h-compact);
  }
  .invoice-lines-table th,
  .invoice-lines-table td {
    font-size: var(--fs-list-compact);
    font-weight: var(--fw-normal);
    padding-block: 0;
    padding-inline: var(--sp-1);
  }
  .invoice-lines-table th {
    font-weight: var(--fw-semibold);
    padding-block: var(--sp-1);
    white-space: normal;
  }
  .invoice-lines-table input:not([type="hidden"]),
  .invoice-lines-table select {
    height: var(--control-h-sm);
    min-height: var(--control-h-sm);
    line-height: var(--lh-tight);
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    padding: var(--sp-1) var(--sp-2);
    border-color: transparent;
    background: transparent;
    box-shadow: none;
  }
  .invoice-lines-table input:not([type="hidden"]):hover,
  .invoice-lines-table select:hover {
    border-color: var(--line);
    background: var(--paper);
  }
  .invoice-lines-table input:not([type="hidden"]):focus-visible,
  .invoice-lines-table select:focus-visible {
    border-color: var(--line);
    background: var(--paper);
  }
  .invoice-lines-table input:not([type="hidden"]):invalid {
    border-color: var(--danger);
    background: var(--paper);
  }
  .invoice-lines-table .invoice-line-remove {
    position: relative;
    overflow: visible;
    width: 100%;
    height: var(--hit-min);
    min-width: 0;
    max-width: 100%;
    min-height: var(--hit-min);
    padding: 0;
    box-shadow: none;
    border: 1px solid transparent;
    background: transparent;
    color: var(--muted);
  }
  .invoice-lines-table .invoice-line-remove:hover {
    color: var(--danger);
    background: var(--pine-soft);
    border-color: transparent;
  }
  .invoice-lines-table .invoice-line-remove:focus-visible {
    background: var(--pine-soft);
    border-color: transparent;
  }
  .invoice-lines-table .invoice-line-remove .ico {
    font-size: var(--row-icon);
    width: var(--row-icon);
    height: var(--row-icon);
    line-height: 1;
  }
  .invoice-lines-table .invoice-line-remove::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: var(--hit-min);
    height: var(--hit-min);
    transform: translate(-50%, -50%);
  }
  .invoice-lines-table select.invoice-input-vat {
    box-sizing: border-box;
    width: 100%;
    max-width: var(--invoice-col-vat);
    padding-inline: var(--sp-1);
  }

  .invoice-lines-table th.invoice-col-vat {
    text-align: left;
    padding-inline-start: calc(var(--sp-1) + var(--sp-1) + 1px);
  }

  .invoice-lines-table .invoice-cell-line-total,
  .invoice-lines-table .invoice-line-total {
    font-size: var(--fs-sm);
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-weight: var(--fw-normal);
  }

  .invoice-form.line-editor .invoice-lines-table td.invoice-cell-qty,
  .invoice-form.line-editor .invoice-lines-table td.invoice-cell-unit,
  .invoice-form.line-editor .invoice-lines-table td.invoice-cell-vat,
  .invoice-form.line-editor .invoice-lines-table td.invoice-cell-line-total,
  .invoice-form.line-editor .invoice-lines-table td.invoice-cell-desc,
  .invoice-form.line-editor .invoice-lines-table td.invoice-cell-actions {
    vertical-align: top;
  }

  .invoice-form.line-editor .invoice-lines-table .invoice-line-unit {
    display: flex;
    align-items: center;
    box-sizing: border-box;
    min-height: var(--control-h-sm);
    line-height: var(--lh-tight);
  }

  .invoice-form.line-editor .invoice-lines-table td.invoice-cell-line-total .invoice-line-total {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    box-sizing: border-box;
    width: 100%;
    min-height: var(--control-h-sm);
    line-height: var(--lh-tight);
  }

  .invoice-cell-line-total,
  .invoice-lines-total td.num {
    padding-right: var(--sp-2);
  }

  .invoice-form .invoice-edit-totals {
    margin-left: auto;
    width: min(18rem, 100%);
    max-width: calc(var(--invoice-col-line-total) + var(--invoice-col-actions) + 10rem);
  }
}

@media (max-width: 639px) {
  .invoice-form.line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-wrap {
    max-width: 100%;
    overflow-x: clip;
  }

  .invoice-form.line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .invoice-form.line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table tbody {
    display: flex;
    flex-direction: column;
    gap: var(--sp-2);
    width: 100%;
    min-width: 0;
  }

  .invoice-form.line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table tr.invoice-lines-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto repeat(3, minmax(0, auto)) repeat(3, minmax(0, auto)) auto;
    column-gap: var(--sp-2);
    row-gap: var(--sp-1);
    align-items: start;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: var(--sp-3);
    border: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    border-radius: var(--radius-card-inner);
    background: color-mix(in srgb, var(--pine) 6%, var(--paper));
    overflow-x: clip;
  }

  .invoice-form.line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table tr.invoice-lines-row td.invoice-cell-desc {
    grid-column: 1 / -1;
    grid-row: 1;
    min-width: 0;
    padding-inline-end: calc(var(--hit-min) + var(--sp-2));
    padding-bottom: 0;
  }

  .invoice-form.line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table tr.invoice-lines-row td.invoice-cell-actions {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: end;
    align-self: start;
    width: var(--hit-min);
    z-index: 1;
  }

  .invoice-form.line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table tr.invoice-lines-row td.invoice-cell-qty {
    grid-column: 1;
    grid-row: 2 / span 3;
  }

  .invoice-form.line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table tr.invoice-lines-row td.invoice-cell-unit {
    grid-column: 2;
    grid-row: 2 / span 3;
  }

  .invoice-form.line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table tr.invoice-lines-row td.invoice-cell-price {
    grid-column: 1;
    grid-row: 5 / span 3;
  }

  .invoice-form.line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table tr.invoice-lines-row td.invoice-cell-vat {
    grid-column: 2;
    grid-row: 5 / span 3;
  }

  @supports (grid-template-rows: subgrid) {
  .invoice-form.line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table tr.invoice-lines-row td.invoice-cell-qty,
  .invoice-form.line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table tr.invoice-lines-row td.invoice-cell-unit,
  .invoice-form.line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table tr.invoice-lines-row td.invoice-cell-price,
  .invoice-form.line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table tr.invoice-lines-row td.invoice-cell-vat {
    display: grid;
    grid-template-rows: subgrid;
    row-gap: var(--sp-1);
    align-items: stretch;
    min-width: 0;
  }
  }

  @supports not (grid-template-rows: subgrid) {
  .invoice-form.line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table tr.invoice-lines-row td.invoice-cell-qty,
  .invoice-form.line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table tr.invoice-lines-row td.invoice-cell-unit {
    grid-row: 2;
  }

  .invoice-form.line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table tr.invoice-lines-row td.invoice-cell-price,
  .invoice-form.line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table tr.invoice-lines-row td.invoice-cell-vat {
    grid-row: 3;
  }

  .invoice-form.line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table tr.invoice-lines-row td.invoice-cell-qty,
  .invoice-form.line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table tr.invoice-lines-row td.invoice-cell-unit,
  .invoice-form.line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table tr.invoice-lines-row td.invoice-cell-price,
  .invoice-form.line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table tr.invoice-lines-row td.invoice-cell-vat {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    align-self: stretch;
    justify-content: flex-end;
    gap: var(--sp-1);
    min-width: 0;
  }
  }

  .invoice-form.line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table tr.invoice-lines-row td.invoice-cell-qty::before,
  .invoice-form.line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table tr.invoice-lines-row td.invoice-cell-unit::before,
  .invoice-form.line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table tr.invoice-lines-row td.invoice-cell-price::before,
  .invoice-form.line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table tr.invoice-lines-row td.invoice-cell-vat::before {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
    line-height: 1.3;
  }

  .invoice-form.line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table tr.invoice-lines-row td.invoice-cell-line-total {
    grid-column: 1 / -1;
    grid-row: 8;
    justify-content: flex-end;
    min-width: 0;
  }

  .invoice-form.line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table tr.invoice-lines-row td.invoice-cell-line-total::before {
    content: none;
  }

  .invoice-form.line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table tr.invoice-lines-row .invoice-line-total {
    margin-inline-start: auto;
    font-weight: var(--fw-semibold);
    text-align: right;
    font-variant-numeric: tabular-nums;
    min-width: 0;
  }

  .invoice-form.line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table tr.invoice-lines-row input:not([type="hidden"]):not([type="checkbox"]),
  .invoice-form.line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table tr.invoice-lines-row select {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    height: var(--hit-min);
    min-height: var(--hit-min);
    line-height: var(--lh-tight);
  }

  .invoice-form.line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table tr.invoice-lines-row .invoice-line-unit {
    display: flex;
    align-items: center;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: var(--hit-min);
    overflow-wrap: anywhere;
  }

  .invoice-form.line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table tr.invoice-lines-row td.invoice-cell-price {
    flex-wrap: nowrap;
  }

  .invoice-form.line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table tr.invoice-lines-row td.invoice-cell-price .invoice-line-price-vat-hint {
    flex: 0 0 auto;
    max-width: 100%;
    overflow-wrap: anywhere;
    line-height: 1.3;
    text-align: end;
  }

  .invoice-form.line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table tr.invoice-lines-row td.invoice-cell-qty input,
  .invoice-form.line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table tr.invoice-lines-row td.invoice-cell-unit input,
  .invoice-form.line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table tr.invoice-lines-row td.invoice-cell-unit select,
  .invoice-form.line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table tr.invoice-lines-row td.invoice-cell-price input {
    flex: 0 0 auto;
    height: var(--hit-min);
  }

  .invoice-form.line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table tr.invoice-lines-row td.invoice-cell-vat::before {
    align-self: stretch;
    text-align: end;
  }

  .invoice-form.line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table tr.invoice-lines-row td.invoice-cell-vat select {
    flex: 0 0 auto;
    width: min(var(--invoice-col-vat), 100%);
    min-width: 0;
    max-width: 100%;
    height: var(--hit-min);
    min-height: var(--hit-min);
    margin-inline-start: auto;
    justify-self: end;
    box-sizing: border-box;
  }

  @supports not (grid-template-rows: subgrid) {
  .invoice-form.line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table tr.invoice-lines-row td.invoice-cell-line-total {
    grid-row: 4;
  }

  .invoice-form.line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table tr.invoice-lines-row td.invoice-cell-vat {
    align-items: flex-end;
  }

  .invoice-form.line-editor:not(.line-editor--parts):not(.line-editor--stock) .invoice-lines-table tr.invoice-lines-row:has(.invoice-line-price-vat-hint) td.invoice-cell-vat::after {
    content: "";
    display: block;
    height: calc(var(--fs-sm) * 1.3);
  }
  }
}

.invoice-doc-lines-wrap {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.invoice-doc-lines th {
  white-space: nowrap;
}

.invoice-doc-lines th:nth-child(n + 2),
.invoice-doc-lines td:nth-child(n + 2) {
  text-align: right;
  min-width: 3.5rem;
  font-variant-numeric: tabular-nums;
}

.invoice-doc-lines th:nth-child(4),
.invoice-doc-lines td:nth-child(4) {
  min-width: 4.5rem;
}

.invoice-status-badges,
.feedback-type-badges {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-1);
  flex-shrink: 0;
}

.job-row-invoice-draft {
  flex: 0 1 auto;
  min-width: 0;
}

.invoice-row-meta-line .badge.badge-invoice-draft {
  flex-shrink: 0;
}

.badge.badge-invoice-draft {
  background: var(--amber-soft);
  color: var(--amber-deep);
  border: 1px solid color-mix(in srgb, var(--amber) 45%, var(--line));
  border-radius: var(--radius-sm);
}

.badge.badge-invoice-overdue,
.badge.badge-invoice-paid {
  border: 1px solid var(--line);
}

.badge.badge-invoice-credited {
  background: var(--bg);
  color: var(--muted);
  border: 1px solid var(--line);
}

.badge.badge-invoice-sent {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid color-mix(in srgb, var(--ink) 16%, var(--line));
}

.badge.badge-invoice-overdue {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: rgba(180, 48, 48, 0.22);
}

.badge.badge-invoice-paid {
  background: var(--pine-soft);
  color: var(--pine-deep);
  border-color: rgba(21, 122, 82, 0.22);
}

.badge.badge-invoice-kind {
  background: transparent;
  color: var(--ink);
  border: 1px solid color-mix(in srgb, var(--ink) 16%, var(--line));
}

.badge.badge-invoice-partial-credit {
  background: var(--pine-soft);
  color: var(--pine-deep);
  border: 1px solid color-mix(in srgb, var(--pine) 22%, transparent);
}

.invoice-mobile-summary-badges {
  margin: 0 0 var(--sp-2);
}

.invoice-mobile-summary .invoice-mobile-copy-btn .ico {
  width: var(--row-icon);
  height: var(--row-icon);
  font-size: var(--row-icon);
}

.invoice-credit-banner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: var(--sp-3);
  box-sizing: border-box;
  margin: var(--sp-2) 0 var(--sp-3);
  padding: var(--sp-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  font-size: var(--fs-sm);
}

.invoice-credit-banner:has(.invoice-credit-banner__actions) {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.invoice-credit-banner__lead {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--pine-soft);
  color: var(--pine-deep);
}

.invoice-credit-banner__lead .ico {
  width: var(--row-icon);
  height: var(--row-icon);
  font-size: var(--row-icon);
}

.invoice-credit-banner__content {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  min-width: 0;
}

.invoice-credit-banner__title {
  margin: 0;
  font-weight: var(--fw-semibold);
  line-height: var(--lh-list);
}

.invoice-credit-banner__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-1) var(--sp-2);
  margin: 0;
  font-size: var(--fs-xs);
  line-height: var(--lh-list);
}

.invoice-credit-banner__sep {
  color: var(--muted);
}

.invoice-credit-links {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  font-size: var(--fs-xs);
}

.invoice-credit-links a {
  font-weight: var(--fw-normal);
}

.invoice-credit-banner__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--sp-2);
  grid-column: 1 / -1;
  margin-top: var(--sp-1);
}

.invoice-credit-banner__actions form {
  margin: 0;
}

.invoice-credit-banner__actions .btn,
.invoice-credit-banner__actions a.btn,
.invoice-credit-banner__actions button.btn {
  min-height: var(--hit-min);
}

@media (min-width: 640px) {
  .invoice-credit-banner__actions {
    grid-column: auto;
    margin-top: 0;
    flex-shrink: 0;
    flex-wrap: nowrap;
  }
}

@media (max-width: 639.98px) {
  .invoice-credit-banner,
  .invoice-credit-banner:has(.invoice-credit-banner__actions) {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .invoice-credit-banner__actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .invoice-credit-banner__actions .btn,
  .invoice-credit-banner__actions a.btn,
  .invoice-credit-banner__actions button.btn {
    width: 100%;
  }
}

@media (max-width: 699.98px) {
  .invoice-lines-table input:not([type="hidden"]),
  .invoice-lines-table select {
    font-size: var(--fs-input);
    min-height: var(--control-h-sm);
  }
}

[data-invoice-finalize-btn][aria-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
}

.line-editor--parts {
  --invoice-col-actions: calc(2 * var(--hit-min));
}

.line-editor--parts .invoice-lines-table .invoice-line-remove,
.line-editor--parts .invoice-lines-table .parts-line-edit {
  width: var(--row-btn);
  height: var(--row-btn);
  min-width: var(--row-btn);
  min-height: var(--row-btn);
  padding: 0;
  color: var(--muted);
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.line-editor--parts .invoice-lines-table .invoice-line-remove .ico,
.line-editor--parts .invoice-lines-table .parts-line-edit .ico {
  font-size: var(--row-icon);
  width: var(--row-icon);
  height: var(--row-icon);
  line-height: 1;
}

.line-editor--parts .invoice-lines-table .invoice-line-remove:hover,
.line-editor--parts .invoice-lines-table .parts-line-edit:hover,
.line-editor--parts .invoice-lines-table .invoice-line-remove:focus-visible,
.line-editor--parts .invoice-lines-table .parts-line-edit:focus-visible {
  color: var(--muted);
  background: var(--pine-soft);
  border-color: transparent;
}

@media (min-width: 640px) {
  .line-editor--parts .invoice-lines-table tr.invoice-lines-row td.invoice-cell-actions {
    display: table-cell;
    vertical-align: middle;
    text-align: right;
    white-space: nowrap;
    overflow: visible;
  }

  .line-editor--parts .invoice-lines-table tr.invoice-lines-row td.invoice-cell-line-total {
    vertical-align: middle;
  }

  .line-editor--parts .invoice-lines-table tr.invoice-lines-row td.invoice-cell-actions .parts-line-edit,
  .line-editor--parts .invoice-lines-table tr.invoice-lines-row td.invoice-cell-actions .parts-line-delete-trigger,
  .line-editor--parts .invoice-lines-table tr.invoice-lines-row td.invoice-cell-actions .invoice-line-remove {
    display: inline-flex;
    vertical-align: middle;
  }

  .line-editor--parts .invoice-lines-table tr.invoice-lines-row td.invoice-cell-actions .parts-line-edit {
    margin-inline-end: calc(var(--hit-min) - var(--row-btn));
  }
}

@media (max-width: 639px) {
  .mobile-list-scroll {
    position: relative;
    max-height: min(42dvh, 20rem);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    min-width: 0;
  }

  .mobile-list-scroll::-webkit-scrollbar {
    display: none;
  }

  .mobile-list-scroll--gallery {
    max-height: min(48dvh, 24rem);
  }

  .mobile-section-body .mobile-list-scroll > .time-list,
  .mobile-section-body .mobile-list-scroll > .trip-list {
    border-radius: var(--radius-card-inner);
  }

  .mobile-list-scroll--overflow:not(.mobile-list-scroll--at-end) {
    -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - var(--sp-5)), transparent);
    mask-image: linear-gradient(to bottom, #000 calc(100% - var(--sp-5)), transparent);
  }
}

.time-entry-delete-confirm,
.parts-line-delete-confirm {
  /* Flex, ei grid: koko rivin p-kappale levitti max-content-sarakkeita (väli + leveä Peruuta). */
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
  gap: var(--sp-2);
}

.time-entry-delete-confirm > p,
.parts-line-delete-confirm > p {
  flex: 0 0 100%;
  margin: 0;
}

.time-entry-delete-confirm > form,
.parts-line-delete-confirm > form {
  margin: 0;
}

textarea.is-unsaved {
  background-color: color-mix(in srgb, var(--accent, #f5a623) 12%, var(--surface, #fff));
}

.guide-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1);
  margin-bottom: var(--sp-2);
}

.guide-image-list {
  list-style: none;
  padding: 0;
  margin: var(--sp-3) 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
}

.guide-image-list img,
.guide-admin-cover {
  width: 8rem;
  height: auto;
  border-radius: var(--radius-sm);
}

.admin-users-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  min-width: 0;
  margin: 0 0 var(--sp-3);
}

.admin-users-search {
  width: min(100%, 20rem);
  min-height: var(--hit-min);
}

.admin-users-filter-select {
  min-height: var(--hit-min);
}

.admin-users-filters .btn {
  min-height: var(--hit-min);
}

.legal-doc p,
.legal-doc li,
.legal-doc td { font-weight: var(--fw-normal); }

.legal-doc strong { font-weight: var(--fw-semibold); }

@media (min-width: 640px) {
  .landing-news-all-link-icon {
    display: inline;
    margin-inline-start: 0.15em;
  }
}
