:root {
  --bg: #f4f0e8;
  --panel: #fffaf2;
  --ink: #171413;
  --muted: rgba(23, 20, 19, 0.62);
  --line: rgba(23, 20, 19, 0.2);
  --line-strong: rgba(23, 20, 19, 0.54);
  --accent: #e8df70;
  --dark: #211d1f;
  --good: #1c6f42;
  --gap: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Courier New", Courier, monospace;
}

a {
  color: inherit;
}

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

button {
  cursor: pointer;
}

.topbar {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 28px;
  background: var(--dark);
  color: #fffaf2;
}

.admin-page {
  --admin-header-height: 58px;
}

.admin-page .topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  min-height: var(--admin-header-height);
  padding: 14px max(24px, calc((100vw - 1400px) / 2));
  background: #000;
  color: #fff;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  text-decoration: none;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.brand span {
  font-weight: 400;
}

.nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
}

.nav a {
  opacity: 0.82;
  text-decoration: none;
}

.nav a:hover {
  opacity: 1;
  text-decoration: underline;
}

.admin-page .nav,
.library-page .nav,
.clients-page .nav {
  align-items: center;
  gap: 30px;
  margin-left: auto;
}

.admin-page .nav a,
.library-page .nav a,
.clients-page .nav a {
  opacity: 0.62;
  transition: opacity 120ms ease;
}

.admin-page .nav a[aria-current="page"],
.library-page .nav a[aria-current="page"],
.clients-page .nav a[aria-current="page"] {
  opacity: 1;
  font-weight: 800;
}

.admin-page .nav a:hover,
.library-page .nav a:hover,
.clients-page .nav a:hover {
  opacity: 1;
  text-decoration: none;
}

.admin-page .nav .nav-database,
.library-page .nav .nav-database,
.clients-page .nav .nav-database {
  padding-left: 30px;
  border-left: 2px solid rgba(255, 255, 255, 0.55);
}

.page {
  width: min(1520px, 100%);
  margin: 0 auto;
  padding: 22px 14px 34px;
}

.admin-page .page {
  padding-top: calc(var(--admin-header-height) + 22px);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(350px, 412px) minmax(0, 1fr);
  gap: var(--gap);
  align-items: start;
}

.preview-column {
  position: sticky;
  top: 18px;
  align-self: start;
}

.admin-page .preview-column {
  top: calc(var(--admin-header-height) + 18px);
}

.panel,
.listing-card,
.gate {
  border: 1px solid var(--line-strong);
  background: var(--panel);
}

.panel {
  padding: 24px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
.listing-title {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  line-height: 0.94;
  letter-spacing: -0.055em;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(42px, 6vw, 86px);
}

.admin-title {
  font-size: clamp(34px, 4vw, 56px);
}

h2 {
  margin-bottom: 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  font-weight: 400;
  letter-spacing: -0.035em;
}

.lede {
  max-width: 760px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.45;
}

.field-grid {
  display: grid;
  gap: 14px;
}

.address-field-row,
.price-field-row {
  display: grid;
  gap: 14px;
}

.address-field-row {
  grid-template-columns: 92px minmax(0, 1fr);
}

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

[hidden] {
  display: none !important;
}

.term-control[hidden] {
  display: none;
}

.availability-control[hidden] {
  display: none;
}

.availability-control {
  display: grid;
  gap: 12px;
}

.term-control {
  display: grid;
  gap: 12px;
}

.term-control--empty {
  padding: 13px 14px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.term-range-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.checkbox-field {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: fit-content;
}

.checkbox-field input {
  width: 18px;
  height: 18px;
  margin: 0;
}

label {
  display: grid;
  gap: 8px;
  font-size: 14px;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: 0.035em;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  padding: 12px;
  outline: none;
  font-size: 16px;
  line-height: 1.35;
  letter-spacing: 0;
  text-transform: none;
}

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

.private-details {
  display: grid;
  gap: 18px;
  margin-top: 22px;
  padding: 20px;
  border-top: 3px solid #0a0a0a;
  background: #2d2b2a;
  color: #fffaf2;
}

.private-details-heading {
  display: grid;
  gap: 8px;
}

.private-details-heading h2,
.private-subsection h3 {
  margin: 0;
  font-family: "Courier New", Courier, monospace;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.private-details-heading h2 {
  font-size: 20px;
}

.private-details-heading > p {
  margin: 0;
  color: rgba(255, 250, 242, 0.68);
  font-size: 12px;
  line-height: 1.45;
}

.private-details-eyebrow {
  margin: 0 0 4px;
  color: rgba(255, 250, 242, 0.68);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.private-details-grid {
  display: grid;
  gap: 14px;
}

.private-layout-grid,
.broker-fields {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.private-checks {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.private-checks .checkbox-field {
  font-weight: 700;
}

.private-subsection {
  display: grid;
  gap: 14px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 250, 242, 0.24);
}

.private-subsection h3 {
  font-size: 14px;
}

.private-notes-grid {
  padding-top: 18px;
  border-top: 1px solid rgba(255, 250, 242, 0.24);
}

.private-details input:not([type="checkbox"]),
.private-details textarea {
  border-color: rgba(255, 250, 242, 0.34);
  background: #ffffff;
  color: var(--ink);
}

.private-details input:focus,
.private-details textarea:focus {
  border-color: #fffaf2;
  box-shadow: 0 0 0 1px #fffaf2;
}

.private-details input[type="checkbox"] {
  accent-color: var(--accent);
}

.client-assignment {
  gap: 12px;
}

.client-tag-list {
  display: flex;
  min-height: 36px;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.client-tag {
  display: inline-flex;
  min-width: 0;
  min-height: 34px;
  align-items: center;
  border: 1px solid rgba(255, 250, 242, 0.5);
  background: #fff;
  color: var(--ink);
}

.client-tag > span {
  min-width: 0;
  padding: 8px 10px;
  overflow-wrap: anywhere;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.client-tag button {
  width: 34px;
  min-width: 34px;
  min-height: 32px;
  align-self: stretch;
  padding: 0;
  border: 0;
  border-left: 1px solid rgba(23, 20, 19, 0.25);
  background: #fff;
  color: var(--ink);
  font-size: 19px;
  line-height: 1;
}

.client-tag button:hover,
.client-tag button:focus-visible {
  background: #d43d3d;
  color: #fff;
}

.client-tag-empty,
.client-assignment-help {
  color: rgba(255, 250, 242, 0.68);
  font-size: 12px;
  line-height: 1.4;
}

.client-entry-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.client-entry-row button {
  min-height: 48px;
  border-color: rgba(255, 250, 242, 0.7);
  background: transparent;
  color: #fffaf2;
}

.client-entry-row button:hover,
.client-entry-row button:focus-visible {
  border-color: #fffaf2;
  background: #fffaf2;
  color: var(--ink);
}

.client-assignment-help {
  margin: 0;
}

.private-notes-grid textarea {
  min-height: 110px;
}

@media (max-width: 420px) {
  .private-layout-grid,
  .broker-fields {
    grid-template-columns: 1fr;
  }

  .client-entry-row {
    grid-template-columns: 1fr;
  }

  .client-entry-row button {
    width: 100%;
  }
}

input[type="file"] {
  padding: 10px;
  cursor: pointer;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 1px var(--ink);
}

.actions {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.action-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.action-group--primary {
  flex-wrap: nowrap;
}

.action-divider {
  width: 100%;
  height: 0;
  margin: 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.publication-date-field {
  width: min(280px, 100%);
  margin: 0;
  padding: 0;
  border: 0;
}

.publishing-controls {
  width: 100%;
  margin-top: 20px;
  padding: 22px 20px 20px;
  border-top: 2px solid var(--ink);
  background: #efefec;
}

.publishing-controls .listing-status-field {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.database-visibility-field {
  margin-top: 2px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
}

.database-visibility-field input {
  flex: 0 0 auto;
  accent-color: var(--ink);
}

.admin-page .publishing-controls .actions .button,
.admin-page .publishing-controls .actions button {
  background: #ffffff;
}


.admin-page .actions .button,
.admin-page .actions button {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.admin-page .actions .button:hover,
.admin-page .actions .button:focus-visible,
.admin-page .actions button:hover,
.admin-page .actions button:focus-visible {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

.admin-page .actions .delete-action:hover,
.admin-page .actions .delete-action:focus-visible {
  background: #d43d3d;
  border-color: #d43d3d;
  color: #ffffff;
}
.admin-page .actions #publish-button.is-published {
  background: var(--good);
  border-color: var(--good);
  color: #ffffff;
}


.admin-page .actions #publish-button:hover,
.admin-page .actions #publish-button:focus-visible {
  background: var(--good);
  border-color: var(--good);
  color: #ffffff;
}

.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
}

.button.primary,
button.primary {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.status {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.media-fields,
.map-fields {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.video-link-field {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.media-fields h2,
.map-fields h2,
.floor-plan-fields h2 {
  margin-bottom: 14px;
  font-size: 24px;
}

.map-picker {
  display: grid;
  gap: 10px;
}

.map-picker-status {
  display: none;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  text-transform: none;
  letter-spacing: 0;
}

.map-picker-status.is-visible {
  display: block;
}

.map-picker-map {
  position: relative;
  width: 100%;
  min-height: 320px;
  height: 320px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #d7d1c8;
}

.map-picker-map--loading,
.map-picker-map--fallback {
  display: grid;
  place-items: center;
  padding: 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  text-align: center;
}

.map-picker-help {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  text-transform: none;
  letter-spacing: 0;
}

.mapboxgl-ctrl-geocoder {
  width: min(360px, calc(100vw - 92px)) !important;
  max-width: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  font-family: "Courier New", Courier, monospace !important;
}

.mapboxgl-ctrl-geocoder input {
  height: 44px !important;
  padding: 10px 40px !important;
  border: 0 !important;
  box-shadow: none !important;
  font-family: "Courier New", Courier, monospace !important;
  font-size: 14px !important;
}

.mapboxgl-ctrl-geocoder--suggestion-title,
.mapboxgl-ctrl-geocoder--suggestion-address {
  font-family: "Courier New", Courier, monospace !important;
}

.mapboxgl-ctrl-bottom-right .mapboxgl-ctrl {
  margin: 0 10px 10px 0;
}

.photo-upload-zone {
  border: 1px solid rgba(23, 20, 19, 0.24);
  background: rgba(255, 255, 255, 0.72);
  transition: background 120ms ease, border-color 120ms ease;
}

.photo-upload-zone.is-dragging {
  border-color: var(--ink);
  background: rgba(232, 223, 112, 0.18);
}

.photo-upload {
  position: relative;
  min-height: 132px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  margin-bottom: 0;
  padding: 24px;
  text-align: center;
  cursor: pointer;
}

.photo-upload input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.photo-upload-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--bg);
  font-size: 26px;
  line-height: 1;
}

.photo-upload strong,
.photo-upload span {
  margin: 0;
  font-size: 14px;
  line-height: 1.35;
  text-transform: uppercase;
  letter-spacing: 0.035em;
}

.photo-upload span:not(.photo-upload-icon) {
  color: var(--muted);
}

.photo-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.floor-plan-fields {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.floor-plan-list {
  margin-top: 14px;
}

.floor-plan-preview-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px 14px;
  align-items: start;
  border: 1px solid rgba(23, 20, 19, 0.16);
  background: rgba(255, 255, 255, 0.78);
  padding: 12px;
}

.floor-plan-preview-media img,
.floor-plan-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 3 / 2;
  height: auto;
  object-fit: contain;
  background: #d7d1c8;
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.photo-list-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 12px 14px;
  align-items: start;
  border: 1px solid rgba(23, 20, 19, 0.16);
  background: rgba(255, 255, 255, 0.78);
  padding: 12px;
}

.photo-list-item.is-dragging {
  opacity: 0.62;
}

.photo-list-item.is-drop-target {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
  background: rgba(232, 223, 112, 0.16);
}

.photo-order-tools {
  display: grid;
  gap: 10px;
  width: 44px;
}

.photo-step-buttons {
  display: grid;
  gap: 8px;
}

.photo-drag-handle,
.photo-order-button,
.photo-delete-button {
  width: 44px;
  min-width: 44px;
  border: 1px solid rgba(23, 20, 19, 0.2);
  background: #fffaf2;
  color: var(--ink);
  padding: 0;
  line-height: 1;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.photo-drag-handle:hover,
.photo-order-button:hover,
.photo-delete-button:hover {
  border-color: rgba(23, 20, 19, 0.44);
  background: #ffffff;
}

.photo-drag-handle:focus-visible,
.photo-order-button:focus-visible,
.photo-delete-button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.photo-drag-handle {
  height: 66px;
  cursor: grab;
  touch-action: none;
  user-select: none;
  font-size: 17px;
  letter-spacing: 0;
}

.photo-drag-handle:active {
  cursor: grabbing;
  transform: scale(0.98);
}

.photo-order-button,
.photo-delete-button {
  height: 44px;
  cursor: pointer;
  font-size: 15px;
}

.photo-delete-button {
  grid-column: 1;
  grid-row: 2;
  font-size: 24px;
}

.floor-plan-delete-button {
  grid-column: 1;
  grid-row: 1;
}

.photo-list-preview {
  min-width: 0;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #d7d1c8;
}

.photo-list-preview img,
.photo-list-preview .photo-list-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  background: #d7d1c8;
}

.photo-list-placeholder {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.photo-caption-bar {
  grid-column: 2;
  min-height: 58px;
  height: 58px;
  resize: vertical;
  padding: 12px 14px;
}

.preview-shell {
  --listing-ink: #0a0a0a;
  --listing-paper: #ffffff;
  --listing-soft: #f4f4f1;
  --listing-soft-2: #e9e9e4;
  --listing-muted: #666666;
  --listing-line: #d7d7d0;
  --listing-radius: 8px;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--listing-soft);
  color: var(--listing-ink);
  font-family: Arial, Helvetica, sans-serif;
}

.preview-column .preview-shell {
  height: calc(100vh - 36px);
  min-height: 560px;
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  border: 1px solid var(--listing-line);
}

.preview-shell figure {
  margin: 0;
}

.preview-shell .button,
.preview-shell button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--listing-ink);
  border-radius: 999px;
  padding: 0 17px;
  background: var(--listing-paper);
  color: var(--listing-ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}

.preview-shell .button.primary,
.preview-shell button.primary {
  background: var(--listing-ink);
  color: var(--listing-paper);
}

.preview-topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 18px;
  padding: 13px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(10, 10, 10, 0.96);
  color: var(--listing-paper);
}

.topbar-return {
  color: var(--listing-paper);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-decoration: none;
  text-transform: uppercase;
}

.topbar-return:hover {
  text-decoration: underline;
}

.preview-page-frame {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 22px 24px 34px;
}

.preview-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 350px);
  gap: 20px;
  align-items: start;
}

.preview-main-stack {
  display: grid;
  gap: 20px;
}

.listing-surface,
.specs-panel,
.contact-panel {
  border: 1px solid var(--listing-line);
  border-radius: var(--listing-radius);
  background: var(--listing-paper);
}

.listing-surface {
  padding: 24px;
}

.listing-overview {
  padding: 28px 34px 32px;
}

.overview-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--listing-line);
  padding-bottom: 18px;
}

.listing-kicker {
  margin: 0 0 12px;
  color: var(--listing-muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.preview-shell .listing-title {
  margin: 0;
  max-width: 100%;
  color: var(--listing-ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
}

.address-bar {
  width: fit-content;
  margin: 13px 0 0;
  padding: 8px 11px;
  background: var(--listing-ink);
  color: var(--listing-paper);
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
}

.listing-description h2 {
  margin: 0 0 13px;
  color: var(--listing-ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: 0;
}

.copy-text {
  max-width: 64ch;
  margin: 0;
  color: var(--listing-muted);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.58;
  white-space: pre-line;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 14px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--listing-line);
  padding-bottom: 12px;
}

.section-heading h2 {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
}

.section-heading span {
  color: var(--listing-muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.media-frame {
  position: relative;
  width: 100%;
  min-height: 300px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, #eeeeea, #dcdcd6);
  color: var(--listing-muted);
  font-size: 14px;
  font-weight: 900;
}

.media-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame img + span {
  display: none;
}

.media-frame.is-empty span {
  display: block;
}

.media-frame.is-empty::before {
  content: "";
  position: absolute;
  inset: 22px;
  border: 1px solid rgba(10, 10, 10, 0.12);
}

.caption-bar {
  margin-top: 6px;
  margin-bottom: 18px;
  color: var(--listing-ink);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.28;
}

.carousel-shell {
  display: grid;
  gap: 0;
}

.carousel-stage {
  position: relative;
  overflow: hidden;
  background: var(--listing-soft-2);
}

.carousel-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  aspect-ratio: 3 / 2;
}

.carousel-frame img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  background: #f7f7f4;
}

.carousel-frame.is-portrait img {
  width: auto;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
  justify-self: center;
}

.carousel-control {
  position: absolute;
  top: 50%;
  width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border: 1px solid rgba(10, 10, 10, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--listing-ink);
  font-size: 28px;
  font-weight: 400;
  line-height: 1;
  text-transform: none;
  transform: translateY(-50%);
}

.carousel-control:hover {
  background: var(--listing-paper);
  border-color: rgba(10, 10, 10, 0.36);
}

.carousel-control-prev {
  left: 14px;
}

.carousel-control-next {
  right: 14px;
}

.carousel-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(82px, 1fr));
  gap: 8px;
}

.carousel-stage + .carousel-thumbs {
  margin-top: 14px;
}

.preview-shell .carousel-thumb {
  display: block;
  box-sizing: border-box;
  min-height: 0;
  width: 100%;
  border: 2px solid transparent;
  border-radius: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  overflow: hidden;
}

.preview-shell .carousel-thumb.is-active {
  border-color: var(--listing-ink);
}

.thumb-frame {
  position: relative;
  display: block;
  min-height: 0;
  aspect-ratio: 3 / 2;
  font-size: 11px;
}

.thumb-frame.is-empty {
  display: grid;
  place-items: center;
}

.thumb-frame::before {
  display: none;
}

.thumb-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.floor-plan-frame {
  overflow: hidden;
  border: 1px solid var(--listing-line);
  background: var(--listing-paper);
}

.floor-plan-media {
  display: block;
  min-height: 0;
  background: var(--listing-paper);
}

.floor-plan-media img {
  width: 100%;
  height: auto;
  background: var(--listing-paper);
}

.floor-plan-media.is-empty {
  min-height: 260px;
}

.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--listing-radius);
  background: #000000;
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.map-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--listing-radius);
  background: var(--listing-soft-2);
}

.map-frame img {
  display: block;
  width: 100%;
  filter: contrast(0.94) opacity(0.88);
}

.map-zone {
  position: absolute;
  width: 130px;
  height: 130px;
  border-radius: 999px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(10, 10, 10, 0.42);
  background: rgba(10, 10, 10, 0.08);
  box-shadow: 0 0 0 20px rgba(10, 10, 10, 0.04);
  pointer-events: none;
}

.sidebar-stack {
  position: sticky;
  top: 78px;
  display: grid;
  gap: 14px;
}

.specs-panel,
.contact-panel {
  padding: 22px;
}

.specs-panel h2,
.contact-panel h2 {
  margin: 0 0 10px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0;
}

.contact-panel p {
  margin: 0 0 18px;
  color: var(--listing-muted);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.38;
}

.listing-updated {
  margin: 0;
  color: var(--listing-muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.listing-updated-bottom {
  margin: 20px 0 0;
}

.contact-actions {
  display: grid;
  gap: 10px;
}

.contact-actions .button {
  width: 100%;
}

.contact-secondary-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.contact-secondary-actions button {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  font-size: 11px;
  background: var(--listing-paper);
  color: var(--listing-ink);
}

.mobile-contact-bar {
  display: none;
}

.sidebar-specs {
  display: grid;
  gap: 0;
  margin-top: 16px;
  border-top: 1px solid var(--listing-line);
}

.sidebar-spec {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--listing-line);
  font-size: 14px;
  font-weight: 800;
}

.sidebar-spec span:first-child {
  color: var(--listing-muted);
}

.listing-disclaimer {
  margin: 22px 0 0;
  color: var(--listing-muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
}

body:not(.admin-page) {
  background: #f4f4f1;
}

body:not(.admin-page) .preview-shell {
  padding-top: 50px;
  overflow-x: visible;
  font-size: 17px;
}

body:not(.admin-page) .preview-topbar {
  position: fixed;
  inset: 0 0 auto;
  height: 50px;
  box-sizing: border-box;
  padding-inline: max(24px, calc((100vw - 1180px) / 2));
}

body:not(.admin-page) .preview-page-frame {
  width: min(1180px, calc(100% - 32px));
  padding: 24px 0 44px;
}

body:not(.admin-page) .preview-content-grid {
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 18px;
}

body:not(.admin-page) .listing-overview {
  padding: 30px 34px 34px;
}

body:not(.admin-page) .preview-shell .listing-title {
  font-size: clamp(44px, 5vw, 68px);
}

body:not(.admin-page) .address-bar {
  font-size: 18px;
}

body:not(.admin-page) .copy-text {
  font-size: 18px;
  line-height: 1.6;
}

body:not(.admin-page) .section-heading h2 {
  font-size: 20px;
}

body:not(.admin-page) .specs-panel h2,
body:not(.admin-page) .contact-panel h2 {
  font-size: 22px;
}

body:not(.admin-page) .caption-bar {
  font-size: 18px;
}

body:not(.admin-page) .sidebar-stack {
  top: 74px;
}

body:not(.admin-page) .specs-panel,
body:not(.admin-page) .contact-panel {
  padding: 24px;
}

body:not(.admin-page) .sidebar-spec {
  font-size: 16px;
  padding: 14px 0;
}

body:not(.admin-page) .contact-panel p {
  font-size: 16px;
}

body:not(.admin-page) .listing-updated {
  font-size: 13px;
}

body:not(.admin-page) .preview-shell .button,
body:not(.admin-page) .preview-shell button {
  min-height: 46px;
  font-size: 13px;
}

body:not(.admin-page) .listing-disclaimer {
  font-size: 13px;
}

.toolbar {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 12px;
  margin: 24px 0;
}

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

.listing-card {
  display: grid;
  min-height: 100%;
  text-decoration: none;
}

.thumb {
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  background: #d7d1c8;
  color: rgba(23, 20, 19, 0.58);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.card-body {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.card-title {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.035em;
}

.card-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.35;
}

.pill {
  width: fit-content;
  border: 1px solid var(--line);
  padding: 5px 8px;
  background: rgba(232, 223, 112, 0.28);
  font-size: 12px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.gate {
  width: min(460px, 100%);
  margin: 70px auto;
  padding: 26px;
}

.home-hero {
  min-height: calc(100vh - 64px);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 34px;
  align-items: center;
}

.route-list {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.route-list a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 14px 0;
  text-decoration: none;
}

@media (max-width: 980px) {
  .home-hero {
    grid-template-columns: 1fr;
  }

  .preview-content-grid {
    grid-template-columns: 1fr;
  }

  .sidebar-stack {
    position: static;
  }

  .map-picker-map {
    height: 300px;
  }

  .mapboxgl-ctrl-geocoder {
    width: calc(100vw - 88px) !important;
  }

  .toolbar,
  .listing-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .workspace {
    grid-template-columns: 1fr;
  }

  .preview-column {
    position: static;
  }

  .preview-column .preview-shell {
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 680px) {
  .admin-page {
    --admin-header-height: 96px;
  }

  .photo-list-item {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 12px;
  }

  .photo-order-tools,
  .photo-drag-handle,
  .photo-order-button {
    width: 40px;
    min-width: 40px;
  }

  .topbar {
    display: grid;
    padding: 14px 20px;
  }

  .nav {
    gap: 12px;
  }

  .page {
    padding: 26px 20px 38px;
  }

  .panel,
  .gate {
    padding: 20px;
  }

  .preview-topbar {
    position: static;
  }

  .preview-page-frame {
    padding: 12px;
  }

  .listing-overview,
  .listing-surface,
  .specs-panel,
  .contact-panel {
    padding: 18px;
  }

  body:not(.admin-page) .specs-panel h2,
  body:not(.admin-page) .contact-panel h2 {
    font-size: 20px;
  }

  .overview-heading {
    display: grid;
    gap: 14px;
  }

  .preview-shell .listing-title {
    font-size: clamp(40px, 13vw, 62px);
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .copy-text {
    font-size: 18px;
  }

  .actions,
  .preview-shell button,
  .preview-shell .button {
    width: 100%;
  }

  .admin-page .action-group--primary {
    gap: 7px;
  }

  .admin-page .action-group--primary button,
  .admin-page .action-group--primary .button {
    min-width: 0;
    padding-right: 8px;
    padding-left: 8px;
    font-size: 12px;
    white-space: nowrap;
  }

  .preview-shell .carousel-control {
    width: 42px;
  }
}

body:not(.admin-page) .preview-topbar {
  position: fixed;
  inset: 0 0 auto;
}

@media (min-width: 761px) {
  body:not(.admin-page) .sidebar-stack {
    position: sticky;
    top: 74px;
  }
}

@media (max-width: 760px) {
  body:not(.admin-page) {
    padding-bottom: 76px;
  }

  body:not(.admin-page) .preview-content-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  body:not(.admin-page) .sidebar-stack {
    position: static;
    min-width: 0;
  }

  body:not(.admin-page) .preview-page-frame {
    width: min(100% - 24px, 1180px);
    padding: 12px 0 90px;
  }

  body:not(.admin-page) .preview-main-stack {
    display: contents;
  }

  body:not(.admin-page) .preview-main-stack > * {
    order: 3;
  }

  body:not(.admin-page) .preview-main-stack > .listing-overview {
    order: 1;
  }

  body:not(.admin-page) .sidebar-stack {
    order: 2;
  }

  body:not(.admin-page) .sidebar-stack .contact-panel {
    display: none;
  }

  body:not(.admin-page) .mobile-contact-bar {
    position: fixed;
    right: 12px;
    bottom: 12px;
    left: 12px;
    z-index: 10;
    display: grid;
    grid-template-columns: 1fr 0.72fr;
    gap: 8px;
    padding: 8px;
    border: 1px solid var(--listing-line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 30px rgba(10, 10, 10, 0.16);
  }

  body:not(.admin-page) .mobile-contact-bar .button,
  body:not(.admin-page) .mobile-contact-bar button {
    width: 100%;
    min-height: 42px;
    font-size: 12px;
  }
}

/* Office Database comparison list and private Listing Library */
.inventory-page,
.library-page,
.clients-page {
  min-height: 100vh;
  background: #f4f4f1;
  color: #0a0a0a;
  font-family: Arial, Helvetica, sans-serif;
}

.inventory-page .topbar,
.library-page .topbar,
.clients-page .topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  min-height: 58px;
  padding: 14px max(24px, calc((100vw - 1400px) / 2));
  background: #000;
  color: #fff;
}

.admin-page .brand,
.inventory-page .brand,
.library-page .brand,
.clients-page .brand {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
}

.inventory-page .nav,
.library-page .nav,
.clients-page .nav {
  letter-spacing: 0;
}

.inventory-page-frame,
.library-page-frame {
  width: min(1400px, calc(100% - 40px));
  margin: 0 auto;
  padding: 38px 0 64px;
}

.inventory-hero,
.library-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 26px;
  border-bottom: 3px solid #0a0a0a;
}

.library-heading h1 {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(44px, 6vw, 76px);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: 0;
}

.inventory-hero h1 {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0;
}

.inventory-eyebrow {
  margin: 0 0 12px;
  color: #666;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.library-heading .inventory-eyebrow {
  margin: 0;
  color: inherit;
  font-size: 17px;
}

.inventory-count,
.library-total {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  white-space: nowrap;
}

.inventory-filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr)) 0 minmax(0, 1fr) 88px;
  gap: 12px;
  align-items: end;
  padding: 22px 0;
  border-bottom: 1px solid #bdbdb7;
}

.inventory-filter-group,
.inventory-order-group {
  display: contents;
}

.inventory-filters label,
.inventory-filter-field,
.library-search {
  gap: 7px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

.inventory-filter-field {
  position: relative;
  display: grid;
  min-width: 0;
  text-transform: uppercase;
}

.inventory-sort-filter::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: -12.5px;
  width: 1px;
  background: #bdbdb7;
  content: "";
}

.inventory-sort-filter {
  grid-column: 7;
}

.inventory-clear {
  grid-column: 8;
}

.inventory-filters input,
.inventory-filters select,
.library-search input {
  min-height: 44px;
  border-color: #bdbdb7;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
}

.inventory-multiselect,
.inventory-single-select {
  position: relative;
  min-width: 0;
}

.inventory-multiselect summary,
.inventory-single-select summary {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 38px 0 12px;
  overflow: hidden;
  border: 1px solid #bdbdb7;
  background: #fff;
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
  cursor: pointer;
  list-style: none;
}

.inventory-multiselect summary::-webkit-details-marker,
.inventory-single-select summary::-webkit-details-marker {
  display: none;
}

.inventory-multiselect summary::after,
.inventory-single-select summary::after {
  position: absolute;
  right: 15px;
  width: 7px;
  height: 7px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  content: "";
  transform: translateY(-2px) rotate(45deg);
}

.inventory-multiselect[open] summary,
.inventory-single-select[open] summary {
  border-color: #0a0a0a;
}

.inventory-multiselect[open] summary::after,
.inventory-single-select[open] summary::after {
  transform: translateY(2px) rotate(225deg);
}

.inventory-filter-select-source[hidden] {
  display: none;
}

.inventory-single-select-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 50;
  width: 100%;
  max-height: 280px;
  overflow-y: auto;
  border: 1px solid #0a0a0a;
  background: #fff;
  box-shadow: 0 10px 24px rgba(10, 10, 10, 0.14);
}

.inventory-single-select-option {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border: 0;
  background: #fff;
  color: #0a0a0a;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.25;
  text-align: left;
  text-transform: none;
  cursor: pointer;
}

.inventory-single-select-option:hover,
.inventory-single-select-option:focus-visible {
  outline: none;
  background: #e5e5e1;
}

.inventory-single-select-option.is-selected {
  background: #efefec;
  font-weight: 800;
}

.inventory-multiselect-menu {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  z-index: 40;
  width: max-content;
  min-width: 100%;
  max-width: min(320px, calc(100vw - 32px));
  max-height: 260px;
  overflow-y: auto;
  padding: 7px;
  border: 1px solid #0a0a0a;
  background: #fff;
  box-shadow: 0 10px 24px rgba(10, 10, 10, 0.14);
}

.inventory-multiselect-menu .inventory-neighborhood-option {
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: 7px 8px;
  gap: 10px;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
  cursor: pointer;
}

.inventory-multiselect-menu .inventory-neighborhood-option:hover {
  background: #efefec;
}

.inventory-multiselect-menu .inventory-neighborhood-option input {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  min-height: 0;
  margin: 0;
  accent-color: #0a0a0a;
}

.inventory-filter-empty {
  margin: 0;
  padding: 8px;
  color: #666;
  font-size: 13px;
  font-weight: 400;
  text-transform: none;
  white-space: nowrap;
}

.inventory-clear {
  width: 88px;
  min-height: 44px;
  padding: 0 14px;
  border-color: #0a0a0a;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.comparison-list {
  margin-top: 22px;
  border-top: 1px solid #0a0a0a;
}

.comparison-row {
  display: grid;
  grid-template-columns: clamp(360px, 30vw, 420px) minmax(0, 1fr);
  gap: 32px;
  align-items: stretch;
}

.comparison-row {
  min-height: 250px;
  padding: 24px 18px;
  border-bottom: 1px solid #cfcfca;
  background: #fff;
  transition: background 120ms ease;
}

.comparison-row:hover {
  background: #fafaf8;
}

.comparison-photo {
  position: relative;
  aspect-ratio: 3 / 2;
  align-self: start;
  overflow: hidden;
  background: #e9e9e4;
  color: #666;
}

.comparison-photo-link {
  display: block;
  width: 100%;
  height: 100%;
}

.comparison-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.comparison-photo-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.comparison-photo-next {
  position: absolute;
  top: 50%;
  right: 10px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 50px;
  padding: 0 0 4px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  background: rgba(10, 10, 10, 0.78);
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 34px;
  font-weight: 400;
  line-height: 1;
  cursor: pointer;
  transform: translateY(-50%);
}

.comparison-photo-next:hover,
.comparison-photo-next:focus-visible {
  outline: none;
  background: #0a0a0a;
}

.comparison-photo-next:focus-visible {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #0a0a0a;
}

.comparison-photo-count {
  position: absolute;
  right: 10px;
  bottom: 10px;
  min-width: 48px;
  padding: 6px 8px;
  background: rgba(10, 10, 10, 0.78);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
}

.comparison-card-content {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.comparison-card-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 24px;
}

.comparison-location {
  min-width: 0;
}

.comparison-location h2 {
  margin: 0 0 8px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: 0;
}

.comparison-location h2 a {
  text-decoration: none;
}

.comparison-location h2 a:hover {
  text-decoration: underline;
}

.comparison-address,
.comparison-description {
  margin: 0;
  line-height: 1.4;
}

.comparison-address {
  font-size: 17px;
  font-weight: 700;
}

.comparison-description {
  display: -webkit-box;
  margin-top: 14px;
  overflow: hidden;
  color: #666;
  font-size: 16px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.comparison-type {
  flex: 0 0 auto;
  margin: 3px 0 0;
  color: #666;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  white-space: nowrap;
}

.comparison-card-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 28px;
  align-items: end;
  margin-top: 32px;
}

.comparison-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.comparison-fact {
  min-width: 0;
  margin: 0;
}

.comparison-fact dt {
  display: block;
  margin-bottom: 8px;
  color: #666;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.comparison-fact dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.3;
}

.comparison-empty-value {
  color: #999;
  font-weight: 500;
}

.comparison-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 18px;
  border: 1px solid #0a0a0a;
  background: #0a0a0a;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
}

.inventory-empty {
  padding: 64px 24px;
  border-bottom: 1px solid #cfcfca;
  background: #fff;
  text-align: center;
}

.inventory-empty h2 {
  margin-bottom: 8px;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 900;
  letter-spacing: 0;
}

.inventory-empty p {
  margin: 0;
  color: #666;
}

.inventory-footer {
  margin-top: 32px;
  padding-top: 18px;
  border-top: 1px solid #c8c8c2;
}

.inventory-footer .listing-disclaimer {
  max-width: 980px;
  margin: 0;
  color: #60605c;
}

.library-controls {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 0;
  border-bottom: 1px solid #bdbdb7;
}

.library-tabs {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
}

.library-tabs button {
  min-height: 44px;
  border-color: #0a0a0a;
  border-right: 0;
  background: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.library-tabs button:last-child {
  border-right: 1px solid #0a0a0a;
}

.library-tabs button.is-active {
  background: #0a0a0a;
  color: #fff;
}

.library-tabs span {
  margin-left: 6px;
  opacity: 0.65;
}

.library-search {
  width: min(340px, 100%);
}

.library-notice {
  min-height: 20px;
  margin: 14px 0 0;
  color: #176b41;
  font-size: 13px;
  font-weight: 700;
}

.library-list {
  margin-top: 8px;
  border-top: 1px solid #0a0a0a;
}

.library-row {
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) minmax(360px, 1.7fr) auto;
  gap: 24px;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #cfcfca;
  background: #fff;
}

.library-primary h2 {
  margin: 8px 0 4px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0;
}

.library-primary p {
  margin: 0;
  color: #666;
  font-size: 14px;
}

.library-status {
  display: inline-block;
  padding: 5px 7px;
  border: 1px solid #0a0a0a;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.library-status--available {
  border-color: #176b41;
  color: #176b41;
}

.library-status--unavailable {
  border-color: #777;
  color: #666;
}

.library-status--draft {
  background: #efefe9;
}

.library-metadata {
  display: grid;
  grid-template-columns: repeat(3, minmax(100px, 1fr));
  gap: 20px;
  margin: 0;
}

.library-metadata dt {
  margin-bottom: 5px;
  color: #666;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.library-metadata dd {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
}

.library-actions {
  display: flex;
  justify-content: end;
  gap: 8px;
}

.library-actions button {
  min-height: 40px;
  padding: 0 12px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .inventory-filters {
    grid-template-columns: repeat(2, minmax(0, calc((100% - 24px) / 3))) 0 minmax(0, calc((100% - 24px) / 3 - 96px)) 72px;
    gap: 16px 12px;
  }

  .inventory-filter-group,
  .inventory-order-group {
    display: contents;
  }

  .inventory-location-filter {
    grid-area: 1 / 1;
  }

  .inventory-size-filter {
    grid-area: 1 / 2;
  }

  .inventory-rent-filter {
    grid-area: 1 / 3 / auto / 6;
  }

  .inventory-term-filter {
    grid-area: 2 / 1;
  }

  .inventory-type-filter {
    grid-area: 2 / 2;
  }

  .inventory-sort-filter {
    grid-area: 2 / 4;
  }

  .inventory-sort-filter::before {
    display: block;
  }

  .inventory-clear {
    grid-area: 2 / 5;
    width: 72px;
    padding-right: 10px;
    padding-left: 10px;
  }
}

@media (max-width: 1280px) {
  .comparison-row {
    grid-template-columns: clamp(320px, 34vw, 400px) minmax(0, 1fr);
    gap: 24px;
  }

  .comparison-card-footer {
    grid-template-columns: minmax(0, 1fr) 160px;
    gap: 20px;
    margin-top: 28px;
  }
}

@media (max-width: 1120px) {
  .comparison-row {
    grid-template-columns: clamp(280px, 36vw, 360px) minmax(0, 1fr);
    gap: 22px;
  }

  .comparison-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 24px;
  }

  .comparison-location h2 {
    font-size: 22px;
  }

  .library-row {
    grid-template-columns: 1fr;
  }

  .library-actions {
    justify-content: start;
  }
}

@media (max-width: 900px) {
  .comparison-row {
    grid-template-columns: minmax(250px, 38%) minmax(0, 1fr);
    gap: 20px;
  }

  .comparison-card-footer {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-top: 24px;
  }

  .comparison-action {
    width: 100%;
  }
}

@media (max-width: 700px) {
  .admin-page .nav,
  .library-page .nav,
  .clients-page .nav {
    gap: 12px 18px;
  }

  .admin-page .nav .nav-database,
  .library-page .nav .nav-database,
  .clients-page .nav .nav-database {
    padding-left: 0;
    border-left: 0;
  }

  .inventory-page .topbar,
  .library-page .topbar,
  .clients-page .topbar {
    position: static;
  }

  .inventory-page-frame,
  .library-page-frame {
    width: min(100% - 24px, 1400px);
    padding: 24px 0 42px;
  }

  .inventory-hero,
  .library-heading,
  .library-controls {
    display: grid;
    align-items: start;
  }

  .library-heading h1 {
    font-size: 44px;
  }

  .inventory-filters {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .inventory-filter-group {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    align-items: end;
  }

  .inventory-location-filter,
  .inventory-size-filter,
  .inventory-rent-filter,
  .inventory-term-filter,
  .inventory-type-filter,
  .inventory-sort-filter,
  .inventory-clear {
    grid-area: auto;
  }

  .inventory-order-group {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 72px;
    gap: 12px;
    align-items: end;
    padding-top: 18px;
    border-top: 1px solid #bdbdb7;
  }

  .inventory-sort-filter::before {
    display: none;
  }

  .inventory-clear {
    width: 72px;
  }

  .comparison-row {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px;
  }

  .comparison-photo {
    width: 100%;
  }

  .comparison-card-heading {
    gap: 16px;
  }

  .comparison-location h2 {
    font-size: 22px;
  }

  .comparison-address {
    font-size: 15px;
  }

  .comparison-description {
    margin-top: 14px;
    font-size: 14px;
    -webkit-line-clamp: 3;
  }

  .comparison-type {
    font-size: 12px;
  }

  .comparison-card-footer {
    margin-top: 0;
    padding-top: 18px;
  }

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

  .library-tabs button,
  .library-tabs button:last-child {
    width: 100%;
    border: 1px solid #0a0a0a;
  }

  .library-search {
    width: 100%;
  }

  .library-row {
    padding: 16px;
  }

  .library-metadata {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .library-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .library-actions button {
    width: 100%;
  }
}

/* Laptop-first Listing Library rows */
.library-row {
  grid-template-columns: 132px minmax(180px, 1fr) minmax(250px, 1.35fr) 118px;
  gap: 16px;
  padding: 16px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: background-color 120ms ease;
}

.library-row:hover {
  background: #f5f5f1;
}

.library-row:focus-visible {
  outline: 2px solid #0a0a0a;
  outline-offset: -2px;
}

.library-thumbnail {
  aspect-ratio: 3 / 2;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #e9e9e4;
  color: #666;
}

.library-thumbnail img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.library-thumbnail-fallback {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.library-title-line {
  display: flex;
  align-items: center;
  min-width: 0;
}

.library-primary h2 {
  min-width: 0;
  margin: 0 0 4px;
  font-size: 17px;
}

.library-status-rail {
  position: absolute;
  inset: 0 auto 0 0;
  width: 7px;
  background: #9a9a94;
}

.library-row--available .library-status-rail {
  background: #28a45f;
}

.library-row--aging .library-status-rail {
  background: #e3b72f;
}

.library-row--expired .library-status-rail {
  background: #d43d3d;
}

.library-metadata {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  align-self: stretch;
}

.library-metadata > div {
  display: grid;
  align-content: center;
  min-width: 0;
  padding: 0 16px;
  border-left: 1px solid #deded9;
}

.library-metadata > div:first-child {
  border-left: 0;
}

.library-metadata dt {
  margin-bottom: 7px;
  line-height: 1;
  white-space: nowrap;
}

.library-metadata dd {
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  white-space: nowrap;
}

.library-actions {
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
}

.library-actions button {
  width: 100%;
  white-space: normal;
}

@media (max-width: 900px) {
  .library-row {
    grid-template-columns: 116px minmax(160px, 1fr) minmax(230px, 1.35fr) 108px;
    gap: 12px;
    padding: 14px;
  }

  .library-primary h2 {
    font-size: 17px;
  }

  .library-metadata {
    gap: 0;
  }

  .library-metadata > div {
    padding: 0 10px;
  }

  .library-metadata dd {
    font-size: 12px;
  }
}

@media (max-width: 820px) {
  .library-row {
    grid-template-columns: 120px minmax(0, 1fr);
  }

  .library-thumbnail {
    grid-row: 1 / span 3;
  }

  .library-primary,
  .library-metadata,
  .library-actions {
    grid-column: 2;
  }

  .library-actions {
    flex-direction: row;
    justify-content: start;
  }

  .library-actions button {
    width: auto;
  }
}

@media (max-width: 620px) {
  .library-row {
    grid-template-columns: 1fr;
  }

  .library-thumbnail,
  .library-primary,
  .library-metadata,
  .library-actions {
    grid-column: 1;
  }

  .library-thumbnail {
    grid-row: auto;
    width: min(240px, 100%);
  }

  .library-metadata {
    grid-template-columns: 1fr;
  }

  .library-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .library-actions button {
    width: 100%;
  }
}

/* Listing Library map view */
.library-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 320px) minmax(200px, 240px) auto;
  align-items: end;
}

.library-controls > .library-tabs {
  grid-column: 1 / 3;
  grid-row: 1;
}

.library-type-filter {
  grid-column: 3 / -1;
  grid-row: 1;
  display: flex;
  align-items: end;
  justify-self: end;
  gap: 10px;
}

.library-type-label {
  padding-bottom: 14px;
  color: #666;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.library-type-tabs {
  display: flex;
}

.library-type-tabs button {
  min-height: 44px;
  border: 1px solid #0a0a0a;
  border-right: 0;
  background: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.library-type-tabs button:last-child {
  border-right: 1px solid #0a0a0a;
}

.library-type-tabs button.is-active {
  background: #0a0a0a;
  color: #fff;
}

.library-controls > .library-search {
  grid-column: 1 / 3;
  grid-row: 2;
  width: 100%;
}

.library-sort {
  grid-column: 3;
  grid-row: 2;
  width: 100%;
}

.library-view-switch {
  grid-column: 4;
  grid-row: 2;
  display: grid;
  grid-template-columns: repeat(2, 72px);
  align-self: end;
}

.library-view-switch button {
  width: 100%;
  min-height: 44px;
  border: 1px solid #0a0a0a;
  background: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.library-view-switch button + button {
  border-left: 0;
}

.library-view-switch button.is-active {
  background: #0a0a0a;
  color: #fff;
}

.library-map-view[hidden] {
  display: none;
}

.library-map-view {
  display: grid;
  grid-template-columns: minmax(340px, 0.72fr) minmax(520px, 1.35fr);
  gap: 18px;
  height: max(560px, calc(100vh - 270px));
  max-height: 760px;
  margin-top: 8px;
}

.library-map-results {
  min-width: 0;
  overflow-y: auto;
  border-top: 1px solid #0a0a0a;
  border-bottom: 1px solid #cfcfca;
  background: #fff;
  scrollbar-gutter: stable;
}

.library-map-row {
  position: relative;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-width: 0;
  padding: 14px;
  overflow: hidden;
  border-bottom: 1px solid #cfcfca;
  background: #fff;
  cursor: pointer;
  transition: background-color 120ms ease, box-shadow 120ms ease;
}

.library-map-row:hover,
.library-map-row.is-selected {
  background: #f3f3ee;
}

.library-map-row.is-selected {
  box-shadow: inset 0 0 0 2px #0a0a0a;
}

.library-map-row:focus-visible {
  outline: 2px solid #0a0a0a;
  outline-offset: -2px;
}

.library-map-thumbnail {
  display: grid;
  place-items: center;
  width: 104px;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #e9e9e4;
}

.library-map-thumbnail img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.library-map-primary {
  min-width: 0;
}

.library-map-primary h2 {
  margin: 0 0 3px;
  overflow-wrap: anywhere;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: 0;
}

.library-map-primary > p {
  margin: 0;
  color: #666;
  font-size: 12px;
  line-height: 1.25;
}

.library-map-primary dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 8px;
}

.library-map-primary dl div {
  min-width: 0;
}

.library-map-primary dt {
  margin-bottom: 3px;
  color: #666;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.library-map-primary dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.library-map-location-state {
  color: #176b41;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.library-map-location-state.is-missing {
  color: #8a6b00;
}

.library-map-actions {
  grid-column: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.library-map-actions button,
.library-map-actions .button {
  display: inline-grid;
  place-items: center;
  min-height: 34px;
  padding: 0 9px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.library-map-empty {
  display: grid;
  gap: 7px;
  padding: 28px 20px;
  color: #666;
  font-size: 13px;
}

.library-map-empty strong {
  color: #0a0a0a;
  font-size: 15px;
}

.library-map-panel {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  border: 1px solid #0a0a0a;
  background: #e9e9e4;
}

.library-map {
  width: 100%;
  min-height: 0;
}

.library-map-status {
  min-height: 38px;
  margin: 0;
  padding: 10px 12px;
  border-top: 1px solid #cfcfca;
  background: #fff;
  color: #555;
  font-size: 11px;
  font-weight: 700;
}

.library-map-marker {
  width: 20px;
  height: 20px;
  padding: 0;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #28a45f;
  box-shadow: 0 0 0 1px #0a0a0a, 0 2px 5px rgb(0 0 0 / 28%);
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.library-map-marker--aging {
  background: #e3b72f;
}

.library-map-marker:hover,
.library-map-marker:focus-visible,
.library-map-marker.is-selected {
  z-index: 2;
  transform: scale(1.35);
  box-shadow: 0 0 0 2px #0a0a0a, 0 3px 8px rgb(0 0 0 / 34%);
  outline: 0;
}

@media (max-width: 1120px) {
  .library-controls {
    grid-template-columns: minmax(0, 1fr) minmax(200px, 240px) auto;
  }

  .library-controls > .library-tabs {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .library-type-filter {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: start;
  }

  .library-search {
    grid-column: 1;
    grid-row: 3;
    margin-top: 14px;
  }

  .library-sort {
    grid-column: 2;
    grid-row: 3;
  }

  .library-view-switch {
    grid-column: 3;
    grid-row: 3;
  }

  .library-map-view {
    grid-template-columns: minmax(320px, 0.8fr) minmax(430px, 1.2fr);
  }

  .library-map-row {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .library-map-thumbnail {
    width: 88px;
  }
}

@media (max-width: 820px) {
  .library-map-view {
    grid-template-columns: 1fr;
    height: auto;
    max-height: none;
  }

  .library-map-panel {
    grid-row: 1;
    min-height: 430px;
  }

  .library-map-results {
    grid-row: 2;
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 700px) {
  .library-controls {
    grid-template-columns: 1fr;
  }

  .library-controls > .library-tabs,
  .library-type-filter,
  .library-search,
  .library-sort,
  .library-view-switch {
    grid-column: 1;
    grid-row: auto;
  }

  .library-type-filter {
    display: grid;
    grid-template-columns: 1fr;
    justify-self: stretch;
    margin-top: 12px;
  }

  .library-type-label {
    padding-bottom: 0;
  }

  .library-type-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .library-type-tabs button,
  .library-type-tabs button:last-child {
    width: 100%;
    border: 1px solid #0a0a0a;
  }

  .library-search {
    margin-top: 12px;
  }

  .library-view-switch {
    grid-template-columns: repeat(2, 1fr);
    width: 100%;
    margin-top: 12px;
  }

  .library-map-panel {
    min-height: 360px;
  }
}

@media (max-width: 460px) {
  .library-map-row {
    grid-template-columns: 82px minmax(0, 1fr);
    padding: 12px;
  }

  .library-map-thumbnail {
    width: 82px;
  }
}

/* Compact Listing Library map cards */
.library-map-row {
  grid-template-columns: 112px minmax(0, 1fr) 68px;
  grid-template-rows: auto auto;
  gap: 15px 16px;
  padding: 16px;
}

.library-map-thumbnail {
  width: 112px;
}

.library-map-primary {
  grid-column: 2 / -1;
}

.library-map-facts {
  grid-column: 1 / 3;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-self: center;
  margin: 0;
  padding: 0 12px;
}

.library-map-facts div {
  min-width: 0;
}

.library-map-facts dt {
  margin-bottom: 4px;
  color: #666;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.library-map-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
}

.library-map-actions {
  grid-column: 3;
  grid-row: 2;
  display: block;
  align-self: center;
}

.library-map-actions .button {
  width: 100%;
  min-height: 44px;
}

@media (max-width: 1120px) {
  .library-map-row {
    grid-template-columns: 96px minmax(0, 1fr) 64px;
    gap: 13px;
  }

  .library-map-thumbnail {
    width: 96px;
  }
}

@media (max-width: 460px) {
  .library-map-row {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .library-map-thumbnail {
    width: 82px;
  }

  .library-map-primary {
    grid-column: 2;
  }

  .library-map-facts {
    grid-column: 1 / -1;
  }

  .library-map-actions {
    grid-column: 1 / -1;
    grid-row: 3;
  }
}


/* Consolidated Listing Library toolbar */
.library-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  padding: 18px 0 20px;
}

.library-filter-row {
  grid-column: 1;
  display: flex;
  width: 100%;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  min-width: 0;
}

.library-filter-group {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.library-status-filter {
  flex: 1 1 auto;
}

.library-type-filter {
  grid-column: auto;
  grid-row: auto;
  display: grid;
  align-items: stretch;
  justify-self: auto;
  gap: 7px;
}

.library-filter-label,
.library-search,
.library-sort {
  color: #0a0a0a;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: uppercase;
}

.library-tabs,
.library-type-tabs {
  display: flex;
  flex-wrap: nowrap;
}

.library-tabs button,
.library-type-tabs button {
  width: auto;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid #0a0a0a;
  border-right: 0;
  background: #fff;
  color: #0a0a0a;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  white-space: nowrap;
}

.library-tabs button:last-child,
.library-type-tabs button:last-child {
  border-right: 1px solid #0a0a0a;
}

.library-tabs button.is-active,
.library-type-tabs button.is-active {
  background: #0a0a0a;
  color: #fff;
}

.library-tools-row {
  grid-column: 1;
  display: grid;
  grid-template-columns: minmax(250px, 1fr) minmax(190px, 230px) minmax(220px, 270px) 148px;
  width: 100%;
  align-items: end;
  gap: 14px;
}

.library-controls .library-search,
.library-controls .library-client-filter,
.library-controls .library-sort {
  grid-column: auto;
  grid-row: auto;
  display: grid;
  gap: 7px;
  width: 100%;
  margin: 0;
}

.library-controls .library-search input,
.library-controls .library-client-filter select,
.library-controls .library-sort select {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid #bdbdb7;
  border-radius: 0;
  background: #fff;
  color: #0a0a0a;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}

.library-client-filter {
  color: #0a0a0a;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: uppercase;
}

.library-primary .library-row-clients {
  margin-top: 7px;
  color: #595956;
  font-size: 11px;
  line-height: 1.3;
}

.library-row-clients strong {
  color: #0a0a0a;
  text-transform: uppercase;
}

.library-row-clients a {
  color: #242423;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.library-row-clients a:hover,
.library-row-clients a:focus-visible {
  color: #000;
  text-decoration-thickness: 2px;
}

.library-view-control {
  display: grid;
  gap: 7px;
}

.library-view-switch {
  grid-column: auto;
  grid-row: auto;
  display: grid;
  grid-template-columns: repeat(2, 74px);
  align-self: auto;
}

.library-view-switch button {
  min-height: 44px;
}

@media (max-width: 900px) {
  .library-filter-row {
    display: grid;
    justify-content: stretch;
  }

  .library-status-filter,
  .library-type-filter {
    width: 100%;
  }

  .library-tools-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) 148px;
  }

  .library-controls .library-search {
    grid-column: 1 / 3;
  }

  .library-controls .library-client-filter {
    grid-column: 3;
  }

  .library-controls .library-sort {
    grid-column: 1 / 3;
  }

  .library-view-control {
    grid-column: 3;
  }
}

@media (max-width: 760px) {
  .library-controls {
    gap: 16px;
  }

  .library-tools-row {
    grid-template-columns: minmax(0, 1fr) 148px;
  }

  .library-controls .library-search {
    grid-column: 1 / -1;
  }

  .library-controls .library-client-filter {
    grid-column: 1;
  }

  .library-controls .library-sort {
    grid-column: 1 / -1;
  }

  .library-view-control {
    grid-column: 2;
  }
}

@media (max-width: 520px) {
  .library-tabs,
  .library-type-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .library-tabs button,
  .library-tabs button:last-child,
  .library-type-tabs button,
  .library-type-tabs button:last-child {
    width: 100%;
    border: 1px solid #0a0a0a;
  }

  .library-tools-row {
    grid-template-columns: 1fr;
  }

  .library-controls .library-search,
  .library-controls .library-client-filter,
  .library-controls .library-sort,
  .library-view-control {
    grid-column: 1;
  }

  .library-view-switch {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Protected publisher access */
body.auth-pending .protected-app,
body.auth-required .protected-app {
  display: none;
}

.auth-page[hidden] {
  display: none;
}

.auth-page {
  width: min(100% - 48px, 680px);
  margin: 72px auto;
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}

.auth-panel {
  border-top: 4px solid #0a0a0a;
  border-bottom: 1px solid #bdbdb7;
  padding: 34px 0 38px;
}

.auth-eyebrow {
  margin: 0 0 12px;
  color: #6a6a66;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.auth-panel h1 {
  margin: 0 0 12px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: 0;
}

.auth-panel > p:not(.auth-eyebrow):not(.auth-message) {
  margin: 0;
  color: #5f5f5b;
  font-size: 16px;
  line-height: 1.5;
}

.auth-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
  margin-top: 26px;
}

.auth-code-step {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
}

.auth-code-step[hidden] {
  display: none;
}

.auth-code-instructions {
  grid-column: 1 / -1;
  margin: 4px 0 0;
  color: #5f5f5b;
  font-size: 14px;
  line-height: 1.45;
}

.auth-form label {
  display: grid;
  gap: 8px;
  color: #0a0a0a;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.auth-form input,
.auth-form button {
  min-height: 52px;
  border: 1px solid #8d8d88;
  border-radius: 0;
  font: 700 15px/1 Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}

.auth-form input {
  width: 100%;
  padding: 0 16px;
  background: #fff;
  font-weight: 500;
}

.auth-form button {
  padding: 0 22px;
  background: #fff;
  color: #0a0a0a;
  cursor: pointer;
  text-transform: uppercase;
}

.auth-form button:hover,
.auth-form button:focus-visible {
  background: #0a0a0a;
  color: #fff;
}

.auth-message {
  min-height: 20px;
  margin: 16px 0 0;
  color: #3f3f3c;
  font-size: 14px;
  line-height: 1.4;
}

.nav-sign-out {
  padding: 0 0 0 22px;
  border: 0;
  border-left: 3px solid #777;
  border-radius: 0;
  background: transparent;
  color: #aaa;
  font: inherit;
  letter-spacing: 0;
  text-transform: uppercase;
  cursor: pointer;
}

.nav-sign-out[hidden] {
  display: block !important;
  visibility: hidden;
  pointer-events: none;
}

html.auth-session-known body.auth-pending .nav-sign-out[hidden] {
  visibility: visible;
}

.nav-sign-out:hover,
.nav-sign-out:focus-visible {
  color: #fff;
}

@media (max-width: 620px) {
  .auth-page {
    width: min(100% - 32px, 680px);
    margin-top: 44px;
  }

  .auth-form {
    grid-template-columns: 1fr;
  }

  .auth-code-step {
    grid-template-columns: 1fr;
  }

  .auth-form button,
  .auth-code-step button {
    width: 100%;
  }
}

/* Client directory and shortlist management */
.clients-page-frame {
  width: min(1400px, calc(100% - 40px));
  margin: 0 auto;
  padding: 38px 0 64px;
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}

.clients-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 26px;
  border-bottom: 3px solid #0a0a0a;
}

.clients-heading .inventory-eyebrow {
  margin-bottom: 8px;
}

.clients-heading h1 {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 32px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: 0;
}

.clients-total {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
}

.clients-workspace {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  min-height: 680px;
  border-bottom: 1px solid #c8c8c2;
}

.client-directory {
  border-right: 1px solid #bdbdb7;
  background: #efefeb;
}

.client-directory-tools {
  display: grid;
  gap: 12px;
  padding: 24px 20px;
  border-bottom: 1px solid #bdbdb7;
}

.client-directory-tools label,
.client-record-form label,
.client-share-controls label,
.match-dialog-controls > label {
  display: grid;
  gap: 7px;
  color: #0a0a0a;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.client-directory-tools input,
.client-record-form input,
.client-record-form select,
.client-record-form textarea,
.client-share-controls select,
.match-dialog-shell input {
  width: 100%;
  border: 1px solid #aaa9a3;
  border-radius: 0;
  background: #fff;
  color: #0a0a0a;
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}

.client-directory-tools input,
.client-record-form input,
.client-record-form select,
.client-share-controls select,
.match-dialog-shell input {
  min-height: 46px;
  padding: 0 13px;
}

.client-record-form textarea {
  min-height: 108px;
  padding: 12px 13px;
  resize: vertical;
  line-height: 1.45;
}

.client-record-form input::placeholder,
.client-record-form textarea::placeholder {
  color: #777773;
  font-weight: 400;
  opacity: 1;
}

.client-record-form .is-helper-text {
  color: #777773;
  font-weight: 400;
}

.client-record-form select option {
  color: #0a0a0a;
  font-weight: 400;
}

.client-new-button,
.client-record-actions button,
.client-section-heading button,
.client-share-controls button,
.client-share-actions button,
.match-dialog-shell button {
  min-height: 42px;
  border: 1px solid #6e6e69;
  border-radius: 0;
  background: #fff;
  color: #0a0a0a;
  font: 800 12px/1 Arial, Helvetica, sans-serif;
  letter-spacing: 0;
  text-transform: uppercase;
}

.client-new-button:hover,
.client-new-button:focus-visible,
.client-section-heading button:hover,
.client-section-heading button:focus-visible,
.client-share-controls button:hover,
.client-share-controls button:focus-visible,
.client-share-actions button:hover,
.client-share-actions button:focus-visible,
.match-dialog-shell button:hover,
.match-dialog-shell button:focus-visible {
  background: #0a0a0a;
  color: #fff;
}

.client-directory-list {
  display: grid;
}

.client-directory-item {
  position: relative;
  display: grid;
  justify-content: start;
  justify-items: start;
  gap: 4px;
  width: 100%;
  min-height: 108px;
  padding: 17px 42px 17px 20px;
  border: 0;
  border-bottom: 1px solid #c8c8c2;
  border-radius: 0;
  background: transparent;
  color: #0a0a0a;
  text-align: left;
}

.client-directory-code {
  color: #356547;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.client-directory-item::after {
  position: absolute;
  top: 50%;
  right: 18px;
  content: "›";
  font-size: 24px;
  transform: translateY(-50%);
}

.client-directory-item:hover,
.client-directory-item:focus-visible {
  background: #e2e2dd;
}

.client-directory-item.is-active {
  background: #0a0a0a;
  color: #fff;
}

.client-directory-name {
  font-size: 16px;
  font-weight: 800;
}

.client-directory-company,
.client-directory-match-count {
  color: #686864;
  font-size: 12px;
}

.client-directory-item.is-active .client-directory-company,
.client-directory-item.is-active .client-directory-code,
.client-directory-item.is-active .client-directory-match-count {
  color: #cfcfca;
}

.client-directory-empty,
.client-match-empty {
  margin: 0;
  padding: 22px 20px;
  color: #666662;
  font-size: 14px;
  line-height: 1.45;
}

.client-detail {
  min-width: 0;
  padding: 28px 34px 50px;
  background: #f8f8f5;
}

.client-detail-heading,
.client-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.client-detail-heading {
  padding-bottom: 22px;
}

.client-detail-heading h2,
.client-section-heading h3,
.match-dialog-shell h2 {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 800;
  letter-spacing: 0;
}

.client-detail-heading h2,
.match-dialog-shell h2 {
  font-size: 28px;
}

.client-section-heading h3 {
  font-size: 20px;
}

.client-detail-eyebrow {
  margin: 0 0 7px;
  color: #666662;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.client-save-state {
  min-height: 18px;
  margin: 0;
  color: #356547;
  font-size: 13px;
  font-weight: 700;
}

.client-record-form {
  display: grid;
  gap: 16px;
  padding: 24px;
  border: 1px solid #bdbdb7;
  background: #fff;
}

.client-record-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.client-requirements-fields {
  display: grid;
  gap: 18px;
  margin-top: 4px;
  padding-top: 22px;
  border-top: 3px solid #0a0a0a;
}

.client-requirements-fields > header h3 {
  margin: 0;
  font: 800 19px/1.15 Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}

.client-requirements-fields > header p {
  margin: 6px 0 0;
  color: #686864;
  font-size: 13px;
}

.client-requirement-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.client-requirement-group {
  display: grid;
  gap: 14px;
}

.client-requirement-group > h4 {
  margin: 0;
  padding-bottom: 8px;
  border-bottom: 1px solid #d0d0ca;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.client-requirement-options {
  margin: 0;
  padding: 16px 0 0;
  border: 0;
  border-top: 1px solid #d0d0ca;
}

.client-requirement-options legend {
  padding: 0 0 9px;
  color: #0a0a0a;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.client-checkbox-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px 16px;
}

.client-space-features {
  grid-column: 1 / span 2;
}

.client-checkbox-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  font-size: 13px;
  font-weight: 700;
  text-transform: none;
}

.client-checkbox-options input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.client-location-entry {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  min-height: 52px;
  padding: 7px;
  border: 1px solid #bdbdb7;
  background: #fff;
}

.client-location-entry:focus-within {
  border-color: #0a0a0a;
  box-shadow: inset 0 0 0 1px #0a0a0a;
}

.client-location-tags {
  display: contents;
}

.client-location-tag {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  min-height: 34px;
  padding: 0 4px 0 11px;
  border: 1px solid #a8a8a2;
  background: #f0f0ec;
  font-size: 12px;
  font-weight: 800;
}

.client-location-tag button {
  display: inline-grid;
  place-items: center;
  width: 27px;
  min-width: 27px;
  height: 27px;
  min-height: 27px;
  padding: 0;
  border: 0;
  background: transparent;
  font: 700 18px/1 Arial, Helvetica, sans-serif;
}

.client-location-tag button:hover,
.client-location-tag button:focus-visible {
  background: #0a0a0a;
  color: #fff;
}

.client-location-entry > input {
  flex: 1 1 190px;
  width: auto;
  min-width: 150px;
  height: 36px;
  min-height: 36px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.client-location-entry > input:focus {
  outline: 0;
}

.client-requirement-empty {
  color: #686864;
  font-size: 13px;
}

.client-record-actions {
  display: flex;
  gap: 12px;
  padding-top: 4px;
}

.client-record-actions button {
  padding: 0 22px;
}

.client-record-actions .client-save-button {
  border-color: #1c6f42;
}

.client-record-actions .client-save-button:hover,
.client-record-actions .client-save-button:focus-visible {
  background: #1c6f42;
  color: #fff;
}

.client-record-actions .client-archive-button:hover,
.client-record-actions .client-archive-button:focus-visible,
.client-share-actions .is-danger:hover,
.client-share-actions .is-danger:focus-visible {
  border-color: #9e2e26;
  background: #9e2e26;
  color: #fff;
}

.client-archive-button[hidden] {
  display: none !important;
}

.client-recommendations,
.client-matches,
.client-sharing {
  margin-top: 32px;
  padding-top: 25px;
  border-top: 3px solid #0a0a0a;
}

.client-sharing {
  border-top-width: 1px;
}

.client-section-heading p {
  margin: 6px 0 0;
  color: #686864;
  font-size: 13px;
}

.client-section-heading button {
  padding: 0 18px;
}

.client-section-heading button:disabled,
.client-share-controls button:disabled {
  border-color: #c6c6c1;
  background: #ededE9;
  color: #999994;
  cursor: default;
}

.client-recommendation-list,
.client-match-list,
.client-share-list {
  margin-top: 18px;
  border-top: 1px solid #bdbdb7;
}

.client-recommendation-row {
  display: grid;
  grid-template-columns: 76px minmax(170px, 1fr) minmax(260px, 1.2fr) minmax(190px, 1fr) 142px;
  gap: 18px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid #d0d0ca;
}

.client-match-score {
  display: grid;
  place-items: center;
  align-content: center;
  width: 76px;
  height: 64px;
  border: 2px solid #777772;
  background: #fff;
}

.client-match-score strong {
  font-size: 20px;
  line-height: 1;
}

.client-match-score span {
  margin-top: 5px;
  color: #686864;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.client-match-score.is-strong,
.client-match-score.is-good {
  border-color: #1c6f42;
  color: #1c6f42;
}

.client-match-score.is-near {
  border-color: #ae8d16;
  color: #725d0f;
  background: #fbf4cc;
}

.client-recommendation-row dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.client-recommendation-row dl div {
  display: grid;
  gap: 4px;
}

.client-recommendation-row dt {
  color: #72726d;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.client-recommendation-row dd {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
}

.client-match-reasons {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  color: #565652;
  font-size: 11px;
  line-height: 1.3;
  list-style: none;
}

.client-match-reasons li::before {
  margin-right: 6px;
  content: "–";
}

.client-recommendation-row > button {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #6e6e69;
  border-radius: 0;
  background: #fff;
  color: #0a0a0a;
  font: 800 10px/1.2 Arial, Helvetica, sans-serif;
  letter-spacing: 0;
  text-transform: uppercase;
}

.client-recommendation-row > button:hover,
.client-recommendation-row > button:focus-visible {
  background: #0a0a0a;
  color: #fff;
}

.client-recommendation-row > button:disabled {
  border-color: #c6c6c1;
  background: #ededE9;
  color: #8c8c87;
  cursor: default;
}

.client-match-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.2fr) minmax(270px, 1fr) 104px auto;
  gap: 18px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid #d0d0ca;
}

.client-match-identity {
  display: grid;
  gap: 4px;
}

.client-match-identity strong {
  font-size: 16px;
}

.client-match-address {
  color: inherit;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
}

.client-match-address:hover,
.client-match-address:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.client-match-identity span {
  color: #666662;
  font-size: 13px;
}

.client-match-row dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
}

.client-match-row dl div {
  display: grid;
  gap: 4px;
}

.client-match-row dt,
.shortlist-value span {
  color: #72726d;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.client-match-row dd {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
}

.client-match-status {
  display: inline-flex;
  justify-content: center;
  padding: 7px 8px;
  border: 1px solid #8f8f89;
  color: #555551;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.client-match-status.is-available {
  border-color: #5b8e6e;
  color: #1c6f42;
}

.client-match-actions {
  display: flex;
  gap: 12px;
}

.client-match-actions a {
  color: #0a0a0a;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.client-share-controls {
  display: grid;
  grid-template-columns: 170px auto;
  align-items: end;
  gap: 12px;
  margin-top: 20px;
}

.client-share-controls button {
  min-width: 150px;
  padding: 0 18px;
}

.client-share-message {
  min-height: 18px;
  margin: 14px 0 0;
  color: #666662;
  font-size: 13px;
}

.client-share-row {
  display: grid;
  grid-template-columns: minmax(190px, 0.8fr) minmax(260px, 1.5fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid #d0d0ca;
}

.client-share-row > div:first-child {
  display: grid;
  gap: 4px;
}

.client-share-row span {
  color: #666662;
  font-size: 12px;
}

.client-share-row input {
  min-width: 0;
  height: 40px;
  padding: 0 11px;
  border: 1px solid #bdbdb7;
  background: #fff;
  color: #444440;
  font: 12px/1 Arial, Helvetica, sans-serif;
}

.client-share-row.is-inactive {
  opacity: 0.58;
}

.client-share-actions {
  display: flex;
  gap: 8px;
}

.client-share-actions button {
  min-height: 40px;
  padding: 0 13px;
}

.match-dialog {
  width: min(760px, calc(100% - 32px));
  max-height: min(760px, calc(100vh - 48px));
  padding: 0;
  border: 1px solid #0a0a0a;
  border-radius: 0;
  background: #f8f8f5;
  color: #0a0a0a;
  font-family: Arial, Helvetica, sans-serif;
}

.match-dialog::backdrop {
  background: rgba(0, 0, 0, 0.58);
}

.match-dialog-shell {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 24px;
}

.match-dialog-shell > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.match-dialog-close {
  width: 42px;
  padding: 0;
  font-size: 24px;
}

.match-dialog-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.match-dialog-list {
  max-height: 420px;
  overflow: auto;
  border-top: 1px solid #bdbdb7;
}

.match-save-state {
  min-height: 20px;
  margin: 0;
  color: #666662;
  font-size: 13px;
  font-weight: 600;
}

.match-dialog-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 68px;
  padding: 10px 4px;
  border-bottom: 1px solid #d0d0ca;
  cursor: pointer;
}

.match-dialog-row input {
  width: 20px;
  height: 20px;
}

.match-dialog-row > span {
  display: grid;
  gap: 4px;
  font-size: 13px;
  font-weight: 800;
}

.match-dialog-row small {
  color: #666662;
  font-size: 11px;
  font-weight: 500;
}

.match-dialog-shell .match-save-button {
  min-width: 130px;
  padding: 0 18px;
  border-color: #1c6f42;
}

.match-dialog-shell .match-save-button:hover,
.match-dialog-shell .match-save-button:focus-visible {
  background: #1c6f42;
  color: #fff;
}

/* Public client shortlist */
.shortlist-page {
  min-height: 100vh;
  background: #f4f4f1;
  color: #0a0a0a;
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}

.shortlist-topbar {
  height: 16px;
  background: #000;
}

.shortlist-frame {
  width: min(1400px, calc(100% - 40px));
  margin: 0 auto;
  padding: 40px 0 70px;
}

.shortlist-loading,
.shortlist-invalid {
  padding: 36px 0;
  border-top: 4px solid #0a0a0a;
}

.shortlist-invalid {
  max-width: 760px;
}

.shortlist-invalid h1 {
  margin: 0 0 16px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 36px;
  line-height: 1.1;
  letter-spacing: 0;
}

.shortlist-invalid > p:not(.inventory-eyebrow) {
  color: #60605c;
  font-size: 17px;
  line-height: 1.5;
}

.shortlist-return-button {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  margin-top: 12px;
  padding: 0 18px;
  background: #0a0a0a;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
}

.shortlist-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  padding-bottom: 28px;
  border-bottom: 3px solid #0a0a0a;
}

.shortlist-heading h1 {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 34px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0;
}

.shortlist-meta {
  display: grid;
  gap: 6px;
  text-align: right;
}

.shortlist-meta strong {
  font-size: 18px;
}

.shortlist-expiration {
  margin: 0;
  color: #60605c;
  font-size: 12px;
}

.shortlist-footer {
  margin-top: 32px;
  padding-top: 18px;
  border-top: 1px solid #c8c8c2;
}

.shortlist-footer .listing-disclaimer {
  max-width: 980px;
  margin-top: 8px;
  color: #60605c;
}

.shortlist-table {
  margin-top: 28px;
  border-bottom: 1px solid #c8c8c2;
}

.shortlist-table-header,
.shortlist-row {
  display: grid;
  grid-template-columns: minmax(360px, 2fr) repeat(4, minmax(112px, 0.65fr)) 132px;
  gap: 20px;
  align-items: center;
}

.shortlist-table-header {
  min-height: 46px;
  padding: 0 18px;
  background: #0a0a0a;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.shortlist-row {
  min-height: 178px;
  padding: 20px 18px;
  border-bottom: 1px solid #c8c8c2;
  background: #fff;
}

.shortlist-space {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  min-width: 0;
}

.shortlist-space img,
.shortlist-image-placeholder {
  display: block;
  width: 180px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #deded8;
}

.shortlist-space > div {
  min-width: 0;
}

.shortlist-space strong {
  display: block;
  font-size: 20px;
  line-height: 1.15;
}

.shortlist-space span {
  display: block;
  margin-top: 5px;
  color: #4f4f4c;
  font-size: 14px;
  font-weight: 700;
}

.shortlist-space p {
  display: -webkit-box;
  overflow: hidden;
  margin: 10px 0 0;
  color: #686864;
  font-size: 13px;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.shortlist-value {
  display: grid;
  gap: 7px;
}

.shortlist-value strong {
  font-size: 14px;
  line-height: 1.25;
}

.shortlist-view-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 15px;
  background: #0a0a0a;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
}

.shortlist-view-button:hover,
.shortlist-view-button:focus-visible {
  background: #1c6f42;
}

.shortlist-empty {
  padding: 34px 0;
}

.shortlist-empty h2 {
  margin-bottom: 8px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0;
}

.shortlist-empty p {
  color: #686864;
}

@media (max-width: 1120px) {
  .clients-workspace {
    grid-template-columns: 270px minmax(0, 1fr);
  }

  .client-detail {
    padding-inline: 24px;
  }

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

  .client-recommendation-row {
    grid-template-columns: 76px minmax(0, 1fr) 142px;
  }

  .client-recommendation-row dl,
  .client-match-reasons {
    grid-column: 2 / 4;
    grid-row: auto;
  }

  .client-recommendation-row > button {
    grid-column: 3;
    grid-row: 1;
  }

  .client-match-row {
    grid-template-columns: minmax(180px, 1fr) minmax(240px, 1fr) auto;
  }

  .client-match-status {
    grid-column: 2;
    justify-self: start;
  }

  .client-match-actions {
    grid-column: 3;
    grid-row: 1 / 3;
  }

}

@media (max-width: 820px) {
  .clients-page-frame,
  .shortlist-frame {
    width: min(100% - 24px, 1400px);
  }

  .clients-workspace {
    grid-template-columns: 1fr;
  }

  .client-directory {
    border-right: 0;
    border-bottom: 3px solid #0a0a0a;
  }

  .client-directory-tools {
    grid-template-columns: minmax(0, 1fr) 150px;
    align-items: end;
  }

  .client-directory-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 280px;
    overflow: auto;
  }

  .client-directory-item:nth-child(odd) {
    border-right: 1px solid #c8c8c2;
  }

  .client-record-grid {
    grid-template-columns: 1fr;
  }

  .client-recommendation-row {
    grid-template-columns: 76px minmax(0, 1fr) 142px;
  }

  .client-recommendation-row dl,
  .client-match-reasons {
    grid-column: 2 / 4;
    grid-row: auto;
  }

  .client-recommendation-row > button {
    grid-column: 3;
    grid-row: 1;
  }

  .client-share-row {
    grid-template-columns: 1fr auto;
  }

  .client-share-row input {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .shortlist-heading {
    align-items: start;
  }

  .shortlist-table-header {
    display: none;
  }

  .shortlist-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 24px;
  }

  .shortlist-space {
    grid-column: 1 / -1;
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .shortlist-space img,
  .shortlist-image-placeholder {
    width: 220px;
  }

  .shortlist-view-button {
    grid-column: 2;
    grid-row: auto;
  }
}

@media (max-width: 620px) {
  .clients-heading,
  .client-detail-heading,
  .client-section-heading,
  .shortlist-heading {
    align-items: start;
    flex-direction: column;
  }

  .clients-total,
  .shortlist-meta {
    text-align: left;
  }

  .client-directory-tools,
  .client-directory-list {
    grid-template-columns: 1fr;
  }

  .client-directory-item:nth-child(odd) {
    border-right: 0;
  }

  .client-detail {
    padding: 24px 0 44px;
  }

  .client-record-form {
    padding: 18px 12px;
  }

  .client-requirement-grid,
  .client-checkbox-options {
    grid-template-columns: 1fr;
  }

  .client-space-features {
    grid-column: 1;
  }

  .client-record-actions,
  .client-share-actions {
    flex-wrap: wrap;
  }

  .client-record-actions button {
    flex: 1 1 140px;
  }

  .client-match-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .client-recommendation-row {
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 14px;
  }

  .client-match-score {
    width: 70px;
  }

  .client-recommendation-row dl,
  .client-match-reasons,
  .client-recommendation-row > button {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .client-match-status,
  .client-match-actions {
    grid-column: 1;
    grid-row: auto;
  }

  .client-share-controls,
  .client-share-row {
    grid-template-columns: 1fr;
  }

  .client-share-controls button,
  .client-share-row input,
  .client-share-actions {
    grid-column: 1;
  }

  .match-dialog-shell {
    padding: 18px 14px;
  }

  .match-dialog-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .match-dialog-row > span:last-child {
    grid-column: 2;
  }

  .shortlist-frame {
    padding-top: 26px;
  }

  .shortlist-heading h1 {
    font-size: 28px;
  }

  .shortlist-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 16px 12px;
  }

  .shortlist-space {
    grid-template-columns: 1fr;
  }

  .shortlist-space img,
  .shortlist-image-placeholder {
    width: 100%;
  }

  .shortlist-view-button {
    grid-column: 1 / -1;
  }
}
