.single-relay_event .tharchive-site-main {
  width: min(1120px, calc(100% - 32px));
}

.tharchive-relay-event {
  display: grid;
  gap: 24px;
  padding-bottom: 24px;
}

.tharchive-relay-event .tharchive-panel {
  background:
    linear-gradient(180deg, rgba(7, 12, 22, 0.78), rgba(6, 10, 18, 0.68)),
    radial-gradient(circle at top right, rgba(140, 230, 255, 0.16), transparent 30%),
    radial-gradient(circle at bottom left, rgba(176, 140, 255, 0.14), transparent 34%);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.tharchive-hero {
  position: relative;
  overflow: hidden;
}

.tharchive-hero::after {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(140, 230, 255, 0.12);
  clip-path: polygon(
    var(--angle-card) 0,
    100% 0,
    100% calc(100% - var(--angle-card)),
    calc(100% - var(--angle-card)) 100%,
    0 100%,
    0 var(--angle-card)
  );
  pointer-events: none;
}

.tharchive-hero__layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, 320px);
  gap: clamp(24px, 4vw, 42px);
  align-items: center;
}

.tharchive-hero__content {
  display: grid;
  gap: 16px;
}

.tharchive-hero__title {
  margin: 0;
  font-size: clamp(1.8rem, 3.8vw, 3.3rem);
  line-height: 1.1;
  text-transform: none;
  letter-spacing: 0.015em;
  text-wrap: pretty;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.tharchive-hero__excerpt {
  margin: 0;
  max-width: 60ch;
  color: var(--text-soft);
  font-size: clamp(1rem, 1.8vw, 1.14rem);
}

.tharchive-hero__meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin-top: 8px;
}

.tharchive-meta-block {
  display: grid;
  gap: 10px;
  min-height: 104px;
  padding: 15px 17px;
  border: 1px solid rgba(140, 230, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(10, 18, 30, 0.66), rgba(8, 14, 24, 0.52)),
    radial-gradient(circle at top right, rgba(140, 230, 255, 0.12), transparent 46%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 14px 32px rgba(0, 0, 0, 0.18);
  clip-path: polygon(
    var(--angle-card) 0,
    100% 0,
    100% calc(100% - var(--angle-card)),
    calc(100% - var(--angle-card)) 100%,
    0 100%,
    0 var(--angle-card)
  );
}

.tharchive-meta-block__label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-2);
  opacity: 0.9;
}

.tharchive-meta-block__value {
  color: var(--text);
  font-size: 1.03rem;
  font-weight: 600;
  line-height: 1.45;
  text-wrap: balance;
}

.tharchive-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tharchive-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(140, 230, 255, 0.18);
  background: rgba(11, 20, 34, 0.58);
  color: var(--text);
  text-decoration: none;
  font-size: 0.92rem;
  clip-path: polygon(
    9px 0,
    100% 0,
    100% calc(100% - 9px),
    calc(100% - 9px) 100%,
    0 100%,
    0 9px
  );
  transition: border-color 0.25s ease, transform 0.25s ease, background-color 0.25s ease;
}

.tharchive-chip:hover,
.tharchive-chip:focus-visible {
  background: rgba(14, 26, 42, 0.76);
  border-color: rgba(140, 230, 255, 0.3);
  transform: translateY(-1px);
  color: #fff;
}

.tharchive-action-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}

.tharchive-hero__topics {
  margin-top: 2px;
}

.tharchive-hero__topics .tharchive-meta-block {
  min-height: auto;
  grid-template-columns: 120px minmax(0, 1fr);
  align-items: start;
  gap: 14px 18px;
}

.tharchive-hero__topics .tharchive-meta-block__label {
  padding-top: 8px;
}

.tharchive-hero__topics .tharchive-chip-list {
  gap: 10px;
}

.tharchive-hero__topics .tharchive-chip {
  min-height: 32px;
  padding: 0 11px;
}

.tharchive-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid rgba(140, 230, 255, 0.3);
  background: linear-gradient(135deg, rgba(17, 34, 58, 0.92), rgba(12, 22, 38, 0.88));
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  clip-path: polygon(
    var(--angle-action) 0,
    100% 0,
    100% calc(100% - var(--angle-action)),
    calc(100% - var(--angle-action)) 100%,
    0 100%,
    0 var(--angle-action)
  );
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.28);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.tharchive-action:hover,
.tharchive-action:focus-visible {
  color: #fff;
  border-color: rgba(140, 230, 255, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 20px 36px rgba(0, 0, 0, 0.34);
}

.tharchive-action--ghost {
  background: rgba(9, 14, 24, 0.42);
  border-color: rgba(140, 180, 255, 0.18);
  color: var(--text-soft);
}

.tharchive-action--ghost:hover,
.tharchive-action--ghost:focus-visible {
  color: var(--text);
  border-color: rgba(140, 180, 255, 0.36);
  background: rgba(12, 20, 34, 0.68);
}

.tharchive-action--disabled,
.tharchive-action--disabled:hover,
.tharchive-action--disabled:focus-visible {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(120, 132, 152, 0.16);
  color: rgba(238, 244, 255, 0.42);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
  pointer-events: none;
}

.tharchive-hero__media {
  position: relative;
  width: min(100%, 320px);
  justify-self: end;
  padding: 14px;
  background: linear-gradient(180deg, rgba(11, 18, 31, 0.84), rgba(7, 12, 22, 0.74));
  border: 1px solid rgba(140, 230, 255, 0.14);
  clip-path: polygon(
    var(--angle-media) 0,
    100% 0,
    100% calc(100% - var(--angle-media)),
    calc(100% - var(--angle-media)) 100%,
    0 100%,
    0 var(--angle-media)
  );
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.34);
}

.tharchive-hero__media::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0) 26%),
    radial-gradient(circle at top, rgba(140, 230, 255, 0.14), transparent 45%);
  pointer-events: none;
}

.tharchive-hero__image {
  display: block;
  width: 100%;
  height: clamp(240px, 34vw, 360px);
  object-fit: cover;
  clip-path: polygon(
    var(--angle-card) 0,
    100% 0,
    100% calc(100% - var(--angle-card)),
    calc(100% - var(--angle-card)) 100%,
    0 100%,
    0 var(--angle-card)
  );
}

.tharchive-relay-event__section {
  display: grid;
  gap: 18px;
}

.tharchive-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.tharchive-info-card {
  display: grid;
  gap: 8px;
  min-height: 118px;
  padding: 18px;
  border: 1px solid rgba(140, 230, 255, 0.14);
  background: rgba(8, 14, 24, 0.46);
  clip-path: polygon(
    var(--angle-card) 0,
    100% 0,
    100% calc(100% - var(--angle-card)),
    calc(100% - var(--angle-card)) 100%,
    0 100%,
    0 var(--angle-card)
  );
}

.tharchive-info-card__label {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent-2);
}

.tharchive-info-card__value {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.6;
}

.tharchive-prose {
  color: var(--text);
  font-size: 1rem;
}

.tharchive-prose > :first-child {
  margin-top: 0;
}

.tharchive-prose > :last-child {
  margin-bottom: 0;
}

.tharchive-prose h1,
.tharchive-prose h2,
.tharchive-prose h3,
.tharchive-prose h4,
.tharchive-prose h5,
.tharchive-prose h6 {
  margin: 1.5em 0 0.6em;
  text-transform: none;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.tharchive-prose p,
.tharchive-prose ul,
.tharchive-prose ol,
.tharchive-prose blockquote,
.tharchive-prose pre,
.tharchive-prose hr {
  margin: 0 0 1.05em;
}

.tharchive-prose ul,
.tharchive-prose ol {
  padding-left: 1.4em;
}

.tharchive-prose a {
  color: var(--accent-prose);
  text-decoration: underline;
  text-decoration-color: rgba(140, 230, 255, 0.52);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
  word-break: break-word;
  text-shadow: 0 0 14px rgba(140, 230, 255, 0.18);
  transition:
    color 0.24s ease,
    text-decoration-color 0.24s ease,
    text-shadow 0.24s ease,
    background-color 0.24s ease;
}

.tharchive-prose a:hover,
.tharchive-prose a:focus-visible {
  color: #fff;
  text-decoration-color: rgba(214, 248, 255, 0.92);
  text-shadow: 0 0 18px rgba(140, 230, 255, 0.34);
  background: linear-gradient(180deg, rgba(140, 230, 255, 0), rgba(140, 230, 255, 0.12));
}

.tharchive-prose p a,
.tharchive-prose li a,
.tharchive-prose blockquote a {
  font-weight: 500;
}

.tharchive-prose blockquote {
  margin-left: 0;
  padding: 16px 18px;
  border-left: 3px solid rgba(140, 230, 255, 0.45);
  background: rgba(8, 16, 28, 0.5);
  color: var(--text-soft);
}

.tharchive-prose hr {
  height: 1px;
  border: 0;
  background:
    linear-gradient(
      90deg,
      rgba(140, 230, 255, 0),
      rgba(140, 230, 255, 0.5) 18%,
      rgba(212, 246, 255, 0.78) 50%,
      rgba(140, 230, 255, 0.5) 82%,
      rgba(140, 230, 255, 0)
    );
  box-shadow: 0 0 18px rgba(140, 230, 255, 0.18);
  opacity: 0.9;
}

.tharchive-prose code,
.tharchive-details__body code {
  padding: 0.14em 0.42em;
  background: rgba(140, 180, 255, 0.12);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.94em;
}

.tharchive-prose pre {
  overflow-x: auto;
  padding: 18px;
  border: 1px solid rgba(140, 180, 255, 0.12);
  background: rgba(4, 8, 14, 0.78);
}

.tharchive-prose pre code {
  padding: 0;
  background: transparent;
  color: inherit;
}

.tharchive-gallery {
  display: grid;
  gap: 16px;
}

.tharchive-gallery__stage {
  position: relative;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 52px;
  align-items: center;
  gap: 16px;
}

.tharchive-gallery.is-single .tharchive-gallery__stage {
  grid-template-columns: minmax(0, 1fr);
}

.tharchive-gallery__viewport {
  position: relative;
  min-height: 0;
}

.tharchive-gallery__slide {
  display: none;
  gap: 14px;
  margin: 0;
  padding: 16px;
  border: 1px solid rgba(140, 230, 255, 0.14);
  background:
    linear-gradient(180deg, rgba(10, 18, 30, 0.72), rgba(7, 12, 22, 0.58)),
    radial-gradient(circle at top right, rgba(140, 230, 255, 0.12), transparent 42%);
  clip-path: polygon(
    var(--angle-md) 0,
    100% 0,
    100% calc(100% - var(--angle-md)),
    calc(100% - var(--angle-md)) 100%,
    0 100%,
    0 var(--angle-md)
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 18px 38px rgba(0, 0, 0, 0.24);
}

.tharchive-gallery__slide.is-active {
  display: grid;
}

.tharchive-gallery__nav {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 1px solid rgba(140, 230, 255, 0.22);
  background: linear-gradient(180deg, rgba(10, 18, 30, 0.72), rgba(7, 12, 22, 0.62));
  color: var(--text);
  font-size: 1.9rem;
  line-height: 1;
  cursor: pointer;
  clip-path: polygon(
    var(--angle-card) 0,
    100% 0,
    100% calc(100% - var(--angle-card)),
    calc(100% - var(--angle-card)) 100%,
    0 100%,
    0 var(--angle-card)
  );
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.24);
  transition:
    transform 0.24s ease,
    border-color 0.24s ease,
    box-shadow 0.24s ease,
    background-color 0.24s ease;
}

.tharchive-gallery__nav:hover,
.tharchive-gallery__nav:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(140, 230, 255, 0.4);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28);
}

.tharchive-gallery__link {
  position: relative;
  display: block;
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  clip-path: polygon(
    var(--angle-card) 0,
    100% 0,
    100% calc(100% - var(--angle-card)),
    calc(100% - var(--angle-card)) 100%,
    0 100%,
    0 var(--angle-card)
  );
}

.tharchive-gallery__media {
  position: relative;
  display: block;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(10, 16, 28, 0.56), rgba(8, 12, 22, 0.3)),
    rgba(5, 10, 18, 0.82);
  min-height: min(68vh, 760px);
}

.tharchive-gallery__media::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0) 26%),
    linear-gradient(180deg, rgba(5, 10, 18, 0), rgba(5, 10, 18, 0.16));
  pointer-events: none;
}

.tharchive-gallery__media::after {
  content: "";
  position: absolute;
  inset: auto 12px 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(140, 230, 255, 0), rgba(140, 230, 255, 0.62), rgba(140, 230, 255, 0));
  opacity: 0.55;
  pointer-events: none;
}

.tharchive-gallery__hint {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(140, 230, 255, 0.2);
  background: rgba(7, 12, 22, 0.72);
  color: rgba(242, 248, 255, 0.82);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.24s ease, transform 0.24s ease, border-color 0.24s ease, color 0.24s ease;
  clip-path: polygon(
    var(--angle-sm) 0,
    100% 0,
    100% calc(100% - var(--angle-sm)),
    calc(100% - var(--angle-sm)) 100%,
    0 100%,
    0 var(--angle-sm)
  );
}

.tharchive-gallery__slide:hover .tharchive-gallery__hint,
.tharchive-gallery__slide:focus-within .tharchive-gallery__hint {
  opacity: 1;
  transform: translateY(0);
  border-color: rgba(140, 230, 255, 0.34);
  color: #fff;
}

.tharchive-gallery__slide img {
  display: block;
  width: 100%;
  max-height: min(68vh, 760px);
  object-fit: cover;
  transition: transform 0.36s ease, opacity 0.28s ease, filter 0.36s ease;
}

.tharchive-gallery__slide:hover img,
.tharchive-gallery__slide:focus-within img {
  transform: scale(1.045);
  opacity: 0.98;
  filter: saturate(1.06);
}

.tharchive-gallery__caption {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.9rem;
  line-height: 1.55;
}

.tharchive-gallery__thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 12px;
}

.tharchive-gallery__thumb {
  display: block;
  padding: 0;
  border: 1px solid rgba(140, 230, 255, 0.14);
  background: rgba(8, 14, 24, 0.46);
  cursor: pointer;
  clip-path: polygon(
    var(--angle-action) 0,
    100% 0,
    100% calc(100% - var(--angle-action)),
    calc(100% - var(--angle-action)) 100%,
    0 100%,
    0 var(--angle-action)
  );
  overflow: hidden;
  transition:
    transform 0.24s ease,
    border-color 0.24s ease,
    box-shadow 0.24s ease,
    opacity 0.24s ease;
}

.tharchive-gallery__thumb:hover,
.tharchive-gallery__thumb:focus-visible,
.tharchive-gallery__thumb.is-active {
  transform: translateY(-2px);
  border-color: rgba(140, 230, 255, 0.36);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
  opacity: 1;
}

.tharchive-gallery__thumb:not(.is-active) {
  opacity: 0.76;
}

.tharchive-gallery__thumb-media {
  display: block;
  background: rgba(5, 10, 18, 0.88);
}

.tharchive-gallery__thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.tharchive-details {
  padding: 18px 20px;
  border: 1px solid rgba(140, 230, 255, 0.12);
  background: rgba(8, 14, 24, 0.46);
}

.tharchive-details summary {
  cursor: pointer;
  list-style: none;
  color: var(--text);
  font-weight: 600;
}

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

.tharchive-details__body {
  margin-top: 14px;
  color: var(--text-soft);
  white-space: normal;
  word-break: break-word;
}

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

  .tharchive-hero__topics .tharchive-meta-block {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .tharchive-hero__topics .tharchive-meta-block__label {
    padding-top: 0;
  }

  .tharchive-hero__media {
    max-width: 320px;
    width: 100%;
    margin: 0 auto;
    justify-self: center;
  }
}

@media (max-width: 640px) {
  .tharchive-gallery__stage {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .tharchive-gallery__slide {
    padding: 10px;
    gap: 10px;
  }

  .tharchive-gallery__nav {
    position: absolute;
    top: calc(50% - 26px);
  }

  .tharchive-gallery__nav--prev {
    left: 8px;
  }

  .tharchive-gallery__nav--next {
    right: 8px;
  }

  .tharchive-gallery__hint {
    right: 10px;
    bottom: 10px;
    min-height: 24px;
    padding: 0 8px;
    font-size: 0.64rem;
  }

  .tharchive-gallery__caption {
    font-size: 0.84rem;
  }

  .tharchive-gallery__thumbs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  .single-relay_event .tharchive-site-main {
    width: calc(100% - 20px);
  }

  .tharchive-hero__title {
    font-size: clamp(1.6rem, 8vw, 2.3rem);
    line-height: 1.14;
  }

  .tharchive-relay-event .tharchive-panel {
    padding: 22px 18px;
  }

  .tharchive-action-group {
    flex-direction: column;
  }

  .tharchive-action {
    width: 100%;
  }

  .tharchive-gallery {
    grid-template-columns: 1fr;
  }
}
