:root {
  color-scheme: light;
  font-family: "Segoe UI", Arial, sans-serif;
  color: #1c1c1c;
  background: #ffffff;
  --ast-red: #a8191d;
  --ast-red-dark: #861417;
  --ast-dark-grey: #5b5b5b;
  --ast-middle-grey: #a2a4a3;
  --card-grey: #f4f4f4;
  --border-grey: #d8d8d8;
  --hover-grey: #e9e9e9;
  --muted: #666666;
  --error-red: #b42318;
  --success-green: #18794e;
  --warning-amber: #9a6700;
  --page-width: 1460px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  line-height: 1.5;
}

button,
input,
select,
textarea {
  font: inherit;
}

/* Shared spacing rule for every user-editable field. */
label:has(> input:not([type="radio"]):not([type="checkbox"]):not([type="hidden"])),
label:has(> select),
label:has(> textarea) {
  display: grid;
  gap: 0.5rem;
}

label > input:not([type="radio"]):not([type="checkbox"]):not([type="hidden"]),
label > select,
label > textarea {
  margin-top: 0;
}

/* Shared vertical rhythm for stacked page areas and cards. */
#main-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#main-content > form:has(> section) {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#main-content > section,
#main-content > form > section {
  margin-top: 0;
  margin-bottom: 0;
}

#sections,
.physical-design,
.designer-fold-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#sections > .section-card,
.physical-design > .utility-card,
.designer-fold-content > .utility-card,
.designer-fold-content > .table-card {
  margin-top: 0;
  margin-bottom: 0;
}

a {
  color: var(--ast-red);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
.table-scroll:focus-visible {
  outline: 3px solid #1f6feb;
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: .75rem;
  left: .75rem;
  z-index: 100;
  padding: .65rem .9rem;
  border-radius: 4px;
  color: #ffffff;
  background: #1c1c1c;
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--border-grey);
  background: rgb(255 255 255 / 96%);
  backdrop-filter: blur(12px);
}

.header-shell,
.page-shell {
  width: min(var(--page-width), calc(100% - 2rem));
  margin: 0 auto;
}

.header-shell {
  min-height: 78px;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 1rem;
  color: #1c1c1c;
  text-decoration: none;
}

.brand img {
  width: 168px;
  height: auto;
  display: block;
}

.brand-title {
  padding-left: 1rem;
  border-left: 1px solid var(--border-grey);
  color: var(--ast-dark-grey);
  font-size: .95rem;
  font-weight: 650;
  letter-spacing: .015em;
  white-space: nowrap;
}

.clipboard-control {
  position: relative;
  flex: 0 0 auto;
  margin-left: auto;
}

.clipboard-trigger {
  min-height: 42px;
  padding: .55rem .9rem;
  border: 1px solid #c69a12;
  border-radius: 6px;
  color: #3a2c00;
  background: #f8d65b;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease;
}

.clipboard-trigger:hover,
.clipboard-trigger[aria-expanded="true"] {
  border-color: #a77e00;
  background: #f2c93d;
}

.clipboard-panel {
  position: absolute;
  z-index: 60;
  top: calc(100% + .55rem);
  left: 0;
  width: min(32rem, calc(100vw - 2rem));
  max-height: min(42rem, calc(100vh - 6rem));
  overflow: auto;
  padding: 1rem;
  border: 1px solid var(--ast-middle-grey);
  border-radius: 6px;
  box-shadow: 0 12px 30px rgb(0 0 0 / 20%);
  background: #ffffff;
}

.clipboard-panel-heading,
.clipboard-actions,
.sticky-heading-tools {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.clipboard-panel-heading {
  justify-content: space-between;
  margin-bottom: 1rem;
}

.clipboard-panel-heading h2,
.clipboard-panel-heading p,
.clipboard-history h3 {
  margin: 0;
}

.clipboard-panel label {
  display: grid;
  gap: .5rem;
  font-weight: 700;
}

.clipboard-panel textarea {
  min-height: 8rem;
}

.clipboard-actions {
  align-items: flex-start;
  margin-top: .75rem;
}

.clipboard-history {
  margin-top: 1rem;
}

.clipboard-history > .field-help {
  margin: .3rem 0 .65rem;
}

.clipboard-history-recent,
.clipboard-history-older ol {
  display: grid;
  gap: .5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.clipboard-history-older {
  max-height: 14rem;
  margin-top: .65rem;
  overflow: auto;
}

.clipboard-history-entry {
  width: 100%;
  display: block;
  padding: .55rem .65rem;
  border: 1px solid var(--border-grey);
  border-radius: 4px;
  color: #1c1c1c;
  background: #f7f7f7;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.clipboard-history-entry:hover {
  background: var(--hover-grey);
}

.clipboard-history-entry span {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  white-space: pre-wrap;
}

.clipboard-history-entry small {
  display: block;
  margin-top: .3rem;
  color: var(--muted);
}

.desktop-navigation {
  margin-left: .5rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.inline-form {
  margin: 0;
}

.mobile-signout {
  width: 100%;
  padding: .75rem;
  border: 0;
  border-radius: 4px;
  color: #1c1c1c;
  background: transparent;
  font-weight: 650;
  text-align: left;
}

.mobile-signout-primary {
  color: #ffffff;
  background: var(--ast-red);
}

.mobile-signout-primary:hover {
  background: var(--ast-red-dark);
}

/* Distance between sections on the Module Layout Designer entry page */
.module-layout-index-section + .module-layout-index-section {
  margin-top: 2rem;
}

.module-id-version {
  display: block;
  margin-top: .15rem;
  color: var(--muted);
  font-size: .8rem;
  font-style: italic;
  font-weight: 400;
}

.nav-button,
.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .55rem .9rem;
  border: 1px solid var(--border-grey);
  border-radius: 6px;
  color: #2d2d2d;
  background: #ffffff;
  font-weight: 650;
  text-decoration: none;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.nav-button:hover,
.nav-button.is-active,
.button-secondary:hover {
  border-color: var(--ast-middle-grey);
  background: var(--hover-grey);
}

.site-header .nav-button {
  background: #ffffff;
}

.site-header .nav-button:hover,
.site-header .nav-button.is-active {
  background: var(--hover-grey);
}

.site-header .nav-signout,
.site-header .nav-signout:hover,
.site-header .nav-signout.is-active {
  border-color: var(--ast-red);
  color: #ffffff;
  background: var(--ast-red);
}

.site-header .nav-signout:hover,
.site-header .nav-signout.is-active {
  border-color: var(--ast-red-dark);
  background: var(--ast-red-dark);
}

.nav-button-primary,
.button-primary {
  border-color: var(--ast-red);
  color: #ffffff;
  background: var(--ast-red);
}

.nav-button-primary:hover,
.nav-button-primary.is-active,
.button-primary:hover {
  border-color: var(--ast-red-dark);
  background: var(--ast-red-dark);
}

.mobile-navigation {
  display: none;
  margin-left: auto;
  position: relative;
}

.mobile-navigation summary {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: .5rem .85rem;
  border: 1px solid var(--border-grey);
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.mobile-navigation summary::-webkit-details-marker {
  display: none;
}

.mobile-navigation nav {
  position: absolute;
  top: calc(100% + .5rem);
  right: 0;
  width: min(280px, calc(100vw - 2rem));
  padding: .5rem;
  border: 1px solid var(--border-grey);
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgb(0 0 0 / 12%);
}

.mobile-navigation nav a {
  display: block;
  padding: .75rem;
  border-radius: 4px;
  color: #1c1c1c;
  font-weight: 650;
  text-decoration: none;
}

.mobile-navigation nav a:hover {
  background: var(--hover-grey);
}

.page-shell {
  flex: 1;
}

main.page-shell {
  padding-top: clamp(2rem, 5vw, 4.5rem);
  padding-bottom: clamp(3rem, 7vw, 6rem);
}

.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 3rem;
  margin-bottom: 2rem;
}

.page-heading-simple {
  max-width: 900px;
}

.eyebrow,
.card-kicker {
  margin: 0 0 .45rem;
  color: var(--ast-red);
  font-size: .78rem;
  font-weight: 750;
  letter-spacing: .1em;
  text-transform: uppercase;
}

h1,
h2 {
  color: #343434;
  line-height: 1.15;
}

h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(2.15rem, 5vw, 4.25rem);
  letter-spacing: -.035em;
}

h2 {
  margin: 0 0 .75rem;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
}

.page-introduction {
  max-width: 760px;
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.system-status {
  min-width: 260px;
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: 1rem;
  border: 1px solid var(--border-grey);
  border-radius: 6px;
  background: var(--card-grey);
}

.system-status strong,
.system-status span {
  display: block;
}

.system-status span:not(.status-dot) {
  margin-top: .15rem;
  color: var(--muted);
  font-size: .88rem;
}

.status-dot {
  width: .72rem;
  height: .72rem;
  flex: 0 0 auto;
  margin-top: .35rem;
  border-radius: 50%;
  background: var(--success-green);
  box-shadow: 0 0 0 4px rgb(24 121 78 / 12%);
}

.utility-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.landing-page-card-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3rem;
  margin-bottom: 1.5rem;
}

.landing-page-card-column {
  display: grid;
  align-content: start;
  gap: 3rem;
}

.card-import-form {
  display: grid;
  gap: 0.65rem;
  margin-top: auto;
}

.card-import-form label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
}

.card-import-form input[type="file"] {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--grey-400);
  border-radius: 4px;
  background: var(--white);
}

.utility-card,
.boundary-card,
.table-card {
  border: 1px solid var(--border-grey);
  border-radius: 6px;
  background: var(--card-grey);
}

.form-card,
.approval-card,
.report-card,
.map-card {
  margin-bottom: 1.25rem;
  padding: clamp(1.1rem, 3vw, 2rem);
  border: 1px solid var(--border-grey);
  border-radius: 6px;
  background: var(--card-grey);
}

.narrow-card {
  max-width: 620px;
}

.stacked-form,
.form-card,
.approval-card form {
  display: grid;
  gap: 1rem;
}

.stacked-form label,
.form-card label,
.approval-card label,
.table-toolbar label {
  display: grid;
  gap: .35rem;
  color: #3e3e3e;
  font-size: .88rem;
  font-weight: 700;
}

input,
select,
textarea {
  min-height: 42px;
  padding: .5rem .7rem;
  border: 1px solid var(--ast-middle-grey);
  border-radius: 5px;
  color: #1c1c1c;
  background: #ffffff;
}

input[type="checkbox"],
input[type="radio"] {
  width: 1.1rem;
  min-height: auto;
  padding: 0;
  accent-color: var(--ast-red);
}

textarea {
  min-height: 100px;
  resize: vertical;
}

.button-row,
.action-list {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
}

.action-list {
  flex-direction: column;
}

.card-metric {
  margin: 1rem 0 0;
  color: #333333 !important;
}

.card-metric strong {
  margin-right: .25rem;
  font-size: 1.5rem;
}

.credential-boundary {
  margin-top: 1.5rem;
}

.message-stack {
  display: grid;
  gap: .65rem;
  margin-bottom: 1rem;
}

.message {
  padding: .85rem 1rem;
  border: 1px solid var(--border-grey);
  border-left-width: 10px;
  border-radius: 1px;
  background: #d7e3fffa;
}

.message-success {
  border-left-color: var(--success-green);
  background: #f2fbf6;
}

.message-warning {
  border-left-color: var(--warning-amber);
  background: #fffaf0;
}

.message-error {
  border-left-color: var(--error-red);
  background: #fff4f4;
}

.classification-form-grid,
.classification-result-grid,
.history-comparison {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.classification-form-grid {
  margin: 1rem 0;
}

.classification-form-grid label {
  display: grid;
  gap: .35rem;
}

.classification-form-grid small,
.classification-result-grid small {
  color: var(--muted);
}

.classification-comparison {
  min-width: 1050px;
}

.classification-result-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 1rem 0;
}

.classification-resolution-card,
.impact-card {
  border: 1px solid var(--border-grey);
  border-radius: .5rem;
  padding: 1rem;
  margin-top: 1rem;
  background: #f7f7f7;
}

.classification-resolution-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .75rem 1.25rem;
}

.classification-resolution-heading strong {
  font-size: 1.45rem;
}

.classification-resolution-heading span {
  color: var(--muted);
}

.classification-item-match {
  margin: .75rem 0 0;
}

.classification-item-found {
  font-weight: 700;
}

.classification-vendor-matches {
  display: grid;
  gap: .75rem;
  margin-top: 1rem;
}

.classification-vendor-matches > p {
  margin: 0;
}

.classification-vendor-heading {
  font-weight: 700;
}

.classification-vendor-record {
  padding: .85rem;
  border: 1px solid var(--border-grey);
  border-radius: .35rem;
  background: #fff;
}

.classification-vendor-record-matched {
  border-color: var(--success-green);
  background: #f2fbf6;
}

.classification-vendor-record p {
  margin: .4rem 0 0;
}

.classification-vendor-item-change,
.classification-related-change {
  font-weight: 700;
}

.classification-description-match {
  color: var(--success-green);
}

.classification-description-warning {
  margin-top: .75rem !important;
}

.change-timeline {
  list-style: none;
  padding: 0;
  margin: 0;
}

.change-timeline > li {
  border-left: 4px solid var(--ast-red);
  padding: 1rem 1rem 1rem 1.25rem;
  margin-bottom: 1rem;
  background: #f7f7f7;
}

.change-timeline .status-label {
  margin-left: .75rem;
}

.history-comparison {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.history-comparison pre {
  max-height: 24rem;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #fff;
  border: 1px solid var(--border-grey);
  padding: .75rem;
}

.status-dot-warning {
  background: #d97706;
  box-shadow: 0 0 0 4px rgb(217 119 6 / 14%);
}

.status-good {
  border-color: #acd7c2;
  color: #12613e;
  background: #f2fbf6;
}

.status-warning,
.status-open,
.status-in_review,
.status-deferred {
  border-color: #e8ca8c;
  color: #795100;
  background: #fffaf0;
}

.status-blocked {
  border-color: #e1bcbc;
  color: var(--error-red);
  background: #fff4f4;
}

.status-resolved {
  border-color: #acd7c2;
  color: #12613e;
  background: #f2fbf6;
}

.cell-note {
  display: block;
  margin-top: .2rem;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 400;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
  margin-bottom: 1.25rem;
}

.report-card {
  margin: 0;
  background: #ffffff;
}

.report-card span,
.report-card strong {
  display: block;
}

.report-card span {
  color: var(--muted);
  font-size: .82rem;
}

.report-card strong {
  margin-top: .25rem;
  font-size: 1.5rem;
}

.report-card-wide {
  margin-bottom: 1.25rem;
}

.source-data-scroll,
.transition-scroll,
.resolution-scroll {
  max-height: 68vh;
}

.sticky-key {
  position: sticky;
  left: 0;
  z-index: 3;
  min-width: 145px;
  border-right: 2px solid var(--border-grey);
  background: #ffffff;
}

thead .sticky-key {
  z-index: 5;
  background: var(--ast-dark-grey);
}

.cell-conflict {
  border: 2px solid #d97706;
  background: #fff1d6 !important;
}

.cell-approved {
  border: 2px solid #299764;
  background: #ddf6e9 !important;
}

.cell-not-supplied {
  color: #777777 !important;
  background: #eeeeee !important;
}

.selected-source {
  box-shadow: inset 0 0 0 3px #299764;
}

.resolution-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0 0 0.85rem;
}

.resolution-summary {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-left: 4px solid var(--green, #377b46);
  background: #eef6ef;
}

.resolution-summary h3,
.resolution-summary p {
  margin-top: 0;
}

.delete-record-choice,
.result-mode-choice {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  margin-top: 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.delete-record-choice input,
.result-mode-choice input {
  margin-top: 0.15rem;
}

.add-record-row td,
.add-record-row th {
  background: #f7f7f7;
}

.new-record-selected .add-record-row td,
.new-record-selected .add-record-row th {
  background: #e8f4ea;
}

.quick-resolve-unavailable td,
.quick-resolve-unavailable th {
  color: #777777;
  background: #eeeeee !important;
}

.quick-resolve-unavailable .cell-approved {
  border-color: #a9a9a9;
}

.resolution-delete-all-warning[hidden] {
  display: none;
}

.cell-new-record input {
  width: max(150px, 100%);
  min-height: 38px;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--ast-middle-grey);
  border-radius: 4px;
  background: #ffffff;
}

.confirmation-dialog {
  width: min(680px, calc(100% - 2rem));
  max-height: calc(100vh - 3rem);
  overflow: auto;
  padding: 1.5rem;
  border: 2px solid var(--ast-red);
  border-radius: 8px;
  box-shadow: 0 18px 50px rgb(0 0 0 / 30%);
}

.confirmation-dialog::backdrop {
  background: rgb(0 0 0 / 45%);
}

.confirmation-dialog .button-row {
  justify-content: flex-end;
  margin-top: 1.25rem;
}

.source-table-actions {
  position: sticky;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
}

.source-table-actions p {
  margin: 0;
  font-weight: 700;
}

.source-table-actions [aria-disabled="true"] {
  opacity: 0.48;
  cursor: not-allowed;
}

.resolved-row th,
.resolved-row td {
  position: sticky;
  bottom: 0;
  z-index: 2;
}

.resolved-row th {
  z-index: 4;
  background: #dff5e9;
}

.resolved-row select,
.resolved-row input {
  min-width: 190px;
}

.hide-equal-columns [data-header]:not(.difference-column):not(.cell-conflict):not(.cell-approved) {
  display: none;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  padding-top: 1rem;
}

.archive-list {
  display: grid;
  gap: .75rem;
  padding-left: 1.25rem;
}

.archive-list span {
  display: block;
  color: var(--muted);
}

.previous-version-frame {
  padding: 1rem;
  border: 5px solid var(--error-red);
  border-radius: 8px;
}

.radio-card,
.check-line {
  display: flex !important;
  align-items: flex-start;
  gap: .75rem !important;
  padding: .85rem;
  border: 1px solid var(--border-grey);
  border-radius: 5px;
  background: #ffffff;
}

.radio-card span,
.radio-card small {
  display: block;
}

.radio-card small {
  margin-top: .2rem;
  color: var(--muted);
  font-weight: 400;
}

.map-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: .5rem;
  margin-bottom: 1rem;
}

.connection-viewport {
  height: 650px;
  overflow: hidden;
  border: 1px solid var(--border-grey);
  border-radius: 5px;
  background-color: #ffffff;
  background-image: radial-gradient(#d8d8d8 1px, transparent 1px);
  background-size: 20px 20px;
  cursor: grab;
}

.connection-viewport:active {
  cursor: grabbing;
}

.connection-canvas {
  position: relative;
  width: 1500px;
  height: 950px;
  transform-origin: 0 0;
}

.map-node {
  position: absolute;
  z-index: 2;
  width: 250px;
  min-height: 160px;
  padding: 1rem;
  border: 2px solid var(--ast-dark-grey);
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 5px 14px rgb(0 0 0 / 10%);
}

.map-node h2 {
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.map-node p,
.map-node li {
  font-size: .78rem;
}

.map-node.is-focused {
  border-color: var(--ast-red);
  box-shadow: 0 0 0 4px rgb(168 25 29 / 16%);
}

.connection-lines {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.connection-lines line {
  stroke: #8a8a8a;
  stroke-width: 2;
}

.utility-card,
.boundary-card {
  padding: clamp(1.25rem, 3vw, 2rem);
}

.utility-card p:not(.card-kicker),
.boundary-card p:not(.card-kicker) {
  color: var(--muted);
}

.utility-card .text-link,
.utility-card .button,
.boundary-card .button {
  margin-top: .75rem;
}

.utility-card-restricted {
  border-top: 3px solid var(--ast-red);
}

.text-link,
.row-action {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-weight: 700;
  text-underline-offset: .2em;
}

.availability-note {
  display: block;
  margin-top: .65rem;
  color: var(--muted);
  font-size: .82rem;
}

.table-card {
  padding: clamp(1.1rem, 3vw, 2rem);
}

.list-builder-selection-card {
  margin-bottom: 1rem;
}

.list-builder-selection-card > summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  list-style: none;
}

.list-builder-selection-card > summary::-webkit-details-marker {
  display: none;
}

.list-builder-selection-card > summary::after {
  content: "⌄";
  flex: 0 0 auto;
  color: var(--ast-red);
  font-size: 1.5rem;
  font-weight: 700;
}

.list-builder-selection-card[open] > summary::after {
  content: "⌃";
}

.list-builder-selection {
  margin-top: 1.25rem;
}

.list-builder-attribute-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.list-builder-attribute-group {
  min-width: 0;
  margin: 0;
  padding: 1rem;
  border: 1px solid var(--border-grey);
  border-radius: 6px;
  background: #ffffff;
}

.list-builder-attribute-group legend {
  padding: 0 .35rem;
  font-weight: 750;
}

.list-builder-attribute-options {
  max-height: 15rem;
  display: grid;
  gap: .35rem;
  overflow: auto;
  padding-right: .35rem;
}

.list-builder-choice {
  align-items: flex-start;
  line-height: 1.25;
}

.list-builder-choice input {
  flex: 0 0 auto;
  margin-top: .15rem;
}

.list-builder-results-card {
  margin-bottom: 1.5rem;
}

.list-builder-table-scroll {
  max-height: 68vh;
}

.list-builder-table th {
  min-width: 15rem;
  vertical-align: top;
}

.list-builder-table th label {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  gap: .6rem;
  margin-top: .6rem;
  color: var(--ast-dark-grey);
  font-size: .78rem;
  font-weight: 650;
}

.list-builder-table th input,
.list-builder-table th select {
  min-width: 0;
  margin: 0;
}

.list-builder-column-title {
  display: block;
  color: var(--ast-dark-grey);
  font-size: .9rem;
}

.list-builder-multiple {
  color: #7d4c00;
  background: #fff0d6;
  font-weight: 700;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.section-heading p:not(.card-kicker) {
  margin: 0;
  color: var(--muted);
}

.result-count {
  white-space: nowrap;
  font-weight: 700;
}

.table-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid var(--border-grey);
  border-radius: 6px;
  background: #ffffff;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem;
}

.filter-label {
  margin-right: .25rem;
  font-size: .88rem;
  font-weight: 700;
}

.filter-button {
  min-height: 38px;
  padding: .4rem .7rem;
  border: 1px solid var(--border-grey);
  border-radius: 999px;
  color: #333333;
  background: #ffffff;
  cursor: pointer;
}

.filter-button:hover {
  background: var(--hover-grey);
}

.filter-button.is-active {
  border-color: var(--ast-red);
  color: #ffffff;
  background: var(--ast-red);
}

.search-control {
  min-width: min(290px, 100%);
  display: grid;
  gap: .3rem;
  color: #3e3e3e;
  font-size: .85rem;
  font-weight: 700;
}

.search-control input {
  width: 100%;
  min-height: 42px;
  padding: .5rem .7rem;
  border: 1px solid var(--ast-middle-grey);
  border-radius: 5px;
  color: #1c1c1c;
  background: #ffffff;
}

.table-scroll {
  max-height: 520px;
  overflow: auto;
  border: 1px solid var(--border-grey);
  border-radius: 5px;
  background: #ffffff;
}

table {
  width: 100%;
  min-width: 940px;
  border-collapse: separate;
  border-spacing: 0;
}

th,
td {
  padding: .8rem .9rem;
  border-bottom: 1px solid #e2e2e2;
  text-align: left;
  vertical-align: top;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  color: #ffffff;
  background: var(--ast-dark-grey);
  font-size: .82rem;
  letter-spacing: .025em;
}

tbody th {
  color: #2c2c2c;
  font-weight: 700;
}

tbody tr:nth-child(even) {
  background: #fafafa;
}

tbody tr:hover {
  background: #f3eded;
}

.sort-button {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.status-label {
  display: inline-block;
  padding: .25rem .5rem;
  border: 1px solid #c9c9c9;
  border-radius: 999px;
  color: #4b4b4b;
  background: #f5f5f5;
  font-size: .78rem;
  font-weight: 700;
  white-space: nowrap;
}

.status-label-restricted {
  border-color: #e1bcbc;
  color: var(--ast-red-dark);
  background: #fff4f4;
}

.empty-table-message {
  margin: 0;
  padding: 2rem;
  color: var(--muted);
  text-align: center;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, .8fr);
  gap: 1rem;
}

.boundary-card {
  border-left: 4px solid var(--warning-amber);
  background: #fffaf0;
}

.plain-list {
  margin: 1.25rem 0 0;
  padding: 0;
  display: grid;
  gap: .7rem;
  list-style: none;
}

.plain-list li {
  position: relative;
  padding-left: 1.25rem;
}

.plain-list li::before {
  content: "";
  position: absolute;
  top: .63rem;
  left: 0;
  width: .42rem;
  height: .42rem;
  border-radius: 50%;
  background: var(--ast-red);
}

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-grey);
  color: var(--muted);
  background: var(--card-grey);
  font-size: .82rem;
}

.footer-content {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

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

[hidden] {
  display: none !important;
}

@media (max-width: 1040px) {
  .desktop-navigation {
    display: none;
  }

  .mobile-navigation {
    display: block;
    margin-left: .5rem;
  }

  .utility-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .utility-card-restricted {
    grid-column: 1 / -1;
  }

  .table-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 760px) {
  .header-shell,
  .page-shell {
    width: min(100% - 1.25rem, var(--page-width));
  }

  .header-shell {
    min-height: 66px;
  }

  .list-builder-attribute-groups {
    grid-template-columns: 1fr;
  }

  .brand img {
    width: 128px;
  }

  .brand-title {
    display: none;
  }

  .clipboard-panel {
    position: fixed;
    top: 4.75rem;
    right: .625rem;
    left: .625rem;
    width: auto;
    max-height: calc(100vh - 5.5rem);
  }

  .clipboard-actions,
  .sticky-heading-tools {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .page-heading,
  .section-heading,
  .source-table-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 1.25rem;
  }

  .system-status {
    min-width: 0;
  }

  .utility-grid,
  .landing-page-card-columns,
  .report-grid,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .landing-page-card-column {
    display: contents;
  }

  .landing-card-order-1 { order: 1; }
  .landing-card-order-2 { order: 2; }
  .landing-card-order-3 { order: 3; }
  .landing-card-order-4 { order: 4; }
  .landing-card-order-5 { order: 5; }
  .landing-card-order-6 { order: 6; }
  .landing-card-order-7 { order: 7; }
  .landing-card-order-8 { order: 8; }

  .utility-card-restricted {
    grid-column: auto;
  }

  .filter-group {
    align-items: stretch;
  }

  .filter-label {
    width: 100%;
  }

  .footer-content {
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
    padding: 1rem 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

/* Module Layout Designer */
.module-identity-card {
  margin-bottom: 2rem;
}

.excel-import-review-card {
  margin-bottom: 2rem;
}

.physical-design {
  margin-bottom: 2rem;
}

.module-container-card {
  border-top: 4px solid var(--ast-red);
}

.designer-fold {
  margin-top: 1rem;
  border: 1px solid var(--border-grey);
  border-radius: 6px;
  background: #fff;
  overflow: clip;
}

.designer-fold > summary {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto auto;
  gap: 1rem;
  align-items: center;
  padding: .9rem 1rem;
  background: var(--card-grey);
  cursor: pointer;
  list-style: none;
}

.designer-fold > summary::-webkit-details-marker {
  display: none;
}

.designer-fold > summary::after {
  content: "⌄";
  width: 1.8rem;
  color: var(--ast-red);
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
  text-align: center;
}

.designer-fold[open] > summary::after {
  content: "⌃";
}

.fold-has-error {
  border-color: #d9a09a;
}

.fold-has-error > summary,
.issue-surface {
  border-color: #d9a09a;
  background: #fff0ee;
}

.designer-fold > summary span:first-child {
  display: grid;
  gap: .2rem;
}

.designer-fold > summary strong {
  font-size: 1rem;
}

.designer-fold > summary small {
  color: var(--ast-dark-grey);
  font-weight: 500;
}

.fold-summary-count {
  min-width: 2.5rem;
  color: var(--ast-dark-grey);
  font-size: .88rem;
  font-weight: 750;
  text-align: right;
}

.designer-fold-content {
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

.import-problems-fold {
  border-color: #d6a19a;
}

.import-problems-fold > summary {
  background: #fff0ee;
}

.structure-items-fold {
  margin-bottom: 1.25rem;
}

.divisions-fold {
  margin-top: 1.25rem;
}

.add-structure-item-row {
  display: grid;
  grid-template-columns: minmax(15rem,1.7fr) auto 7rem 7rem auto;
  gap: .6rem;
  align-items: end;
  padding: .8rem;
  border: 1px solid var(--border-grey);
  border-radius: 6px;
  background: #fff;
}

.structure-item-table-scroll {
  max-height: 28rem;
  overflow: auto;
}

.structure-item-table {
  min-width: 980px;
}

.structure-item-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.logistics-filter-control {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: center;
  margin-top: 1rem;
  padding: .75rem;
  border: 1px solid var(--border-grey);
  border-radius: 6px;
  background: var(--card-grey);
}

.logistics-filter-control .button[aria-pressed="true"] {
  border-color: var(--ast-red);
  background: var(--ast-red);
  color: #fff;
}

.logistics-filter-control span {
  color: var(--ast-dark-grey);
  font-size: .88rem;
}

.sub-layout-preview-dialog {
  width: min(92vw, 78rem);
  max-width: 78rem;
  max-height: 88vh;
}

.sub-layout-preview-dialog [data-sub-layout-preview-content] {
  display: grid;
  gap: 1rem;
  max-height: 65vh;
  overflow: auto;
}

.sub-layout-preview-image {
  display: block;
  width: auto;
  max-width: min(100%, 48rem);
  max-height: 24rem;
  margin: 0 auto;
  border: 1px solid var(--border-grey);
  border-radius: 6px;
  object-fit: contain;
}

.sub-layout-preview-table {
  max-height: 34rem;
}

.sub-layout-preview-table table {
  min-width: 760px;
}

.utility-grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.latest-project-list {
  align-items: start;
}

.utility-grid-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.utility-card-operational {
  border-top: 4px solid var(--ast-red);
}

.compact-stats {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin: 1rem 0;
}

.compact-stats div {
  min-width: 8rem;
  padding: .65rem .8rem;
  border: 1px solid var(--border-grey);
  border-radius: 6px;
  background: #fff;
}

.compact-stats dt {
  color: var(--ast-dark-grey);
  font-size: .82rem;
}

.compact-stats dd {
  margin: .2rem 0 0;
  font-size: 1.3rem;
  font-weight: 700;
}

.card-heading-row, .section-card-header, .section-list-heading, .dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.compact-search {
  display: flex;
  align-items: end;
  gap: .5rem;
}

.compact-search label {
  display: flex;
  align-items: center;
  gap: .75rem; /* space between label text and search box */
}

.table-scroll-medium {
  max-height: 34rem;
  overflow: auto;
}

.template-list-scroll {
  max-height: 31rem;
  overflow-y: auto;
}

.action-cell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
}

.action-cell form {
  margin: 0;
}

.division-table td.action-cell {
  display: table-cell;
  vertical-align: top;
}

.division-table td.action-cell > form,
.division-table td.action-cell > button,
.division-table td.action-cell > a {
  display: inline-block;
  margin: 0 .4rem .4rem 0;
  vertical-align: top;
}

.database-update-active {
  overflow: hidden;
}

.database-updating-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: rgb(255 255 255 / 88%);
  backdrop-filter: blur(2px);
}

.database-updating-overlay[hidden] {
  display: none;
}

.database-updating-card {
  width: min(34rem, 100%);
  padding: 2rem;
  border: 1px solid var(--border-grey);
  border-radius: .5rem;
  background: white;
  box-shadow: 0 1.25rem 3rem rgb(0 0 0 / 18%);
  text-align: center;
}

.database-updating-card h2 {
  margin: 1.25rem 0 .5rem;
  color: var(--ast-black);
}

.database-updating-card p {
  margin: 0;
  color: var(--ast-dark-grey);
}

.ast-updating-logo {
  display: block;
  width: min(100%, 31rem);
  height: auto;
  margin: 0 auto;
}

.ast-turbine-rotor {
  transform-origin: 212.5px 82.5px;
  animation: ast-turbine-perspective-spin 1.25s linear infinite;
}

@keyframes ast-turbine-perspective-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes ast-turbine-reduced-motion {
  0%,
  100% {
    opacity: .55;
  }

  50% {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ast-turbine-rotor {
    animation: ast-turbine-reduced-motion 1.4s ease-in-out infinite;
  }
}

.button-danger {
  border-color: var(--error-red);
  color: var(--error-red);
  background: #fff;
}

.error-card {
  border-color: var(--error-red);
}

.module-designer-heading {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,.97);
  padding-block: .8rem;
  border-bottom: 1px solid var(--border-grey);
}

.module-designer-source {
  margin: .65rem 0 1rem;
}

.sticky-actions {
  align-items: center;
}

.sticky-heading-tools {
  margin-left: auto;
}

.sticky-heading-tools .button-row {
  margin: 0;
}

.module-identity-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr .7fr 1fr;
  gap: 1rem;
  align-items: end;
}

.module-identity-grid fieldset {
  margin: 0;
  min-height: 100%;
}

.choice-line {
  display: flex;
  gap: .4rem;
  align-items: center;
  margin-top: .4rem;
}

.choice-line input {
  width: auto;
}

.generated-id-card { padding: .75rem 1rem; background: #d7e3fffa; border: 1px solid var(--border-grey);
  border-left-width: 10px; border-radius: 6px; }
.generated-id-card span, .generated-id-card strong {
  display: block;
}

.generated-id-card strong {
  margin-top: .25rem;
  font-size: 1.4rem;
}

.module-description-field {
  grid-column: 1 / -1;
}

.field-help {
  display: block;
  margin-top: .25rem;
  color: var(--ast-dark-grey);
  font-size: .86rem;
}

.plain-list {
  margin-bottom: 0;
}

.validation-card {
  display: grid;
  grid-template-columns: minmax(14rem,.4fr) 1fr;
  gap: 1rem;
  padding: 1rem;
  margin: 1rem 0;
  border: 2px solid #9A6700;
  border-radius: 6px;
  background: #fff9e8;
}

.validation-list {
  margin: 0;
  max-height: 16rem;
  overflow-y: auto;
}

.validation-list a {
  color: inherit;
}

.section-card {
  margin: 2rem 0;
  padding: 1rem;
  border: 1px solid var(--border-grey);
  border-radius: 6px;
  background: var(--card-grey);
}

.section-card-header {
  position: sticky;
  top: var(--module-designer-sticky-offset, 5.5rem);
  z-index: 15;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: .55rem;
  margin: -1rem -1rem 1rem;
  padding: .65rem 1rem;
  border-bottom: 1px solid var(--border-grey);
  border-radius: 6px 6px 0 0;
  background: rgb(244 244 244 / 98%);
  box-shadow: 0 4px 8px rgb(0 0 0 / 8%);
  backdrop-filter: blur(8px);
}

.section-card-header .card-kicker {
  margin: 0;
  font-size: 1rem;
}

.section-card-header h2 {
  margin: 0;
  font-size: 1.2rem;
}

.section-identity-line {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  min-width: 0;
}

.section-description-control {
  display: grid;
  grid-template-columns: max-content minmax(14rem, 1fr);
  align-items: center;
  gap: .75rem;
  min-width: 0;
  color: var(--ast-red-dark);
  font-size: 1rem;
  font-weight: 750;
}

.section-description-control input {
  width: 100%;
  min-height: 40px;
  padding: .45rem .65rem;
  border: 2px solid var(--ast-middle-grey);
  background: #fff;
  font-size: 1.05rem;
}

.section-card-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-card-meta p {
  margin: 0 0 .2rem;
}

.section-card-meta small {
  display: block;
  color: var(--muted);
  font-size: .8rem;
  font-weight: 600;
}

.section-card-meta .icon-action-row {
  flex: 0 0 auto;
}

.section-card,
.section-card [id^="structure-item-"],
.section-card [id^="division-"] {
  scroll-margin-top: calc(
    var(--module-designer-sticky-offset, 5.5rem)
    + var(--module-designer-section-header-height, 5.5rem)
    + 1rem
  );
}

.section-top-grid {
  display: grid;
  grid-template-columns: minmax(16rem,1fr) minmax(20rem,1fr);
  gap: 1rem;
}

.section-picture-panel {
  padding: .8rem;
  background: #fff;
  border: 1px solid var(--border-grey);
  border-radius: 6px;
}

.section-picture-panel-wide {
  width: 100%;
}

.section-picture-layout {
  display: grid;
  grid-template-columns: minmax(18rem,1.35fr) minmax(16rem,.65fr);
  gap: 1.5rem;
  align-items: center;
}

.section-picture-preview {
  display: grid;
  place-items: center;
  min-height: 280px;
  padding: 1rem;
  border: 1px solid var(--border-grey);
  border-radius: 6px;
  background: var(--card-grey);
}

.section-thumbnail {
  display: block;
  width: min(100%,420px);
  max-height: 260px;
  margin-inline: auto;
  object-fit: contain;
  background: #fff;
}

.section-picture-details {
  display: grid;
  gap: 1.25rem;
  align-content: center;
  min-width: 0;
}

.section-picture-metadata {
  display: grid;
  gap: .8rem;
  margin: 0;
}

.section-picture-metadata div {
  display: grid;
  gap: .25rem;
}

.section-picture-metadata dt {
  color: var(--ast-dark-grey);
  font-size: .82rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.section-picture-metadata dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 650;
}

.section-picture-actions {
  align-items: stretch;
  flex-direction: column;
}

.section-picture-actions .button, .section-picture-actions form {
  width: 100%;
}

.section-picture-actions form .button {
  width: 100%;
}

.section-picture-replace-form {
  display: grid;
  gap: .65rem;
  padding: .75rem;
  border: 1px solid var(--border-grey);
  border-radius: 6px;
  background: var(--card-grey);
}

.section-picture-replace-form label {
  display: grid;
  gap: .45rem;
  color: var(--ast-dark-grey);
  font-size: .84rem;
  font-weight: 700;
}

.picture-suggestions {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: .5rem;
  margin-bottom: .8rem;
}

.picture-suggestions > p {
  grid-column: 1/-1;
}

.picture-suggestion {
  display: grid;
  gap: .35rem;
}

.picture-suggestion img {
  width: 100%;
  height: 120px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--border-grey);
}

.icon-action-row, .mini-arrow-form {
  display: flex;
  gap: .25rem;
}

.icon-action-row form {
  display: flex;
  gap: .25rem;
}

.icon-button {
  min-width: 2.25rem;
  min-height: 2.25rem;
  border: 1px solid var(--border-grey);
  border-radius: 5px;
  background: #fff;
  cursor: pointer;
}

.icon-button:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.save-icon {
  color: #12613e;
  border-color: #76b895;
}

.save-icon:disabled {
  color: var(--ast-middle-grey);
  border-color: var(--border-grey);
  background: #f2f2f2;
  box-shadow: none;
}

.save-icon:not(:disabled) {
  background: #e8f7ef;
  box-shadow: 0 0 0 2px rgb(18 97 62 / 10%);
}

.danger-icon {
  color: var(--error-red);
  border-color: var(--error-red);
}

.add-division-row {
  display: grid;
  grid-template-columns: 7rem minmax(15rem,1.7fr) auto 7rem 7rem auto;
  gap: .6rem;
  align-items: end;
  margin: 1rem 0;
  padding: .8rem;
  background: #fff;
  border: 1px solid var(--border-grey);
  border-radius: 6px;
}

.selected-item-summary {
  min-height: 3rem;
  padding: .45rem .6rem;
  border: 1px solid var(--border-grey);
  border-radius: 5px;
}

.selected-item-summary strong, .selected-item-summary span {
  display: block;
}

.selected-item-summary span {
  margin-top: .15rem;
  color: var(--ast-dark-grey);
  font-size: .86rem;
}

.division-table-scroll {
  max-height: 38rem;
  overflow: auto;
}

.division-table {
  min-width: 1050px;
}

.division-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.division-number {
  display: inline-block;
  min-width: 2.4rem;
  padding: .3rem .45rem;
  border: 1px solid #18794e;
  border-radius: 4px;
  background: #dff4e8;
  color: #145c3d;
  text-align: center;
}

.compact-number-input {
  min-width: 5rem;
  max-width: 7rem;
}

.compact-unit-input {
  min-width: 4rem;
  max-width: 7rem;
}

.division-value-unsaved {
  border-color: #d97706 !important;
  background: #fffaf0 !important;
}

.row-error > * {
  background: #fff0ee !important;
}

.row-warning > * {
  background: #fff0d2;
}

.inline-warning {
  margin-top: .4rem;
  padding: .35rem .5rem;
  border-left: 3px solid #d68100;
  color: #7a4700;
  background: #fff7e8;
}

.validation-warning-card {
  border-color: #d68100;
  background: #fff7e8;
}

.item-creation-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.classified-field {
  padding: .75rem;
  border: 1px solid var(--border-grey);
  border-radius: 6px;
}

.requirement-mark {
  position: absolute;
  top: 0.55rem;
  right: 0.65rem;
  color: var(--error-red);
  font-size: 2rem;
  font-weight: 800;
  line-height: .7;
}

label:has(> .requirement-mark) {
  position: relative;
  padding-right: 2.5rem;
}

.field-recommended .requirement-mark,
.recommended-footnote {
  color: #c66c00;
}

.classified-field.has-value .requirement-mark {
  visibility: hidden;
}

.item-mode-choices,
.item-id-entry-row,
.item-number-grid {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.item-mode-choices {
  margin-top: 1rem;
  padding: 1rem;
  border: 2px solid var(--ast-red);
  border-radius: 6px;
  background: #fff;
}

.item-mode-choices label {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem 1rem;
  border: 1px solid var(--border-grey);
  border-radius: 6px;
  background: var(--card-grey);
  font-size: 1.05rem;
  font-weight: 750;
}

.item-mode-choices input {
  width: 1.25rem;
  height: 1.25rem;
}

.item-mode-information {
  margin-top: .75rem;
  padding: .65rem .85rem;
  border-left: 4px solid var(--ast-middle-grey);
  background: var(--card-grey);
}

.classification-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.classification-grid label {
  display: grid;
  grid-template-columns: minmax(9rem, max-content) minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
}

.classification-column {
  display: grid;
  gap: 1rem;
}

.derived-classification-value {
  background: #e5f2fb;
  border-color: #9cc7e4;
  color: #244a62;
  font-size: 1.05rem;
  font-weight: 750;
}

.new-subgroup-panel {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid #9cc7e4;
  border-radius: 6px;
  background: #f2f8fc;
}

.new-subgroup-panel summary {
  color: #244a62;
  font-weight: 750;
  cursor: pointer;
}

.detected-item-id {
  padding: .7rem 1rem;
  font-size: 1.4rem;
  border: 2px solid var(--border-grey);
  border-radius: 6px;
  background: #fff;
}

.item-id-collision {
  padding: .5rem;
  color: #12613e;
}

.item-id-collision.has-collision {
  color: var(--error-red);
  background: #fff0ee;
}

.locked-item-id {
  display: grid;
  gap: .3rem;
}

@media (max-width: 900px) {
  .item-creation-grid {
    grid-template-columns: 1fr;
  }

  .classification-grid {
    grid-template-columns: 1fr;
  }
}

.inline-error {
  margin-top: .4rem;
  padding: .4rem;
  border-left: 3px solid var(--error-red);
  color: var(--error-red);
}

.multiline-cell {
  margin: 0;
  min-width: 18rem;
}

.multiline-cell div {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: .4rem;
}

.multiline-cell dt {
  font-weight: 700;
}

.multiline-cell dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.add-section-card {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: .75rem;
  padding: 1rem;
  border: 2px dashed var(--ast-middle-grey);
  border-radius: 6px;
  background: #fff;
}

.add-section-card p {
  flex-basis: 100%;
  margin: 0;
}

.finalize-card {
  margin-top: 1.25rem;
  border-top: 4px solid var(--ast-red);
}

.item-picker-dialog {
  position: fixed;
  inset: 1rem auto auto 60%;
  transform: translateX(-50%);
  margin: 0;

  width: min(980px, 94vw);
  max-height: calc(100vh - 6rem);
  border: 1px solid var(--border-grey);
  border-radius: 8px;
}

.item-picker-dialog::backdrop, .confirmation-dialog::backdrop {
  background: rgba(0,0,0,.45);
}

.item-picker-searches {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.item-picker-search-control {
  display: grid;
  gap: .6rem;
  color: #3e3e3e;
  font-size: .9rem;
  font-weight: 700;
}

.item-picker-search-control input {
  width: 100%;
  min-height: 44px;
}

.item-result-count {
  min-height: 1.25rem;
  margin: .65rem 0 0;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 700;
}

.item-picker-results {
  display: grid;
  gap: .7rem;
  max-height: 60vh;
  margin-top: .8rem;
  overflow-y: auto;
}

.item-result-card {
  padding: .75rem;
  border: 1px solid var(--border-grey);
  border-radius: 6px;
  background: var(--card-grey);
  overflow-wrap: anywhere;
}

.item-result-card h3 {
  margin-top: 0;
}

.item-product-block {
  margin-top: .5rem;
  padding: .65rem;
  background: #fff;
  border-radius: 5px;
}

.item-product-block p {
  margin: .25rem 0;
}

.supplier-choice-list {
  display: grid;
  gap: .35rem;
  margin-top: .5rem;
}

.supplier-choice {
  width: 100%;
  padding: .55rem;
  border: 1px solid var(--border-grey);
  border-radius: 5px;
  background: #fff;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.supplier-choice:hover, .supplier-choice:focus-visible {
  border-color: var(--ast-red);
  background: var(--hover-grey);
}

.confirmation-dialog {
  width: min(620px,92vw);
  border: 1px solid var(--border-grey);
  border-radius: 8px;
}

.history-section {
  margin: 1rem 0;
  padding-top: 1rem;
  border-top: 1px solid var(--border-grey);
}

.history-thumbnail {
  width: min(320px,100%);
  max-height: 220px;
  object-fit: contain;
}

.history-undo-card {
  border-top: 4px solid var(--warning-amber);
}

.history-timeline-selectable {
  display: grid;
  gap: .7rem;
  padding-left: 1.5rem;
}

.history-timeline-selectable > li {
  padding: .75rem;
  border: 1px solid var(--border-grey);
  border-radius: 6px;
  background: #fff;
}

.history-step-selectable {
  border-left: 4px solid var(--ast-red) !important;
}

.history-step-choice {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  margin-bottom: .65rem;
  padding: .55rem;
  border-radius: 5px;
  background: #fff4f4;
  color: var(--ast-red-dark);
  font-weight: 750;
  cursor: pointer;
}

.history-step-choice input {
  width: auto;
  margin-top: .2rem;
}

.history-timeline-selectable li > div {
  display: grid;
  gap: .35rem;
}

.destructive-review-card {
  border: 2px solid var(--error-red);
  background: #fff8f7;
}

.destructive-review-card blockquote {
  margin: 1rem 0;
  padding: .8rem 1rem;
  border-left: 4px solid var(--ast-red);
  background: #fff;
}

.confirmation-form {
  display: grid;
  gap: 1rem;
  margin-top: 1.25rem;
}

.project-summary-card {
  gap: 1rem;
}

.project-summary-card h3 {
  margin: 0;
}

.latest-project-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .6rem;
}

.latest-project-row {
  display: grid;
  gap: .2rem;
  padding: .65rem;
  border-left: 4px solid var(--ast-red);
  border-radius: 4px;
  background: #fff;
}

.empty-state-compact {
  margin: 0;
  color: var(--muted);
}

.project-timeline-card {
  overflow: hidden;
}

.project-timeline-scroll {
  height: calc(4.2rem + (var(--timeline-lanes) * 5rem) + .5rem + 13px);
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: .5rem;
  scroll-snap-type: x proximity;
}

.project-timeline-scroll.is-history-timeline {
  scroll-snap-type: x mandatory;
}

.project-timeline {
  position: relative;
  min-width: 760px;
  min-height: calc(3.2rem + (var(--timeline-lanes) * 5rem));
  margin-top: 1rem;
  border: 1px solid var(--border-grey);
  border-radius: 6px;
  background-color: #fff;
}

.timeline-month-axis {
  position: relative;
  z-index: 3;
  height: 2.35rem;
  border-bottom: 1px solid var(--border-grey);
  color: var(--muted);
  font-size: .85rem;
  white-space: nowrap;
}

.timeline-month-label {
  position: absolute;
  top: .55rem;
  left: var(--timeline-left);
  padding-left: .35rem;
}

.timeline-month-grid,
.timeline-today-line {
  position: absolute;
  z-index: 1;
  top: 0;
  bottom: 0;
  left: var(--timeline-left);
  width: 1px;
  pointer-events: none;
}

.timeline-month-grid {
  background: #d1d1d1;
  scroll-snap-align: start;
}

.timeline-today-line {
  z-index: 2;
  width: 3px;
  background: #f0c800;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 70%);
}

.timeline-project {
  position: absolute;
  top: calc(3.15rem + (var(--timeline-lane) * 5rem));
  left: var(--timeline-left);
  width: var(--timeline-width);
  min-width: 8px;
  color: #1c1c1c;
  text-decoration: none;
  z-index: 4;
}

.timeline-bar {
  display: block;
  width: 100%;
  height: 1.3rem;
  border-radius: 4px;
  background: var(--ast-red);
  box-shadow: 0 1px 2px rgba(0,0,0,.18);
}

.timeline-project:hover .timeline-bar,
.timeline-project:focus-visible .timeline-bar {
  background: var(--ast-red-dark);
}

.timeline-label {
  display: block;
  width: max-content;
  max-width: 22rem;
  margin-top: .3rem;
  padding-right: .5rem;
  white-space: nowrap;
  font-size: .85rem;
}

.timeline-label.is-hidden {
  visibility: hidden;
}

.project-timeline-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: start;
  margin-top: 1rem;
}

.timeline-zoom-controls {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: .5rem;
  margin: 0;
}

.timeline-zoom-controls .icon-button {
  width: auto;
  min-width: 3rem;
  padding-inline: .6rem;
}

.project-timeline-actions {
  display: grid;
  gap: 1rem;
  min-width: 0;
  margin: 0;
}

.project-timeline-action-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
}

.project-timeline-action-buttons > .button {
  align-self: center;
}

.project-create-ribbon {
  display: grid;
  gap: 1rem;
  margin-block: 1rem;
  padding: 1rem;
  border-block: 3px solid var(--ast-red);
  background: var(--card-grey);
}

.project-create-disclosure {
  width: 100%;
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.project-create-disclosure .project-create-ribbon {
  margin-bottom: 0;
}

.project-create-ribbon h2 {
  margin: 0;
}

.project-create-form {
  display: grid;
  grid-template-columns: repeat(5, minmax(9rem, 1fr)) auto;
  gap: 1rem;
  align-items: end;
}

.project-archive-card,
.archive-project-list {
  display: grid;
  gap: 1rem;
}

.project-archive-card {
  margin-block: 1rem;
}

.project-archive-card h2 {
  margin-bottom: .35rem;
}

.archive-project-row {
  display: grid;
  gap: .8rem;
  padding: 1rem;
  border: 1px solid var(--border-grey);
  border-radius: 6px;
  background: #fbfbfb;
}

.archive-project-row > header {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem 1.25rem;
  align-items: baseline;
}

.archive-project-row > header strong {
  font-size: 1.15rem;
}

.historical-project-action {
  margin-left: auto;
}

.archive-module-list {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  align-items: flex-start;
}

.archive-module-item {
  position: relative;
  min-width: 7rem;
  height: 3rem;
  padding: .7rem;
  border: 1px solid #8b8b8b;
  border-radius: 6px;
  background: #fff;
}

.archive-module-item:hover,
.archive-module-item:focus,
.archive-module-item:focus-within {
  z-index: 45;
  border-color: var(--ast-red);
}

.archive-module-hover {
  top: 100%;
  left: 0;
  max-height: 24rem;
}

.archive-module-item:hover .archive-module-hover,
.archive-module-item:focus .archive-module-hover,
.archive-module-item:focus-within .archive-module-hover {
  display: grid;
}

.archive-module-hover a {
  color: inherit;
  text-decoration: none;
}

.archive-module-hover a:hover strong,
.archive-module-hover a:focus strong {
  color: var(--ast-red-dark);
  text-decoration: underline;
}

.inventory-review-summary {
  margin-bottom: 1rem;
}

.inventory-review-remarks {
  min-width: 16rem;
  white-space: pre-wrap;
}

@media (max-width: 760px) {
  .project-timeline-footer {
    grid-template-columns: 1fr;
  }

  .timeline-zoom-controls {
    justify-content: flex-start;
  }

  .archive-project-row > header {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.project-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.project-card {
  display: grid;
  grid-template-rows: 8.75rem auto auto minmax(1.5rem, 1fr) auto;
  gap: 1rem;
  height: auto;
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--border-grey);
  border-radius: 7px;
  background: var(--card-grey);
}

.project-card-created {
  outline: 3px solid var(--success-green);
  outline-offset: 2px;
}

.project-card:has(.module-board-item:hover),
.project-card:has(.module-board-item:focus),
.project-card:has(.module-board-item:focus-within) {
  z-index: 30;
}

.project-card-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
  height: 8.75rem;
  min-height: 8.75rem;
}

.project-card-header h2 {
  margin: 0;
  font-size: 1.65rem;
}

.project-location {
  display: grid;
  font-size: 1.4rem;
  gap: .2rem;
  max-height: 4.5rem;
  overflow: hidden;
  text-align: right;
}

.project-card-header-actions {
  display: grid;
  justify-items: end;
  gap: .6rem;
}

.project-edit-panel {
  position: fixed;
  z-index: 90;
  top: 6rem;
  width: min(42rem, calc(50vw - 2rem));
  max-height: calc(100vh - 8rem);
  margin: 0;
  overflow: auto;
  padding: 1rem;
  border: 1px solid var(--ast-middle-grey);
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 12px 35px rgb(0 0 0 / 28%);
}

.project-edit-panel-right {
  right: 1rem;
  left: auto;
}

.project-edit-panel-left {
  right: auto;
  left: 1rem;
}

.project-edit-form {
  display: grid;
  gap: 1rem;
}

.project-module-selector {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: end;
}

.project-module-list {
  max-height: 31rem;
  overflow: auto;
  border: 1px solid var(--border-grey);
  border-radius: 5px;
  background: #fff;
}

.project-module-list table {
  width: 100%;
}

.project-module-list thead {
  position: sticky;
  top: 0;
  z-index: 1;
}

.status-unassessed {
  border-color: #b9b9b9;
  color: #555;
  background: #ededed;
}

.project-information {
  display: grid;
  gap: .75rem;
  padding: .8rem;
  border: 1px solid var(--border-grey);
  border-radius: 5px;
  background: #fff;
}

.project-warning {
  padding: .7rem;
  border-left: 5px solid;
  border-radius: 4px;
}

.project-warning ul {
  margin-bottom: 0;
}

.project-warning-overlap {
  border-color: var(--error-red);
  color: var(--error-red);
  background: #fff4f4;
}

.project-warning-turnaround {
  border-color: var(--warning-amber);
  color: #714500;
  background: #fff4df;
}

.project-readiness {
  overflow-wrap: anywhere;
}

.available-module-card {
  display: grid;
  gap: 1rem;
  margin-block: 1rem;
}

.module-token-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr));
  grid-auto-flow: row dense;
  gap: .65rem;
  min-height: 4.5rem;
  padding: .8rem;
  border: 2px dashed var(--border-grey);
  border-radius: 6px;
  background: #fff;
}

.module-token-grid.is-drag-over,
.project-module-trash.is-drag-over {
  border-color: var(--ast-red);
  background: #fff0f0;
}

.module-board-item {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .5rem;
  height: 3rem;
  min-height: 3rem;
  max-height: 3rem;
  padding: .55rem .7rem;
  border: 1px solid;
  border-radius: 6px;
  cursor: grab;
  user-select: none;
}

.module-board-item > strong {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.module-board-item.module-wide {
  grid-column: span 2;
}

.module-board-item.module-ready,
.module-board-legend .module-ready {
  border-color: #5d9c68;
  background: #e8f5ea;
}

.module-board-item.module-not-ready,
.module-board-legend .module-not-ready {
  border-color: #c97b7b;
  background: #fde8e8;
}

.module-board-item.module-placeholder,
.module-board-legend .module-placeholder {
  border-color: #a7a7a7;
  background: #e8e8e8;
}

.module-board-item.is-dragging {
  opacity: .45;
}

.module-board-item:hover,
.module-board-item:focus,
.module-board-item:focus-within {
  z-index: 40;
}

.module-status-dot {
  width: .7rem;
  height: .7rem;
  flex: 0 0 .7rem;
  border-radius: 50%;
  background: currentColor;
}

.schedule-warning-dot {
  display: inline-block;
  width: .72rem;
  height: .72rem;
  flex: 0 0 .72rem;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .7);
}

.schedule-warning-stack {
  display: grid;
  grid-template-rows: repeat(2, .72rem);
  gap: .2rem;
  align-content: center;
  min-width: .72rem;
}

.schedule-warning-overlap {
  background: var(--error-red);
}

.schedule-warning-turnaround {
  background: #ff8a00;
}

.schedule-warning-text.overlap {
  color: var(--error-red);
}

.schedule-warning-text.turnaround {
  color: #714500;
}

.module-hover-card {
  position: absolute;
  z-index: 20;
  top: 100%;
  left: 0;
  display: none;
  width: min(24rem, 80vw);
  max-height: min(34rem, calc(100vh - 8rem));
  overflow: auto;
  gap: .35rem;
  padding: .8rem;
  border: 1px solid var(--border-grey);
  border-radius: 6px;
  color: var(--text);
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
}

.module-hover-card .button {
  justify-self: start;
  margin-top: .35rem;
}

.module-hover-subtitle {
  margin: .65rem 0 0;
  padding-top: .55rem;
  border-top: 1px solid var(--border-grey);
  font-size: .95rem;
}

.module-board-item:hover .module-hover-card,
.module-board-item:focus .module-hover-card,
.module-board-item:focus-within .module-hover-card {
  display: grid;
}

.module-hover-card ol {
  display: grid;
  gap: .45rem;
  margin: .35rem 0 0;
  padding-left: 1.3rem;
}

.module-inventory-history-latest a,
.module-inventory-history-older a {
  display: block;
  color: inherit;
  text-decoration: none;
}

.module-inventory-history-latest a:hover strong,
.module-inventory-history-latest a:focus strong,
.module-inventory-history-older a:hover strong,
.module-inventory-history-older a:focus strong {
  color: var(--ast-red-dark);
  text-decoration: underline;
}

.module-inventory-history-older {
  max-height: 10rem;
  overflow-y: auto;
  padding-right: .35rem;
  border-top: 1px solid var(--border-grey);
  border-bottom: 1px solid var(--border-grey);
  background: #fafafa;
}

.module-hover-card li span {
  display: block;
  color: var(--muted);
  font-size: .82rem;
}

.module-board-legend {
  display: flex;
  gap: .6rem;
}

.module-board-legend span {
  padding: .35rem .6rem;
  border: 1px solid;
  border-radius: 4px;
}

.module-board-message {
  min-height: 1.4rem;
  margin: 0;
  color: var(--ast-red-dark);
}

.project-module-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.project-module-heading p {
  margin: 0;
}

.project-module-trash {
  padding: .45rem .65rem;
  border: 2px dashed #b46a6a;
  border-radius: 5px;
  color: var(--error-red);
  background: #fff;
}

.project-card-footer {
  display: flex;
  justify-content: flex-end;
  align-items: end;
}

.project-module-grid {
  grid-template-columns: repeat(auto-fill, minmax(5.8rem, 1fr));
  min-height: 5rem;
  overflow: visible;
  align-content: start;
}

.project-card-bottom-space {
  min-height: 1.5rem;
}

.inventory-completion-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 1rem;
}

.inventory-completion-left {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 1rem;
}

.inventory-completion-card h2,
.inventory-completion-card p:last-child {
  margin-bottom: 0;
}

.inventory-completion-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

.inventory-completion-choices {
  display: grid;
  gap: .55rem;
  margin: 0;
  padding: 0;
  border: 0;
}

.inventory-completion-choices legend {
  margin-bottom: .65rem;
  font-weight: 700;
}

.inventory-completion-choice {
  min-height: 2.85rem;
  display: flex;
  align-items: center;
  gap: .65rem;
  width: fit-content;
  min-width: min(100%, 24rem);
  padding: .6rem .7rem;
  border: 1px solid var(--border-grey);
  border-radius: 5px;
  background: #ffffff;
}

.inventory-completion-choice input {
  flex: 0 0 auto;
  margin: 0;
}

.inventory-completion-choice.is-disabled {
  color: #7b7b7b;
  background: #eeeeee;
}

.inventory-completion-guidance {
  min-height: 1.35rem;
  margin: 0;
}

.inventory-completion-actions {
  align-self: start;
}

.inventory-live-deviation-summary {
  min-width: 0;
  align-self: start;
  padding: .85rem;
  border: 1px solid var(--border-grey);
  border-radius: 5px;
  background: #ffffff;
}

.inventory-live-deviation-summary h3 {
  margin: 0 0 .65rem;
}

.inventory-live-deviation-summary ul,
.inventory-deviation-list {
  display: grid;
  gap: .5rem;
  margin: 0;
  padding-left: 1.2rem;
}

.inventory-deviation-list li span {
  display: block;
  white-space: pre-wrap;
}

.inventory-history-subtitle {
  margin: .2rem 0 0;
  font-size: 24px;
}

.inventory-value-good {
  border-color: #58a76f !important;
  background: #e8f6ec !important;
}

.inventory-value-warning,
.inventory-recommended-attention .inventory-remarks-preview,
.inventory-recommended-attention textarea {
  border-color: #d79627 !important;
  background: #fff1d6 !important;
}

.inventory-value-error,
.inventory-required-attention .inventory-remarks-preview,
.inventory-required-attention textarea {
  border-color: var(--error-red) !important;
  background: #fff0f0 !important;
}

.inventory-line-guidance {
  display: block;
  margin-top: .2rem;
  color: var(--error-red);
  font-size: .6rem;
  white-space: normal;
}

.project-card-header-actions .button,
.archive-project-row header > .button {
  width: 12.75rem;
}

.project-card-header-actions .button-primary {
  border-color: var(--border-grey);
  color: #2d2d2d;
  background: #ffffff;
}

.project-card-header-actions .button-primary:hover {
  border-color: var(--ast-middle-grey);
  background: var(--hover-grey);
}

.inventory-picker {
  max-width: 34rem;
  margin-block: 1rem;
}

.inventory-form,
.inventory-section-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.inventory-module-heading {
  position: sticky;
  top: 0;
  z-index: 25;
  margin: 0;
  padding-block: .7rem;
  border-bottom: 1px solid var(--border-grey);
  background: rgb(255 255 255 / 97%);
  backdrop-filter: blur(10px);
}

.inventory-module-heading h1 {
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  letter-spacing: -.015em;
}

.inventory-module-heading p {
  margin: .2rem 0 0;
  font-size: .78rem;
}

.inventory-module-heading .eyebrow {
  margin-bottom: .15rem;
  font-size: .67rem;
}

.inventory-section-card {
  position: relative;
  overflow: visible;
  padding: 0;
}

.inventory-section-card:not([open]) {
  overflow: hidden;
}

.inventory-section-heading {
  position: sticky;
  top: var(--inventory-module-sticky-offset, 5rem);
  z-index: 15;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .62rem .75rem;
  border-bottom: 1px solid var(--border-grey);
  border-radius: 5px 5px 0 0;
  background: rgb(244 244 244 / 98%);
  box-shadow: 0 1px 0 rgb(0 0 0 / 5%);
  white-space: nowrap;
  cursor: pointer;
  list-style: none;
}

.inventory-section-heading::-webkit-details-marker {
  display: none;
}

.inventory-section-heading::before {
  content: "\25B6";
  flex: 0 0 auto;
  font-size: .72rem;
  color: var(--text-muted);
  transition: transform .15s ease;
}

.inventory-section-card[open] > .inventory-section-heading::before {
  transform: rotate(90deg);
}

.inventory-section-description {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-section-picture {
  display: flex;
  flex-direction: column;
  gap: .65rem;
  padding: .75rem;
  border-bottom: 1px solid var(--border-grey);
  background: #ffffff;
}

.inventory-section-picture-actions {
  order: 1;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.inventory-section-picture-preview {
  order: 2;
  margin: 0;
}

.inventory-section-picture.is-open .inventory-section-picture-preview {
  order: 1;
}

.inventory-section-picture.is-open .inventory-section-picture-actions {
  order: 2;
}

.inventory-section-picture-preview img {
  display: block;
  width: auto;
  max-width: min(100%, 48rem);
  max-height: 32rem;
  border: 1px solid var(--border-grey);
  border-radius: 4px;
  object-fit: contain;
}

.inventory-table {
  overflow: visible;
  background: #ffffff;
}

.inventory-table table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  font-size: .68rem;
}

.inventory-col-division {
  width: 6.5%;
}

.inventory-col-item {
  width: 9.5%;
}

.inventory-col-description {
  width: 16%;
}

.inventory-col-brand {
  width: 8%;
}

.inventory-col-layout-quantity {
  width: 6.5%;
}

.inventory-col-unit {
  width: 4.5%;
}

.inventory-col-condition {
  width: 10.5%;
}

.inventory-col-refill,
.inventory-col-good,
.inventory-col-has-serial {
  width: 7%;
}

.inventory-col-serials {
  width: 8.5%;
}

.inventory-col-remarks {
  width: 9%;
}

.inventory-table th,
.inventory-table td {
  min-width: 0;
  padding: .28rem;
  overflow: hidden;
  white-space: nowrap;
}

.inventory-table thead th {
  top: var(--inventory-table-heading-offset, 7.5rem);
  z-index: 14;
}

.inventory-table th > span,
.inventory-cell-text {
  min-width: 0;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-table input,
.inventory-table select,
.inventory-table textarea,
.inventory-remarks-preview {
  min-width: 0;
  width: 100%;
  padding: .27rem;
  border: 1px solid var(--ast-middle-grey);
  border-radius: 4px;
  font-size: .68rem;
}

.inventory-table input,
.inventory-table select,
.inventory-remarks-preview {
  height: 1.7rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-remarks-control {
  min-width: 0;
}

.inventory-remarks-preview {
  display: none;
  color: #1c1c1c;
  background: #ffffff;
  text-align: left;
  cursor: text;
}

.inventory-remarks-control.is-enhanced .inventory-remarks-preview {
  display: block;
}

.inventory-remarks-control.is-enhanced textarea {
  display: none;
}

.inventory-remarks-control.is-enhanced.is-editing .inventory-remarks-preview {
  display: none;
}

.inventory-remarks-control.is-enhanced.is-editing textarea {
  display: block;
  min-height: 8rem;
  overflow: auto;
  white-space: pre-wrap;
  resize: both;
}

@media (min-width: 900px) {
  .inventory-table td.inventory-cell-editing {
    position: relative;
    z-index: 18;
    overflow: visible;
  }

  .inventory-remarks-control.is-editing textarea {
    position: absolute;
    top: .2rem;
    right: .2rem;
    width: min(30rem, calc(100vw - 3rem));
    box-shadow: 0 8px 24px rgb(0 0 0 / 20%);
  }
}

@media (max-width: 899px) {
  .inventory-completion-card {
    grid-template-columns: 1fr;
  }

  .inventory-completion-guidance,
  .inventory-completion-actions {
    grid-column: auto;
  }

  .inventory-section-heading {
    padding-inline: .65rem;
  }

  .inventory-table {
    padding: .65rem;
  }

  .inventory-table thead,
  .inventory-table colgroup {
    display: none;
  }

  .inventory-table tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .4rem;
    margin-bottom: 1rem;
    padding: .6rem;
    border: 1px solid var(--border-grey);
    border-radius: 4px;
  }

  .inventory-table tr:last-child {
    margin-bottom: 0;
  }

  .inventory-table td {
    display: grid;
    gap: .2rem;
    padding: .2rem;
    border: 0;
  }

  .inventory-table td::before {
    content: attr(data-label);
    overflow: hidden;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (max-width: 520px) {
  .inventory-table tr {
    grid-template-columns: 1fr;
  }
}

.pwa-offline-notice {
  margin: 0;
}

.pwa-saved-inventories .card-heading-row {
  align-items: center;
}

.pwa-connection-state {
  min-height: 2.4rem;
  margin-block: .75rem;
  padding: .55rem .7rem;
  border: 1px solid var(--border-grey);
  border-radius: 5px;
  background: #ffffff;
}

.pwa-connection-state[data-state="complete"] {
  border-color: #58a76f;
  color: var(--success-green);
  background: #e8f6ec;
}

.pwa-connection-state[data-state="error"] {
  border-color: var(--error-red);
  color: var(--error-red);
  background: #fff0f0;
}

.pwa-inventory-card-list {
  max-height: 34rem;
  display: grid;
  gap: 1rem;
  overflow-y: auto;
}

.pwa-inventory-card {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 1rem;
  padding: .85rem;
  border: 1px solid var(--border-grey);
  border-radius: 5px;
  background: #ffffff;
}

.pwa-inventory-card h3,
.pwa-inventory-card p {
  margin: 0;
}

.pwa-inventory-card .field-help {
  overflow-wrap: anywhere;
}

.pwa-inventory-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: .6rem;
}

.pwa-upload-badge {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: .25rem .55rem;
  border: 1px solid var(--border-grey);
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
}

.pwa-upload-badge.is-local {
  border-color: #d79627;
  color: var(--warning-amber);
  background: #fff1d6;
}

.pwa-upload-badge.is-uploaded {
  border-color: #58a76f;
  color: var(--success-green);
  background: #e8f6ec;
}

.pwa-upload-progress {
  flex-basis: 100%;
  min-height: 1.25rem;
  text-align: right;
  font-size: .82rem;
}

.pwa-upload-progress[data-state="complete"] {
  color: var(--success-green);
}

.pwa-upload-progress[data-state="error"] {
  color: var(--error-red);
}

@media (max-width: 760px) {
  .inventory-pwa-form .inventory-section-heading {
    white-space: normal;
  }

  .inventory-pwa-form .inventory-section-picture-actions,
  .inventory-pwa-form .inventory-completion-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .inventory-pwa-form .inventory-section-picture-actions .button,
  .inventory-pwa-form .inventory-completion-actions .button {
    width: 100%;
  }

  .pwa-saved-inventories .card-heading-row,
  .pwa-inventory-card {
    grid-template-columns: 1fr;
  }

  .pwa-inventory-card-actions {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .pwa-inventory-card-actions .button {
    width: 100%;
  }

  .pwa-upload-progress {
    text-align: left;
  }
}

@media (max-width: 980px) {
  .utility-grid-two, .utility-grid-three, .module-identity-grid, .section-top-grid, .validation-card, .project-card-grid {
    grid-template-columns: 1fr;
  }

  .project-create-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-edit-panel,
  .project-edit-panel-left,
  .project-edit-panel-right {
    top: 4.5rem;
    right: 1rem;
    left: 1rem;
    width: auto;
    max-height: calc(100vh - 6rem);
  }

  .section-picture-layout {
    grid-template-columns: 1fr;
  }

  .section-picture-details {
    width: min(100%,32rem);
    justify-self: center;
  }

  .module-description-field {
    grid-column: auto;
  }

  .add-division-row, .add-structure-item-row {
    grid-template-columns: 1fr 1fr;
  }

  .add-division-row .selected-item-summary {
    grid-column: 1/-1;
  }

  .add-structure-item-row .selected-item-summary {
    grid-column: 1/-1;
  }
}

@media (max-width: 640px) {
  .card-heading-row, .dialog-heading {
    flex-direction: column;
  }

  .section-identity-line,
  .section-card-meta {
    flex-wrap: wrap;
  }

  .section-description-control {
    grid-template-columns: 1fr;
    gap: .25rem;
  }

  .compact-search, .add-division-row, .add-structure-item-row {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .designer-fold > summary {
    grid-template-columns: minmax(0,1fr) auto;
  }

  .fold-summary-count {
    display: none;
  }

  .picture-suggestions {
    grid-template-columns: 1fr;
  }

  .project-create-form,
  .project-module-selector {
    grid-template-columns: 1fr;
  }

  .project-card-header {
    display: grid;
  }

  .project-location {
    text-align: left;
  }
}

.project-card-identity {
  display: grid;
  justify-items: start;
  gap: .45rem;
}

.ata-project-selector {
  display: grid;
  grid-template-columns: minmax(14rem, .6fr) minmax(24rem, 1.4fr);
  align-items: end;
  gap: 1rem;
}

.ata-column-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: .75rem;
  margin-top: 1rem;
}

.ata-export-controls {
  display: grid;
  justify-items: end;
  gap: 1rem;
}

.ata-export-options,
.ata-export-button-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .65rem;
}

.ata-export-button-row {
  flex-wrap: nowrap;
  width: max-content;
  max-width: 100%;
  margin: 0;
  overflow-x: auto;
}

.ata-export-button {
  flex: 0 0 auto;
  white-space: nowrap;
  border-color: var(--border-grey);
  color: #2d2d2d;
  background: #ffffff;
}

.ata-export-button:hover,
.ata-export-button:focus-visible {
  border-color: var(--ast-middle-grey);
  color: #2d2d2d;
  background: var(--hover-grey);
}

.ata-orientation-choice {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .65rem .8rem;
  border: 1px solid var(--border-grey);
  border-radius: 7px;
  background: #fff;
}

.ata-orientation-choice legend {
  padding: 0 .25rem;
  font-weight: 700;
}

.ata-orientation-choice label {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}

.ata-summary-choice {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .65rem .8rem;
  border: 1px solid var(--border-grey);
  border-radius: 7px;
  background: #fff;
  font-weight: 700;
}

.ata-column-options fieldset {
  display: flex;
  align-items: center;
  gap: .8rem;
  min-width: 0;
  padding: .6rem .75rem;
  border: 1px solid var(--border-grey);
  border-radius: 5px;
  background: #fff;
}

.ata-column-options legend {
  padding: 0 .25rem;
  font-weight: 700;
}

.ata-column-options label {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
}

.ata-column-tray {
  display: flex;
  gap: .5rem;
  min-height: 4.25rem;
  margin-top: 1rem;
  padding: .75rem;
  overflow-x: auto;
  border: 1px solid var(--border-grey);
  border-radius: 7px;
  background: #fff;
}

.ata-column-box {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: .35rem;
  min-height: 2.6rem;
  padding: .35rem;
  border: 1px solid var(--ast-middle-grey);
  border-radius: 5px;
  background: var(--card-grey);
  cursor: grab;
}

.ata-column-box[data-ata-column-box="no"] {
  border-color: var(--ast-red);
  cursor: default;
}

.ata-column-box:active {
  cursor: grabbing;
}

.ata-summary-card {
  display: grid;
  grid-template-columns: minmax(16rem, .65fr) minmax(24rem, 1.35fr);
  align-items: start;
  gap: 1rem;
}

.ata-summary-card .message {
  grid-column: 1 / -1;
}

.ata-carnet-table {
  min-width: 62rem;
}

.ata-carnet-table td[data-ata-column="description"] {
  min-width: 22rem;
  white-space: normal;
}

.ata-carnet-table .row-warning td {
  background: #fff3df;
}

@media (max-width: 760px) {
  .ata-project-selector,
  .ata-summary-card {
    grid-template-columns: 1fr;
  }

  .ata-export-controls,
  .ata-export-options,
  .ata-export-button-row {
    justify-items: stretch;
    justify-content: flex-start;
  }

  .ata-export-button-row .ata-export-button {
    flex: 0 0 auto;
  }
}

.tooling-overview-page-header {
  align-items: flex-end;
}

.tooling-overview-selector,
.tooling-overview-draft-note,
.tooling-overview-sheet {
  margin-top: 1rem;
}

.tooling-overview-sheet {
  width: min(100%, 70rem);
  margin-right: auto;
  margin-left: auto;
  padding: clamp(1.25rem, 4vw, 3rem);
  border: 1px solid var(--border-grey);
  background: #fff;
  box-shadow: 0 .4rem 1.4rem rgb(0 0 0 / 8%);
  color: #111;
}

.tooling-overview-document-header {
  display: grid;
  justify-items: center;
  gap: .35rem;
  text-align: center;
}

.tooling-overview-document-header img {
  width: min(15rem, 45%);
  height: auto;
  margin-bottom: .5rem;
}

.tooling-overview-document-header h2,
.tooling-overview-document-header p {
  margin: 0;
}

.tooling-overview-document-header h2 {
  font-size: clamp(1.45rem, 3vw, 2rem);
  letter-spacing: .03em;
}

.tooling-overview-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem 2rem;
  margin: 2rem 0;
}

.tooling-overview-facts div {
  display: grid;
  grid-template-columns: minmax(8rem, auto) minmax(0, 1fr);
  gap: .75rem;
}

.tooling-overview-facts dt {
  font-weight: 700;
}

.tooling-overview-facts dd {
  margin: 0;
}

.tooling-overview-map {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: 2rem;
  align-items: stretch;
  margin-top: 1rem;
}

.tooling-overview-carrier {
  display: flex;
  min-height: 12rem;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: .75rem;
  padding: 1rem .6rem;
  border: 2px solid var(--ast-dark-grey);
  background: #f4f4f4;
  text-align: center;
}

.tooling-overview-carrier span {
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.tooling-overview-module-groups {
  display: grid;
  gap: 1rem;
}

.tooling-overview-module-group {
  position: relative;
  display: grid;
  grid-template-columns: minmax(10rem, .55fr) minmax(18rem, 1.45fr);
  gap: 1rem;
  align-items: center;
  break-inside: avoid;
}

.tooling-overview-module-group::before {
  position: absolute;
  left: -2rem;
  width: 2rem;
  border-top: 1px solid var(--ast-dark-grey);
  content: "";
}

.tooling-overview-module-identity {
  display: grid;
  gap: .25rem;
  padding: .7rem;
  border: 1px solid var(--ast-dark-grey);
  background: #fafafa;
}

.tooling-overview-module-identity strong {
  font-size: 1.05rem;
}

.tooling-overview-module-identity small {
  color: var(--text-muted);
}

.tooling-overview-section-list {
  margin: 0;
  padding: 0;
  border: 1px solid var(--ast-dark-grey);
  list-style: none;
}

.tooling-overview-section-list li {
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr);
  gap: .45rem;
  padding: .22rem .4rem;
  border-bottom: 1px solid var(--ast-dark-grey);
  line-height: 1.25;
}

.tooling-overview-section-list li:last-child {
  border-bottom: 0;
}

.tooling-overview-section-list li span {
  font-variant-numeric: tabular-nums;
}

.tooling-overview-section-list li strong {
  font-weight: 500;
}

.tooling-overview-section-list .tooling-overview-empty-section {
  display: block;
  color: var(--text-muted);
}

@media (max-width: 760px) {
  .tooling-overview-facts {
    grid-template-columns: 1fr;
  }

  .tooling-overview-map {
    grid-template-columns: 1fr;
  }

  .tooling-overview-carrier {
    min-height: auto;
  }

  .tooling-overview-carrier span {
    writing-mode: horizontal-tb;
    transform: none;
  }

  .tooling-overview-module-group {
    grid-template-columns: 1fr;
  }

  .tooling-overview-module-group::before {
    display: none;
  }
}

@media print {
  @page {
    size: A4 portrait;
    margin: 10mm;
  }

  .site-header,
  .site-footer,
  .tooling-overview-page-header,
  .tooling-overview-selector,
  .tooling-overview-draft-note {
    display: none;
  }

  .page-shell {
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0;
  }

  .tooling-overview-sheet {
    width: auto;
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
  }

  .tooling-overview-document-header img {
    width: 42mm;
  }

  .tooling-overview-module-group {
    grid-template-columns: 38mm minmax(0, 1fr);
    gap: 5mm;
  }

  .tooling-overview-map {
    grid-template-columns: 27mm minmax(0, 1fr);
    gap: 8mm;
  }

  .tooling-overview-module-group::before {
    left: -8mm;
    width: 8mm;
  }
}

.inventory-catalogue-entry-form,
.inventory-catalogue-selection-form,
.inventory-catalogue-view-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 1rem;
}

.inventory-catalogue-entry-form label,
.inventory-catalogue-selection-form label {
  display: grid;
  flex: 1 1 15rem;
  gap: .5rem;
}

.inventory-catalogue-entry-form select,
.inventory-catalogue-selection-form select {
  width: 100%;
}

.inventory-catalogue-or {
  align-self: center;
  font-weight: 700;
  color: var(--text-muted);
}

.inventory-catalogue-page-header {
  align-items: flex-end;
}

.inventory-catalogue-selector,
.inventory-catalogue-view-choice,
.inventory-catalogue-module-note,
.inventory-catalogue-page {
  margin-top: 1rem;
}

.inventory-catalogue-view-choice {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
}

.inventory-catalogue-view-form label {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 2.75rem;
  padding: .45rem .7rem;
  border: 1px solid var(--border-grey);
  border-radius: 6px;
  background: #fff;
}

.inventory-catalogue-page {
  width: min(100%, 70rem);
  min-height: 60rem;
  margin-right: auto;
  margin-left: auto;
  padding: clamp(1.25rem, 4vw, 3rem);
  border: 1px solid var(--border-grey);
  background: #fff;
  box-shadow: 0 .4rem 1.4rem rgb(0 0 0 / 8%);
  color: #111;
}

.inventory-catalogue-document-header {
  display: grid;
  justify-items: center;
  gap: .35rem;
  text-align: center;
}

.inventory-catalogue-document-header img {
  width: min(15rem, 45%);
  height: auto;
  margin-bottom: .5rem;
}

.inventory-catalogue-document-header h2,
.inventory-catalogue-document-header p {
  margin: 0;
}

.inventory-catalogue-document-header h2 {
  font-size: clamp(1.45rem, 3vw, 2rem);
  letter-spacing: .03em;
}

.inventory-catalogue-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem 2rem;
  margin: 2rem 0;
}

.inventory-catalogue-facts div {
  display: grid;
  grid-template-columns: minmax(8rem, auto) minmax(0, 1fr);
  gap: .75rem;
}

.inventory-catalogue-facts dt {
  font-weight: 700;
}

.inventory-catalogue-facts dd {
  margin: 0;
}

.inventory-catalogue-overview-map {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: 2rem;
  align-items: stretch;
  margin-top: 1rem;
}

.inventory-catalogue-project-carrier {
  display: flex;
  min-height: 14rem;
  justify-content: center;
  align-items: center;
  padding: 1rem .6rem;
  border: 2px solid var(--ast-dark-grey);
  background: #f4f4f4;
}

.inventory-catalogue-project-carrier-text {
  display: flex;
  align-items: center;
  gap: .8rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-align: center;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.inventory-catalogue-project-carrier-text strong {
  font-size: 1.05rem;
}

.inventory-catalogue-module-groups {
  display: grid;
  gap: 1rem;
}

.inventory-catalogue-module-group {
  position: relative;
  display: grid;
  grid-template-columns: minmax(10rem, .55fr) minmax(18rem, 1.45fr);
  gap: 1rem;
  align-items: center;
  break-inside: avoid;
}

.inventory-catalogue-module-group::before {
  position: absolute;
  left: -2rem;
  width: 2rem;
  border-top: 1px solid var(--ast-dark-grey);
  content: "";
}

.inventory-catalogue-module-identity {
  display: grid;
  gap: .25rem;
  padding: .7rem;
  border: 1px solid var(--ast-dark-grey);
  background: #fafafa;
}

.inventory-catalogue-module-identity strong {
  font-size: 1.05rem;
}

.inventory-catalogue-module-identity small {
  color: var(--text-muted);
}

.inventory-catalogue-overview-sections {
  margin: 0;
  padding: 0;
  border: 1px solid var(--ast-dark-grey);
  list-style: none;
}

.inventory-catalogue-overview-sections li {
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr);
  gap: .45rem;
  padding: .22rem .4rem;
  border-bottom: 1px solid var(--ast-dark-grey);
  line-height: 1.25;
}

.inventory-catalogue-overview-sections li:last-child {
  border-bottom: 0;
}

.inventory-catalogue-overview-sections li strong {
  font-weight: 500;
}

.inventory-catalogue-cover-page {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  text-align: center;
}

.inventory-catalogue-cover-page img {
  width: min(22rem, 60%);
  height: auto;
  margin-bottom: 3rem;
}

.inventory-catalogue-cover-page h2 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 4rem);
  letter-spacing: .08em;
}

.inventory-catalogue-cover-page h3 {
  margin: 1rem 0 0;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
}

.inventory-catalogue-section-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 13rem;
  align-items: start;
  gap: 1rem;
}

.inventory-catalogue-section-header img {
  width: 100%;
  height: auto;
}

.inventory-catalogue-section-header dl {
  display: grid;
  gap: .45rem;
  margin: 0;
}

.inventory-catalogue-section-header dl div {
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr);
  gap: .75rem;
}

.inventory-catalogue-section-header dt,
.inventory-catalogue-section-header dd {
  margin: 0;
}

.inventory-catalogue-section-header dd {
  font-weight: 700;
}

.inventory-catalogue-section-picture {
  display: flex;
  min-height: 12rem;
  justify-content: center;
  align-items: center;
  margin: 1.5rem 0 1rem;
}

.inventory-catalogue-section-picture img {
  display: block;
  max-width: 100%;
  max-height: 30rem;
  border: 5px solid #111;
  object-fit: contain;
}

.inventory-catalogue-picture-placeholder {
  display: grid;
  min-height: 8rem;
  place-content: center;
  gap: .35rem;
  margin: 1.5rem 0 1rem;
  border: 2px dashed var(--border-grey);
  background: #f4f4f4;
  color: var(--text-muted);
  text-align: center;
}

.inventory-catalogue-item-table {
  width: 100%;
  border-collapse: collapse;
}

.inventory-catalogue-item-table th,
.inventory-catalogue-item-table td {
  padding: .55rem .45rem;
  border-bottom: 1px solid #d1d1d1;
  text-align: left;
  vertical-align: top;
}

.inventory-catalogue-item-table th:first-child,
.inventory-catalogue-item-table td:first-child {
  width: 3.2rem;
}

.inventory-catalogue-item-table th:nth-child(2),
.inventory-catalogue-item-table td:nth-child(2) {
  width: 9rem;
}

.inventory-catalogue-item-table th:last-child,
.inventory-catalogue-item-table td:last-child {
  width: 6rem;
  white-space: nowrap;
}

.inventory-catalogue-continuation-heading th {
  padding-top: 1rem;
  border-bottom: 2px solid #111;
  font-size: .9rem;
}

@media (max-width: 760px) {
  .inventory-catalogue-facts {
    grid-template-columns: 1fr;
  }

  .inventory-catalogue-overview-map {
    grid-template-columns: 1fr;
  }

  .inventory-catalogue-project-carrier {
    min-height: auto;
  }

  .inventory-catalogue-project-carrier-text {
    writing-mode: horizontal-tb;
    transform: none;
  }

  .inventory-catalogue-module-group {
    grid-template-columns: 1fr;
  }

  .inventory-catalogue-module-group::before {
    display: none;
  }

  .inventory-catalogue-section-header {
    grid-template-columns: 1fr;
  }

  .inventory-catalogue-section-header img {
    width: min(13rem, 50%);
  }
}

@media print {
  @page {
    size: A4 portrait;
    margin: 10mm;
  }

  .site-header,
  .site-footer,
  .inventory-catalogue-page-header,
  .inventory-catalogue-selector,
  .inventory-catalogue-view-choice,
  .inventory-catalogue-module-note {
    display: none;
  }

  .page-shell {
    width: auto;
    max-width: none;
    margin: 0;
    padding: 0;
  }

  .inventory-catalogue-page {
    width: auto;
    min-height: 267mm;
    margin: 0;
    padding: 0;
    border: 0;
    break-after: page;
    box-shadow: none;
  }

  .inventory-catalogue-section-page {
    break-before: page;
  }

  .inventory-catalogue-item-table thead {
    display: table-header-group;
  }

  .inventory-catalogue-item-table tr {
    break-inside: avoid;
  }

  .inventory-catalogue-document-header img {
    width: 42mm;
  }

  .inventory-catalogue-module-group {
    grid-template-columns: 38mm minmax(0, 1fr);
    gap: 5mm;
  }

  .inventory-catalogue-overview-map {
    grid-template-columns: 27mm minmax(0, 1fr);
    gap: 8mm;
  }

  .inventory-catalogue-module-group::before {
    left: -8mm;
    width: 8mm;
  }

  .inventory-catalogue-section-picture img {
    max-height: 105mm;
  }

  .inventory-catalogue-picture-placeholder {
    min-height: 32mm;
  }
}

/* Two-factor sign-in */
.two-factor-steps {
  margin: 0 0 1.25rem;
  padding-left: 1.25rem;
  display: grid;
  gap: 0.75rem;
}

.two-factor-qr {
  margin: 0.75rem 0;
  display: inline-grid;
  justify-items: center;
  gap: 0.25rem;
  padding: 0.75rem;
  background: #ffffff;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
}

.two-factor-qr figcaption {
  font-size: 0.85rem;
  color: #555555;
}

.two-factor-secret code,
.recovery-code-list code {
  font-family: Consolas, "Cascadia Mono", "Courier New", monospace;
  font-size: 1rem;
  letter-spacing: 0.04em;
  word-break: break-all;
}

.recovery-code-list {
  margin: 1rem 0 1.25rem;
  padding-left: 1.75rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
  gap: 0.4rem 1.5rem;
}
