.tpfai-gems-archive,
.tpfai-gem-single {
  background: #f7f8f5;
  color: #1d2520;
  font-family: "Plus Jakarta Sans", "Be Vietnam Pro", system-ui, sans-serif;
  line-break: strict;
}

.tpfai-gems-wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 64px;
}

.tpfai-gems-main {
  width: 100%;
  max-width: none;
}

.tpfai-gems-kicker {
  margin: 0 0 4px;
  color: #3d7a4a;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

.tpfai-gems-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  margin-bottom: 14px;
  padding: 18px 22px;
  border: 1px solid #dde5d7;
  border-radius: 8px;
  background: #ffffff;
  text-align: center;
  justify-items: center;
}

.tpfai-gems-hero h1,
.tpfai-gem-header h1 {
  margin: 0;
  color: #17231d;
  font-size: clamp(24px, 3.2vw, 34px);
  line-height: 1.18;
  letter-spacing: 0;
  overflow-wrap: break-word;
  text-wrap: pretty;
}

.tpfai-gems-hero p,
.tpfai-gem-lead {
  max-width: 820px;
  margin: 0;
  color: #48564d;
  font-size: 14px;
  line-height: 1.65;
  overflow-wrap: break-word;
  text-wrap: pretty;
}

.tpfai-gems-filters {
  position: sticky;
  top: 8px;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(330px, 1.05fr) minmax(0, 1.45fr) auto;
  gap: 12px 16px;
  align-items: end;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid #dde5d7;
  border-radius: 8px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 14px 34px rgba(31, 45, 37, .08);
  backdrop-filter: blur(12px);
}

.tpfai-gems-search {
  display: grid;
  gap: 6px;
  margin-bottom: 0;
}

.tpfai-gems-search span,
.tpfai-gems-filter-label {
  color: #556258;
  font-size: 13px;
  font-weight: 800;
}

.tpfai-gems-search input {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid #cdd7c8;
  border-radius: 8px;
  background: #fbfcfa;
  color: #17231d;
  font-size: 16px;
}

.tpfai-gems-filter-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: end;
}

.tpfai-gems-filter-group {
  display: grid;
  gap: 5px;
}

.tpfai-gems-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tpfai-gems-chip,
.tpfai-gems-reset {
  min-height: 32px;
  border: 1px solid #cdd7c8;
  border-radius: 999px;
  background: #ffffff;
  color: #324038;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.tpfai-gems-chip {
  padding: 5px 10px;
}

.tpfai-gems-chip.is-active {
  border-color: #1e6b3b;
  background: #e6f4e9;
  color: #164f2d;
}

.tpfai-gems-filter-actions {
  display: grid;
  align-items: center;
  justify-items: end;
  gap: 6px;
  margin-top: 0;
}

#tpfai-gems-count {
  color: #556258;
  font-size: 13px;
  font-weight: 800;
}

.tpfai-gems-reset {
  padding: 5px 10px;
}

.tpfai-gems-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.tpfai-gem-card {
  min-height: 100%;
}

.tpfai-gem-card[hidden] {
  display: none;
}

.tpfai-gem-card-link {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 22px;
  border: 1px solid #dde5d7;
  border-radius: 8px;
  background: #ffffff;
  color: inherit;
  text-decoration: none;
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.tpfai-gem-card-link:hover {
  border-color: #9bbc9b;
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(31, 45, 37, .10);
}

.tpfai-gem-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.tpfai-gem-card-type,
.tpfai-gem-card-level {
  font-size: 12px;
  font-weight: 800;
}

.tpfai-gem-card-type {
  color: #3d7a4a;
}

.tpfai-gem-card-level {
  padding: 4px 8px;
  border-radius: 999px;
  background: #fff3d6;
  color: #7a4d00;
}

.tpfai-gem-card h2 {
  margin: 0 0 10px;
  color: #17231d;
  font-size: 20px;
  line-height: 1.35;
  letter-spacing: 0;
}

.tpfai-gem-card-summary {
  margin: 0 0 14px;
  color: #48564d;
  font-size: 14px;
  line-height: 1.75;
}

.tpfai-gem-card-points {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
}

.tpfai-gem-card-points div {
  padding: 10px;
  border-radius: 8px;
  background: #f4f7f1;
}

.tpfai-gem-card-points dt {
  margin-bottom: 4px;
  color: #617069;
  font-size: 12px;
  font-weight: 800;
}

.tpfai-gem-card-points dd {
  margin: 0;
  color: #253229;
  font-size: 13px;
  line-height: 1.6;
}

.tpfai-gem-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

.tpfai-gem-card-tags span,
.tpfai-gem-taxonomies a {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border: 1px solid #d7e0d2;
  border-radius: 999px;
  background: #fbfcfa;
  color: #3d4c43;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.tpfai-gem-card-more,
.tpfai-gem-card-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  width: min(100%, 190px);
  min-height: 40px;
  margin-top: 18px;
  padding: 9px 16px;
  border: 1px solid #1e6b3b;
  border-radius: 999px;
  background: #1e6b3b;
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
  text-decoration: none;
  box-shadow: 0 6px 14px rgba(30, 107, 59, .18);
  transition: background .16s ease, transform .16s ease, box-shadow .16s ease;
}

.tpfai-gem-card-link:hover .tpfai-gem-card-button {
  background: #185732;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(30, 107, 59, .24);
}

.tpfai-gems-empty {
  padding: 20px;
  border: 1px solid #dde5d7;
  border-radius: 8px;
  background: #ffffff;
  color: #48564d;
}

.tpfai-gem-header {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, .7fr);
  gap: 24px;
  margin-bottom: 20px;
}

.tpfai-gem-header-main,
.tpfai-gem-facts,
.tpfai-gem-taxonomies,
.tpfai-gem-video,
.tpfai-gem-body,
.tpfai-gem-cta,
.tpfai-gem-related {
  border: 1px solid #dde5d7;
  border-radius: 8px;
  background: #ffffff;
}

.tpfai-gem-header-main {
  padding: 34px;
}

.tpfai-gem-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  color: #1e6b3b;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.tpfai-gem-back-link::before {
  content: "<";
}

.tpfai-gem-lead {
  margin-top: 14px;
}

.tpfai-gem-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.tpfai-gem-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 11px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
  text-decoration: none;
  white-space: nowrap;
}

.tpfai-gem-btn-primary {
  border: 1px solid #1e6b3b;
  background: #1e6b3b;
  color: #ffffff;
}

.tpfai-gem-btn-secondary {
  border: 1px solid #cdd7c8;
  background: #ffffff;
  color: #1e6b3b;
}

.tpfai-gem-facts {
  display: grid;
  gap: 8px;
  padding: 18px;
}

.tpfai-gem-facts div {
  padding: 12px 14px;
  border-left: 3px solid #d7e7d4;
  border-radius: 8px;
  background: #f7faf5;
}

.tpfai-gem-facts span,
.tpfai-gem-taxonomies span {
  display: block;
  margin-bottom: 5px;
  color: #617069;
  font-size: 11px;
  font-weight: 800;
}

.tpfai-gem-facts strong {
  display: block;
  color: #253229;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.75;
}

.tpfai-gem-taxonomies {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
  padding: 18px;
}

.tpfai-gem-taxonomies p {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}

.tpfai-gem-video {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(320px, 1.2fr);
  gap: 18px;
  align-items: center;
  margin-bottom: 20px;
  padding: 24px;
}

.tpfai-gem-video h2,
.tpfai-gem-cta h2,
.tpfai-gem-related h2 {
  margin: 0 0 8px;
  color: #17231d;
  font-size: 24px;
  letter-spacing: 0;
}

.tpfai-gem-video p,
.tpfai-gem-cta p {
  margin: 0;
  color: #48564d;
  line-height: 1.75;
}

.tpfai-gem-video-cover,
.tpfai-gem-video iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
}

.tpfai-gem-video-cover {
  position: relative;
  display: grid;
  place-items: center;
  background: #1d2520;
  color: #ffffff;
  cursor: pointer;
}

.tpfai-gem-video-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .72;
}

.tpfai-gem-video-cover span {
  position: relative;
  z-index: 1;
  padding: 11px 16px;
  border-radius: 999px;
  background: #ffffff;
  color: #1e6b3b;
  font-weight: 800;
}

.tpfai-gem-video-link {
  color: #1e6b3b;
  font-weight: 800;
}

.tpfai-gem-body {
  margin-bottom: 20px;
  padding: 34px;
}

.tpfai-gem-body .toc {
  display: none !important;
}

.tpfai-gem-body h2 {
  margin: 34px 0 12px;
  color: #17231d;
  font-size: 26px;
  letter-spacing: 0;
}

.tpfai-gem-body h2:first-child {
  margin-top: 0;
}

.tpfai-gem-body p,
.tpfai-gem-body li {
  color: #34423a;
  font-size: 16px;
  line-height: 1.9;
  overflow-wrap: break-word;
  text-wrap: pretty;
}

.tpfai-gem-body p {
  margin: 0 0 1.15em;
}

.tpfai-gem-body p:last-child {
  margin-bottom: 0;
}

.tpfai-gem-body-action {
  display: flex;
  justify-content: center;
  margin: 28px 0 10px;
}

.tpfai-gem-body-action .tpfai-gem-btn {
  min-width: 180px;
}

.tpfai-gem-body ul,
.tpfai-gem-body ol {
  padding-left: 1.35em;
}

.tpfai-gem-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
  padding: 24px;
  background: #eef6ea;
}

.tpfai-gem-cta .tpfai-gem-btn {
  flex: 0 0 auto;
  min-width: 128px;
}

.tpfai-gem-cta-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
  align-items: center;
}

.tpfai-gem-related {
  padding: 24px;
}

.tpfai-gem-related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.tpfai-gem-related-grid a {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid #d7e0d2;
  border-radius: 8px;
  background: #fbfcfa;
  color: inherit;
  text-decoration: none;
}

.tpfai-gem-related-grid span {
  color: #3d7a4a;
  font-size: 12px;
  font-weight: 800;
}

.tpfai-gem-related-grid strong {
  color: #17231d;
  line-height: 1.5;
}

.tpfai-gem-related-grid em {
  color: #1e6b3b;
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}

@media (max-width: 960px) {
  .tpfai-gems-filters {
    grid-template-columns: 1fr;
  }

  .tpfai-gems-hero {
    text-align: left;
    justify-items: start;
  }

  .tpfai-gems-filter-actions {
    display: flex;
    justify-content: space-between;
  }

  .tpfai-gem-related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tpfai-gem-header,
  .tpfai-gem-video {
    grid-template-columns: 1fr;
  }

  .tpfai-gem-taxonomies {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .tpfai-gems-archive,
  .tpfai-gem-single {
    width: 100vw;
    margin-right: calc(50% - 50vw);
    margin-left: calc(50% - 50vw);
  }

  .tpfai-gems-wrap {
    box-sizing: border-box;
    width: 100%;
    padding: 6px 6px 44px;
  }

  .tpfai-gems-hero {
    padding: 16px;
  }

  .tpfai-gems-filters {
    gap: 10px;
    margin-bottom: 12px;
    padding: 12px;
  }

  .tpfai-gem-card-link {
    padding: 16px 14px;
  }

  .tpfai-gem-card-top {
    margin-bottom: 10px;
  }

  .tpfai-gem-card h2 {
    margin-bottom: 8px;
    font-size: 18px;
    line-height: 1.42;
  }

  .tpfai-gem-card-summary {
    margin-bottom: 10px;
    font-size: 13.5px;
    line-height: 1.68;
  }

  .tpfai-gem-card-points {
    gap: 6px;
    margin-bottom: 10px;
  }

  .tpfai-gem-card-points div {
    padding: 9px 10px;
  }

  .tpfai-gem-card-points dd {
    font-size: 12.5px;
    line-height: 1.55;
  }

  .tpfai-gem-card-tags span {
    min-height: 24px;
    font-size: 11.5px;
  }

  .tpfai-gem-card-button {
    min-height: 38px;
    margin-top: 14px;
  }

  .tpfai-gem-header-main,
  .tpfai-gem-body {
    padding: 18px 14px;
  }

  .tpfai-gems-hero h1,
  .tpfai-gem-header h1 {
    font-size: 21px;
    line-height: 1.32;
  }

  .tpfai-gem-lead {
    margin-top: 12px;
    font-size: 13.5px;
    line-height: 1.8;
  }

  .tpfai-gem-header {
    gap: 12px;
    margin-bottom: 12px;
  }

  .tpfai-gem-facts {
    gap: 8px;
    padding: 14px;
  }

  .tpfai-gem-facts div {
    padding: 11px 12px;
  }

  .tpfai-gem-facts strong {
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.72;
  }

  .tpfai-gem-body {
    margin-bottom: 14px;
  }

  .tpfai-gem-body h2 {
    margin: 28px 0 10px;
    font-size: 21px;
    line-height: 1.38;
    text-wrap: pretty;
  }

  .tpfai-gem-body p,
  .tpfai-gem-body li {
    font-size: 15px;
    line-height: 1.82;
  }

  .tpfai-gem-body-action {
    margin: 24px 0 10px;
  }

  .tpfai-gem-body-action .tpfai-gem-btn {
    width: 100%;
  }

  .tpfai-gem-body ul,
  .tpfai-gem-body ol {
    padding-left: 1.15em;
  }

  .tpfai-gem-body li + li {
    margin-top: .35em;
  }

  .tpfai-gems-filters {
    position: relative;
    top: auto;
  }

  .tpfai-gems-grid,
  .tpfai-gem-related-grid,
  .tpfai-gem-taxonomies {
    grid-template-columns: 1fr;
  }

  .tpfai-gems-filter-actions,
  .tpfai-gem-cta {
    align-items: stretch;
    flex-direction: column;
  }

  .tpfai-gem-actions {
    display: grid;
    gap: 10px;
    margin-top: 20px;
  }

  .tpfai-gem-cta-actions {
    display: grid;
    width: 100%;
  }

  .tpfai-gem-btn {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
  }

  .tpfai-gem-actions .tpfai-gem-btn-secondary {
    white-space: normal;
    line-height: 1.45;
  }
}
