.project-info {
  --card-width: min(350px, calc(100vw - 36px));
  --pin-clearance: clamp(95px, 11vw, 160px);
  --card-ink: #172a31;
  --card-gold: #a16e34;
  position: absolute;
  z-index: 2;
  left: clamp(calc(18px + var(--card-width) / 2), var(--project-x, 50%), calc(100% - 18px - var(--card-width) / 2));
  top: calc(var(--project-y, 50%) - var(--pin-clearance));
  translate: -50% -100%;
  width: var(--card-width);
  max-height: min(335px, calc(100vh - 155px));
  overflow: auto;
  overscroll-behavior: contain;
  padding: 18px 20px 17px;
  border: 1px solid #ffefd5;
  border-inline-start: 3px solid #c99553;
  border-radius: 12px;
  background: linear-gradient(138deg, #fff8eae8, #f5eee1dc 79%);
  color: var(--card-ink);
  color-scheme: light;
  box-shadow: 0 13px 38px #0c202d40, 0 2px 7px #25323122;
  backdrop-filter: blur(12px) saturate(.85);
  animation: project-info-in 180ms ease both;
}

.project-info[data-placement="below"] {
  --card-top: clamp(76px, calc(var(--project-y, 50%) + 20px), calc(100% - 280px));
  top: var(--card-top);
  translate: -50% 0;
  max-height: min(335px, calc(100% - var(--card-top) - min(74px, 12vh)));
}

[data-illustrative] .project-info[data-placement] {
  --card-width: min(310px, calc(100vw - 36px));
  top: max(136px, calc(env(safe-area-inset-top) + 124px));
  left: max(22px, env(safe-area-inset-left));
  max-height: min(350px, max(120px, calc(100dvh - 240px)));
  translate: none;
}

[data-illustrative] .feature-sign strong { font-size: clamp(16px, 2.15vw, 33px); }
[data-illustrative] .feature-sign small { font-size: clamp(9px, 1.1vw, 14px); }
[data-illustrative] .feature-pin {
  --feature-glyph-width: clamp(27px, 3.75vw, 51px);
  /* The rotated, rounded corner extends beyond the unrotated glyph box. */
  padding-bottom: calc(var(--feature-glyph-width) * .1864);
}
[data-illustrative] .feature-glyph { width: var(--feature-glyph-width); }

@media (max-width: 620px) {
  [data-illustrative] .project-info[data-placement] {
    top: auto;
    bottom: calc(var(--dock-bottom) + var(--opening-dock-height) + 8px);
    left: 12px;
    max-height: min(320px, 48dvh);
  }
}

.project-info-heading {
  position: relative;
  padding-inline-end: 34px;
}

.project-info-brand {
  margin: 0 0 5px;
  color: #5d421f;
  font-size: .67rem;
  font-weight: 800;
  letter-spacing: .13em;
  line-height: 1.2;
  text-transform: uppercase;
}

.project-info h2 {
  margin: 0;
  font: 500 clamp(1.38rem, 2.1vw, 1.72rem)/1.12 Georgia, 'Times New Roman', serif;
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
}

.project-info-close {
  position: absolute;
  top: 0;
  right: 0;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid #8b734a45;
  border-radius: 50%;
  background: #fffaf48c;
  color: var(--card-ink);
}

.project-info-close::before,
.project-info-close::after {
  position: absolute;
  top: calc(50% - .65px);
  left: calc(50% - 5px);
  width: 10px;
  height: 1.3px;
  content: '';
  background: currentColor;
  transform: rotate(45deg);
}

.project-info-close::after { transform: rotate(-45deg); }
.project-info-close:hover { background: #ead1a5; border-color: #a16e348c; }
:is(.project-info, .project-photo) :is(button, a):focus-visible { outline: 2px solid #805321; outline-offset: 3px; }

.project-info-specs {
  display: grid;
  grid-template-columns: minmax(65px, .7fr) minmax(0, 1.3fr);
  align-items: baseline;
  gap: 5px 12px;
  margin: 13px 0 0;
  padding: 11px 0 0;
  border-top: 1px solid #a16e343b;
  font-size: .79rem;
  line-height: 1.42;
}

.project-info-specs dt { color: #535747; }
.project-info-specs dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }

.project-info-description {
  margin: 12px 0 0;
  color: #344349;
  font-size: .85rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.project-info-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
}

.project-info-actions:has(> :not([hidden])) { margin-top: 12px; }

.project-info-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #66451f;
  font-size: .79rem;
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.project-info-link:hover { color: #352618; }
.project-info-link .point-arrow { display: block; margin: 0; color: currentColor; }

.project-info-photo {
  min-height: 34px;
  padding: 6px 11px;
  border: 1px solid #af7d46;
  border-radius: 6px;
  background: #e7c38d;
  color: #302417;
  font-size: .79rem;
  font-weight: 700;
}

.project-info .project-info-photo:hover { background: #efcf9d; border-color: #805321; }

.project-photo {
  width: max-content;
  max-width: calc(100vw - 30px);
  max-height: min(93dvh, calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 18px));
  padding: 0;
  overflow: hidden;
  border: 1px solid #f0d09c91;
  border-radius: 12px;
  background: #091820;
  box-shadow: 0 22px 74px #020d1691;
}

.project-photo[open] { animation: project-info-in 180ms ease both; }
.project-photo::backdrop { background: #061118d4; backdrop-filter: blur(8px); }

.project-photo img {
  width: auto;
  height: auto;
  max-width: min(1280px, calc(100vw - 32px));
  max-height: min(calc(93dvh - 2px), calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 20px));
  object-fit: contain;
}

.project-photo .project-info-close {
  z-index: 1;
  top: 10px;
  right: 10px;
  width: 42px;
  height: 42px;
  background: #122531f2;
  border-color: #e4b978ae;
  color: #fff5e6;
  box-shadow: 0 4px 17px #10212b6b;
}

.project-photo .project-info-close:hover { background: #1f3947; }
.project-photo .project-info-close:focus-visible { outline-color: #fff0cf; }
.feature-pin[aria-expanded="true"] .feature-glyph { filter: brightness(1.13); }
#stage[data-project-hover="true"] { cursor: pointer; }
#stage[data-dragging] { cursor: grabbing; }

.point-arrow,
.pin-glyph {
  position: relative;
  flex: 0 0 11px;
  width: 11px;
  height: 11px;
  font-size: 0;
  transform: rotate(-45deg);
}

.pin[data-direction="next"] .pin-glyph { transform: none; }

.point-arrow::before,
.pin-glyph::before {
  position: absolute;
  top: calc(50% - .75px);
  left: 0;
  width: 10px;
  height: 1.5px;
  content: '';
  background: currentColor;
}

.point-arrow::after,
.pin-glyph::after {
  position: absolute;
  top: calc(50% - 3px);
  right: 1px;
  width: 6px;
  height: 6px;
  content: '';
  border-block-start: 1.5px solid;
  border-inline-end: 1.5px solid;
  transform: rotate(45deg);
}

.noscript-note {
  position: absolute;
  right: max(14px, env(safe-area-inset-right));
  bottom: max(22px, env(safe-area-inset-bottom));
  margin: 0;
  max-width: min(265px, 45vw);
  padding: 12px 14px;
  border-radius: 10px;
  font-size: .78rem;
  line-height: 1.4;
}

.topbar-actions { display: flex; gap: 7px; }

@keyframes project-info-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 640px) {
  .project-info,
  .project-info[data-placement="below"] {
    inset: auto max(13px, env(safe-area-inset-right)) max(187px, calc(env(safe-area-inset-bottom) + 174px)) max(13px, env(safe-area-inset-left));
    width: auto;
    max-height: min(315px, calc(100vh - 270px));
    padding: 14px 16px;
    translate: none;
  }

  .project-info-close { width: 36px; height: 36px; }
  .project-info-description { margin-top: 9px; }
}

@media (max-width: 610px) {
  .topbar-actions { gap: 5px; }
  .topbar-actions .toolbar { height: 38px; padding-inline: 9px; font-size: .75rem; }
  .topbar-actions img { display: none; }
  .project-point > span:not(.point-arrow) { min-width: 0; }
  .project-point strong, .project-point small { white-space: normal; }
}

@media (max-height: 450px) {
  .project-info,
  .project-info[data-placement="below"] {
    inset: auto max(14px, env(safe-area-inset-right)) max(71px, calc(env(safe-area-inset-bottom) + 61px)) auto;
    width: min(310px, calc(100vw - 28px));
    max-height: calc(100vh - 150px);
    translate: none;
  }
}

@media (prefers-reduced-motion: reduce) { .project-info, .project-photo[open] { animation: none; } }
