.page-shell {
  width: min(100%, 1920px);
  margin: 0 auto;
  padding: clamp(1rem, 2vw, 2rem);
}

.tags-hero {
  padding: 100px 0 40px;
  position: relative;
}
.tags-hero::after {
  content: "";
  display: block;
  width: 48px;
  height: 2px;
  background: linear-gradient(90deg, #C9A876, transparent);
  margin-top: 16px;
}
.tags-hero .eyebrow {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #8A6E43;
  margin: 0 0 8px;
}
.tags-hero h1 {
  font-family: "Oswald", sans-serif;
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1;
  color: #f0ece6;
  margin: 0;
}
.tags-hero .muted {
  font-family: "Manrope", sans-serif;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.38);
  margin: 10px 0 0;
}

.tags-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1px;
  background: rgba(176, 141, 87, 0.1);
  border: 1px solid rgba(176, 141, 87, 0.1);
  margin: 0 0 48px;
}

.tag-chip {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  background: #0d0e10;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.72);
  overflow: hidden;
  transition: background 180ms cubic-bezier(0.16, 1, 0.3, 1), color 180ms cubic-bezier(0.16, 1, 0.3, 1);
}
.tag-chip::before {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(176, 141, 87, 0.14), transparent);
  transition: left 480ms cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}
.tag-chip::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 18px;
  right: 18px;
  height: 1px;
  background: var(--bronze, #B08D57);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
}
.tag-chip:hover {
  background: rgba(176, 141, 87, 0.07);
  color: #C9A876;
}
.tag-chip:hover::before {
  left: 120%;
}
.tag-chip:hover::after {
  transform: scaleX(1);
}
.tag-chip:hover .tag-bullet {
  background: #C9A876;
  box-shadow: 0 0 8px rgba(176, 141, 87, 0.5);
}
.tag-chip:hover .tag-arrow {
  opacity: 1;
  transform: translateX(2px);
}

.tag-bullet {
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  background: rgba(176, 141, 87, 0.45);
  border-radius: 50%;
  transition: background 180ms, box-shadow 180ms;
}

.tag-name {
  flex: 1;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tag-arrow {
  flex-shrink: 0;
  font-size: 0.8rem;
  opacity: 0.28;
  transition: opacity 180ms, transform 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

.tag-hero {
  position: relative;
  padding: 108px 0 40px;
  margin-bottom: 40px;
  border-bottom: 1px solid rgba(176, 141, 87, 0.1);
  overflow: hidden;
}

.tag-hero__bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 80% at 80% 50%, rgba(176, 141, 87, 0.06) 0%, transparent 70%), radial-gradient(ellipse 40% 60% at 10% 20%, rgba(176, 141, 87, 0.04) 0%, transparent 70%);
  pointer-events: none;
}

.tag-hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: start;
}
@media (max-width: 640px) {
  .tag-hero__grid {
    grid-template-columns: 1fr;
  }
}

.tag-hero__text .eyebrow {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.58rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #8A6E43;
  margin: 0 0 10px;
}
.tag-hero__text h1 {
  font-family: "Oswald", sans-serif;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 700;
  color: #C9A876;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
  line-height: 1;
}
.tag-hero__text .muted {
  font-family: "Manrope", sans-serif;
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.38);
  margin: 0 0 20px;
}

.tag-hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 2px;
  border: 1px solid rgba(176, 141, 87, 0.18);
  background: rgba(176, 141, 87, 0.05);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.6);
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-green {
  background: #4ade80;
  box-shadow: 0 0 6px rgba(74, 222, 128, 0.5);
}
.dot-blue {
  background: #60a5fa;
  box-shadow: 0 0 6px rgba(96, 165, 250, 0.4);
}
.dot-bronze {
  background: #B08D57;
  box-shadow: 0 0 6px rgba(176, 141, 87, 0.5);
}

.tag-hero__card {
  min-width: 220px;
  background: rgba(176, 141, 87, 0.05);
  border: 1px solid rgba(176, 141, 87, 0.15);
  border-top: 2px solid #C9A876;
  padding: 18px 20px;
}
.tag-hero__card .eyebrow {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.58rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #8A6E43;
  margin: 0 0 4px;
}
.tag-hero__card strong {
  display: block;
  font-family: "Oswald", sans-serif;
  font-size: 1.1rem;
  font-weight: 500;
  color: #f0ece6;
  margin-bottom: 2px;
}
.tag-hero__card .muted {
  font-family: "Manrope", sans-serif;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.35);
  margin: 8px 0 14px;
  line-height: 1.5;
}

.card-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.pulse-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.25);
  border-radius: 2px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #4ade80;
}
.pulse-badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #4ade80;
  animation: pulseGlow 1.6s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.4);
  }
}
.tag-hero__cta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.tag-hero__cta .btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  border-radius: 2px;
  font-family: "Manrope", sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
  transition: background 180ms, color 180ms, border-color 180ms;
}
.tag-hero__cta .btn.primary {
  background: #C9A876;
  color: #0a0b0d;
  border: 1px solid #C9A876;
}
.tag-hero__cta .btn.primary:hover {
  background: #dab97e;
  border-color: #dab97e;
}
.tag-hero__cta .btn.ghost {
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(176, 141, 87, 0.25);
}
.tag-hero__cta .btn.ghost:hover {
  border-color: #C9A876;
  color: #C9A876;
}

.tag-section {
  margin-bottom: 56px;
}
.tag-section#articles {
  scroll-margin-top: 80px;
}
.tag-section#gallery {
  scroll-margin-top: 80px;
}

.tag-section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(176, 141, 87, 0.1);
  margin-bottom: 24px;
}
.tag-section__head .eyebrow {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.58rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: #8A6E43;
  margin: 0 0 4px;
}
.tag-section__head h2 {
  font-family: "Oswald", sans-serif;
  font-size: 1.6rem;
  font-weight: 500;
  color: #f0ece6;
  margin: 0;
}
.tag-section__head .pill {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  border-radius: 2px;
  border: 1px solid rgba(176, 141, 87, 0.2);
  background: rgba(176, 141, 87, 0.06);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: #C9A876;
  text-decoration: none;
}

.tag-articles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.tag-article-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 20px;
  background: rgba(176, 141, 87, 0.03);
  border: 1px solid rgba(176, 141, 87, 0.12);
  border-left: 2px solid rgba(176, 141, 87, 0.3);
  text-decoration: none;
  transition: background 180ms, border-color 180ms, transform 180ms;
}
.tag-article-card:hover {
  background: rgba(176, 141, 87, 0.07);
  border-color: rgba(176, 141, 87, 0.4);
  border-left-color: #C9A876;
  transform: translateX(3px);
}
.tag-article-card .card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}
.tag-article-card .card-meta .eyebrow {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.3);
  margin: 0;
}
.tag-article-card .card-meta .pill.subtle {
  padding: 2px 8px;
  font-size: 0.62rem;
  border-color: rgba(176, 141, 87, 0.15);
  background: transparent;
  color: #8A6E43;
  border-radius: 2px;
}
.tag-article-card h3 {
  font-family: "Manrope", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
  margin: 0;
  line-height: 1.4;
}

.tag-gallery {
  columns: 3;
  column-gap: 10px;
}
@media (max-width: 900px) {
  .tag-gallery {
    columns: 2;
  }
}
@media (max-width: 560px) {
  .tag-gallery {
    columns: 1;
  }
}
.tag-gallery .masonry-item {
  break-inside: avoid;
  display: block;
  margin-bottom: 10px;
}

.empty-state {
  padding: 48px 24px;
  text-align: center;
  border: 1px dashed rgba(176, 141, 87, 0.15);
}
.empty-state h3 {
  font-family: "Oswald", sans-serif;
  font-size: 1.2rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.5);
  margin: 0 0 8px;
}
.empty-state p {
  font-family: "Manrope", sans-serif;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.28);
  margin: 0;
}
