.tpp-project-page,
.tpp-project-page * {
  box-sizing: border-box;
}

.tpp-project-page {
  --tpp-text: #111111;
  --tpp-muted: #777777;
  --tpp-body: #444444;
  --tpp-soft: #faf6f0;
  --tpp-soft-image: #d8cfc2;
  --tpp-card: #ffffff;
  --tpp-footer: #1c1b19;
  --tpp-line: rgba(0, 0, 0, 0.10);
  --tpp-accent: #8E1F1F;
  --tpp-accent-soft: rgba(142, 31, 31, 0.10);
  width: 100%;
  margin: 0 auto;
  overflow-x: clip;
  background: #ffffff;
  color: var(--tpp-text);
  font-family: inherit;
  border: 0.5px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
}

.tpp-project-page a {
  color: inherit;
}

.tpp-topbar {
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.08);
  background: #ffffff;
}

.tpp-topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.tpp-logo {
  color: #1a1a1a;
  line-height: 1;
  text-align: center;
  font-weight: 500;
  letter-spacing: 3px;
  font-size: 12px;
  text-transform: uppercase;
  flex: 0 0 auto;
}

.tpp-logo small {
  display: block;
  margin-top: 3px;
  font-size: 6px;
  letter-spacing: 2px;
  color: #888888;
}

.tpp-topnav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  color: #444444;
  font-size: 11px;
  line-height: 1.2;
}

.tpp-topnav a,
.tpp-topnav span,
.tpp-footer-links a,
.tpp-footer-links span {
  text-decoration: none;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

.tpp-topnav a:hover,
.tpp-footer-links a:hover {
  color: var(--tpp-accent);
}

.tpp-donate-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--tpp-accent);
  color: #ffffff !important;
  padding: 5px 12px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.tpp-language-link {
  font-style: italic;
}

.tpp-mobile-actions {
  display: none;
  align-items: center;
  gap: 10px;
}

.tpp-menu-button {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  color: #333333;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.tpp-page-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 36px 24px 48px;
}

.tpp-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 28px;
  align-items: start;
}

.tpp-layout-left_sidebar .tpp-content-column {
  grid-column: 2;
  grid-row: 1;
}

.tpp-layout-left_sidebar .tpp-sidebar {
  grid-column: 1;
  grid-row: 1;
}

.tpp-layout-full_width .tpp-main-grid {
  display: block;
}

.tpp-layout-full_width .tpp-sidebar,
.tpp-layout-full_width .tpp-sidebar-sticky {
  position: static;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.tpp-content-column {
  min-width: 0;
}

.tpp-article-header {
  margin: 0 0 18px;
}

.tpp-project-title {
  margin: 0 0 4px;
  color: #111111;
  font-size: clamp(26px, 3.2vw, 36px);
  line-height: 1.15;
  font-weight: 500;
  letter-spacing: -0.018em;
}

.tpp-title-rule {
  display: block;
  width: 48px;
  height: 3px;
  margin: 8px 0 6px;
  background: var(--tpp-accent);
  border-radius: 999px;
}

.tpp-project-location {
  margin: 0;
  color: var(--tpp-muted);
  font-size: 12px;
  line-height: 1.4;
  font-style: italic;
}

.tpp-hero-wrap {
  position: relative;
  width: 100%;
  margin: 0 0 24px;
  overflow: hidden;
  border-radius: 6px;
  background: var(--tpp-soft-image);
}

.tpp-project-image {
  display: block;
  width: 100%;
  object-fit: cover;
  background: var(--tpp-soft-image);
}

.tpp-hero-image {
  height: 340px;
  aspect-ratio: 16 / 8.5;
  transition: transform 260ms ease, filter 260ms ease;
}

.tpp-hero-wrap:hover .tpp-hero-image {
  transform: scale(1.018);
}

.tpp-lightbox-item {
  cursor: zoom-in;
}

.tpp-project-content {
  color: var(--tpp-body);
  font-size: 12px;
  line-height: 1.65;
  font-weight: 400;
}

.tpp-project-content h1,
.tpp-project-content h2,
.tpp-project-content h3,
.tpp-project-content h4,
.tpp-project-content h5,
.tpp-project-content h6 {
  margin: 1.55em 0 6px;
  color: #111111;
  line-height: 1.25;
  font-weight: 500;
  letter-spacing: -0.008em;
}

.tpp-project-content h2 {
  font-size: 13px;
}

.tpp-project-content h3 {
  font-size: 12.5px;
}

.tpp-project-content .tpp-content-heading {
  scroll-margin-top: 110px;
}

.tpp-project-content .tpp-content-heading:first-child,
.tpp-project-content h1:first-child,
.tpp-project-content h2:first-child,
.tpp-project-content h3:first-child,
.tpp-project-content h4:first-child,
.tpp-project-content h5:first-child,
.tpp-project-content h6:first-child {
  margin-top: 0;
}

.tpp-project-content p,
.tpp-project-content ul,
.tpp-project-content ol {
  margin: 0 0 20px;
}

.tpp-project-content p + h2,
.tpp-project-content p + h3 {
  margin-top: 2px;
}

.tpp-project-content img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

.tpp-mobile-toc {
  display: none;
}

.tpp-sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tpp-sidebar-sticky {
  position: sticky;
  top: 86px;
  z-index: 2;
}

.tpp-side-box {
  min-height: auto;
  padding: 13px 14px;
  border: 0.5px solid var(--tpp-line);
  border-radius: 6px;
  background: #ffffff;
  overflow: hidden;
}

.tpp-side-box-title {
  margin: 0 0 10px;
  color: #999999;
  font-size: 10px;
  line-height: 1.35;
  letter-spacing: 1.5px;
  font-weight: 500;
  text-transform: uppercase;
}

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

.tpp-list li + li {
  margin-top: 7px;
}

.tpp-links-list a,
.tpp-links-list span {
  display: block;
  padding-left: 10px;
  color: #555555;
  font-size: 11px;
  line-height: 1.35;
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: color 160ms ease, border-color 160ms ease, padding-left 160ms ease;
}

.tpp-links-list a:hover,
.tpp-links-list a.is-active {
  color: var(--tpp-accent);
  border-left-color: var(--tpp-accent);
  padding-left: 8px;
  font-weight: 500;
}

.tpp-toc-level-3 a,
.tpp-toc-level-3 span {
  padding-left: 18px;
  color: #666666;
}

.tpp-empty-note {
  margin: 0;
  color: var(--tpp-muted);
  font-size: 11px;
  line-height: 1.45;
}

.tpp-icon-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 9px;
}

.tpp-mini-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  margin-top: 1px;
  color: var(--tpp-accent);
  font-size: 13px;
  line-height: 1;
}

.tpp-icon-row p {
  margin: 0;
  color: #444444;
  font-size: 11px;
  line-height: 1.45;
}

.tpp-card-action,
.tpp-view-all-projects {
  display: inline-block;
  margin: 2px 0 0;
  color: var(--tpp-accent);
  font-size: 11px;
  line-height: 1.35;
  font-weight: 500;
  text-decoration: none;
}

.tpp-outline-button {
  display: inline-block;
  margin-top: 3px;
  padding: 5px 12px;
  border: 1px solid var(--tpp-accent);
  border-radius: 3px;
  color: var(--tpp-accent) !important;
  background: transparent;
  font-size: 10px;
  line-height: 1.2;
  font-weight: 500;
  text-decoration: none;
}

.tpp-needs-list li {
  position: relative;
  padding-left: 18px;
  color: #444444;
  font-size: 11px;
  line-height: 1.45;
}

.tpp-needs-list li::before {
  content: "•";
  position: absolute;
  left: 4px;
  color: var(--tpp-accent);
}

.tpp-related-list {
  display: grid;
  gap: 9px;
}

.tpp-related-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  color: #333333;
  font-size: 11px;
  line-height: 1.35;
  text-decoration: none;
  transition: color 160ms ease, transform 160ms ease;
}

.tpp-related-card:hover {
  color: var(--tpp-accent);
  transform: translateX(2px);
}

.tpp-related-card img,
.tpp-related-placeholder {
  width: 38px;
  height: 30px;
  object-fit: cover;
  border-radius: 4px;
  background: var(--tpp-soft-image);
}

.tpp-related-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #8a7f6e;
  font-size: 12px;
}

.tpp-gallery-wrap {
  position: relative;
  margin-top: 28px;
}

.tpp-gallery {
  display: grid;
  gap: 8px;
}

.tpp-gallery-item {
  position: relative;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border-radius: 6px;
  background: var(--tpp-soft-image);
}

.tpp-gallery-image {
  height: 165px;
  transition: transform 250ms ease, filter 250ms ease;
}

.tpp-gallery-item:hover .tpp-gallery-image {
  transform: scale(1.035);
  filter: saturate(1.05);
}

.tpp-gallery-caption {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  margin: 0;
  padding: 5px 8px;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.5);
  font-size: 10px;
  line-height: 1.2;
}

.tpp-gallery-thumbnail_strip,
.tpp-gallery-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tpp-gallery-thumbnail_strip .tpp-gallery-image {
  height: 160px;
}

.tpp-gallery-masonry {
  columns: 3 160px;
  display: block;
}

.tpp-gallery-masonry .tpp-gallery-item {
  break-inside: avoid;
  margin-bottom: 8px;
}

.tpp-gallery-masonry .tpp-gallery-image {
  height: auto;
  object-fit: contain;
}

.tpp-gallery-carousel {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 10px;
}

.tpp-gallery-carousel .tpp-gallery-item {
  flex: 0 0 min(290px, 82vw);
  scroll-snap-align: start;
}

.tpp-gallery-slider {
  display: block;
  overflow: hidden;
}

.tpp-gallery-slider .tpp-gallery-item {
  display: none;
}

.tpp-gallery-slider .tpp-gallery-item.is-active {
  display: block;
}

.tpp-gallery-slider .tpp-gallery-image {
  height: 360px;
}

.tpp-gallery-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: #ffffff;
  color: #111111;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.tpp-gallery-prev { left: 10px; }
.tpp-gallery-next { right: 10px; }

.tpp-project-cta {
  margin-top: 28px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--tpp-soft);
  border-radius: 6px;
}

.tpp-project-cta p {
  margin: 0;
  color: #333333;
  font-size: 12px;
  line-height: 1.45;
}

.tpp-cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  background: var(--tpp-accent);
  color: #ffffff !important;
  padding: 7px 16px;
  border-radius: 3px;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 500;
  text-decoration: none;
}

.tpp-footer {
  background: var(--tpp-footer);
}

.tpp-footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.tpp-footer-logo {
  color: #ffffff;
  font-size: 11px;
  letter-spacing: 2.5px;
  line-height: 1;
}

.tpp-footer-links {
  display: none;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.tpp-footer-links a,
.tpp-footer-links span {
  color: #d8d5cf;
  font-size: 10px;
}

.tpp-footer p {
  margin: 0;
  color: #7d7a74;
  font-size: 10px;
  line-height: 1.3;
}

.tpp-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(8px);
}

.tpp-modal.is-open {
  display: flex;
}

.tpp-modal-inner {
  position: relative;
  width: min(1120px, 100%);
  max-height: 92vh;
}

.tpp-modal-image {
  display: block;
  width: 100%;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 8px;
  background: #111111;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
}

.tpp-modal-caption {
  margin-top: 12px;
  color: #ffffff;
  text-align: center;
  font-size: 13px;
}

.tpp-modal-close,
.tpp-modal-prev,
.tpp-modal-next {
  position: absolute;
  z-index: 3;
  border: 0;
  border-radius: 999px;
  background: #ffffff;
  color: #111111;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

.tpp-modal-close {
  top: -18px;
  right: -18px;
  width: 44px;
  height: 44px;
  font-size: 26px;
  line-height: 44px;
}

.tpp-modal-prev,
.tpp-modal-next {
  top: 50%;
  width: 46px;
  height: 56px;
  transform: translateY(-50%);
  font-size: 34px;
}

.tpp-modal-prev { left: 14px; }
.tpp-modal-next { right: 14px; }

body.tpp-modal-open {
  overflow: hidden;
}

@media (max-width: 1024px) {
  .tpp-topbar-inner,
  .tpp-footer-inner {
    padding-left: 24px;
    padding-right: 24px;
  }

  .tpp-page-inner {
    padding-left: 20px;
    padding-right: 20px;
  }

  .tpp-main-grid,
  .tpp-layout-left_sidebar .tpp-main-grid {
    grid-template-columns: minmax(0, 1fr) 220px;
  }

  .tpp-topnav {
    gap: 11px;
  }
}

@media (max-width: 820px) {
  .tpp-project-page {
    border-radius: 18px;
  }

  .tpp-topbar-inner {
    padding: 12px 16px;
  }

  .tpp-logo {
    text-align: left;
    font-size: 11px;
    letter-spacing: 2.5px;
  }

  .tpp-logo small,
  .tpp-topnav {
    display: none;
  }

  .tpp-mobile-actions {
    display: flex;
  }

  .tpp-mobile-actions .tpp-donate-link {
    padding: 4px 10px;
    font-size: 10px;
  }

  .tpp-page-inner {
    padding: 20px 16px 24px;
  }

  .tpp-main-grid,
  .tpp-layout-left_sidebar .tpp-main-grid,
  .tpp-layout-full_width .tpp-main-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .tpp-layout-left_sidebar .tpp-content-column,
  .tpp-layout-left_sidebar .tpp-sidebar {
    grid-column: auto;
    grid-row: auto;
  }

  .tpp-mobile-content_first .tpp-content-column { order: 1; }
  .tpp-mobile-content_first .tpp-sidebar { order: 2; }
  .tpp-mobile-sidebar_first .tpp-content-column { order: 2; }
  .tpp-mobile-sidebar_first .tpp-sidebar { order: 1; margin-bottom: 18px; }

  .tpp-project-title {
    font-size: 20px;
    line-height: 1.2;
  }

  .tpp-title-rule {
    width: 40px;
    margin: 6px 0;
  }

  .tpp-project-location {
    font-size: 11px;
    margin-bottom: 14px;
  }

  .tpp-hero-wrap {
    margin-bottom: 14px;
  }

  .tpp-hero-image {
    height: 230px;
    aspect-ratio: 16 / 10;
  }

  .tpp-mobile-toc {
    display: block;
    margin: 0 0 18px;
  }

  .tpp-mobile-toc-details {
    border: 0.5px solid var(--tpp-line);
    border-radius: 6px;
    padding: 0;
    background: #ffffff;
  }

  .tpp-mobile-toc-details summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    color: #333333;
    font-size: 11px;
    font-weight: 500;
    list-style: none;
    cursor: pointer;
  }

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

  .tpp-mobile-toc-details summary::after {
    content: "⌄";
    color: #888888;
    font-size: 14px;
  }

  .tpp-mobile-toc-details[open] summary::after {
    transform: rotate(180deg);
  }

  .tpp-mobile-toc-details .tpp-auto-toc {
    padding: 0 12px 12px;
  }

  .tpp-desktop-toc {
    display: none;
  }

  .tpp-sidebar,
  .tpp-layout-full_width .tpp-sidebar,
  .tpp-sidebar-sticky {
    position: static;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin-top: 20px;
  }

  .tpp-project-content h2 {
    font-size: 13px;
  }

  .tpp-project-content h3 {
    font-size: 12.5px;
  }

  .tpp-project-content p,
  .tpp-project-content ul,
  .tpp-project-content ol {
    margin-bottom: 16px;
  }

  .tpp-gallery-thumbnail_strip,
  .tpp-gallery-grid {
    grid-template-columns: 1fr;
  }

  .tpp-gallery-thumbnail_strip .tpp-gallery-image,
  .tpp-gallery-image,
  .tpp-gallery-slider .tpp-gallery-image {
    height: 240px;
  }

  .tpp-related-card {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .tpp-related-card img,
  .tpp-related-placeholder {
    width: 44px;
    height: 32px;
  }

  .tpp-project-cta {
    margin-top: 24px;
    padding: 14px;
    display: block;
    text-align: center;
  }

  .tpp-project-cta p {
    margin-bottom: 10px;
    font-size: 11px;
  }

  .tpp-cta-button {
    padding: 8px 18px;
  }

  .tpp-footer-inner {
    display: block;
    padding: 20px 16px;
  }

  .tpp-footer-logo {
    margin-bottom: 10px;
    font-size: 10px;
    letter-spacing: 2px;
  }

  .tpp-footer-links {
    display: flex;
    margin-bottom: 12px;
  }

  .tpp-footer p {
    font-size: 9px;
  }

  .tpp-modal {
    padding: 16px;
  }

  .tpp-modal-close {
    top: 8px;
    right: 8px;
  }

  .tpp-modal-prev { left: 8px; }
  .tpp-modal-next { right: 8px; }
}

@media (max-width: 420px) {
  .tpp-hero-image {
    height: 190px;
  }

  .tpp-gallery-thumbnail_strip .tpp-gallery-image,
  .tpp-gallery-image,
  .tpp-gallery-slider .tpp-gallery-image {
    height: 210px;
  }
}

@media (max-width: 820px) {
  .tpp-mobile-menu-open .tpp-topbar-inner {
    flex-wrap: wrap;
  }

  .tpp-mobile-menu-open .tpp-topnav {
    order: 3;
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    gap: 0;
    padding-top: 8px;
    border-top: 0.5px solid rgba(0, 0, 0, 0.08);
  }

  .tpp-mobile-menu-open .tpp-topnav a,
  .tpp-mobile-menu-open .tpp-topnav span {
    padding: 8px 0;
    font-size: 12px;
  }

  .tpp-mobile-menu-open .tpp-topnav .tpp-donate-link {
    display: none;
  }
}
