.tm-speakers-front,
.tm-speaker-profile {
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
}

.tm-speakers-hero {
  padding: 44px 0;
}

.tm-kicker {
  color: #c49a5a;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .78rem;
}

.tm-speakers-hero h1,
.tm-speaker-profile h1 {
  font-size: clamp(3rem, 7vw, 6rem);
  line-height: 1.02;
  letter-spacing: -.06em;
  margin: .1em 0;
}

.tm-speakers-hero p,
.tm-profile-pitch {
  font-size: 1.2rem;
  color: rgba(17,17,17,.72);
  max-width: 720px;
}

/* Speaker listing */
.tm-public-speaker-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 22px;
  margin: 32px 0;
  align-items: stretch;
}

.tm-public-speaker-card {
  background: #fff;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(17,17,17,.08);
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.tm-card-image {
  display: grid;
  aspect-ratio: 4 / 5;
  background: #eee;
  place-items: center;
  text-decoration: none;
  color: #777;
  flex: 0 0 auto;
}

.tm-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tm-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 250px;
}

.tm-card-role {
  color: #c49a5a;
  font-weight: 800;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin: 0 0 8px;
  min-height: 1.2em;
}

.tm-card-body h2 {
  font-size: clamp(1.15rem, 1.3vw, 1.45rem);
  line-height: 1.15;
  margin: 0 0 10px;
  min-height: 3.35em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tm-card-body a {
  text-decoration: none;
  color: inherit;
}

.tm-card-body p:not(.tm-card-role) {
  color: rgba(17,17,17,.72);
  margin: 0 0 18px;
  line-height: 1.45;
  min-height: 4.35em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tm-card-link {
  display: inline-flex;
  margin-top: auto;
  font-weight: 800;
  color: #111;
}

/* Single speaker profile */
.tm-speaker-profile-grid {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 54px;
  align-items: center;
}

.tm-profile-image {
  border-radius: 28px;
  overflow: hidden;
  background: #eee;
  aspect-ratio: 4 / 5;
}

.tm-profile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tm-profile-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.tm-primary-front-button,
.tm-secondary-front-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 999px;
  padding: 12px 22px;
  text-decoration: none;
  font-weight: 800;
}

.tm-primary-front-button {
  background: #111;
  color: #fff;
}

.tm-secondary-front-button {
  background: #fff;
  color: #111;
  border: 1px solid rgba(17,17,17,.15);
}

.tm-back-link {
  display: inline-block;
  margin-bottom: 24px;
  text-decoration: none;
  font-weight: 800;
}

.tm-profile-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 34px 0;
}

.tm-profile-meta div {
  background: #fff;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 12px 32px rgba(17,17,17,.06);
}

.tm-profile-meta strong {
  display: block;
  color: #c49a5a;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.tm-profile-meta span {
  font-weight: 800;
}

.tm-profile-content {
  font-size: 1.08rem;
  max-width: 780px;
}

.tm-speaker-profile .wp-post-image,
.tm-speaker-profile > h1:first-child {
  display: none !important;
}

@media (max-width: 960px) {
  .tm-public-speaker-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .tm-public-speaker-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tm-speaker-profile-grid {
    grid-template-columns: 1fr;
  }

  .tm-profile-meta {
    grid-template-columns: repeat(2, 1fr);
  }

  .tm-card-body {
    min-height: 230px;
  }
}

@media (max-width: 640px) {
  .tm-public-speaker-grid,
  .tm-profile-meta {
    grid-template-columns: 1fr;
  }

  .tm-speakers-front,
  .tm-speaker-profile {
    width: min(100% - 24px, 1320px);
    padding: 28px 0;
  }

  .tm-card-body,
  .tm-card-body h2,
  .tm-card-body p:not(.tm-card-role) {
    min-height: 0;
  }
}

/* v1.5: override narrow theme content areas when shortcode is inside a page block */
.entry-content .tm-speakers-front,
.wp-site-blocks .tm-speakers-front,
main .tm-speakers-front {
  max-width: 1320px !important;
}

.entry-content .tm-public-speaker-grid,
.wp-site-blocks .tm-public-speaker-grid,
main .tm-public-speaker-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

@media (max-width: 960px) {
  .entry-content .tm-public-speaker-grid,
  .wp-site-blocks .tm-public-speaker-grid,
  main .tm-public-speaker-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 900px) {
  .entry-content .tm-public-speaker-grid,
  .wp-site-blocks .tm-public-speaker-grid,
  main .tm-public-speaker-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 640px) {
  .entry-content .tm-public-speaker-grid,
  .wp-site-blocks .tm-public-speaker-grid,
  main .tm-public-speaker-grid {
    grid-template-columns: 1fr !important;
  }
}


/* v1.6: full-width escape for themes with narrow page containers */
.tm-speakers-front--full {
  width: min(1320px, calc(100vw - 32px)) !important;
  max-width: 1320px !important;
}

/* Break out of narrow .entry-content containers */
.entry-content .tm-speakers-front--full,
.wp-block-post-content .tm-speakers-front--full,
.site-main .tm-speakers-front--full,
main .tm-speakers-front--full {
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: calc(-50vw + 16px) !important;
  margin-right: calc(-50vw + 16px) !important;
  width: calc(100vw - 32px) !important;
  max-width: 1320px !important;
}

/* Re-center after breakout on very wide screens */
@media (min-width: 1352px) {
  .entry-content .tm-speakers-front--full,
  .wp-block-post-content .tm-speakers-front--full,
  .site-main .tm-speakers-front--full,
  main .tm-speakers-front--full {
    margin-left: calc(-660px) !important;
    width: 1320px !important;
  }
}

.tm-speakers-front--cols-4 .tm-public-speaker-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

.tm-speakers-front--cols-3 .tm-public-speaker-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

@media (max-width: 960px) {
  .tm-speakers-front--cols-4 .tm-public-speaker-grid,
  .tm-speakers-front--cols-3 .tm-public-speaker-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 900px) {
  .tm-speakers-front--cols-4 .tm-public-speaker-grid,
  .tm-speakers-front--cols-3 .tm-public-speaker-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 640px) {
  .tm-speakers-front--full {
    width: min(100% - 24px, 1320px) !important;
  }

  .entry-content .tm-speakers-front--full,
  .wp-block-post-content .tm-speakers-front--full,
  .site-main .tm-speakers-front--full,
  main .tm-speakers-front--full {
    left: auto;
    right: auto;
    margin-left: auto !important;
    margin-right: auto !important;
    width: min(100% - 24px, 1320px) !important;
  }

  .tm-speakers-front--cols-4 .tm-public-speaker-grid,
  .tm-speakers-front--cols-3 .tm-public-speaker-grid {
    grid-template-columns: 1fr !important;
  }
}


.tm-profile-top-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.tm-profile-top-actions .tm-back-link {
  margin-bottom: 0;
}

.tm-speaker-edit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 999px;
  padding: 9px 16px;
  background: #111;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: .9rem;
  box-shadow: 0 10px 24px rgba(17,17,17,.12);
}

.tm-speaker-edit-button:hover,
.tm-speaker-edit-button:focus {
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}


/* v1.9.3 compact speaker listing header */
.tm-speakers-front {
  padding-top: 12px !important;
}

.tm-speakers-hero {
  padding-top: 12px !important;
  padding-bottom: 28px !important;
}

.tm-speakers-hero h1 {
  margin-top: 0 !important;
}

.tm-public-speaker-grid {
  margin-top: 18px !important;
}


/* v1.9.4: make /talare/ listing match search result listing */
.tm-speakers-front--search-style {
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 48px !important;
}

.tm-speakers-front--search-style .tm-speakers-hero--compact {
  padding: 12px 0 18px !important;
}

.tm-speakers-front--search-style .tm-speakers-hero--compact h1 {
  margin: 0 !important;
  font-size: clamp(2.6rem, 6vw, 5rem);
  line-height: 1;
  letter-spacing: -.05em;
}

.tm-speaker-search--speaker-list {
  width: 100%;
  margin: 0;
  padding: 0;
}

.tm-speaker-search-count {
  margin: 0 0 20px;
  font-weight: 800;
}

.tm-speaker-search-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  align-items: stretch;
}

.tm-speaker-search--cols-3 .tm-speaker-search-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tm-speaker-search-card {
  background: #fff;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(17,17,17,.08);
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.tm-speaker-search-image {
  display: grid;
  aspect-ratio: 4 / 5;
  background: #eee;
  place-items: center;
  color: #777;
  text-decoration: none;
}

.tm-speaker-search-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tm-speaker-search-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 250px;
}

.tm-speaker-search-role {
  color: #c49a5a;
  font-weight: 800;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin: 0 0 8px;
}

.tm-speaker-search-body h2 {
  font-size: 1.35rem;
  line-height: 1.15;
  margin: 0 0 10px;
  min-height: 3.1em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tm-speaker-search-body h2 a {
  color: inherit;
  text-decoration: none;
}

.tm-speaker-search-body p:not(.tm-speaker-search-role) {
  color: rgba(17,17,17,.72);
  margin: 0 0 18px;
  line-height: 1.45;
  min-height: 4.35em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tm-speaker-search-link {
  margin-top: auto;
  color: #111;
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 1180px) {
  .tm-speaker-search-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .tm-speaker-search-grid,
  .tm-speaker-search--cols-3 .tm-speaker-search-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .tm-speakers-front--search-style {
    width: min(100% - 24px, 1320px);
  }

  .tm-speaker-search-grid,
  .tm-speaker-search--cols-3 .tm-speaker-search-grid {
    grid-template-columns: 1fr;
  }

  .tm-speaker-search-body,
  .tm-speaker-search-body h2,
  .tm-speaker-search-body p:not(.tm-speaker-search-role) {
    min-height: 0;
  }
}


/* v1.9.5: force /talare/ cards to match search result cards */
.tm-speakers-front--search-style .tm-speaker-search-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 22px !important;
  align-items: stretch !important;
}

.tm-speakers-front--search-style .tm-speaker-search-card {
  background: #fff !important;
  border-radius: 24px !important;
  overflow: hidden !important;
  box-shadow: 0 12px 36px rgba(17,17,17,.08) !important;
  display: flex !important;
  flex-direction: column !important;
  min-height: 100% !important;
}

.tm-speakers-front--search-style .tm-speaker-search-image {
  display: grid !important;
  aspect-ratio: 4 / 5 !important;
  background: #eee !important;
  place-items: center !important;
  color: #777 !important;
  text-decoration: none !important;
}

.tm-speakers-front--search-style .tm-speaker-search-image img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

.tm-speakers-front--search-style .tm-speaker-search-body {
  padding: 20px !important;
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  min-height: 0 !important;
}

.tm-speakers-front--search-style .tm-speaker-search-role {
  color: #c49a5a !important;
  font-weight: 800 !important;
  font-size: .72rem !important;
  text-transform: uppercase !important;
  letter-spacing: .08em !important;
  margin: 0 0 8px !important;
  line-height: 1.2 !important;
}

.tm-speakers-front--search-style .tm-speaker-search-body h2 {
  font-size: 1.35rem !important;
  line-height: 1.15 !important;
  letter-spacing: 0 !important;
  margin: 0 0 14px !important;
  min-height: 0 !important;
  max-height: none !important;
  display: block !important;
  overflow: visible !important;
  -webkit-line-clamp: unset !important;
  -webkit-box-orient: initial !important;
}

.tm-speakers-front--search-style .tm-speaker-search-body h2 a {
  color: inherit !important;
  text-decoration: none !important;
}

.tm-speakers-front--search-style .tm-speaker-search-body p:not(.tm-speaker-search-role) {
  color: rgba(17,17,17,.72) !important;
  margin: 0 0 18px !important;
  line-height: 1.45 !important;
  min-height: 0 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 3 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

.tm-speakers-front--search-style .tm-speaker-search-link {
  margin-top: auto !important;
  color: #111 !important;
  font-weight: 800 !important;
  text-decoration: none !important;
}

@media (max-width: 1180px) {
  .tm-speakers-front--search-style .tm-speaker-search-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 900px) {
  .tm-speakers-front--search-style .tm-speaker-search-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 640px) {
  .tm-speakers-front--search-style .tm-speaker-search-grid {
    grid-template-columns: 1fr !important;
  }
}


/* v1.9.8 related speakers */
.tm-related-speakers {
  margin-top: 56px;
  padding-top: 36px;
  border-top: 1px solid rgba(17,17,17,.10);
}

.tm-related-speakers-head {
  margin-bottom: 22px;
}

.tm-related-speakers-head h2 {
  margin: 0 0 6px;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1;
  letter-spacing: -.04em;
}

.tm-related-speakers-head p {
  margin: 0;
  color: rgba(17,17,17,.68);
}

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

.tm-related-speaker-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  background: #fff;
  color: #111;
  border-radius: 22px;
  overflow: hidden;
  text-decoration: none;
  box-shadow: 0 12px 34px rgba(17,17,17,.08);
}

.tm-related-speaker-image {
  display: block;
  aspect-ratio: 4 / 3;
  background-size: cover;
  background-position: center;
  background-color: #eee;
}

.tm-related-speaker-body {
  padding: 16px;
  display: grid;
  gap: 6px;
}

.tm-related-speaker-body small {
  color: #c49a5a;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .68rem;
}

.tm-related-speaker-body strong {
  font-size: 1.08rem;
  line-height: 1.15;
}

.tm-related-speaker-body em {
  font-style: normal;
  margin-top: 4px;
  font-weight: 900;
}

@media (max-width: 900px) {
  .tm-related-speakers-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .tm-related-speakers-grid {
    grid-template-columns: 1fr;
  }
}


/* v2.0 rich speaker content typography */
.tm-profile-content h1,
.tm-profile-content h2,
.tm-profile-content h3,
.tm-profile-content h4 {
  margin: 1.25em 0 .45em;
  line-height: 1.08;
  letter-spacing: -.03em;
}

.tm-profile-content h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
}

.tm-profile-content h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.tm-profile-content h3 {
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.tm-profile-content h4 {
  font-size: 1.2rem;
}

.tm-profile-content ul,
.tm-profile-content ol {
  margin: 1em 0 1.4em 1.3em;
  padding-left: 1em;
}

.tm-profile-content li {
  margin: .35em 0;
}

.tm-profile-content blockquote {
  margin: 1.6em 0;
  padding: 22px 26px;
  border-left: 5px solid #c49a5a;
  background: rgba(196,154,90,.10);
  border-radius: 18px;
  font-size: 1.12em;
  line-height: 1.55;
}

.tm-profile-content blockquote p {
  margin: 0;
}

.tm-profile-content strong {
  font-weight: 900;
}

.tm-profile-content em {
  font-style: italic;
}


/* v2.1 video preview instead of video button */
.tm-profile-video {
  width: 100%;
  margin-top: 22px;
}

.tm-profile-video-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 22px;
  overflow: hidden;
  background: #111;
  box-shadow: 0 14px 36px rgba(17,17,17,.12);
}

.tm-profile-video-frame iframe,
.tm-profile-video-frame video,
.tm-profile-video-frame embed,
.tm-profile-video-frame object {
  display: block;
  width: 100% !important;
  height: 100% !important;
  border: 0;
}

.tm-profile-video-fallback {
  border-radius: 18px;
  background: rgba(17,17,17,.06);
  padding: 16px 18px;
}

.tm-profile-video-fallback a {
  color: #111;
  font-weight: 900;
  text-decoration: none;
}

@media (max-width: 720px) {
  .tm-profile-video {
    margin-top: 18px;
  }

  .tm-profile-video-frame {
    border-radius: 18px;
  }
}


/* v2.2 equal speaker listing images */
.tm-speakers-front .tm-speaker-search-card,
.tm-speakers-front--search-style .tm-speaker-search-card,
.tm-speaker-search .tm-speaker-search-card {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  overflow: hidden !important;
}

.tm-speakers-front .tm-speaker-search-image,
.tm-speakers-front--search-style .tm-speaker-search-image,
.tm-speaker-search .tm-speaker-search-image {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  aspect-ratio: 4 / 5 !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: hidden !important;
  background: #eee !important;
  flex: 0 0 auto !important;
}

.tm-speakers-front .tm-speaker-search-image img,
.tm-speakers-front--search-style .tm-speaker-search-image img,
.tm-speaker-search .tm-speaker-search-image img {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center center !important;
}

.tm-speakers-front .tm-speaker-search-body,
.tm-speakers-front--search-style .tm-speaker-search-body,
.tm-speaker-search .tm-speaker-search-body {
  flex: 1 1 auto !important;
}

/* Also keep related speaker images consistent */
.tm-related-speaker-image {
  aspect-ratio: 4 / 3 !important;
  height: auto !important;
  min-height: 0 !important;
  background-size: cover !important;
  background-position: center center !important;
}
