/*
 Theme Name:   TraitMind Child
 Theme URI:    https://traitmind.com
 Description:  TraitMind 统一多语言主题 - 子主题，基于 Twenty Twenty-Five
 Author:       TraitMind Team
 Author URI:   https://traitmind.com
 Template:     twentytwentyfive
 Version:      1.0.3
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  traitmind-child
 Tags:         one-column, custom-colors, custom-menu, custom-logo, translation-ready
*/

/* ============================================
   TraitMind Custom Styles
   ============================================ */

/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* --- CSS Variables --- */
:root {
  --tm-primary: #5B5BD6;
  --tm-primary-dark: #4545B8;
  --tm-accent: #F59E0B;
  --tm-bg: #F8FAFC;
  --tm-dark: #1E293B;
  --tm-text: #334155;
  --tm-light: #E2E8F0;
  --tm-white: #FFFFFF;
  --tm-radius: 12px;
  --tm-shadow: 0 4px 20px rgba(91, 91, 214, 0.12);
  --tm-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

:root[data-theme="dark"] {
  --tm-primary: #8B8CF6;
  --tm-primary-dark: #A5B4FC;
  --tm-accent: #FBBF24;
  --tm-bg: #0F172A;
  --tm-dark: #F8FAFC;
  --tm-text: #CBD5E1;
  --tm-light: #334155;
  --tm-white: #111827;
  --tm-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

:root[data-theme="dark"] body {
  background: #0F172A;
  color: #CBD5E1;
}

:root[data-theme="dark"] .tm-header,
:root[data-theme="dark"] .tm-mobile-menu,
:root[data-theme="dark"] .tm-lang-switcher,
:root[data-theme="dark"] .tm-lang-dropdown,
:root[data-theme="dark"] .tm-test-card,
:root[data-theme="dark"] .tm-test-list-item,
:root[data-theme="dark"] .tm-overview,
:root[data-theme="dark"] .tm-overview-rich,
:root[data-theme="dark"] .tm-question,
:root[data-theme="dark"] .tm-result-card,
:root[data-theme="dark"] #tm-share-card,
:root[data-theme="dark"] .tm-result-comments,
:root[data-theme="dark"] .tm-comment-form-wrap,
:root[data-theme="dark"] .tm-comments-placeholder,
:root[data-theme="dark"] .tm-ov-section,
:root[data-theme="dark"] .tm-dim-card,
:root[data-theme="dark"] .tm-rs,
:root[data-theme="dark"] .tm-also-took,
:root[data-theme="dark"] [style*="background:#fff"],
:root[data-theme="dark"] [style*="background:white"],
:root[data-theme="dark"] [style*="background: #fff"] {
  background: #111827 !important;
  color: #CBD5E1 !important;
  border-color: #334155 !important;
}

:root[data-theme="dark"] [style*="background:#F8FAFC"],
:root[data-theme="dark"] [style*="background: #F8FAFC"],
:root[data-theme="dark"] [style*="background:#F0F4FF"],
:root[data-theme="dark"] [style*="background:#EEF2FF"] {
  background: #1E293B !important;
  border-color: #334155 !important;
}

:root[data-theme="dark"] h1,
:root[data-theme="dark"] h2,
:root[data-theme="dark"] h3,
:root[data-theme="dark"] h4,
:root[data-theme="dark"] h5,
:root[data-theme="dark"] h6,
:root[data-theme="dark"] .tm-logo-text,
:root[data-theme="dark"] .tm-overview-title,
:root[data-theme="dark"] .tm-result-name,
:root[data-theme="dark"] .tm-dim-name,
:root[data-theme="dark"] [style*="color:#1E293B"] {
  color: #F8FAFC !important;
}

:root[data-theme="dark"] p,
:root[data-theme="dark"] li,
:root[data-theme="dark"] .tm-overview-desc,
:root[data-theme="dark"] .tm-result-desc,
:root[data-theme="dark"] .tm-result-role,
:root[data-theme="dark"] .tm-dim-card-desc,
:root[data-theme="dark"] .tm-nav a,
:root[data-theme="dark"] .tm-lang-link,
:root[data-theme="dark"] [style*="color:#334155"],
:root[data-theme="dark"] [style*="color:#475569"],
:root[data-theme="dark"] [style*="color:#64748B"],
:root[data-theme="dark"] [style*="color:#94A3B8"] {
  color: #CBD5E1 !important;
}

:root[data-theme="dark"] input,
:root[data-theme="dark"] textarea,
:root[data-theme="dark"] select,
:root[data-theme="dark"] .tm-option-btn {
  background: #0F172A !important;
  color: #F8FAFC !important;
  border-color: #334155 !important;
}

:root[data-theme="dark"] .tm-footer {
  background: #020617;
}

:root[data-theme="dark"] .tm-stat-bar,
:root[data-theme="dark"] [style*="background:#E2E8F0"] {
  background: #334155 !important;
}

/* Contact page keeps lightly tinted information cards in light mode. In dark
   mode, use a true dark surface so the global text-color variables retain contrast. */
:root[data-theme="dark"] .tm-contact-page .tm-contact-info-card {
  background: #1E293B !important;
  border: 1px solid #334155;
}

:root[data-theme="dark"] .tm-contact-page .tm-contact-card-label {
  color: #94A3B8 !important;
}

:root[data-theme="dark"] .tm-contact-page .tm-contact-card-value:not(.tm-contact-email) {
  color: #F8FAFC !important;
}

:root[data-theme="dark"] .tm-contact-page .tm-contact-email {
  color: #A5B4FC !important;
}

:root[data-theme="dark"] .tm-contact-page .tm-contact-form,
:root[data-theme="dark"] .tm-contact-page .tm-contact-comment {
  background: #111827 !important;
  border-color: #334155 !important;
}

.tm-contact-honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
}

.tm-contact-reply-toggle,
.tm-contact-reply-submit,
.tm-contact-reply-cancel {
  border-radius: 8px;
  font-family: Inter, sans-serif;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
}

.tm-contact-reply-toggle {
  margin-top: 12px;
  padding: 6px 12px;
  background: #EEF2FF;
  border: 1px solid #C7D2FE;
  color: #4F46E5;
}

.tm-contact-reply-form {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--tm-light);
  border-radius: 10px;
  background: var(--tm-bg);
}

.tm-contact-reply-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.tm-contact-reply-fields .tm-contact-input {
  min-width: 0;
  width: 100%;
  border: 1px solid var(--tm-light);
  border-radius: 8px;
  padding: 10px;
  font: inherit;
}

.tm-contact-reply-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.tm-contact-reply-submit {
  padding: 8px 14px;
  background: var(--tm-primary);
  border: 1px solid var(--tm-primary);
  color: #fff;
}

.tm-contact-reply-cancel {
  padding: 8px 14px;
  background: transparent;
  border: 1px solid var(--tm-light);
  color: var(--tm-text);
}

.tm-contact-replying-to {
  margin-left: 8px;
  color: var(--tm-primary);
  font-size: 0.78rem;
}

.tm-contact-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 28px 0 8px;
}

.tm-contact-pagination a,
.tm-contact-pagination span {
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--tm-light);
  border-radius: 8px;
  color: var(--tm-text);
  background: var(--tm-white);
  font: 700 0.88rem Inter, sans-serif;
  text-decoration: none;
}

.tm-contact-pagination a:hover {
  border-color: var(--tm-primary);
  color: var(--tm-primary);
}

.tm-contact-pagination .is-current {
  border-color: var(--tm-primary);
  background: var(--tm-primary);
  color: #fff;
}

:root[data-theme="dark"] .tm-contact-reply-toggle {
  background: #312E81;
  border-color: #6366F1;
  color: #E0E7FF;
}

:root[data-theme="dark"] .tm-contact-reply-form {
  background: #0F172A;
  border-color: #334155;
}

:root[data-theme="dark"] .tm-header-search-results {
  background: #111827;
  border-color: #334155;
}

:root[data-theme="dark"] .tm-header-search-icon {
  color: #94A3B8;
}

:root[data-theme="dark"] .tm-contact-pagination a,
:root[data-theme="dark"] .tm-contact-pagination span {
  background: #111827;
  border-color: #334155;
  color: #E2E8F0;
}

:root[data-theme="dark"] .tm-contact-pagination a:hover {
  border-color: #818CF8;
  color: #C7D2FE;
}

:root[data-theme="dark"] .tm-contact-pagination .is-current {
  background: var(--tm-primary);
  border-color: var(--tm-primary);
  color: #fff;
}

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

:root[data-theme="dark"] .tm-about-page .tm-about-tool-card,
:root[data-theme="dark"] .tm-privacy-page .tm-privacy-contact-cta,
:root[data-theme="dark"] .tm-faq-contact-cta {
  background: #1E293B !important;
  border: 1px solid #334155;
}

:root[data-theme="dark"] .tm-about-page .tm-about-tool-card > div:last-child > div,
:root[data-theme="dark"] .tm-privacy-page .tm-privacy-contact-cta h3,
:root[data-theme="dark"] .tm-faq-contact-cta h2 {
  color: #F8FAFC !important;
}

:root[data-theme="dark"] .tm-about-page .tm-about-tool-card > div:last-child > div:last-child,
:root[data-theme="dark"] .tm-privacy-page .tm-privacy-contact-cta p,
:root[data-theme="dark"] .tm-faq-contact-cta p {
  color: #CBD5E1 !important;
}

:root[data-theme="dark"] .tm-about-page .tm-about-disclaimer {
  background: #3B2A14 !important;
  border-color: #854D0E !important;
}

:root[data-theme="dark"] .tm-about-page .tm-about-disclaimer p {
  color: #FDE68A !important;
}

.tm-faq-contact-cta {
  background: linear-gradient(135deg, #EEF2FF, #FAF5FF);
  border: 1px solid #C7D2FE;
}

.tm-faq-contact-cta h2 {
  color: var(--tm-dark);
}

.tm-faq-contact-cta p {
  color: var(--tm-text);
}

.tm-faq-contact-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 20px;
  border-radius: 8px;
  background: var(--tm-primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
}

.tm-faq-contact-button:hover {
  background: var(--tm-primary-dark);
  color: #fff;
}

.tm-about-library-cta {
  margin: -12px 0 40px;
  padding: 24px;
  text-align: center;
  border: 1px solid var(--tm-light);
  border-radius: 12px;
  background: var(--tm-white);
}

.tm-about-library-cta p {
  max-width: 620px;
  margin: 0 auto 16px;
  color: var(--tm-text);
  font-size: 0.95rem;
  line-height: 1.7;
}

.tm-about-library-cta a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 20px;
  border-radius: 8px;
  background: var(--tm-primary);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.tm-about-library-cta a:hover {
  background: var(--tm-primary-dark);
  color: #fff;
}

/* --- Global Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
}

}

html {
  scroll-behavior: smooth;
}

body { 
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--tm-text);
  background: var(--tm-bg);
  line-height: 1.6;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.tm-footer {
  flex-shrink: 0;
}

.tm-test-page-wrapper {
  flex: 1 0 auto;
  min-height: auto !important;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  line-height: 1.2;
}

a {
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

.tm-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================
   SCROLL CONTAINER & SCREENS
   ============================================ */



.tm-scroll-container {
  overflow-y: auto;
}

.tm-screen {
  min-height: 100vh;
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* ============================================
   HEADER
   ============================================ */
.tm-header {
  background: var(--tm-white);
  border-bottom: 1px solid var(--tm-light);
  position: relative;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.tm-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.tm-header-inner-search {
  justify-content: flex-start;
  gap: 20px;
}

.tm-header-inner-search .tm-header-right {
  margin-left: auto;
}

/* Logo */
.tm-logo-wrapper {
  display: flex;
  align-items: center;
}

.tm-logo-text {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--tm-dark);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
}

.tm-logo-text span,
.tm-logo-text .tm-logo-highlight {
  color: var(--tm-primary);
}

.tm-logo-icon {
  width: 40px;
  height: 40px;
  background: var(--tm-primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  font-weight: 900;
}

/* Navigation */
.tm-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tm-nav a {
  text-decoration: none;
  color: var(--tm-text);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 8px 16px;
  border-radius: 8px;
  transition: var(--tm-transition);
}

.tm-nav a:hover {
  background: rgba(91, 91, 214, 0.08);
  color: var(--tm-primary);
}

.tm-nav a.active {
  color: var(--tm-primary);
  background: rgba(91, 91, 214, 0.08);
}

/* Global test search appears on language, test, question, and result pages. */
.tm-header-search,
.tm-mobile-search {
  position: relative;
}

.tm-header-search {
  flex: 1 1 300px;
  max-width: 360px;
  min-width: 190px;
}

.tm-header-search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748B;
  font-size: 1.25rem;
  line-height: 1;
  pointer-events: none;
}

.tm-header-search-input {
  width: 100%;
  height: 40px;
  box-sizing: border-box;
  padding: 0 12px 0 37px;
  border: 1px solid var(--tm-light);
  border-radius: 8px;
  background: var(--tm-bg);
  color: var(--tm-dark);
  font: 500 0.9rem Inter, sans-serif;
  outline: none;
}

.tm-header-search-input:focus {
  border-color: var(--tm-primary);
  box-shadow: 0 0 0 3px rgba(91, 91, 214, 0.12);
}

.tm-header-search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  min-width: 280px;
  overflow: hidden;
  border: 1px solid var(--tm-light);
  border-radius: 8px;
  background: var(--tm-white);
  box-shadow: var(--tm-shadow);
  z-index: 1100;
}

.tm-header-search-results a,
.tm-header-search-results p {
  margin: 0;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--tm-text);
  font-size: 0.88rem;
  line-height: 1.35;
  text-decoration: none;
}

.tm-header-search-results a:hover {
  background: rgba(91, 91, 214, 0.08);
  color: var(--tm-primary);
}

.tm-header-search-results .tm-header-search-all {
  justify-content: space-between;
  border-top: 1px solid var(--tm-light);
  color: var(--tm-primary);
  font-weight: 700;
}

.tm-mobile-search {
  display: none;
}

/* Header Right */
.tm-header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.tm-theme-toggle {
  width: 36px;
  height: 36px;
  border: 1px solid var(--tm-light);
  border-radius: 999px;
  background: var(--tm-bg);
  color: var(--tm-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  transition: var(--tm-transition);
}

.tm-theme-toggle:hover {
  border-color: var(--tm-primary);
  background: rgba(91, 91, 214, 0.08);
  transform: translateY(-1px);
}

.tm-theme-toggle-icon {
  display: block;
  transform: translateY(1px);
  font-size: 0;
}

.tm-theme-toggle-icon::before {
  content: '🌙';
  font-size: 1rem;
}

:root[data-theme="dark"] .tm-theme-toggle-icon::before {
  content: '☀️';
}

.tm-theme-toggle-icon img.emoji {
  display: none !important;
}

/* Language Switcher (Header) */
.tm-lang-switcher {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--tm-bg);
  border-radius: 8px;
  padding: 4px;
}

.tm-lang-current {
  font-weight: 600;
  font-size: 0.85rem;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: default;
  text-decoration: none;
}

.tm-lang-link {
  text-decoration: none;
  color: var(--tm-text);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 5px 10px;
  border-radius: 6px;
  transition: var(--tm-transition);
  min-width: 36px;
  text-align: center;
}

.tm-lang-link:hover {
  background: var(--tm-white);
  color: var(--tm-primary);
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

/* Mobile Hamburger */
.tm-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  border: none;
  background: none;
  border-radius: 6px;
}

.tm-hamburger:hover {
  background: rgba(91, 91, 214, 0.08);
}

.tm-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--tm-dark);
  border-radius: 2px;
  transition: var(--tm-transition);
}

/* Mobile Menu */
.tm-mobile-menu {
  display: none;
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  background: var(--tm-white);
  padding: 16px 24px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  z-index: 999;
}

.tm-mobile-menu.open {
  display: block;
}

.tm-mobile-menu a {
  display: block;
  padding: 12px 0;
  text-decoration: none;
  color: var(--tm-text);
  font-weight: 500;
  border-bottom: 1px solid var(--tm-light);
}

/* ============================================
   HERO SECTION
   ============================================ */
.tm-hero {
  background: linear-gradient(135deg, #5B5BD6 0%, #7C7CF0 50%, #F59E0B 100%);
  padding: 120px 24px;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
}

.tm-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.1) 0%, transparent 60%);
}

.tm-hero-content {
  max-width: 720px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.tm-hero-title,
.tm-hero h1 {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 3.5rem;
  font-weight: 800;
  margin: 0 0 20px;
  line-height: 1.1;
  color: white;
}

.tm-site-title {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 3.5rem;
  font-weight: 800;
  margin: 0 0 20px;
  color: white;
  line-height: 1.1;
}

.tm-hero-subtitle,
.tm-hero .subtitle,
.tm-site-desc {
  font-size: 1.25rem;
  font-weight: 400;
  opacity: 0.9;
  margin: 0 0 48px;
  color: rgba(255,255,255,0.9);
  line-height: 1.6;
}

/* ============================================
   BUTTONS
   ============================================ */
.tm-btn {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  border-radius: 50px;
  text-decoration: none;
  transition: var(--tm-transition);
  cursor: pointer;
  border: none;
  outline: none;
}

.tm-btn-primary {
  background: white;
  color: var(--tm-primary);
  font-weight: 700;
  font-size: 1.1rem;
  padding: 16px 48px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  border-radius: 50px;
}

.tm-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.2);
  background: white;
  color: var(--tm-primary-dark);
}

.tm-btn-small {
  display: inline-block;
  background: var(--tm-primary);
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 10px 24px;
  border-radius: 50px;
  text-decoration: none;
  transition: var(--tm-transition);
}

.tm-btn-small:hover {
  background: var(--tm-primary-dark);
  transform: translateY(-1px);
  color: white;
}

/* ============================================
   SECTION INNER (shared wrapper)
   ============================================ */
.tm-section-inner {
  max-width: 1200px;
  width: 100%;
  padding: 0 24px;
  margin: 0 auto;
}

.tm-section-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  text-align: center;
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--tm-dark);
  margin: 0 0 12px;
  line-height: 1.2;
}

.tm-section-subtitle {
  text-align: center;
  color: #64748B;
  font-size: 1.05rem;
  margin: 0 auto 48px;
  max-width: 560px;
}

/* ============================================
   TESTS OVERVIEW (Screen 2)
   ============================================ */
.tm-tests-overview {
  background: var(--tm-bg);
  padding: 80px 0;
  flex-direction: column;
}

/* ============================================
   TEST CARDS GRID
   ============================================ */
.tm-test-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 0;
}

.tm-test-card {
  background: var(--tm-white);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 4px 20px rgba(91, 91, 214, 0.08);
  transition: var(--tm-transition);
  border: 2px solid transparent;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.tm-test-card:hover {
  transform: translateY(-6px);
  border-color: var(--tm-primary);
  box-shadow: 0 12px 40px rgba(91, 91, 214, 0.18);
}

.tm-test-card-featured {
  background: linear-gradient(135deg, rgba(91,91,214,0.05) 0%, rgba(245,158,11,0.05) 100%);
  border-color: rgba(91,91,214,0.15);
}

.tm-test-icon {
  font-size: 1.4rem;
  margin-bottom: 16px;
  line-height: 1;
}

.tm-test-name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--tm-dark);
  margin: 0 0 8px;
  line-height: 1.3;
}

.tm-test-tagline {
  color: #64748B;
  font-size: 0.9rem;
  margin: 0 0 24px;
  flex: 1;
  line-height: 1.6;
}

/* ============================================
   LANGUAGE SELECTION (Screen 3)
   ============================================ */
.tm-lang-select {
  background: linear-gradient(135deg, #1E293B 0%, #334155 100%);
  padding: 80px 0;
  flex-direction: column;
}

.tm-lang-select .tm-section-title,
.tm-lang-select .tm-section-subtitle {
  color: white;
}

.tm-lang-select .tm-section-subtitle {
  color: rgba(255,255,255,0.7);
}

.tm-lang-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  max-width: 880px;
  margin: 0 auto;
  width: 100%;
}

.tm-lang-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: rgba(255,255,255,0.08);
  border: 1.5px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 14px 8px;
  min-height: 104px;
  text-decoration: none;
  color: white;
  transition: var(--tm-transition);
  backdrop-filter: blur(8px);
}

.tm-lang-card:hover {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.35);
  transform: translateY(-4px);
}

.tm-lang-flag {
  font-size: 2.5rem;
  line-height: 1;
}

.tm-lang-name {
  font-weight: 600;
  font-size: 0.7rem;
}

/* ============================================
   WHY TRAITMIND (Screen 4)
   ============================================ */
.tm-why {
  background: var(--tm-white);
  padding: 80px 0;
  flex-direction: column;
}

.tm-why-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  max-width: 960px;
  margin: 0 auto;
  width: 100%;
}

.tm-why-item {
  text-align: center;
  padding: 24px;
}

.tm-why-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
  line-height: 1;
}

.tm-why-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--tm-dark);
  margin: 0 0 12px;
}

.tm-why-desc {
  color: #64748B;
  font-size: 0.9rem;
  margin: 0;
  line-height: 1.7;
}

/* ============================================
   LANGUAGE HOME PAGE
   ============================================ */
.tm-lang-home-hero {
  background: linear-gradient(135deg, #5B5BD6 0%, #7C7CF0 50%, #F59E0B 100%);
  padding: 80px 24px;
  text-align: center;
  color: white;
  flex-direction: column;
  padding-top: 152px; /* account for fixed header */
}

.tm-hero-lang-badge {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 50px;
  padding: 6px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 20px;
  backdrop-filter: blur(4px);
}

/* ============================================
   FEATURED & ALL TESTS (lang-home)
   ============================================ */
.tm-featured-tests {
  background: var(--tm-bg);
  padding: 80px 0;
  flex-direction: column;
}

.tm-all-tests {
  background: var(--tm-white);
  padding: 80px 0;
  flex-direction: column;
}

.tm-test-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}

.tm-test-list-item {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--tm-white);
  border: 1px solid var(--tm-light);
  border-radius: 12px;
  padding: 20px 24px;
  transition: var(--tm-transition);
}

.tm-test-list-item:hover {
  border-color: var(--tm-primary);
  box-shadow: 0 4px 16px rgba(91,91,214,0.1);
  transform: translateX(4px);
}

.tm-test-list-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}

.tm-test-list-info {
  flex: 1;
}

.tm-test-list-info h3 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--tm-dark);
  margin: 0 0 4px;
}

.tm-test-list-info p {
  color: #64748B;
  font-size: 0.875rem;
  margin: 0;
}

/* ============================================
   LANGUAGE BOTTOM SWITCHER
   ============================================ */
.tm-lang-bottom-switcher {
  background: var(--tm-dark);
  padding: 80px 0;
  flex-direction: column;
}

.tm-lang-bottom-switcher .tm-section-title,
.tm-lang-bottom-switcher .tm-section-subtitle {
  color: white;
}

.tm-lang-bottom-switcher .tm-section-subtitle {
  color: rgba(255,255,255,0.6);
}

/* ============================================
   FOOTER
   ============================================ */
.tm-footer {
  background: var(--tm-dark);
  color: rgba(255,255,255,0.7);
  padding: 30px 24px 0;
}

.tm-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

/* Compact footer (non-home pages - override original grid) */
.tm-footer .tm-footer-grid {
  display: block;
  padding-bottom: 0;
  border-bottom: none;
}

.tm-footer .tm-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  font-size: 0.85rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 12px;
}

.tm-footer-col h4 {
  color: white;
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 20px;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.tm-footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tm-footer-col li {
  margin-bottom: 10px;
}

.tm-footer-col a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--tm-transition);
}

.tm-footer-col a:hover {
  color: white;
}

.tm-copyright {
  color: rgba(255,255,255,0.5);
  font-size: 0.85rem;
}

.tm-social {
  display: flex;
  gap: 12px;
}

/* Smaller footer social icons */
.tm-footer .tm-social-icon {
  width: 28px;
  height: 28px;
}

.tm-social-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  font-size: 0.85rem;
  transition: var(--tm-transition);
}

.tm-social-icon:hover {
  background: var(--tm-primary);
  transform: translateY(-2px);
  color: white;
}

/* ============================================
   TEST FRAMEWORK (CPT/Shortcode)
   ============================================ */
.tm-test-page-wrapper {
  max-width: 816px;
  margin: 0 auto;
  padding: 120px 24px 80px;
  min-height: 100vh;
}

.tm-test-header {
  text-align: center;
  margin-bottom: 48px;
}

.tm-test-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.tm-question {
  background: var(--tm-white);
  border-radius: 16px;
  padding: 32px;
  box-shadow: var(--tm-shadow);
}

.tm-error {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  border-radius: 12px;
  padding: 16px;
  color: #DC2626;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .tm-why-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .tm-nav { display: none; }
  .tm-hamburger { display: flex; }
  .tm-lang-switcher { display: flex; }
  
  .tm-hero,
  .tm-lang-home-hero {
    padding: 80px 20px;
    padding-top: 120px;
  }

  .tm-hero-title,
  .tm-site-title {
    font-size: 2.25rem;
  }

  .tm-hero-subtitle,
  .tm-site-desc {
    font-size: 1.05rem;
    margin-bottom: 36px;
  }

  .tm-lang-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 360px;
    gap: 8px;
  }

  .tm-why-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .tm-footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .tm-footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .tm-test-cards-grid {
    grid-template-columns: 1fr;
  }

  .tm-test-list-item {
    flex-wrap: wrap;
  }

  .tm-section-title {
    font-size: 1.75rem;
  }
}

@media (max-width: 480px) {
  .tm-header-right {
    gap: 8px;
  }

  .tm-theme-toggle {
    width: 32px;
    height: 32px;
    font-size: 0.94rem;
  }

  .tm-hero-title,
  .tm-site-title {
    font-size: 1.75rem;
  }

  .tm-btn-primary {
    padding: 14px 32px;
    font-size: 1rem;
  }

  .tm-header-inner {
    height: 64px;
  }
}

/* ============================================
   WORDPRESS BLOCK OVERRIDES
   ============================================ */
.wp-site-blocks {
  padding-top: 0 !important;
}

.alignfull {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Ensure Twenty Twenty Five doesn't fight with our layout */
body.wp-singular .wp-site-blocks > * {
  max-width: none;
}

/* Privacy choices: quiet bottom notice that keeps the site usable. */
.tm-footer-privacy-settings {
  border: 0;
  padding: 0;
  background: transparent;
  color: rgba(255,255,255,0.6);
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}

.tm-footer-privacy-settings:hover,
.tm-footer-privacy-settings:focus-visible {
  color: #fff;
}

.tm-privacy-banner[hidden] {
  display: none;
}

.tm-privacy-banner {
  position: fixed;
  inset: auto 16px 16px;
  z-index: 2000;
  display: flex;
  justify-content: center;
  font-family: Inter, sans-serif;
}

.tm-privacy-panel {
  width: min(940px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  padding: 18px 20px;
  border: 1px solid #D9E0EE;
  border-radius: 12px;
  background: #FFFFFF;
  color: #334155;
  box-shadow: 0 18px 56px rgba(30, 41, 59, 0.2);
}

.tm-privacy-copy h2 {
  margin: 0 0 5px;
  color: #1E293B;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.35;
}

.tm-privacy-copy p {
  margin: 0;
  color: #64748B;
  font-size: 0.79rem;
  line-height: 1.65;
}

.tm-privacy-copy a {
  color: #4F46E5;
  font-weight: 700;
  text-underline-offset: 2px;
}

.tm-privacy-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.tm-privacy-actions button,
.tm-privacy-settings-button {
  min-height: 42px;
  padding: 0 15px;
  border-radius: 8px;
  font: 750 0.76rem Inter, sans-serif;
  cursor: pointer;
}

.tm-privacy-essential {
  border: 1px solid #CBD5E1;
  background: #FFFFFF;
  color: #334155;
}

.tm-privacy-essential:hover {
  background: #F8FAFC;
}

.tm-privacy-accept,
.tm-privacy-settings-button {
  border: 1px solid #5B5BD6;
  background: #5B5BD6;
  color: #FFFFFF;
}

.tm-privacy-accept:hover,
.tm-privacy-settings-button:hover {
  background: #4949BC;
}

:root[data-theme="dark"] .tm-privacy-panel {
  border-color: #334155;
  background: #111827;
  color: #CBD5E1;
  box-shadow: 0 18px 56px rgba(0, 0, 0, 0.42);
}

:root[data-theme="dark"] .tm-privacy-copy h2 {
  color: #F8FAFC;
}

:root[data-theme="dark"] .tm-privacy-copy p {
  color: #CBD5E1;
}

:root[data-theme="dark"] .tm-privacy-copy a {
  color: #A5B4FC;
}

:root[data-theme="dark"] .tm-privacy-essential {
  border-color: #475569;
  background: #1E293B;
  color: #F8FAFC;
}

:root[data-theme="dark"] .tm-privacy-essential:hover {
  background: #293548;
}

@media (max-width: 680px) {
  .tm-privacy-banner {
    inset: auto 10px 10px;
  }

  .tm-privacy-panel {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px;
  }

  .tm-privacy-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    white-space: normal;
  }

  .tm-privacy-actions button {
    width: 100%;
    padding: 0 10px;
  }
}

@media (max-width: 768px) {
  .tm-mobile-search {
    display: none;
  }
}

@media (max-width: 700px) {
  .tm-header-inner-search {
    gap: 8px;
    padding: 0 12px;
  }

  .tm-header-inner-search > .tm-header-search {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
  }

  .tm-header-inner-search .tm-logo-text {
    font-size: 1.18rem;
  }

  .tm-header-inner-search .tm-header-right {
    gap: 6px;
  }

  .tm-header-inner-search .tm-header-search-input {
    height: 34px;
    padding-left: 29px;
    padding-right: 8px;
    font-size: 0.78rem;
  }

  .tm-header-inner-search .tm-header-search-icon {
    left: 9px;
    font-size: 1rem;
  }

  .tm-header-inner-search .tm-header-search-results {
    position: fixed;
    top: 66px;
    left: 12px;
    right: 12px;
    min-width: 0;
  }

  .tm-header-inner-search .tm-lang-dropdown-btn {
    max-width: 78px;
    overflow: hidden;
    padding: 6px 8px;
    text-overflow: ellipsis;
  }
}

@media (max-width: 390px) {
  .tm-header-inner-search .tm-logo-text {
    font-size: 1rem;
  }

  .tm-header-inner-search .tm-lang-dropdown-btn {
    max-width: 58px;
    font-size: 0.76rem;
  }

  .tm-header-inner-search .tm-header-search-input::placeholder {
    color: transparent;
  }
}

/* Fix: make header not overlapped by scroll container */
.tm-scroll-container + .tm-footer,
.tm-scroll-container ~ .tm-footer {
  margin-top: 0;
}


/* ============================================
   HERO STATS BAR
   ============================================ */
.tm-hero-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 48px;
  flex-wrap: wrap;
}

.tm-stat-item {
  text-align: center;
  min-width: 100px;
}

.tm-stat-number {
  display: block;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: white;
  line-height: 1.2;
}

.tm-stat-label {
  display: block;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.75);
  margin-top: 4px;
}

.tm-hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 50px;
  padding: 6px 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
  color: white;
  backdrop-filter: blur(4px);
}

.tm-hero-tagline {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.85);
  max-width: 580px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

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

.tm-hero-bg-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.tm-shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.1;
}

.tm-shape-1 {
  width: 600px; height: 600px;
  background: white;
  top: -200px; right: -150px;
}

.tm-shape-2 {
  width: 400px; height: 400px;
  background: white;
  bottom: -100px; left: -100px;
}

.tm-shape-3 {
  width: 200px; height: 200px;
  background: var(--tm-accent);
  top: 50%; left: 10%;
}

/* ============================================
   TEST CARD CATEGORY BADGE
   ============================================ */
.tm-test-cat-badge {
  display: inline-block;
  background: rgba(91,91,214,0.08);
  color: var(--tm-primary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 12px;
  border-radius: 50px;
  margin-bottom: 12px;
  letter-spacing: 0.3px;
}

.tm-test-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  font-size: 0.82rem;
  color: #94A3B8;
}

.tm-test-learn-more {
  font-size: 0.82rem;
  color: var(--tm-primary);
  text-decoration: none;
  margin-top: 8px;
  display: inline-block;
  font-weight: 500;
}

.tm-test-learn-more:hover {
  text-decoration: underline;
}

/* ============================================
   HOW IT WORKS
   ============================================ */
.tm-how {
  background: var(--tm-white);
  padding: 80px 0;
  flex-direction: column;
}

.tm-how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  max-width: 960px;
  margin: 0 auto;
  width: 100%;
}

.tm-how-step {
  text-align: center;
  padding: 40px 24px;
  position: relative;
}

.tm-step-number {
  width: 48px;
  height: 48px;
  background: var(--tm-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  margin: 0 auto 20px;
}

.tm-step-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
  line-height: 1;
}

.tm-how-step h3 {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--tm-dark);
  margin: 0 0 12px;
}

.tm-how-step p {
  color: #64748B;
  font-size: 0.9rem;
  margin: 0;
  line-height: 1.7;
}

/* ============================================
   LANGUAGE CARDS (improved)
   ============================================ */
.tm-lang-desc {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
  margin-top: -4px;
}

/* ============================================
   GLOBAL REACH
   ============================================ */
.tm-global {
  background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
  padding: 80px 0;
  flex-direction: column;
}

.tm-global .tm-section-title,
.tm-global .tm-section-subtitle {
  color: white;
}

.tm-global .tm-section-subtitle {
  color: rgba(255,255,255,0.7);
}

.tm-global-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}

.tm-global-stat {
  text-align: center;
  padding: 32px 16px;
  background: rgba(255,255,255,0.05);
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.1);
}

.tm-global-number {
  display: block;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--tm-accent);
  line-height: 1.2;
  margin-bottom: 8px;
}

.tm-global-label {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
}

/* ============================================
   FAQ
   ============================================ */
.tm-faq {
  background: var(--tm-bg);
  padding: 80px 0;
  flex-direction: column;
}

.tm-faq-list {
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
}

.tm-faq-item {
  background: var(--tm-white);
  border: 1px solid var(--tm-light);
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
}

.tm-faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--tm-dark);
  text-align: left;
  transition: var(--tm-transition);
}

.tm-faq-question:hover {
  background: rgba(91,91,214,0.03);
}

.tm-faq-icon {
  font-size: 1.5rem;
  color: var(--tm-primary);
  font-weight: 300;
  flex-shrink: 0;
  margin-left: 16px;
  transition: transform 0.3s ease;
}

.tm-faq-question[aria-expanded="true"] .tm-faq-icon {
  transform: rotate(0deg);
}

.tm-faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  padding: 0 24px;
}

.tm-faq-answer[aria-hidden="false"] {
  max-height: 300px;
  padding: 0 24px 20px;
}

.tm-faq-answer p {
  color: #64748B;
  font-size: 0.92rem;
  line-height: 1.7;
  margin: 0;
}

/* ============================================
   FINAL CTA
   ============================================ */
.tm-cta {
  background: linear-gradient(135deg, #5B5BD6 0%, #7C7CF0 50%, #4545B8 100%);
  padding: 100px 24px;
  flex-direction: column;
  text-align: center;
  color: white;
}

.tm-cta-content {
  max-width: 600px;
  margin: 0 auto;
}

.tm-cta-title {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 2.5rem;
  font-weight: 800;
  color: white;
  margin: 0 0 16px;
  line-height: 1.2;
}

.tm-cta-desc {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.85);
  margin: 0 0 40px;
  line-height: 1.6;
}

.tm-btn-large {
  padding: 18px 56px;
  font-size: 1.2rem;
}

.tm-cta-langs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
}

.tm-cta-langs a {
  color: rgba(255,255,255,0.85);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
}

.tm-cta-langs a:hover {
  color: white;
}

/* ============================================
   RESPONSIVE ADDITIONS
   ============================================ */
@media (max-width: 900px) {
  .tm-how-grid { grid-template-columns: 1fr; gap: 24px; }
  .tm-global-grid { grid-template-columns: repeat(2, 1fr); }
  .tm-hero-stats { gap: 20px; }
}

@media (max-width: 768px) {
  .tm-hero-stats { gap: 16px; }
  .tm-stat-number { font-size: 1.5rem; }
  .tm-hero-tagline { font-size: 1rem; }
  .tm-cta-title { font-size: 1.75rem; }
  .tm-global-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .tm-global-number { font-size: 1.75rem; }
}

@media (max-width: 480px) {
  .tm-hero-stats { flex-wrap: wrap; gap: 12px; }
  .tm-stat-item { min-width: 80px; }
  .tm-cta-langs { flex-wrap: wrap; gap: 8px; }
}

/* ============================================
   TEST LIST ACTIONS (lang-home)
   ============================================ */
.tm-test-list-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 18px;
  flex-shrink: 0;
}

.tm-test-list-link {
  font-size: 0.85rem;
  color: var(--tm-primary);
  text-decoration: none;
  font-weight: 500;
}

.tm-test-list-link:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .tm-test-list-actions {
    flex-direction: row;
    width: auto;
    gap: 14px;
    margin-top: 16px;
  }
  .tm-test-list-item {
    flex-wrap: wrap;
  }
}

/* ============================================
   LANGUAGE HOME HERO FIXES
   ============================================ */
.tm-lang-home-hero .tm-hero-tagline {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.85);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

/* ============================================
   HOW IT WORKS + GLOBAL (merged)
   ============================================ */
.tm-how-global {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 720px;
  margin: 56px auto 0;
  width: 100%;
}

.tm-how-global .tm-global-stat {
  background: linear-gradient(135deg, rgba(91,91,214,0.06), rgba(245,158,11,0.06));
  border: 1px solid var(--tm-light);
  border-radius: 16px;
  padding: 28px 16px;
  text-align: center;
}

.tm-how-global .tm-global-number {
  display: block;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--tm-primary);
  line-height: 1.2;
  margin-bottom: 6px;
}

.tm-how-global .tm-global-label {
  font-size: 0.82rem;
  color: #64748B;
}

@media (max-width: 768px) {
  .tm-how-global {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 40px;
  }
  .tm-how-global .tm-global-stat { padding: 20px 12px; }
  .tm-how-global .tm-global-number { font-size: 1.4rem; }
}

/* ============================================
   RESULT PAGE COMMENTS (full-width wrapper)
   ============================================ */
.tm-result-comments-wrap {
  max-width: 816px;
  margin: 0 auto;
  padding: 0 24px 40px;
}
.tm-result-comments-wrap .tm-result-comments {
  margin-top: 0;
}

/* Footer full-width fix */
footer.tm-footer {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

.tm-test-page-wrapper {
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
}

.tm-result-page,
#tm-result-content,
.tm-result-card,
.tm-result-comments,
.tm-also-took,
.tm-also-grid {
  max-width: 100%;
  box-sizing: border-box;
  min-width: 0;
}

@media (max-width: 768px) {
  .tm-test-page-wrapper {
    max-width: 100%;
    padding-left: 16px;
    padding-right: 16px;
    overflow-x: hidden;
  }

  .tm-result-card [style*="grid-template-columns:repeat(4,1fr)"],
  .tm-also-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .tm-result-card [style*="grid-template-columns:repeat(3,1fr)"] {
    grid-template-columns: 1fr !important;
  }
}


/* ============================================
   Language Dropdown (20 languages)
   ============================================ */
.tm-lang-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--tm-bg, #F8FAFC);
    border: none;
    border-radius: 8px;
    padding: 6px 14px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--tm-dark, #1E293B);
    cursor: pointer;
    white-space: nowrap;
}
.tm-lang-switcher { position: relative; }
.tm-lang-dropdown-btn:hover { background: rgba(91,91,214,0.08); }
.tm-lang-dropdown-btn:focus-visible {
    outline: 2px solid var(--tm-primary, #5B5BD6);
    outline-offset: 2px;
}
:root[data-theme="dark"] .tm-lang-dropdown-btn {
    background: #1E293B;
    color: #E2E8F0;
}
.tm-lang-dropdown-btn::after {
    content: '▾';
    font-size: 0.7rem;
    margin-left: 4px;
}
.tm-lang-dropdown {
    display: none;
    position: absolute;
    right: 0;
    left: auto;
    top: 100%;
    margin-top: 6px;
    background: white;
    border: 1px solid var(--tm-light, #E2E8F0);
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    min-width: 240px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1001;
}
.tm-lang-dropdown.open { display: block; }
.tm-lang-dropdown a {
    display: block;
    padding: 9px 16px;
    text-decoration: none;
    color: var(--tm-text, #334155);
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.15s;
}
.tm-lang-dropdown a:hover {
    background: rgba(91,91,214,0.06);
    color: var(--tm-primary, #5B5BD6);
}
.tm-lang-dropdown a.current {
    background: rgba(91,91,214,0.08);
    color: var(--tm-primary, #5B5BD6);
    font-weight: 700;
}

/* Hide ad slots until ready */
.tm-ad-slot { display: none !important; }
