/* Unequal cover heights form two independent columns. */
.projects {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-flow: row;
  columns: auto;
  gap: 64px 9vw;
  align-items: start;
}
.projects .project-card {
  display: block;
  width: 100%;
  margin: 0;
  min-width: 0;
}
.project-card figcaption {
  text-align: left;
}
.project-card-placeholder {
  display: block;
  aspect-ratio: 4/3;
  background: #f0f0f0;
}
.project-blocks {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.project-content-block {
  position: relative;
  min-width: 0;
}
.project-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  align-items: start;
}
.project-photo-slot {
  position: relative;
  min-width: 0;
  margin: 0;
}
.project-photo-slot img {
  width: 100%;
  height: auto;
}
.project-photo-slot figcaption {
  font:
    12px/1.35 'PT Sans',
    Arial,
    sans-serif;
  color: #111;
  text-align: left;
  margin-top: 10px;
}
.project-text-block {
  width: 100%;
}
.project-text-block p:last-child {
  margin-bottom: 0;
}
.project-text-block:empty {
  display: none;
}
.admin-project-mode .project-page {
  width: min(calc(100% - 370px), 1080px);
  max-width: 1080px;
  margin-left: max(300px, calc((100vw - 1080px) / 2));
  margin-right: auto;
}
.project-editor-sidebar {
  position: fixed;
  left: 24px;
  top: 252px;
  bottom: 100px;
  width: 230px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 8px;
  scrollbar-width: thin;
  z-index: 8;
  font:
    13px/1.35 'PT Sans',
    Arial,
    sans-serif;
  color: #555;
}
.project-cover-panel,
.project-meta-panel {
  border: 1px solid #e1e1e1;
  border-radius: 20px;
  padding: 16px;
  background: #fafafa;
}
.project-panel-title {
  font-size: 14px;
  color: #333;
  margin-bottom: 14px;
}
.project-cover-drop {
  width: 100%;
  min-height: 100px;
  background: #f1f1f1;
  border: 1px dashed #ccc;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.project-cover-drop img {
  width: 100%;
  height: auto;
  max-height: 220px;
  object-fit: contain;
}
.project-cover-drop > span {
  font-size: 34px;
  font-weight: 400;
  color: #999;
}
.project-panel-hint {
  font-size: 11px;
  color: #aaa;
  margin-top: 12px;
}
.project-meta-panel {
  margin-top: 18px;
}
.project-meta-preview {
  width: 100%;
  max-height: 150px;
  object-fit: contain;
  margin-bottom: 16px;
}
.project-meta-panel label {
  display: block;
  margin: 12px 0;
  font-size: 12px;
  color: #888;
}
.project-meta-panel input,
.project-meta-panel select {
  display: block;
  width: 100%;
  font:
    13px/1.35 'PT Sans',
    Arial,
    sans-serif;
  padding: 8px 10px;
  background: transparent;
  border: 1px solid #ddd;
  border-radius: 12px;
  margin-top: 5px;
  color: #333;
}
.project-meta-save {
  padding: 10px 14px;
  background: #111;
  color: #fafafa;
  font-size: 12px;
  width: 100%;
  margin-top: 8px;
}
.project-photo-empty {
  display: flex;
  width: 100%;
  aspect-ratio: 16/9;
  background: #f3f3f3;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
}
.project-columns .project-photo-empty {
  aspect-ratio: 3/2;
}
.project-photo-empty > span {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #ccc;
  background: #fff;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  font:
    34px/1 'PT Sans',
    Arial,
    sans-serif;
}
.project-photo-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  font-size: 12px;
  color: #888;
}
.project-photo-actions button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.project-photo-actions svg {
  width: 13px;
  height: 13px;
}
.project-photo-replace {
  right: 12px;
  top: 12px;
  opacity: 1;
}
.project-meta-selected img {
  outline: 1px solid #aaa;
  outline-offset: 3px;
}
.project-insert {
  position: relative;
  margin: 0;
}
.project-block-menu {
  min-width: 430px;
}
.project-block-actions {
  position: absolute;
  right: -44px;
  top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 3;
}
.project-block-actions > .admin-post-pencil {
  position: static;
}
.project-block-actions > button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  color: #aaa;
  background: #fafafae6;
}
.project-block-actions > button svg {
  width: 17px;
  height: 17px;
}
.project-block-actions > button:hover {
  color: #111;
  background: #eee;
}
.project-heading-editable {
  position: relative;
}
.project-heading-editable > .admin-post-pencil {
  left: -36px;
  right: auto;
  top: 0;
  width: 28px;
  height: 28px;
}
.project-heading-editable > .admin-post-pencil svg {
  width: 17px;
  height: 17px;
}
.project-heading .description {
  min-height: 30px;
}
.admin-project-mode .project-heading {
  gap: 48px;
}
.admin-project-mode .project-blocks {
  gap: 24px;
}
.project-drag-over {
  outline: 2px dashed #888 !important;
  outline-offset: 5px;
  background: #e8e8e8;
}
.project-text-block > button {
  color: #aaa;
  padding: 24px;
  border: 1px dashed #ddd;
  width: 100%;
  border-radius: 18px;
}
#new-project-modal {
  width: 420px;
  padding: 36px;
}
#new-project-modal label {
  font:
    13px/1.35 'PT Sans',
    Arial,
    sans-serif;
  color: #888;
  margin: 18px 0;
}
#new-project-modal input {
  display: block;
  width: 100%;
  border: 1px solid #ddd;
  background: transparent;
  padding: 12px 14px;
  border-radius: 16px;
  color: #111;
  margin-top: 8px;
  font-size: 16px;
}
@media (max-width: 650px) {
  .projects {
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
  }
  .projects .project-card {
    margin: 0;
  }
  .project-columns {
    gap: 6%;
  }
  .project-blocks {
    gap: 24px;
  }
  .project-photo-slot figcaption {
    font-size: 10px;
  }
}

.project-caption-text {
  color: #111;
}
.project-caption-year {
  color: #999;
  margin-left: 4px;
}
.project-photo-actions {
  border-top: 0.5px solid #ddd;
  padding-top: 10px;
  margin-top: 12px;
}
/* Project-wide save/revert and a quiet, logo-aligned sidebar. */
.admin-project-mode .project-page {
  width: min(calc(100% - 420px), 1080px);
  margin-left: max(350px, calc((100vw - 1080px) / 2));
}
.project-editor-sidebar {
  left: 5%;
  display: flex;
  flex-direction: column;
  overflow: visible;
  padding: 0;
  width: 230px;
}
.project-sidebar-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  padding-right: 4px;
}
.project-cover-panel,
.project-meta-panel {
  border: 0;
  background: #f0f0f0;
  border-radius: 20px;
}
.project-cover-drop {
  background: #e8e8e8;
  border-color: #d4d4d4;
}
.project-meta-panel input,
.project-meta-panel select {
  background: #fafafa;
  border-color: #ddd;
}
.project-meta-save {
  display: none;
}
.project-save-actions {
  flex: none;
  margin-top: 14px;
  padding: 14px;
  background: #f0f0f0;
  border-radius: 20px;
}
.project-save-status {
  font-size: 11px;
  line-height: 1.35;
  color: #888;
  margin-bottom: 10px;
}
.project-save-actions button {
  display: block;
  width: 100%;
  padding: 10px 12px;
  font:
    12px/1.35 'PT Sans',
    Arial,
    sans-serif;
  border: 1px solid #d6d6d6;
  background: transparent;
  color: #555;
  border-radius: 22px;
}
.project-save-actions button + button {
  margin-top: 8px;
}
.project-save-actions .ui-primary {
  background: #111;
  border-color: #111;
  color: #fafafa;
}
.project-save-actions button:disabled {
  opacity: 0.3;
  cursor: default;
}
.project-save-actions button:not(:disabled):hover {
  background: #e4e4e4;
  color: #111;
}
.project-save-actions .ui-primary:not(:disabled):hover {
  background: #333;
  color: #fff;
}
.project-dirty-marker {
  position: absolute;
  left: -30px;
  top: 12px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #ffb000;
  color: #111;
  box-shadow: 0 2px 8px #e39d0026;
  font:
    bold 14px/1 'PT Sans',
    Arial,
    sans-serif;
  z-index: 4;
}
.project-heading-editable > .project-dirty-marker {
  left: -64px;
  top: 4px;
}
.project-cover-dirty {
  position: fixed;
  z-index: 12;
}
.project-draft-badge {
  display: inline-block;
  margin-left: 9px;
  padding: 2px 7px;
  border-radius: 12px;
  background: #ebebeb;
  color: #999;
  font:
    10px/1.3 'PT Sans',
    Arial,
    sans-serif;
  vertical-align: middle;
}
.admin-project-order-mode main.content {
  width: min(calc(100% - 420px), 1080px);
  max-width: 1080px;
  margin-left: max(350px, calc((100vw - 1080px) / 2));
  margin-right: auto;
}
.project-order-sidebar {
  position: fixed;
  left: 5%;
  top: 252px;
  bottom: 100px;
  width: 230px;
  display: flex;
  flex-direction: column;
  z-index: 8;
  font:
    13px/1.35 'PT Sans',
    Arial,
    sans-serif;
}
.project-order-panel {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  background: #f0f0f0;
  border-radius: 20px;
  padding: 16px 10px 12px;
  scrollbar-width: thin;
  overscroll-behavior: contain;
}
.project-order-panel > .project-panel-title,
.project-order-panel > .project-panel-hint {
  padding: 0 6px;
}
.project-order-panel > .project-panel-hint {
  margin: 0 0 14px;
}
.project-order-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.project-order-row {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 62px;
  padding: 7px 5px;
  border-radius: 12px;
  cursor: grab;
  border: 1px solid transparent;
}
.project-order-row:hover {
  background: #e8e8e8;
}
.project-order-row img,
.project-order-empty {
  width: 42px;
  height: 44px;
  object-fit: contain;
  background: #e5e5e5;
  flex: none;
  border-radius: 4px;
}
.project-order-grip {
  font-size: 18px;
  color: #aaa;
  flex: none;
  user-select: none;
}
.project-order-name {
  min-width: 0;
  flex: 1;
  font-size: 11px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.project-order-name .project-draft-badge {
  margin: 4px 0 0;
  display: table;
  font-size: 9px;
  padding: 1px 5px;
  background: #e3e3e3;
}
.project-order-moves {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: none;
}
.project-order-moves button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  color: #999;
  font-size: 13px;
}
.project-order-moves button:disabled {
  opacity: 0.2;
  cursor: default;
}
.project-order-moves button:not(:disabled):hover {
  background: #111;
  color: #fff;
}
.project-order-target {
  border-color: #aaa !important;
  background: #e2e2e2 !important;
}
.project-order-dragging {
  opacity: 0.4;
}
.project-order-sidebar .project-save-actions {
  flex: none;
}
