.tfy-section {
  border-top: 1px solid var(--border, #262630);
  border-bottom: 1px solid var(--border, #262630);
  background: linear-gradient(180deg, rgba(80, 66, 255, .07), rgba(10, 10, 15, 0) 45%);
}

.tfy-inner {
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
  padding: 42px 0 46px;
}

.tfy-heading-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.tfy-heading-row h2 {
  margin: 8px 0 5px;
  color: var(--text, #f4f4f7);
  font: 800 clamp(30px, 4vw, 48px)/.98 "Barlow Condensed", sans-serif;
  letter-spacing: -.02em;
}

.tfy-intro {
  max-width: 670px;
  margin: 0;
  color: var(--muted2, #a6a6b2);
  font-size: 14px;
  line-height: 1.55;
}

.tfy-watchlist-link {
  flex: none;
  padding: 10px 14px;
  border: 1px solid var(--border2, #3b3b48);
  border-radius: 4px;
  color: var(--text, #f4f4f7);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .05em;
  text-decoration: none;
  text-transform: uppercase;
}

.tfy-watchlist-link:hover,
.tfy-watchlist-link:focus-visible {
  border-color: #786dff;
  outline: none;
}

.tfy-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 25px 0 14px;
}

.tfy-controls-label {
  margin-right: 2px;
  color: var(--muted2, #a6a6b2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.tfy-topic-list {
  display: flex;
  flex: 1;
  gap: 7px;
  overflow-x: auto;
  padding: 2px;
  scrollbar-width: thin;
}

.tfy-topic,
.tfy-reset {
  appearance: none;
  border: 1px solid var(--border2, #3b3b48);
  border-radius: 999px;
  background: rgba(255, 255, 255, .025);
  color: var(--muted2, #a6a6b2);
  cursor: pointer;
  font: 700 11px/1 "DM Sans", sans-serif;
  letter-spacing: .04em;
  padding: 9px 12px;
  white-space: nowrap;
}

.tfy-topic[aria-pressed="true"] {
  border-color: #786dff;
  background: #6358e8;
  color: #fff;
}

.tfy-topic:focus-visible,
.tfy-reset:focus-visible,
.tfy-dismiss:focus-visible,
.tfy-more-like:focus-visible {
  outline: 2px solid #9e97ff;
  outline-offset: 2px;
}

.tfy-reset {
  border: 0;
  background: transparent;
  color: var(--muted, #7f7f8d);
  padding-inline: 5px;
}

.tfy-context {
  min-height: 20px;
  margin-bottom: 13px;
  color: var(--muted, #7f7f8d);
  font-size: 12px;
}

.tfy-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.tfy-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border, #262630);
  border-radius: 6px;
  background: var(--surface, #121219);
  transition: transform .18s ease, border-color .18s ease;
}

.tfy-card:hover {
  transform: translateY(-3px);
  border-color: var(--border2, #3b3b48);
}

.tfy-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.tfy-image-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #1a1a24;
}

.tfy-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform .25s ease;
}

.tfy-card:hover .tfy-image {
  transform: scale(1.025);
}

.tfy-type {
  position: absolute;
  left: 10px;
  bottom: 9px;
  padding: 5px 7px;
  border-radius: 3px;
  background: rgba(9, 9, 14, .86);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.tfy-card-body {
  padding: 14px 14px 16px;
}

.tfy-reason {
  margin-bottom: 8px;
  color: #9e97ff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.tfy-title {
  display: -webkit-box;
  min-height: 45px;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--text, #f4f4f7);
  font: 700 17px/1.3 "DM Sans", sans-serif;
}

.tfy-meta {
  margin-top: 11px;
  color: var(--muted, #7f7f8d);
  font-size: 11px;
}

.tfy-card-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: flex;
  gap: 6px;
}

.tfy-dismiss,
.tfy-more-like {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 50%;
  background: rgba(8, 8, 12, .8);
  color: #fff;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
}

.tfy-more-like {
  width: auto;
  padding: 0 10px;
  border-radius: 999px;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .02em;
}

.tfy-more-like[aria-pressed="true"] {
  border-color: #9e97ff;
  background: #6358e8;
  color: #fff;
}

.tfy-skeleton {
  aspect-ratio: 4 / 3;
  border: 1px solid var(--border, #262630);
  border-radius: 6px;
  background: linear-gradient(100deg, #15151d 20%, #20202a 40%, #15151d 60%);
  background-size: 200% 100%;
  animation: tfy-shimmer 1.25s linear infinite;
}

.tfy-empty,
.tfy-noscript {
  grid-column: 1 / -1;
  padding: 24px;
  border: 1px solid var(--border, #262630);
  border-radius: 6px;
  color: var(--muted2, #a6a6b2);
  text-align: center;
}

@keyframes tfy-shimmer {
  to { background-position-x: -200%; }
}

@media (max-width: 980px) {
  .tfy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .tfy-inner { width: min(100% - 24px, 1240px); padding: 34px 0 38px; }
  .tfy-heading-row { align-items: start; }
  .tfy-watchlist-link { padding: 8px 10px; font-size: 10px; }
  .tfy-controls { align-items: flex-start; flex-wrap: wrap; }
  .tfy-controls-label { width: 100%; }
  .tfy-topic-list { order: 2; width: 100%; }
  .tfy-reset { margin-left: auto; }
  .tfy-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .tfy-card,
  .tfy-image { transition: none; }
  .tfy-skeleton { animation: none; }
}
