
:root {
    --tq-p-ivory: #F7FBFF;
    --tq-p-ivory-2: #FFFFFF;
    --tq-p-mist: #EAF6FF;
    --tq-p-blue: #B9DDF5;
    --tq-p-mint: #DFF1FF;
    --tq-p-teal: #2F7EA8;
    --tq-p-teal-dark: #1F5F7A;
    --tq-p-gold: #C8A65A;
    --tq-p-charcoal: #1F2D3D;
    --tq-p-muted: #66788A;
    --tq-p-line: rgba(47,126,168,.16);
    --tq-p-shadow: 0 24px 70px rgba(31,45,61,.10);
    --tq-p-shadow-soft: 0 14px 40px rgba(31,45,61,.08);
    --tq-p-radius: 28px;
    --tq-p-radius-sm: 18px;
    --tq-p-container: 1260px;
    --tq-p-serif: 'Be Vietnam Pro', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --tq-p-sans: 'Be Vietnam Pro', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: radial-gradient(circle at 20% 10%, rgba(185,221,245,.42), transparent 28rem), radial-gradient(circle at 88% 18%, rgba(223,241,255,.55), transparent 24rem), var(--tq-p-ivory);
    color: var(--tq-p-charcoal);
    font-family: var(--tq-p-sans);
    font-size: 16px;
    line-height: 1.72;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--tq-p-teal); text-decoration: none; transition: color .18s ease, opacity .18s ease, transform .18s ease; }
a:hover { color: var(--tq-p-teal-dark); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4, h5, h6 { margin: 0 0 .75rem; line-height: 1.22; color: var(--tq-p-charcoal); letter-spacing: -.018em; }
h1, h2 { font-family: var(--tq-p-serif); font-weight: 680; }
h1 { font-size: clamp(2.05rem, 4.2vw, 4.05rem); }
h2 { font-size: clamp(1.58rem, 2.9vw, 2.45rem); }
h3 { font-size: clamp(1.05rem, 1.45vw, 1.32rem); }
p { margin: 0 0 1rem; }
.screen-reader-text { border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important; }
.skip-link:focus { clip: auto !important; clip-path: none; display: block; height: auto; width: auto; left: 1rem; top: 1rem; z-index: 100000; padding: .75rem 1rem; background: #fff; border-radius: 999px; box-shadow: var(--tq-p-shadow-soft); }

.tq-p-container { width: min(100% - 40px, var(--tq-p-container)); margin-inline: auto; }
.tq-p-main { min-height: 60vh; }
.tq-p-section { padding: clamp(3.4rem, 6.6vw, 5.8rem) 0; }
.tq-p-section-soft { background: linear-gradient(180deg, rgba(234,246,246,.62), rgba(255,255,255,.0)); }
.tq-p-kicker { display: inline-flex; align-items: center; gap: .5rem; color: var(--tq-p-teal); font-weight: 750; letter-spacing: .08em; text-transform: uppercase; font-size: .77rem; margin-bottom: 1rem; }
.tq-p-muted { color: var(--tq-p-muted); }

.tq-p-site-header { position: sticky; top: 0; z-index: 80; backdrop-filter: blur(18px); background: rgba(247,251,255,.86); border-bottom: 1px solid rgba(47,126,168,.10); }
.tq-p-header-inner { min-height: 82px; display: flex; align-items: center; gap: 1.4rem; }
.tq-p-brand { flex: 0 0 auto; }
.tq-p-site-title { font-family: var(--tq-p-serif); font-size: 1.22rem; font-weight: 760; color: var(--tq-p-charcoal); letter-spacing: -.015em; }
.tq-p-site-description { margin: .1rem 0 0; color: var(--tq-p-muted); font-size: .78rem; }
.custom-logo { max-height: 58px; width: auto; }
.tq-p-primary-nav { margin-left: auto; }
.tq-p-primary-nav ul { list-style: none; padding: 0; margin: 0; display: flex; align-items: center; gap: .45rem; }
.tq-p-primary-nav a { display: inline-flex; padding: .62rem .85rem; border-radius: 999px; color: var(--tq-p-charcoal); font-weight: 650; font-size: .95rem; }
.tq-p-primary-nav a:hover, .tq-p-primary-nav .current-menu-item > a { color: var(--tq-p-teal); background: rgba(185,221,245,.22); }
.tq-p-header-cta, .tq-p-button, .tq-lms-button { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; border: 0; border-radius: 999px; background: var(--tq-p-teal); color: #fff !important; font-weight: 760; padding: .86rem 1.28rem; box-shadow: 0 14px 34px rgba(47,126,168,.22); cursor: pointer; }
.tq-p-header-cta:hover, .tq-p-button:hover, .tq-lms-button:hover { transform: translateY(-1px); background: var(--tq-p-teal-dark); color: #fff !important; }
.tq-p-button-ghost, .tq-lms-button-secondary { color: var(--tq-p-teal) !important; background: rgba(255,255,255,.72); box-shadow: inset 0 0 0 1px var(--tq-p-line); }
.tq-p-button-ghost:hover, .tq-lms-button-secondary:hover { background: #fff; color: var(--tq-p-teal-dark) !important; }
.tq-p-button-light { background: #fff; color: var(--tq-p-teal) !important; box-shadow: 0 16px 40px rgba(38,50,56,.12); }
.tq-p-menu-toggle { display: none; background: transparent; border: 0; padding: .4rem; margin-left: auto; }
.tq-p-menu-toggle span:not(.screen-reader-text) { display: block; width: 26px; height: 2px; background: var(--tq-p-teal); margin: 5px 0; border-radius: 10px; }

.tq-p-hero { padding: clamp(3.5rem, 7vw, 6.5rem) 0 clamp(2.8rem, 5vw, 5rem); overflow: hidden; }
.tq-p-hero-grid { display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(320px, .78fr); gap: clamp(2rem, 6vw, 5.5rem); align-items: center; }
.tq-p-hero-copy p { max-width: 660px; font-size: clamp(1.02rem, 1.55vw, 1.16rem); color: var(--tq-p-muted); }
.tq-p-hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin: 2rem 0; }
.tq-p-trust-row { display: flex; flex-wrap: wrap; gap: .7rem; }
.tq-p-trust-row span, .tq-p-pill { display: inline-flex; align-items: center; border-radius: 999px; background: rgba(255,255,255,.72); border: 1px solid var(--tq-p-line); padding: .45rem .72rem; color: var(--tq-p-muted); font-weight: 650; font-size: .88rem; }
.tq-p-hero-panel { min-height: 500px; position: relative; border-radius: 40px; background: linear-gradient(140deg, rgba(185,221,245,.92), rgba(223,241,255,.76) 55%, rgba(255,255,255,.82)); box-shadow: var(--tq-p-shadow); overflow: hidden; padding: 2rem; border: 1px solid rgba(255,255,255,.72); }
.tq-p-orb { position: absolute; border-radius: 999px; filter: blur(2px); opacity: .65; }
.tq-p-orb-one { width: 260px; height: 260px; background: rgba(184,217,245,.55); right: -80px; top: -50px; }
.tq-p-orb-two { width: 220px; height: 220px; background: rgba(47,126,168,.18); left: -70px; bottom: 20px; }
.tq-p-hero-card { position: absolute; background: rgba(255,255,255,.74); border: 1px solid rgba(255,255,255,.86); border-radius: 32px; padding: 1.55rem; box-shadow: var(--tq-p-shadow-soft); backdrop-filter: blur(14px); }
.tq-p-hero-card-main { left: 2rem; right: 2rem; top: 2rem; }
.tq-p-hero-card-main h2 { font-size: clamp(1.45rem, 2.6vw, 2.25rem); }
.tq-p-hero-card-small { right: 2rem; bottom: 2rem; max-width: 250px; }
.tq-p-hero-card-small strong { display: block; font-size: 2.25rem; font-family: var(--tq-p-serif); font-weight: 760; color: var(--tq-p-teal); }

.tq-p-section-head { max-width: 760px; margin-bottom: 2.2rem; }
.tq-p-section-head p { color: var(--tq-p-muted); font-size: 1rem; }
.tq-p-course-grid, .tq-lms-course-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.tq-p-instructor-grid, .tq-lms-instructor-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.tq-p-post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.tq-p-card, .tq-lms-course-card, .tq-lms-section-card, .tq-lms-sidebar-card, .tq-lms-register-box, .tq-lms-payment-card, .tq-lms-dashboard-card, .tq-lms-order-card, .tq-lms-my-course-card, .tq-lms-instructor-card-mini { background: rgba(255,255,255,.82) !important; border: 1px solid var(--tq-p-line) !important; border-radius: var(--tq-p-radius) !important; box-shadow: var(--tq-p-shadow-soft) !important; overflow: hidden; }
.tq-p-card-media, .tq-lms-course-card-image { position: relative; display: grid; min-height: 220px; background: linear-gradient(135deg, var(--tq-p-mist), var(--tq-p-mint)); overflow: hidden; place-items: center; color: var(--tq-p-teal); font-weight: 800; }
.tq-p-card-media img, .tq-lms-course-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.tq-p-card:hover .tq-p-card-media img, .tq-lms-course-card:hover .tq-lms-course-card-image img { transform: scale(1.035); }
.tq-p-card-body, .tq-lms-course-card-body { padding: 1.45rem; }
.tq-p-card-body h3 a, .tq-lms-course-card-body h3 a { color: var(--tq-p-charcoal); }
.tq-p-course-eyebrow, .tq-lms-course-meta { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: .75rem; color: var(--tq-p-muted); font-weight: 700; font-size: .82rem; }
.tq-p-course-eyebrow span, .tq-lms-course-meta span { background: var(--tq-p-mist); color: var(--tq-p-teal); padding: .28rem .55rem; border-radius: 999px; }
.tq-p-floating-badge, .tq-lms-card-badge, .tq-lms-badge { position: absolute; z-index: 2; top: 1rem; left: 1rem; display: inline-flex; padding: .42rem .7rem; border-radius: 999px; background: linear-gradient(135deg, #78BCE5, var(--tq-p-teal)); color: #fff; font-size: .76rem; font-weight: 800; letter-spacing: .035em; }
.tq-lms-badge { position: static; margin-bottom: 1rem; }
.tq-p-card-footer, .tq-lms-course-card-footer { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-top: 1.2rem; }
.tq-p-price strong, .tq-lms-sidebar-price strong, .tq-lms-course-card-footer strong { color: var(--tq-p-teal); font-size: 1.15rem; }
del { color: var(--tq-p-muted); font-size: .92em; }

.tq-p-feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
.tq-p-feature-card { padding: 2rem; border-radius: var(--tq-p-radius); background: rgba(255,255,255,.76); border: 1px solid var(--tq-p-line); box-shadow: var(--tq-p-shadow-soft); }
.tq-p-feature-card span { display: inline-flex; width: 42px; height: 42px; border-radius: 50%; align-items: center; justify-content: center; background: var(--tq-p-blue); color: var(--tq-p-teal-dark); font-weight: 900; margin-bottom: 1rem; }
.tq-p-cta-card { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: clamp(2rem, 5vw, 4rem); border-radius: 40px; background: linear-gradient(135deg, var(--tq-p-teal-dark), #3E9AD0); color: #fff; box-shadow: var(--tq-p-shadow); }
.tq-p-cta-card h2, .tq-p-cta-card p, .tq-p-cta-card .tq-p-kicker { color: #fff; }

.tq-p-page-main { padding: clamp(3rem, 6vw, 5rem) 0; }
.tq-p-page-header, .tq-p-archive-hero { text-align: center; padding: clamp(2rem, 6vw, 4rem) 0; }
.tq-p-page-header p, .tq-p-archive-hero p { max-width: 720px; margin-inline: auto; color: var(--tq-p-muted); font-size: 1.08rem; }
.tq-p-content-card, .tq-p-entry .entry-content { background: rgba(255,255,255,.78); border: 1px solid var(--tq-p-line); border-radius: var(--tq-p-radius); box-shadow: var(--tq-p-shadow-soft); padding: clamp(1.35rem, 4vw, 3rem); }
.tq-p-featured-image { margin: 0 0 1.5rem; border-radius: var(--tq-p-radius); overflow: hidden; box-shadow: var(--tq-p-shadow-soft); }
.tq-p-empty-card { padding: 2rem; border-radius: var(--tq-p-radius); background: rgba(255,255,255,.8); border: 1px dashed var(--tq-p-line); color: var(--tq-p-muted); }

/* TQ Elearning plugin enhancements */
.tq-lms-course-hero { background: linear-gradient(135deg, rgba(234,246,255,.94), rgba(255,255,255,.82)); border: 1px solid var(--tq-p-line); border-radius: 36px; padding: clamp(1.4rem, 3.4vw, 2.5rem); display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, .62fr); gap: 2rem; align-items: center; box-shadow: var(--tq-p-shadow-soft); margin: 2rem 0; }
.tq-lms-course-hero h1 { font-size: clamp(1.95rem, 3.8vw, 3.35rem); }
.tq-lms-course-subtitle { color: var(--tq-p-muted); font-size: 1.02rem; }
.tq-lms-course-hero-image { border-radius: 30px; overflow: hidden; box-shadow: var(--tq-p-shadow-soft); }
.tq-lms-course-hero-image img { width: 100%; height: auto; }
.tq-lms-course-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.4rem; align-items: start; margin-bottom: 4rem; }
.tq-lms-course-main { display: grid; gap: 1.25rem; }
.tq-lms-course-sidebar { position: sticky; top: 104px; }
.tq-lms-section-card, .tq-lms-sidebar-card { padding: clamp(1.25rem, 3vw, 2rem); }
.tq-lms-sidebar-thumb { width: 100%; border-radius: 20px; margin-bottom: 1rem; }
.tq-lms-course-facts { list-style: none; padding: 0; margin: 1rem 0; display: grid; gap: .5rem; }
.tq-lms-course-facts li { display: flex; justify-content: space-between; gap: 1rem; padding: .72rem 0; border-bottom: 1px solid var(--tq-p-line); }
.tq-lms-course-facts span { color: var(--tq-p-muted); }
.tq-lms-learning-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.tq-lms-check-list, .tq-lms-dot-list, .tq-lms-tag-list { padding: 0; list-style: none; display: grid; gap: .65rem; }
.tq-lms-check-list li, .tq-lms-dot-list li { position: relative; padding-left: 1.65rem; }
.tq-lms-check-list li:before, .tq-lms-dot-list li:before { content: '✓'; position: absolute; left: 0; top: 0; color: var(--tq-p-teal); font-weight: 900; }
.tq-lms-tag-list { display: flex; flex-wrap: wrap; }
.tq-lms-tag-list li { padding: .5rem .75rem; background: var(--tq-p-mist); border-radius: 999px; color: var(--tq-p-teal); font-weight: 700; }
.tq-lms-module { border: 1px solid var(--tq-p-line); border-radius: 22px; overflow: hidden; margin-top: 1rem; background: rgba(250,247,240,.55); }
.tq-lms-module h3 { padding: 1rem 1.1rem; margin: 0; background: rgba(185,221,245,.2); font-size: 1rem; }
.tq-lms-module ul { list-style: none; padding: 0; margin: 0; }
.tq-lms-module li { display: flex; justify-content: space-between; gap: 1rem; padding: .85rem 1.1rem; border-top: 1px solid var(--tq-p-line); }
.tq-lms-video-wrap, .tq-lms-video-player { position: relative; width: 100%; aspect-ratio: 16/9; border-radius: 28px; overflow: hidden; background: #10292b; box-shadow: var(--tq-p-shadow-soft); }
.tq-lms-video-wrap iframe, .tq-lms-video-wrap video, .tq-lms-video-player iframe, .tq-lms-video-player video { width: 100%; height: 100%; border: 0; display: block; }
.tq-lms-instructor-profile, .tq-lms-instructor-card-mini { display: flex; gap: 1rem; align-items: center; }
.tq-lms-instructor-avatar, .tq-p-instructor-avatar, .tq-lms-instructor-mini-avatar { width: 88px; height: 88px; border-radius: 999px; overflow: hidden; flex: 0 0 auto; background: var(--tq-p-mist); display: grid; place-items: center; color: var(--tq-p-teal); font-weight: 900; }
.tq-lms-instructor-avatar img, .tq-p-instructor-avatar img, .tq-lms-instructor-mini-avatar img { width: 100%; height: 100%; object-fit: cover; }
.tq-lms-faq details { border: 1px solid var(--tq-p-line); border-radius: 18px; padding: 1rem; margin-top: .75rem; background: rgba(250,247,240,.45); }
.tq-lms-faq summary { cursor: pointer; font-weight: 800; color: var(--tq-p-teal-dark); }

.tq-lms-lesson-layout { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 1.4rem; align-items: start; margin: 2rem 0 4rem; }
.tq-lms-lesson-main, .tq-lms-lesson-sidebar { background: rgba(255,255,255,.78); border: 1px solid var(--tq-p-line); border-radius: var(--tq-p-radius); box-shadow: var(--tq-p-shadow-soft); padding: clamp(1.25rem, 3vw, 2rem); }
.tq-lms-lesson-sidebar { position: sticky; top: 104px; max-height: calc(100vh - 124px); overflow: auto; }
.tq-lms-lesson-heading h1 { font-size: clamp(1.7rem, 3vw, 2.55rem); }
.tq-lms-back-link { display: inline-flex; margin-bottom: 1rem; color: var(--tq-p-teal); font-weight: 800; }
.tq-lms-lesson-content { margin-top: 1.5rem; }
.tq-lms-resources { margin-top: 1.5rem; padding: 1.2rem; border-radius: 22px; background: var(--tq-p-mist); }
.tq-lms-lesson-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.5rem; }
.tq-lms-progress-bar, .tq-lms-progress-track { background: rgba(47,126,168,.12); border-radius: 999px; overflow: hidden; min-height: 10px; }
.tq-lms-progress-fill { background: linear-gradient(90deg, var(--tq-p-teal), var(--tq-p-blue)); min-height: 10px; border-radius: 999px; }
.tq-lms-message { padding: 1rem 1.1rem; border-radius: 18px; margin: 1rem 0; border: 1px solid var(--tq-p-line); background: rgba(255,255,255,.85); }
.tq-lms-message-success { border-color: rgba(47,126,168,.3); background: rgba(223,241,255,.55); }
.tq-lms-message-error { border-color: rgba(160,60,60,.24); background: rgba(255,235,235,.72); }
.tq-lms-payment-grid { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 1.5rem; }
.tq-lms-payment-qr img { border-radius: 24px; box-shadow: var(--tq-p-shadow-soft); }
.tq-lms-copy-field { display: flex; gap: .5rem; align-items: center; padding: .65rem .75rem; border-radius: 16px; background: var(--tq-p-mist); color: var(--tq-p-charcoal); font-weight: 750; }
.tq-lms-status, .tq-lms-order-status { display: inline-flex; border-radius: 999px; padding: .3rem .65rem; background: var(--tq-p-mist); color: var(--tq-p-teal); font-weight: 800; font-size: .82rem; }
.tq-lms-dashboard-grid, .tq-lms-my-courses-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }

.tq-p-instructor-card { text-align: center; padding-top: 1.5rem; }
.tq-p-instructor-card .tq-p-instructor-avatar { width: 112px; height: 112px; margin: 0 auto 1rem; box-shadow: 0 14px 34px rgba(47,126,168,.16); }
.tq-lms-instructor-single { margin: 2rem 0 4rem; }
.tq-lms-instructor-hero { display: flex; align-items: center; gap: 1.5rem; padding: clamp(1.5rem, 4vw, 3rem); border-radius: 40px; background: linear-gradient(135deg, var(--tq-p-mist), rgba(255,255,255,.82)); border: 1px solid var(--tq-p-line); box-shadow: var(--tq-p-shadow-soft); margin-bottom: 1.25rem; }
.tq-lms-instructor-hero-avatar { width: 160px; height: 160px; border-radius: 50%; overflow: hidden; flex: 0 0 auto; }
.tq-lms-instructor-hero-avatar img { width: 100%; height: 100%; object-fit: cover; }

.tq-p-site-footer { margin-top: 4rem; background: #1B526D; color: rgba(255,255,255,.78); padding: 4rem 0 1.5rem; }
.tq-p-site-footer h2, .tq-p-site-footer h3, .tq-p-site-footer a { color: #fff; }
.tq-p-footer-grid { display: grid; grid-template-columns: 1.2fr .8fr 1fr; gap: 2rem; }
.tq-p-footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.tq-p-footer-bottom { display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid rgba(255,255,255,.14); margin-top: 2rem; padding-top: 1.2rem; font-size: .9rem; }

.navigation.pagination { margin-top: 2rem; }
.nav-links { display: flex; gap: .45rem; justify-content: center; flex-wrap: wrap; }
.page-numbers { min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: rgba(255,255,255,.8); border: 1px solid var(--tq-p-line); font-weight: 800; }
.page-numbers.current { background: var(--tq-p-teal); color: #fff; }
.tq-p-page-header h1, .tq-p-archive-hero h1 { font-size: clamp(1.85rem, 3.6vw, 3rem); }
.tq-p-entry-title, .entry-title { font-size: clamp(1.85rem, 3.4vw, 3rem); }
.search-form { display: flex; gap: .6rem; justify-content: center; margin-top: 1rem; }
.search-field, input[type='text'], input[type='email'], input[type='url'], input[type='password'], input[type='number'], input[type='tel'], select, textarea { width: 100%; border: 1px solid var(--tq-p-line); background: rgba(255,255,255,.86); border-radius: 18px; padding: .85rem 1rem; color: var(--tq-p-charcoal); font: inherit; }
.search-submit, button, input[type='submit'] { border: 0; border-radius: 999px; background: var(--tq-p-teal); color: #fff; padding: .85rem 1.15rem; font-weight: 800; cursor: pointer; }

@media (max-width: 1024px) {
    .tq-p-hero-grid, .tq-lms-course-layout, .tq-lms-lesson-layout, .tq-lms-course-hero { grid-template-columns: 1fr; }
    .tq-lms-course-sidebar, .tq-lms-lesson-sidebar { position: static; max-height: none; }
    .tq-p-course-grid, .tq-lms-course-grid, .tq-p-post-grid, .tq-p-instructor-grid, .tq-lms-instructor-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tq-p-feature-grid, .tq-p-footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .tq-p-container { width: min(100% - 28px, var(--tq-p-container)); }
    .tq-p-header-inner { min-height: 70px; }
    .tq-p-menu-toggle { display: inline-block; }
    .tq-p-primary-nav { position: fixed; inset: 70px 14px auto; background: rgba(255,255,255,.96); border: 1px solid var(--tq-p-line); border-radius: 22px; box-shadow: var(--tq-p-shadow); padding: 1rem; display: none; }
    .tq-p-primary-nav.is-open { display: block; }
    .tq-p-primary-nav ul { display: grid; gap: .2rem; }
    .tq-p-primary-nav a { width: 100%; }
    .tq-p-header-cta { display: none; }
    .tq-p-hero-panel { min-height: 420px; }
    .tq-p-hero-card-small { left: 2rem; right: 2rem; max-width: none; }
    .tq-p-course-grid, .tq-lms-course-grid, .tq-p-post-grid, .tq-p-instructor-grid, .tq-lms-instructor-grid, .tq-lms-learning-grid, .tq-lms-dashboard-grid, .tq-lms-my-courses-grid, .tq-lms-payment-grid { grid-template-columns: 1fr; }
    .tq-p-cta-card, .tq-p-footer-bottom, .tq-lms-module li, .tq-lms-lesson-nav { flex-direction: column; align-items: stretch; }
    .tq-p-card-footer, .tq-lms-course-card-footer { align-items: flex-start; flex-direction: column; }
    .tq-lms-instructor-hero { flex-direction: column; text-align: center; }
}

/* v1.2.0 refinements: cleaner header and stable lesson sidebar */
.tq-p-site-header {
    background: rgba(247, 251, 255, .92);
    box-shadow: 0 10px 34px rgba(31, 45, 61, .045);
}
.tq-p-header-inner {
    min-height: 72px;
    gap: 1rem;
}
.tq-p-brand {
    min-width: 0;
    max-width: 390px;
}
.tq-p-site-title {
    display: inline-block;
    font-size: clamp(.96rem, 1.35vw, 1.12rem);
    line-height: 1.28;
    font-weight: 760;
    letter-spacing: -.02em;
}
.tq-p-primary-nav {
    min-width: 0;
}
.tq-p-primary-nav ul {
    gap: .14rem;
    justify-content: flex-end;
}
.tq-p-primary-nav li {
    min-width: 0;
}
.tq-p-primary-nav a {
    white-space: nowrap;
    padding: .48rem .62rem;
    border-radius: 16px;
    font-size: .86rem;
    line-height: 1.28;
    font-weight: 700;
    letter-spacing: -.01em;
}
.tq-p-primary-nav a:hover,
.tq-p-primary-nav .current-menu-item > a,
.tq-p-primary-nav .current_page_item > a,
.tq-p-primary-nav .current-menu-ancestor > a {
    color: var(--tq-p-teal-dark);
    background: rgba(185, 221, 245, .34);
    box-shadow: inset 0 0 0 1px rgba(47, 126, 168, .08);
}
.tq-p-header-cta {
    padding: .62rem .9rem;
    min-height: 42px;
    font-size: .86rem;
    line-height: 1.18;
    white-space: nowrap;
    box-shadow: 0 10px 24px rgba(47, 126, 168, .18);
}

h1 { font-size: clamp(1.86rem, 3.25vw, 3.12rem); }
h2 { font-size: clamp(1.38rem, 2.35vw, 2.08rem); }
.tq-lms-course-hero h1 { font-size: clamp(1.72rem, 3.05vw, 2.72rem); }
.tq-lms-lesson-heading h1 { font-size: clamp(1.55rem, 2.65vw, 2.18rem); line-height: 1.2; }
.tq-p-page-header h1,
.tq-p-archive-hero h1,
.tq-p-entry-title,
.entry-title { font-size: clamp(1.65rem, 2.85vw, 2.45rem); }

.tq-lms-lesson-layout {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 390px);
    gap: clamp(1rem, 2.2vw, 1.8rem);
}
.tq-lms-lesson-main {
    min-width: 0;
}
.tq-lms-lesson-sidebar {
    padding: 1.15rem;
    min-width: 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(47,126,168,.5) rgba(234,246,255,.8);
}
.tq-lms-lesson-sidebar::-webkit-scrollbar { width: 8px; }
.tq-lms-lesson-sidebar::-webkit-scrollbar-track { background: rgba(234,246,255,.85); border-radius: 999px; }
.tq-lms-lesson-sidebar::-webkit-scrollbar-thumb { background: rgba(47,126,168,.45); border-radius: 999px; }
.tq-lms-lesson-sidebar > .tq-lms-back-link {
    margin: 0 0 .85rem;
    padding: .52rem .72rem;
    border-radius: 999px;
    background: rgba(234,246,255,.75);
    font-size: .88rem;
}
.tq-lms-lesson-sidebar .tq-lms-section-card.tq-lms-curriculum {
    padding: .85rem !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 22px !important;
    box-shadow: none !important;
    background: transparent !important;
    overflow: visible;
}
.tq-lms-lesson-sidebar .tq-lms-curriculum > h2 {
    font-size: clamp(1.25rem, 1.75vw, 1.55rem);
    line-height: 1.22;
    margin: 0 0 .9rem;
    letter-spacing: -.02em;
}
.tq-lms-lesson-sidebar .tq-lms-module {
    border-radius: 18px;
    background: rgba(255,255,255,.82);
    overflow: hidden;
}
.tq-lms-lesson-sidebar .tq-lms-module h3 {
    padding: .78rem .9rem;
    font-size: .92rem;
    line-height: 1.32;
    color: #1F5F7A;
    background: rgba(185,221,245,.28);
}
.tq-lms-lesson-sidebar .tq-lms-module li {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: .42rem;
    align-items: start;
    padding: .82rem .9rem;
}
.tq-lms-lesson-row-title,
.tq-lms-lesson-row-meta {
    min-width: 0;
}
.tq-lms-lesson-row-title a,
.tq-lms-lesson-row-title span {
    display: block;
    color: var(--tq-p-charcoal);
    font-size: .94rem;
    font-weight: 750;
    line-height: 1.42;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
}
.tq-lms-lesson-row-title small {
    display: block;
    margin-top: .18rem;
    font-size: .78rem;
    line-height: 1.25;
}
.tq-lms-lesson-row-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem .45rem;
    align-items: center;
}
.tq-lms-lesson-row-meta em,
.tq-lms-lesson-row-meta small {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    border-radius: 999px;
    font-size: .76rem;
    line-height: 1.2;
    white-space: nowrap;
}
.tq-lms-lesson-row-meta em {
    padding: .25rem .52rem;
    color: #1F5F7A;
    background: rgba(185,221,245,.38);
    font-style: normal;
    font-weight: 800;
}
.tq-lms-lesson-row-meta small {
    color: var(--tq-p-muted);
}
.tq-lms-module li.is-completed a:before,
.tq-lms-module li.is-completed span:before {
    margin-right: .22rem;
}

@media (max-width: 1180px) {
    .tq-p-header-cta { display: none; }
    .tq-p-primary-nav a { font-size: .84rem; padding-inline: .52rem; }
}
@media (max-width: 980px) {
    .tq-p-header-inner { min-height: 68px; }
    .tq-p-menu-toggle { display: inline-block; }
    .tq-p-primary-nav {
        position: fixed;
        inset: 76px 16px auto;
        background: rgba(255,255,255,.97);
        border: 1px solid var(--tq-p-line);
        border-radius: 22px;
        box-shadow: var(--tq-p-shadow);
        padding: .9rem;
        display: none;
        margin-left: 0;
    }
    .tq-p-primary-nav.is-open { display: block; }
    .tq-p-primary-nav ul { display: grid; gap: .2rem; justify-content: stretch; }
    .tq-p-primary-nav a { width: 100%; white-space: normal; font-size: .95rem; padding: .72rem .9rem; }
    .tq-p-brand { max-width: calc(100% - 54px); }
}

/* v1.2.1: hard mobile fix for lesson view */
@media (max-width: 1024px) {
    body.tq-pastel-lesson-view .tq-p-container,
    body.single-tq_lesson .tq-p-container,
    body.single-tq_lesson .tq-p-lms-entry {
        width: min(100% - 28px, var(--tq-p-container));
        max-width: 100%;
    }

    body.tq-pastel-lesson-view .tq-lms-lesson-layout,
    body.single-tq_lesson .tq-lms-lesson-layout {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 1rem !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 1.25rem 0 3rem !important;
    }

    body.tq-pastel-lesson-view .tq-lms-lesson-main,
    body.tq-pastel-lesson-view .tq-lms-lesson-sidebar,
    body.single-tq_lesson .tq-lms-lesson-main,
    body.single-tq_lesson .tq-lms-lesson-sidebar {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        position: static !important;
        top: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }

    body.tq-pastel-lesson-view .tq-lms-lesson-main,
    body.single-tq_lesson .tq-lms-lesson-main {
        order: 1;
    }

    body.tq-pastel-lesson-view .tq-lms-lesson-sidebar,
    body.single-tq_lesson .tq-lms-lesson-sidebar {
        order: 2;
    }
}

@media (max-width: 760px) {
    body.tq-pastel-lesson-view .tq-p-container,
    body.single-tq_lesson .tq-p-container,
    body.single-tq_lesson .tq-p-lms-entry {
        width: min(100% - 24px, var(--tq-p-container));
    }

    body.tq-pastel-lesson-view .tq-lms-lesson-main,
    body.tq-pastel-lesson-view .tq-lms-lesson-sidebar,
    body.single-tq_lesson .tq-lms-lesson-main,
    body.single-tq_lesson .tq-lms-lesson-sidebar {
        border-radius: 24px !important;
        padding: 1rem !important;
    }

    body.tq-pastel-lesson-view .tq-lms-lesson-heading h1,
    body.single-tq_lesson .tq-lms-lesson-heading h1 {
        font-size: clamp(1.45rem, 7vw, 2rem) !important;
        line-height: 1.24 !important;
    }

    body.tq-pastel-lesson-view .tq-lms-back-link,
    body.single-tq_lesson .tq-lms-back-link {
        max-width: 100%;
        white-space: normal;
    }

    body.tq-pastel-lesson-view .tq-lms-video-wrap,
    body.tq-pastel-lesson-view .tq-lms-video-player,
    body.single-tq_lesson .tq-lms-video-wrap,
    body.single-tq_lesson .tq-lms-video-player {
        border-radius: 20px;
    }

    body.tq-pastel-lesson-view .tq-lms-lesson-sidebar .tq-lms-curriculum > h2,
    body.single-tq_lesson .tq-lms-lesson-sidebar .tq-lms-curriculum > h2 {
        font-size: 1.45rem;
    }

    body.tq-pastel-lesson-view .tq-lms-lesson-sidebar .tq-lms-module li,
    body.single-tq_lesson .tq-lms-lesson-sidebar .tq-lms-module li {
        padding: .82rem .86rem;
    }

    body.tq-pastel-lesson-view .tq-lms-lesson-row-title a,
    body.tq-pastel-lesson-view .tq-lms-lesson-row-title span,
    body.single-tq_lesson .tq-lms-lesson-row-title a,
    body.single-tq_lesson .tq-lms-lesson-row-title span {
        font-size: .98rem;
        line-height: 1.42;
        overflow-wrap: break-word;
    }
}

/* v1.2.2: full mobile pass across LMS pages */
html,
body {
    overflow-x: hidden;
}

.tq-p-main,
.tq-p-container,
.tq-p-entry,
.tq-p-lms-entry,
.tq-p-content-card,
.tq-lms-section-card,
.tq-lms-sidebar-card,
.tq-lms-course-card,
.tq-lms-payment-box,
.tq-lms-register-box,
.tq-lms-my-course-card,
.tq-lms-order-card,
.tq-lms-dashboard-card {
    min-width: 0;
}

.tq-p-content-card iframe,
.tq-p-content-card video,
.entry-content iframe,
.entry-content video {
    max-width: 100%;
}

.tq-lms-payment-box {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(180px, 260px);
    gap: 1.25rem;
    align-items: start;
    background: rgba(255,255,255,.82);
    border: 1px solid var(--tq-p-line);
    border-radius: var(--tq-p-radius);
    box-shadow: var(--tq-p-shadow-soft);
    padding: clamp(1.1rem, 3vw, 1.75rem);
    margin: 1rem 0;
}

.tq-lms-payment-main,
.tq-lms-payment-qr,
.tq-lms-payment-list,
.tq-lms-payment-list dd {
    min-width: 0;
}

.tq-lms-payment-list {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    gap: .7rem 1rem;
    margin: 1rem 0;
}

.tq-lms-payment-list dt {
    color: var(--tq-p-muted);
    font-weight: 700;
}

.tq-lms-payment-list dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.tq-lms-payment-list code,
.tq-copy-target {
    display: inline-block;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}

.tq-lms-copy {
    padding: .42rem .7rem;
    min-height: auto;
    font-size: .78rem;
    margin-left: .35rem;
    box-shadow: none;
}

.tq-lms-payment-qr {
    text-align: center;
}

.tq-lms-payment-qr img {
    width: min(100%, 260px);
    margin-inline: auto;
}

.tq-lms-my-orders {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tq-lms-my-orders table {
    width: 100%;
    border-collapse: collapse;
    min-width: 680px;
}

.tq-lms-my-orders th,
.tq-lms-my-orders td {
    padding: .85rem;
    border-bottom: 1px solid var(--tq-p-line);
    text-align: left;
    vertical-align: top;
}

.tq-lms-my-orders td[colspan] {
    padding: 1rem 0;
}

.tq-lms-my-course-card {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 1rem;
    padding: 1rem;
    align-items: center;
}

.tq-lms-my-course-image {
    border-radius: 20px;
    overflow: hidden;
    background: var(--tq-p-mist);
}

.tq-lms-my-course-image img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.tq-lms-progress-bar span,
.tq-lms-progress-bar > span {
    display: block;
    min-height: 10px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--tq-p-teal), var(--tq-p-blue));
}

.tq-lms-student-dashboard > h2 {
    margin-top: 1.6rem;
}

@media (max-width: 920px) {
    .tq-p-site-title {
        font-size: clamp(.9rem, 3.4vw, 1.05rem);
    }

    .tq-p-primary-nav {
        left: 14px;
        right: 14px;
        max-height: calc(100vh - 92px);
        overflow-y: auto;
        z-index: 120;
    }
}

@media (max-width: 760px) {
    :root {
        --tq-p-radius: 24px;
        --tq-p-radius-sm: 16px;
    }

    body {
        font-size: 15.5px;
        line-height: 1.68;
        background: radial-gradient(circle at 18% 0%, rgba(185,221,245,.38), transparent 20rem), var(--tq-p-ivory);
    }

    h1 { font-size: clamp(1.65rem, 8vw, 2.25rem); }
    h2 { font-size: clamp(1.28rem, 6vw, 1.72rem); }
    h3 { font-size: clamp(1.02rem, 4.7vw, 1.22rem); }

    .tq-p-container {
        width: min(100% - 24px, var(--tq-p-container));
    }

    .tq-p-section {
        padding: 2.6rem 0;
    }

    .tq-p-page-header,
    .tq-p-archive-hero {
        padding: 1.8rem 0 1.25rem;
        text-align: left;
    }

    .tq-p-page-header p,
    .tq-p-archive-hero p {
        margin-inline: 0;
        font-size: .96rem;
    }

    .tq-p-page-header h1,
    .tq-p-archive-hero h1,
    .tq-p-entry-title,
    .entry-title {
        font-size: clamp(1.55rem, 8vw, 2.08rem) !important;
        line-height: 1.22;
    }

    .tq-p-site-header {
        background: rgba(247,251,255,.96);
    }

    .tq-p-header-inner {
        min-height: 64px;
        gap: .75rem;
    }

    .tq-p-brand {
        max-width: calc(100% - 52px);
    }

    .tq-p-site-title {
        display: block;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .tq-p-site-description {
        display: none;
    }

    .tq-p-menu-toggle span:not(.screen-reader-text) {
        width: 28px;
        height: 2px;
        margin: 6px 0;
    }

    .tq-p-primary-nav {
        inset: 72px 12px auto;
        max-height: calc(100vh - 86px);
        padding: .8rem;
        border-radius: 20px;
    }

    .tq-p-primary-nav a {
        border-radius: 14px;
        padding: .78rem .88rem;
    }

    .tq-p-hero {
        padding: 2.3rem 0 2.5rem;
    }

    .tq-p-hero-copy p {
        font-size: .98rem;
    }

    .tq-p-hero-actions {
        display: grid;
        grid-template-columns: 1fr;
        margin: 1.4rem 0;
    }

    .tq-p-button,
    .tq-lms-button,
    .tq-p-button-ghost,
    .tq-lms-button-secondary {
        width: 100%;
        min-height: 44px;
        padding: .78rem 1rem;
        text-align: center;
    }

    .tq-p-trust-row {
        gap: .5rem;
    }

    .tq-p-trust-row span,
    .tq-p-pill {
        font-size: .8rem;
        padding: .38rem .58rem;
    }

    .tq-p-hero-panel {
        min-height: 0;
        padding: 1rem;
        border-radius: 30px;
        display: grid;
        gap: 1rem;
    }

    .tq-p-hero-card {
        position: relative;
        inset: auto;
        border-radius: 24px;
        padding: 1.15rem;
    }

    .tq-p-hero-card-main,
    .tq-p-hero-card-small {
        left: auto;
        right: auto;
        top: auto;
        bottom: auto;
        max-width: none;
    }

    .tq-p-hero-card-small strong {
        font-size: 1.75rem;
    }

    .tq-p-orb {
        display: none;
    }

    .tq-p-course-grid,
    .tq-lms-course-grid,
    .tq-p-post-grid,
    .tq-p-instructor-grid,
    .tq-lms-instructor-grid,
    .tq-lms-learning-grid,
    .tq-lms-dashboard-grid,
    .tq-lms-my-courses-grid,
    .tq-lms-payment-grid,
    .tq-p-feature-grid,
    .tq-p-footer-grid {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 1rem;
    }

    .tq-p-card-media,
    .tq-lms-course-card-image {
        min-height: 176px;
    }

    .tq-p-card-body,
    .tq-lms-course-card-body,
    .tq-p-feature-card,
    .tq-p-content-card,
    .tq-p-entry .entry-content,
    .tq-lms-section-card,
    .tq-lms-sidebar-card,
    .tq-lms-register-box,
    .tq-lms-payment-card,
    .tq-lms-dashboard-card,
    .tq-lms-order-card {
        padding: 1rem !important;
        border-radius: 22px !important;
    }

    .tq-p-card-footer,
    .tq-lms-course-card-footer,
    .tq-lms-course-facts li,
    .tq-p-footer-bottom,
    .tq-lms-lesson-nav {
        flex-direction: column;
        align-items: stretch;
    }

    .tq-p-course-eyebrow,
    .tq-lms-course-meta {
        gap: .36rem;
    }

    .tq-lms-course-hero {
        margin: 1rem 0;
        padding: 1rem;
        border-radius: 26px;
        gap: 1rem;
    }

    .tq-lms-course-hero h1 {
        font-size: clamp(1.55rem, 8vw, 2.12rem) !important;
    }

    .tq-lms-course-subtitle {
        font-size: .96rem;
    }

    .tq-lms-course-hero-image,
    .tq-lms-sidebar-thumb {
        border-radius: 20px;
    }

    .tq-lms-course-layout {
        margin-bottom: 2.8rem;
        gap: 1rem;
    }

    .tq-lms-course-sidebar {
        top: auto;
    }

    .tq-lms-course-facts li {
        gap: .25rem;
        padding: .62rem 0;
    }

    .tq-lms-course-facts strong,
    .tq-lms-course-facts span {
        overflow-wrap: anywhere;
    }

    .tq-lms-module {
        border-radius: 18px;
    }

    .tq-lms-module h3 {
        padding: .82rem .9rem;
        font-size: .96rem;
    }

    .tq-lms-module li {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: .45rem;
        padding: .82rem .9rem;
    }

    .tq-lms-lesson-row-title a,
    .tq-lms-lesson-row-title span {
        overflow-wrap: break-word;
    }

    .tq-lms-lesson-row-meta {
        display: flex;
        flex-wrap: wrap;
        gap: .35rem .45rem;
    }

    .tq-lms-video-wrap,
    .tq-lms-video-player {
        border-radius: 18px !important;
    }

    .tq-lms-instructor-profile,
    .tq-lms-instructor-card-mini {
        align-items: flex-start;
    }

    .tq-lms-instructor-avatar,
    .tq-p-instructor-avatar,
    .tq-lms-instructor-mini-avatar {
        width: 74px;
        height: 74px;
    }

    .tq-lms-instructor-hero {
        align-items: center;
        text-align: center;
        padding: 1.25rem;
        border-radius: 28px;
    }

    .tq-lms-instructor-hero-avatar {
        width: 118px;
        height: 118px;
    }

    .tq-lms-payment-box {
        grid-template-columns: minmax(0, 1fr);
        padding: 1rem;
        border-radius: 22px;
    }

    .tq-lms-payment-list {
        grid-template-columns: minmax(0, 1fr);
        gap: .28rem;
    }

    .tq-lms-payment-list dt {
        margin-top: .55rem;
    }

    .tq-lms-copy {
        display: inline-flex;
        margin: .35rem 0 0;
    }

    .tq-lms-payment-qr {
        order: -1;
    }

    .tq-lms-payment-qr img {
        width: min(100%, 220px);
    }

    .tq-lms-my-orders {
        border: 1px solid var(--tq-p-line);
        border-radius: 18px;
        background: rgba(255,255,255,.68);
    }

    .tq-lms-my-orders table {
        min-width: 620px;
    }

    .tq-lms-my-course-card {
        grid-template-columns: minmax(0, 1fr);
        padding: 1rem !important;
        border-radius: 22px !important;
    }

    .tq-lms-my-course-image img {
        aspect-ratio: 16 / 9;
    }

    .tq-lms-student-dashboard > h2 {
        font-size: clamp(1.28rem, 6vw, 1.72rem);
    }

    .search-form {
        display: grid;
        grid-template-columns: 1fr;
    }

    .search-submit,
    button,
    input[type='submit'] {
        width: 100%;
    }

    .tq-p-cta-card {
        padding: 1.35rem !important;
        border-radius: 26px;
        text-align: left;
    }

    .tq-p-site-footer {
        margin-top: 2.6rem;
        padding: 2.4rem 0 1.1rem;
    }
}

@media (max-width: 420px) {
    .tq-p-container,
    body.tq-pastel-lesson-view .tq-p-container,
    body.single-tq_lesson .tq-p-container,
    body.single-tq_lesson .tq-p-lms-entry {
        width: min(100% - 20px, var(--tq-p-container));
    }

    .tq-p-site-title {
        font-size: clamp(.82rem, 4.2vw, .98rem);
        letter-spacing: -.03em;
    }

    .tq-p-card-body,
    .tq-lms-course-card-body,
    .tq-p-content-card,
    .tq-p-entry .entry-content,
    .tq-lms-section-card,
    .tq-lms-sidebar-card,
    .tq-lms-lesson-main,
    .tq-lms-lesson-sidebar {
        padding: .9rem !important;
    }

    .tq-lms-lesson-heading h1,
    body.tq-pastel-lesson-view .tq-lms-lesson-heading h1,
    body.single-tq_lesson .tq-lms-lesson-heading h1 {
        font-size: clamp(1.35rem, 8.5vw, 1.82rem) !important;
    }

    .tq-lms-lesson-sidebar .tq-lms-curriculum > h2,
    body.tq-pastel-lesson-view .tq-lms-lesson-sidebar .tq-lms-curriculum > h2,
    body.single-tq_lesson .tq-lms-lesson-sidebar .tq-lms-curriculum > h2 {
        font-size: 1.28rem !important;
    }

    .tq-p-card-media,
    .tq-lms-course-card-image {
        min-height: 154px;
    }

    .tq-lms-payment-qr img {
        width: min(100%, 190px);
    }
}

/* v1.3.0 Premium UI polish: softer blue pastel system, refined header, home, dashboard, and mobile UX */
:root {
    --tq-p-ivory: #F6FBFF;
    --tq-p-ivory-2: #FFFFFF;
    --tq-p-mist: #EAF6FF;
    --tq-p-blue: #B7DDF6;
    --tq-p-blue-2: #DDF0FF;
    --tq-p-teal: #2F82B7;
    --tq-p-teal-dark: #1D5F86;
    --tq-p-gold: #C9A65A;
    --tq-p-charcoal: #172235;
    --tq-p-muted: #63758A;
    --tq-p-line: rgba(47, 130, 183, .15);
    --tq-p-shadow: 0 28px 90px rgba(23, 34, 53, .10);
    --tq-p-shadow-soft: 0 16px 48px rgba(23, 34, 53, .075);
}

body {
    background:
        radial-gradient(circle at 8% 4%, rgba(183, 221, 246, .48), transparent 28rem),
        radial-gradient(circle at 92% 12%, rgba(221, 240, 255, .82), transparent 30rem),
        linear-gradient(180deg, #F6FBFF 0%, #FFFFFF 45%, #F6FBFF 100%);
}

h1, h2, h3, h4, h5, h6 {
    letter-spacing: -.032em;
}

.tq-p-site-header {
    background: rgba(246, 251, 255, .82) !important;
    backdrop-filter: blur(22px) saturate(140%);
    border-bottom: 1px solid rgba(47, 130, 183, .095);
    box-shadow: 0 10px 36px rgba(23, 34, 53, .045) !important;
}

.tq-p-site-header::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(47,130,183,.24), transparent);
    pointer-events: none;
}

.tq-p-header-inner {
    min-height: 72px !important;
    gap: .9rem;
}

.tq-p-brand {
    max-width: 430px;
}

.tq-p-site-title {
    font-weight: 800;
    font-size: clamp(.98rem, 1.22vw, 1.18rem) !important;
    letter-spacing: -.035em;
}

.tq-p-site-description {
    font-size: .72rem;
    letter-spacing: .02em;
}

.tq-p-header-actions {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    flex: 0 0 auto;
}

.tq-p-header-link {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: .48rem .76rem;
    border-radius: 999px;
    color: var(--tq-p-teal-dark);
    background: rgba(234,246,255,.74);
    border: 1px solid rgba(47,130,183,.12);
    font-weight: 760;
    font-size: .84rem;
    white-space: nowrap;
}

.tq-p-header-link:hover {
    background: #fff;
    color: var(--tq-p-teal-dark);
}

.tq-p-primary-nav a {
    font-size: .84rem !important;
    font-weight: 760 !important;
    padding: .52rem .68rem !important;
    border-radius: 999px !important;
}

.tq-p-primary-nav a:hover,
.tq-p-primary-nav .current-menu-item > a,
.tq-p-primary-nav .current_page_item > a,
.tq-p-primary-nav .current-menu-ancestor > a {
    background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(221,240,255,.8)) !important;
    color: var(--tq-p-teal-dark) !important;
    box-shadow: inset 0 0 0 1px rgba(47,130,183,.13);
}

.tq-p-header-cta,
.tq-p-button,
.tq-lms-button,
.search-submit,
button,
input[type='submit'] {
    background: linear-gradient(135deg, #2F82B7, #1D6F9D);
    box-shadow: 0 15px 36px rgba(47,130,183,.22);
}

.tq-p-header-cta {
    min-height: 40px !important;
    padding: .62rem .95rem !important;
    font-size: .84rem !important;
}

.tq-p-button-ghost,
.tq-lms-button-secondary {
    background: rgba(255,255,255,.82) !important;
    color: var(--tq-p-teal-dark) !important;
    border: 1px solid rgba(47,130,183,.16);
    box-shadow: 0 10px 28px rgba(23,34,53,.055);
}

.tq-p-button-light {
    color: var(--tq-p-teal-dark) !important;
    background: #fff !important;
}

.tq-p-mobile-nav-head,
.tq-p-mobile-nav-actions,
.tq-p-menu-backdrop {
    display: none;
}

.tq-p-menu-toggle {
    border-radius: 14px;
    background: rgba(234,246,255,.82);
    border: 1px solid rgba(47,130,183,.13);
    width: 44px;
    height: 44px;
    place-items: center;
}

.tq-p-menu-toggle span:not(.screen-reader-text) {
    width: 23px;
    background: var(--tq-p-teal-dark);
    transition: transform .2s ease, opacity .2s ease;
}

.tq-p-menu-toggle.is-open span:not(.screen-reader-text):nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.tq-p-menu-toggle.is-open span:not(.screen-reader-text):nth-child(2) {
    opacity: 0;
}

.tq-p-menu-toggle.is-open span:not(.screen-reader-text):nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.tq-p-premium-hero {
    padding-top: clamp(3rem, 6vw, 5.8rem);
}

.tq-p-premium-hero .tq-p-hero-copy h1 {
    max-width: 780px;
    font-size: clamp(2.05rem, 4.6vw, 4.25rem);
    line-height: 1.08;
}

.tq-p-premium-hero .tq-p-hero-copy p {
    max-width: 680px;
    font-size: clamp(1rem, 1.3vw, 1.12rem);
}

.tq-p-premium-hero-panel {
    min-height: 510px;
    background:
        linear-gradient(145deg, rgba(255,255,255,.64), rgba(221,240,255,.86)),
        radial-gradient(circle at 72% 8%, rgba(47,130,183,.18), transparent 18rem),
        linear-gradient(135deg, rgba(183,221,246,.92), rgba(246,251,255,.7));
}

.tq-p-premium-hero-panel::after {
    content: '';
    position: absolute;
    width: 72%;
    height: 72%;
    right: -18%;
    bottom: -18%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(47,130,183,.12), transparent 65%);
}

.tq-p-hero-card {
    border-color: rgba(255,255,255,.92);
    background: rgba(255,255,255,.76);
}

.tq-p-hero-card span:first-child {
    color: var(--tq-p-teal-dark);
    font-weight: 800;
    font-size: .82rem;
}

.tq-p-mini-progress {
    height: 10px;
    margin-top: 1.15rem;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(47,130,183,.12);
}

.tq-p-mini-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2F82B7, #9ED4F8);
}

.tq-p-section-head-row {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    max-width: none;
}

.tq-p-section-link {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    border-radius: 999px;
    padding: .55rem .8rem;
    color: var(--tq-p-teal-dark);
    background: rgba(255,255,255,.74);
    border: 1px solid var(--tq-p-line);
    font-weight: 800;
}

.tq-p-card,
.tq-lms-course-card,
.tq-lms-section-card,
.tq-lms-sidebar-card,
.tq-p-content-card,
.tq-lms-dashboard-card,
.tq-lms-order-card,
.tq-lms-register-box,
.tq-lms-payment-box {
    background: rgba(255,255,255,.82) !important;
    border: 1px solid rgba(47,130,183,.135) !important;
    box-shadow: 0 18px 56px rgba(23,34,53,.07) !important;
}

.tq-p-card,
.tq-lms-course-card {
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.tq-p-card:hover,
.tq-lms-course-card:hover {
    transform: translateY(-4px);
    border-color: rgba(47,130,183,.24) !important;
    box-shadow: 0 24px 68px rgba(23,34,53,.105) !important;
}

.tq-p-card-media,
.tq-lms-course-card-image {
    background: linear-gradient(135deg, #DDF0FF, #F6FBFF);
}

.tq-p-card-media img,
.tq-lms-course-card-image img {
    transition: transform .4s ease;
}

.tq-p-card:hover .tq-p-card-media img,
.tq-lms-course-card:hover .tq-lms-course-card-image img {
    transform: scale(1.035);
}

.tq-p-floating-badge,
.tq-lms-card-badge,
.tq-lms-badge {
    background: linear-gradient(135deg, rgba(47,130,183,.94), rgba(29,95,134,.94)) !important;
    color: #fff !important;
    box-shadow: 0 12px 28px rgba(47,130,183,.22);
}

.tq-p-price strong,
.tq-lms-sidebar-price strong,
.tq-lms-course-card-footer strong {
    color: var(--tq-p-teal-dark);
}

.tq-p-pathway-shell {
    padding: clamp(1.1rem, 3vw, 2rem);
    border-radius: 40px;
    background: linear-gradient(135deg, rgba(234,246,255,.82), rgba(255,255,255,.72));
    border: 1px solid rgba(47,130,183,.13);
    box-shadow: var(--tq-p-shadow-soft);
}

.tq-p-pathway-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.tq-p-pathway-card,
.tq-p-feature-card {
    position: relative;
    overflow: hidden;
    padding: 1.35rem;
    border-radius: 28px;
    background: rgba(255,255,255,.82);
    border: 1px solid rgba(47,130,183,.13);
    box-shadow: 0 14px 44px rgba(23,34,53,.06);
}

.tq-p-pathway-card::before,
.tq-p-feature-card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(90deg, #B7DDF6, #2F82B7);
}

.tq-p-pathway-card span,
.tq-p-feature-card span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 16px;
    background: rgba(221,240,255,.95);
    color: var(--tq-p-teal-dark);
    font-weight: 900;
    margin-bottom: .85rem;
}

.tq-p-method-section {
    background: linear-gradient(180deg, transparent, rgba(234,246,255,.52), transparent);
}

.tq-p-method-grid {
    display: grid;
    grid-template-columns: minmax(0, .85fr) minmax(0, 1fr);
    gap: clamp(1.25rem, 4vw, 3.5rem);
    align-items: center;
}

.tq-p-method-copy {
    padding: clamp(1rem, 2vw, 1.5rem) 0;
}

.tq-p-method-copy p {
    color: var(--tq-p-muted);
    font-size: 1.02rem;
}

.tq-p-method-list {
    display: grid;
    gap: .9rem;
}

.tq-p-method-list div {
    padding: 1.1rem 1.2rem;
    border-radius: 24px;
    background: rgba(255,255,255,.82);
    border: 1px solid rgba(47,130,183,.13);
    box-shadow: 0 14px 44px rgba(23,34,53,.055);
}

.tq-p-method-list strong,
.tq-p-method-list span {
    display: block;
}

.tq-p-method-list strong {
    color: var(--tq-p-charcoal);
    margin-bottom: .25rem;
}

.tq-p-method-list span {
    color: var(--tq-p-muted);
}

.tq-p-testimonial-card {
    max-width: 980px;
    margin-inline: auto;
    padding: clamp(1.5rem, 4vw, 3rem);
    border-radius: 38px;
    background: linear-gradient(135deg, rgba(255,255,255,.88), rgba(221,240,255,.72));
    border: 1px solid rgba(47,130,183,.13);
    box-shadow: var(--tq-p-shadow-soft);
    text-align: center;
}

.tq-p-testimonial-card blockquote {
    margin: 0 auto 1rem;
    max-width: 820px;
    color: var(--tq-p-charcoal);
    font-size: clamp(1.25rem, 2.4vw, 2rem);
    line-height: 1.45;
    letter-spacing: -.025em;
    font-weight: 700;
}

.tq-p-testimonial-card p {
    color: var(--tq-p-muted);
    margin-bottom: 0;
}

.tq-p-cta-card {
    background:
        radial-gradient(circle at 20% 0%, rgba(255,255,255,.32), transparent 24rem),
        linear-gradient(135deg, #2F82B7, #1D5F86) !important;
    border: 0 !important;
}

.tq-p-dashboard-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    padding: clamp(1.3rem, 4vw, 2.4rem);
    border-radius: 34px;
    background: linear-gradient(135deg, rgba(221,240,255,.9), rgba(255,255,255,.82));
    border: 1px solid rgba(47,130,183,.13);
    box-shadow: var(--tq-p-shadow-soft);
    margin-bottom: 1.1rem;
}

.tq-p-dashboard-hero h1 {
    font-size: clamp(1.65rem, 3.2vw, 2.45rem);
}

.tq-p-dashboard-hero p {
    max-width: 720px;
    color: var(--tq-p-muted);
}

.tq-p-dashboard-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    justify-content: flex-end;
}

.tq-lms-student-dashboard {
    display: grid;
    gap: 1.1rem;
}

.tq-lms-student-dashboard > h2 {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin: 1.4rem 0 .25rem !important;
    font-size: clamp(1.32rem, 2.35vw, 1.85rem);
}

.tq-lms-student-dashboard > h2::before {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--tq-p-teal);
    box-shadow: 0 0 0 7px rgba(47,130,183,.12);
}

.tq-lms-my-course-card,
.tq-lms-dashboard-card,
.tq-lms-order-card {
    border-radius: 26px !important;
}

.tq-lms-payment-box {
    border-radius: 30px !important;
}

.tq-lms-payment-list code,
.tq-copy-target {
    color: var(--tq-p-teal-dark);
    background: rgba(221,240,255,.72);
    border: 1px solid rgba(47,130,183,.12);
    border-radius: 12px;
    padding: .18rem .42rem;
}

.tq-lms-copy.is-copied,
.tq-lms-copy:hover {
    background: var(--tq-p-teal-dark);
    color: #fff;
}

.tq-lms-lesson-main {
    background: rgba(255,255,255,.88) !important;
}

.tq-lms-lesson-sidebar {
    background: rgba(255,255,255,.78) !important;
}

.tq-lms-lesson-heading {
    border-bottom: 1px solid rgba(47,130,183,.1);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.tq-lms-lesson-content {
    font-size: 1.02rem;
}

.tq-lms-lesson-content p {
    max-width: 78ch;
}

.tq-lms-lesson-progress-actions .tq-lms-message-success {
    border-radius: 20px;
}

.tq-lms-module li.is-completed {
    background: rgba(221,240,255,.42);
}

.tq-lms-status-pending,
.tq-lms-order-status .tq-lms-status-pending {
    background: rgba(201,166,90,.16);
    color: #8B6B22;
}

.tq-lms-status-approved,
.tq-lms-status-active,
.tq-lms-order-status .tq-lms-status-approved {
    background: rgba(47,130,183,.13);
    color: var(--tq-p-teal-dark);
}

.tq-lms-status-rejected,
.tq-lms-order-status .tq-lms-status-rejected {
    background: rgba(180,65,65,.12);
    color: #9A3434;
}

.tq-p-site-footer {
    background:
        radial-gradient(circle at 20% 0%, rgba(183,221,246,.2), transparent 26rem),
        linear-gradient(135deg, #174B6B, #0F3147) !important;
}

@media (max-width: 1180px) {
    .tq-p-header-link { display: none; }
}

@media (max-width: 980px) {
    body.tq-p-menu-open {
        overflow: hidden;
    }

    .tq-p-header-actions {
        display: none;
    }

    .tq-p-menu-toggle {
        display: grid !important;
        margin-left: auto;
        z-index: 132;
    }

    .tq-p-menu-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 120;
        background: rgba(12, 28, 45, .28);
        opacity: 0;
        pointer-events: none;
        transition: opacity .22s ease;
        backdrop-filter: blur(5px);
    }

    .tq-p-menu-backdrop.is-open {
        opacity: 1;
        pointer-events: auto;
    }

    .tq-p-primary-nav {
        display: block !important;
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        left: auto !important;
        width: min(390px, calc(100vw - 28px));
        max-height: none !important;
        padding: 1rem !important;
        margin: 0 !important;
        border-radius: 28px 0 0 28px !important;
        border: 1px solid rgba(47,130,183,.14) !important;
        border-right: 0 !important;
        background: rgba(246,251,255,.98) !important;
        box-shadow: -22px 0 70px rgba(23,34,53,.18) !important;
        z-index: 130 !important;
        overflow-y: auto !important;
        transform: translateX(104%);
        transition: transform .24s ease;
    }

    .tq-p-primary-nav.is-open {
        transform: translateX(0);
    }

    .tq-p-mobile-nav-head,
    .tq-p-mobile-nav-actions {
        display: flex;
    }

    .tq-p-mobile-nav-head {
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        margin-bottom: .9rem;
        padding: .35rem .25rem .85rem;
        border-bottom: 1px solid rgba(47,130,183,.12);
        color: var(--tq-p-charcoal);
        font-weight: 900;
        font-size: 1.05rem;
    }

    .tq-p-menu-close {
        width: 40px !important;
        height: 40px;
        padding: 0 !important;
        border-radius: 999px !important;
        background: rgba(221,240,255,.9) !important;
        color: var(--tq-p-teal-dark) !important;
        box-shadow: none !important;
        font-size: 1.45rem;
        line-height: 1;
    }

    .tq-p-primary-nav ul {
        display: grid !important;
        gap: .36rem !important;
    }

    .tq-p-primary-nav a {
        justify-content: flex-start;
        width: 100% !important;
        padding: .82rem .9rem !important;
        border-radius: 16px !important;
        white-space: normal !important;
        font-size: .98rem !important;
        line-height: 1.3;
    }

    .tq-p-mobile-nav-actions {
        display: grid;
        gap: .65rem;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid rgba(47,130,183,.12);
    }

    .tq-p-mobile-nav-actions .tq-p-button {
        width: 100%;
    }

    .tq-p-method-grid,
    .tq-p-pathway-grid,
    .tq-p-dashboard-hero {
        grid-template-columns: minmax(0, 1fr);
    }

    .tq-p-dashboard-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 760px) {
    .tq-p-premium-hero .tq-p-hero-copy h1 {
        font-size: clamp(1.72rem, 8.4vw, 2.42rem);
        line-height: 1.12;
    }

    .tq-p-premium-hero-panel {
        min-height: 0;
    }

    .tq-p-section-head-row {
        display: grid;
        align-items: start;
    }

    .tq-p-section-link {
        width: fit-content;
    }

    .tq-p-pathway-shell,
    .tq-p-testimonial-card {
        border-radius: 26px;
        padding: 1rem;
    }

    .tq-p-pathway-grid {
        gap: .8rem;
    }

    .tq-p-pathway-card,
    .tq-p-feature-card,
    .tq-p-method-list div {
        border-radius: 22px;
        padding: 1rem;
    }

    .tq-p-testimonial-card blockquote {
        font-size: clamp(1.08rem, 5.4vw, 1.42rem);
        text-align: left;
    }

    .tq-p-dashboard-hero {
        border-radius: 24px;
        padding: 1rem;
    }

    .tq-p-dashboard-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    .tq-lms-my-orders {
        overflow: visible !important;
        border: 0 !important;
        background: transparent !important;
    }

    .tq-lms-my-orders table,
    .tq-lms-my-orders thead,
    .tq-lms-my-orders tbody,
    .tq-lms-my-orders tr,
    .tq-lms-my-orders th,
    .tq-lms-my-orders td {
        display: block;
        width: 100%;
        min-width: 0 !important;
    }

    .tq-lms-my-orders thead {
        display: none;
    }

    .tq-lms-my-orders tr {
        margin: 0 0 .95rem;
        padding: .85rem;
        border: 1px solid rgba(47,130,183,.13);
        border-radius: 22px;
        background: rgba(255,255,255,.82);
        box-shadow: 0 14px 40px rgba(23,34,53,.055);
    }

    .tq-lms-my-orders td {
        display: grid;
        grid-template-columns: 118px minmax(0, 1fr);
        gap: .65rem;
        align-items: start;
        padding: .48rem 0 !important;
        border: 0 !important;
    }

    .tq-lms-my-orders td::before {
        color: var(--tq-p-muted);
        font-weight: 800;
        font-size: .82rem;
    }

    .tq-lms-my-orders td:nth-child(1)::before { content: 'Mã đơn'; }
    .tq-lms-my-orders td:nth-child(2)::before { content: 'Khóa học'; }
    .tq-lms-my-orders td:nth-child(3)::before { content: 'Số tiền'; }
    .tq-lms-my-orders td:nth-child(4)::before { content: 'Trạng thái'; }
    .tq-lms-my-orders td:nth-child(5)::before { content: 'Ngày tạo'; }

    .tq-lms-my-orders td[colspan] {
        display: block;
        padding: .25rem 0 0 !important;
    }

    .tq-lms-my-orders td[colspan]::before {
        content: none;
    }

    .tq-lms-payment-box {
        box-shadow: 0 14px 40px rgba(23,34,53,.06) !important;
    }

    .tq-lms-lesson-content {
        font-size: 1rem;
    }

    .tq-lms-lesson-sidebar {
        margin-top: .35rem;
    }

    .tq-p-site-footer {
        border-radius: 28px 28px 0 0;
    }
}

@media (max-width: 420px) {
    .tq-p-primary-nav {
        width: calc(100vw - 18px);
        border-radius: 22px 0 0 22px !important;
    }

    .tq-p-site-title {
        overflow-wrap: normal;
        word-break: normal;
    }

    .tq-lms-my-orders td {
        grid-template-columns: minmax(0, 1fr);
        gap: .16rem;
    }
}

/* v1.4.0 Layout stabilization pass: desktop + mobile LMS compatibility */
.tq-elearning-active .tq-p-lms-entry,
.tq-elearning-active .tq-lms-course-layout,
.tq-elearning-active .tq-lms-course-main,
.tq-elearning-active .tq-lms-course-sidebar,
.tq-elearning-active .tq-lms-sidebar-card,
.tq-elearning-active .tq-lms-register-box,
.tq-elearning-active .tq-lms-payment-box,
.tq-elearning-active .tq-lms-payment-main,
.tq-elearning-active .tq-lms-payment-qr,
.tq-elearning-active .tq-lms-payment-list,
.tq-elearning-active .tq-lms-payment-list dt,
.tq-elearning-active .tq-lms-payment-list dd,
.tq-elearning-active .tq-lms-course-facts,
.tq-elearning-active .tq-lms-course-facts li,
.tq-elearning-active .tq-lms-learning-grid,
.tq-elearning-active .tq-lms-module,
.tq-elearning-active .tq-lms-module li,
.tq-elearning-active .tq-lms-auth-wrap,
.tq-elearning-active .tq-lms-profile-box,
.tq-elearning-active .tq-lms-quiz-box,
.tq-elearning-active .tq-lms-comments {
    min-width: 0 !important;
    max-width: 100%;
}

.tq-elearning-active .tq-lms-course-layout {
    grid-template-columns: minmax(0, 1fr) minmax(330px, 380px) !important;
    gap: clamp(1.25rem, 2.4vw, 2rem) !important;
    align-items: start !important;
}

.tq-elearning-active .tq-lms-course-main,
.tq-elearning-active .tq-lms-course-sidebar {
    width: 100% !important;
}

.tq-elearning-active .tq-lms-course-sidebar {
    align-self: start;
    overflow: visible !important;
}

.tq-elearning-active .tq-lms-sidebar-card,
.tq-elearning-active .tq-lms-register-box,
.tq-elearning-active .tq-lms-payment-box,
.tq-elearning-active .tq-lms-section-card {
    overflow: visible !important;
}

.tq-elearning-active .tq-lms-register-box > h3,
.tq-elearning-active .tq-lms-payment-main > h3,
.tq-elearning-active .tq-lms-sidebar-card > h3 {
    font-size: clamp(1.08rem, 1.5vw, 1.32rem) !important;
    line-height: 1.28 !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
}

.tq-elearning-active .tq-lms-payment-box {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(180px, 250px) !important;
    gap: 1.15rem !important;
    align-items: start !important;
    width: 100% !important;
}

.tq-elearning-active .tq-lms-payment-list {
    display: grid !important;
    grid-template-columns: minmax(118px, .36fr) minmax(0, 1fr) !important;
    gap: .72rem 1rem !important;
    width: 100% !important;
}

.tq-elearning-active .tq-lms-payment-list dt,
.tq-elearning-active .tq-lms-payment-list dd {
    line-height: 1.48 !important;
}

.tq-elearning-active .tq-lms-payment-list dt {
    color: var(--tq-p-muted) !important;
    font-weight: 800 !important;
}

.tq-elearning-active .tq-lms-payment-list dd {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: .42rem .5rem !important;
    margin: 0 !important;
    color: var(--tq-p-charcoal) !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
}

.tq-elearning-active .tq-lms-payment-list code,
.tq-elearning-active .tq-copy-target {
    display: inline-flex !important;
    align-items: center !important;
    max-width: 100% !important;
    min-height: 30px;
    padding: .2rem .52rem !important;
    border-radius: 12px !important;
    background: rgba(221,240,255,.82) !important;
    border: 1px solid rgba(47,130,183,.16) !important;
    color: var(--tq-p-teal-dark) !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', monospace !important;
    font-size: .9rem !important;
    line-height: 1.35 !important;
    white-space: nowrap !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
}

.tq-elearning-active .tq-lms-copy,
.tq-elearning-active button.tq-lms-copy,
.tq-elearning-active .tq-lms-copy-button,
.tq-elearning-active button.tq-lms-copy-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    min-width: 0 !important;
    min-height: 32px !important;
    padding: .38rem .72rem !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: linear-gradient(135deg, #2F82B7, #1D6F9D) !important;
    color: #fff !important;
    font-size: .78rem !important;
    line-height: 1 !important;
    font-weight: 850 !important;
    white-space: nowrap !important;
    text-indent: 0 !important;
    box-shadow: 0 8px 18px rgba(47,130,183,.18) !important;
}

.tq-elearning-active .tq-lms-copy:hover,
.tq-elearning-active button.tq-lms-copy:hover,
.tq-elearning-active .tq-lms-copy-button:hover,
.tq-elearning-active button.tq-lms-copy-button:hover,
.tq-elearning-active .tq-lms-copy.is-copied,
.tq-elearning-active button.tq-lms-copy.is-copied {
    color: #fff !important;
    background: linear-gradient(135deg, #1D6F9D, #174B6B) !important;
}

.tq-elearning-active .tq-lms-payment-qr {
    display: grid !important;
    place-items: center !important;
    align-content: start !important;
    gap: .55rem !important;
    padding: .8rem !important;
    border-radius: 22px !important;
    background: rgba(255,255,255,.72) !important;
    border: 1px solid rgba(47,130,183,.12) !important;
    text-align: center !important;
}

.tq-elearning-active .tq-lms-payment-qr img {
    display: block;
    width: min(100%, 220px) !important;
    height: auto !important;
    margin: 0 auto !important;
    object-fit: contain !important;
    border-radius: 18px !important;
}

.tq-elearning-active .tq-lms-qr-fallback {
    display: none;
    width: 100%;
    padding: .82rem !important;
    border: 1px dashed rgba(47,130,183,.24) !important;
    border-radius: 16px !important;
    color: var(--tq-p-muted) !important;
    background: rgba(246,251,255,.9) !important;
    font-size: .86rem !important;
    line-height: 1.45 !important;
    white-space: normal !important;
    overflow-wrap: break-word !important;
}

.tq-elearning-active .tq-lms-payment-qr.is-missing .tq-lms-qr-fallback {
    display: block !important;
}

.tq-elearning-active .tq-lms-payment-note {
    margin: 1rem 0 0 !important;
    padding: .9rem 1rem !important;
    border-left: 4px solid var(--tq-p-gold) !important;
    border-radius: 16px !important;
    background: rgba(255,250,242,.88) !important;
    color: var(--tq-p-charcoal) !important;
    line-height: 1.65 !important;
}

/* Compact payment box when it appears inside the course purchase sidebar. */
.tq-elearning-active .tq-lms-course-sidebar .tq-lms-register-box .tq-lms-payment-box,
.tq-elearning-active .tq-lms-sidebar-card .tq-lms-payment-box,
.tq-elearning-active .tq-lms-register-box .tq-lms-payment-box {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: .9rem !important;
    padding: 0 !important;
    margin: 1rem 0 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}

.tq-elearning-active .tq-lms-course-sidebar .tq-lms-payment-main > h3,
.tq-elearning-active .tq-lms-register-box .tq-lms-payment-main > h3 {
    font-size: 1.06rem !important;
    margin-bottom: .55rem !important;
}

.tq-elearning-active .tq-lms-course-sidebar .tq-lms-order-status,
.tq-elearning-active .tq-lms-register-box .tq-lms-order-status {
    margin: .4rem 0 .8rem !important;
}

.tq-elearning-active .tq-lms-course-sidebar .tq-lms-payment-list,
.tq-elearning-active .tq-lms-register-box .tq-lms-payment-list {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: .22rem !important;
}

.tq-elearning-active .tq-lms-course-sidebar .tq-lms-payment-list dt,
.tq-elearning-active .tq-lms-register-box .tq-lms-payment-list dt {
    margin-top: .62rem !important;
    font-size: .8rem !important;
}

.tq-elearning-active .tq-lms-course-sidebar .tq-lms-payment-list dd,
.tq-elearning-active .tq-lms-register-box .tq-lms-payment-list dd {
    display: flex !important;
    align-items: center !important;
    gap: .38rem !important;
}

.tq-elearning-active .tq-lms-course-sidebar .tq-lms-payment-qr,
.tq-elearning-active .tq-lms-register-box .tq-lms-payment-qr {
    order: -1;
    padding: .8rem !important;
}

.tq-elearning-active .tq-lms-course-sidebar .tq-lms-payment-qr img,
.tq-elearning-active .tq-lms-register-box .tq-lms-payment-qr img {
    width: min(100%, 190px) !important;
}

.tq-elearning-active .tq-lms-payment-receipt-area {
    grid-column: 1 / -1 !important;
    min-width: 0 !important;
}

.tq-elearning-active .tq-lms-receipt-form,
.tq-elearning-active .tq-lms-profile-box,
.tq-elearning-active .tq-lms-quiz-box,
.tq-elearning-active .tq-lms-comments {
    background: rgba(255,255,255,.82) !important;
    border: 1px solid rgba(47,130,183,.13) !important;
    border-radius: 24px !important;
    box-shadow: 0 14px 42px rgba(23,34,53,.055) !important;
}

.tq-elearning-active .tq-lms-profile-box,
.tq-elearning-active .tq-lms-quiz-box,
.tq-elearning-active .tq-lms-comments {
    padding: clamp(1rem, 2.4vw, 1.5rem) !important;
}

.tq-elearning-active .tq-lms-status,
.tq-elearning-active .tq-lms-order-status,
.tq-elearning-active .tq-lms-badge,
.tq-elearning-active .tq-p-pill,
.tq-elearning-active .tq-lms-lesson-row-meta em,
.tq-elearning-active .tq-lms-lesson-row-meta small {
    white-space: nowrap !important;
    word-break: normal !important;
}

.tq-elearning-active .tq-lms-register-box .tq-lms-message,
.tq-elearning-active .tq-lms-sidebar-card .tq-lms-message {
    overflow-wrap: break-word !important;
    word-break: normal !important;
}

.tq-elearning-active .tq-lms-button,
.tq-elearning-active button.tq-lms-button,
.tq-elearning-active .tq-p-button,
.tq-elearning-active input[type='submit'] {
    color: #fff !important;
    text-indent: 0 !important;
    white-space: normal !important;
}

.tq-elearning-active .tq-lms-course-facts li {
    align-items: flex-start !important;
}

.tq-elearning-active .tq-lms-course-facts li strong,
.tq-elearning-active .tq-lms-course-facts li span,
.tq-elearning-active .tq-lms-course-facts li a {
    min-width: 0 !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
}

.tq-elearning-active .tq-lms-course-facts li strong {
    flex: 0 0 auto;
}

.tq-elearning-active .tq-lms-course-facts li span {
    text-align: right;
}

@media (max-width: 1120px) {
    .tq-elearning-active .tq-lms-course-layout,
    .tq-elearning-active .tq-lms-payment-box,
    .tq-elearning-active .tq-lms-auth-wrap {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .tq-elearning-active .tq-lms-course-sidebar,
    .tq-elearning-active .tq-lms-lesson-sidebar {
        position: static !important;
        top: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }

    .tq-elearning-active .tq-lms-payment-qr {
        order: -1;
    }
}

@media (max-width: 760px) {
    .tq-elearning-active .tq-lms-course-layout,
    .tq-elearning-active .tq-lms-lesson-layout,
    .tq-elearning-active .tq-lms-course-hero,
    .tq-elearning-active .tq-lms-learning-grid,
    .tq-elearning-active .tq-lms-dashboard-grid,
    .tq-elearning-active .tq-lms-my-courses-grid,
    .tq-elearning-active .tq-lms-auth-wrap,
    .tq-elearning-active .tq-lms-payment-box {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .tq-elearning-active .tq-lms-course-sidebar,
    .tq-elearning-active .tq-lms-sidebar-card,
    .tq-elearning-active .tq-lms-register-box,
    .tq-elearning-active .tq-lms-section-card,
    .tq-elearning-active .tq-lms-payment-box {
        width: 100% !important;
    }

    .tq-elearning-active .tq-lms-payment-list,
    .tq-elearning-active .tq-lms-course-sidebar .tq-lms-payment-list,
    .tq-elearning-active .tq-lms-register-box .tq-lms-payment-list {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: .22rem !important;
    }

    .tq-elearning-active .tq-lms-payment-list dt {
        margin-top: .62rem !important;
    }

    .tq-elearning-active .tq-lms-payment-list dd {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
    }

    .tq-elearning-active .tq-lms-payment-list code,
    .tq-elearning-active .tq-copy-target {
        max-width: min(100%, 100vw - 72px) !important;
        font-size: .84rem !important;
    }

    .tq-elearning-active .tq-lms-copy,
    .tq-elearning-active button.tq-lms-copy,
    .tq-elearning-active .tq-lms-copy-button,
    .tq-elearning-active button.tq-lms-copy-button {
        width: auto !important;
        min-width: 76px !important;
    }

    .tq-elearning-active .tq-lms-payment-qr img {
        width: min(100%, 210px) !important;
    }

    .tq-elearning-active .tq-lms-course-facts li {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: .18rem !important;
    }

    .tq-elearning-active .tq-lms-course-facts li span {
        text-align: left !important;
    }

    .tq-elearning-active .tq-lms-register-form input,
    .tq-elearning-active .tq-lms-auth-form input,
    .tq-elearning-active .tq-lms-profile-form input,
    .tq-elearning-active .tq-lms-profile-form select,
    .tq-elearning-active .tq-lms-profile-form textarea,
    .tq-elearning-active .tq-lms-receipt-form input,
    .tq-elearning-active .tq-lms-quiz-box input,
    .tq-elearning-active .tq-lms-quiz-box textarea {
        width: 100% !important;
        max-width: 100% !important;
    }
}

@media (max-width: 420px) {
    .tq-elearning-active .tq-lms-payment-list code,
    .tq-elearning-active .tq-copy-target {
        max-width: min(100%, 100vw - 56px) !important;
    }

    .tq-elearning-active .tq-lms-copy,
    .tq-elearning-active button.tq-lms-copy,
    .tq-elearning-active .tq-lms-copy-button,
    .tq-elearning-active button.tq-lms-copy-button {
        min-width: 68px !important;
        padding-inline: .58rem !important;
    }

    .tq-elearning-active .tq-lms-payment-qr img {
        width: min(100%, 180px) !important;
    }
}

/* v1.6.0: compact premium layout, blog/news templates, stable menu/button/auth polish */
:root {
    --tq-p-container: 1200px;
    --tq-p-shadow: 0 18px 54px rgba(31,45,61,.085);
    --tq-p-shadow-soft: 0 10px 30px rgba(31,45,61,.065);
}

body.tq-compact-layout {
    line-height: 1.66;
}

.tq-compact-layout .tq-p-section {
    padding: clamp(2.35rem, 4.6vw, 4rem) 0;
}

.tq-compact-layout .tq-p-hero {
    padding: clamp(2.4rem, 5.2vw, 4.7rem) 0 clamp(2rem, 4vw, 3.6rem);
}

.tq-compact-layout .tq-p-hero-panel {
    min-height: 390px;
    border-radius: 32px;
}

.tq-compact-layout .tq-p-hero-card {
    padding: 1.25rem;
    border-radius: 24px;
}

.tq-compact-layout .tq-p-section-head {
    margin-bottom: 1.45rem;
}

.tq-compact-layout .tq-p-card-media,
.tq-compact-layout .tq-lms-course-card-image {
    min-height: 184px;
}

.tq-compact-layout .tq-p-card-body,
.tq-compact-layout .tq-lms-course-card-body {
    padding: 1.16rem 1.22rem 1.24rem;
}

.tq-compact-layout .tq-p-site-footer {
    margin-top: 2.8rem;
    padding-top: 2.9rem;
}

/* Header and dropdown menu */
.tq-p-site-header {
    overflow: visible;
}

.tq-p-header-inner {
    min-height: 68px !important;
}

.tq-p-brand {
    max-width: 420px;
}

.tq-p-site-title {
    font-size: clamp(.96rem, 1.35vw, 1.12rem) !important;
    white-space: normal;
}

.tq-p-primary-nav,
.tq-p-primary-nav ul,
.tq-p-primary-nav li {
    overflow: visible;
}

.tq-p-primary-nav li {
    position: relative;
}

.tq-p-primary-nav > ul,
.tq-p-primary-nav .menu {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .14rem;
}

.tq-p-primary-nav a {
    color: var(--tq-p-charcoal) !important;
    white-space: nowrap;
}

.tq-p-primary-nav .sub-menu,
.tq-p-primary-nav .children {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    z-index: 100;
    width: max-content;
    min-width: 230px;
    display: grid;
    gap: .2rem;
    padding: .65rem;
    margin: 0;
    border: 1px solid rgba(47,130,183,.14);
    border-radius: 18px;
    background: rgba(255,255,255,.98);
    box-shadow: 0 18px 48px rgba(31,45,61,.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}

.tq-p-primary-nav li:hover > .sub-menu,
.tq-p-primary-nav li:focus-within > .sub-menu,
.tq-p-primary-nav li:hover > .children,
.tq-p-primary-nav li:focus-within > .children {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.tq-p-primary-nav .sub-menu a,
.tq-p-primary-nav .children a {
    width: 100%;
    justify-content: flex-start;
    padding: .62rem .78rem;
    border-radius: 12px;
    font-size: .86rem;
    line-height: 1.35;
}

.tq-p-primary-nav .sub-menu .sub-menu,
.tq-p-primary-nav .children .children {
    left: calc(100% + 8px);
    top: 0;
}

.tq-p-header-actions {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    flex: 0 0 auto;
}

.tq-p-header-link {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: .48rem .82rem;
    border-radius: 999px;
    border: 1px solid rgba(47,130,183,.18);
    background: rgba(255,255,255,.72);
    color: var(--tq-p-teal-dark) !important;
    font-weight: 800;
    white-space: nowrap;
}

/* Button text visibility across theme and plugin */
.tq-p-button,
.tq-p-header-cta,
.tq-lms-button,
button.tq-lms-button,
.tq-lms-auth-submit,
.tq-lms-register-button,
.tq-lms-receipt-form button,
.tq-lms-quiz-box button,
.search-submit,
button,
input[type='submit'] {
    color: #fff !important;
    text-indent: 0 !important;
    text-shadow: none !important;
    white-space: nowrap;
    min-width: max-content;
}

.tq-p-button-ghost,
.tq-lms-button-secondary,
.tq-p-section-link,
.tq-p-read-more {
    color: var(--tq-p-teal-dark) !important;
}

.tq-lms-course-card-footer .tq-lms-button,
.tq-p-card-footer .tq-p-button,
.tq-lms-course-card .tq-lms-button,
.tq-p-course-card .tq-p-button {
    min-width: 130px;
    padding-inline: 1rem !important;
}

/* Blog/news archive */
.tq-p-blog-main {
    padding: clamp(1.7rem, 3.8vw, 3.2rem) 0 clamp(2.6rem, 5vw, 4.2rem);
}

.tq-p-blog-shell {
    display: grid;
    gap: 1.45rem;
}

.tq-p-blog-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(1.55rem, 3.6vw, 2.6rem);
    border: 1px solid rgba(47,130,183,.13);
    border-radius: 30px;
    background:
        radial-gradient(circle at 90% 20%, rgba(185,221,245,.48), transparent 18rem),
        linear-gradient(135deg, rgba(255,255,255,.92), rgba(234,246,255,.78));
    box-shadow: 0 14px 42px rgba(31,45,61,.055);
}

.tq-p-blog-hero h1 {
    max-width: 760px;
    font-size: clamp(1.7rem, 3.2vw, 2.55rem);
    margin-bottom: .55rem;
}

.tq-p-blog-hero p {
    max-width: 720px;
    margin: 0;
    color: var(--tq-p-muted);
    font-size: 1rem;
}

.tq-p-post-grid {
    display: grid;
    gap: 1.05rem;
}

.tq-p-post-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tq-p-post-grid-1 {
    grid-template-columns: minmax(0, 1fr);
}

.tq-p-news-card {
    display: grid;
    grid-template-rows: auto 1fr;
    min-width: 0;
    overflow: hidden;
}

.tq-p-post-grid-1 .tq-p-news-card {
    grid-template-columns: minmax(260px, .45fr) minmax(0, 1fr);
    grid-template-rows: auto;
    align-items: stretch;
}

.tq-p-news-media {
    min-height: 190px;
}

.tq-p-post-grid-1 .tq-p-news-media {
    min-height: 230px;
    height: 100%;
}

.tq-p-news-body h2 {
    font-size: clamp(1.18rem, 1.9vw, 1.58rem);
    margin-bottom: .55rem;
}

.tq-p-news-body h2 a {
    color: var(--tq-p-charcoal) !important;
}

.tq-p-news-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .45rem .7rem;
    margin-bottom: .7rem;
    color: var(--tq-p-muted);
    font-size: .82rem;
    font-weight: 760;
}

.tq-p-news-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: .22rem .58rem;
    border-radius: 999px;
    background: rgba(221,240,255,.85);
    color: var(--tq-p-teal-dark);
}

.tq-p-read-more {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    margin-top: .25rem;
    font-weight: 850;
}

/* Single post: no sidebar, elegant reading column */
.tq-p-single-main {
    padding: clamp(1.7rem, 3.8vw, 3rem) 0 clamp(2.8rem, 5vw, 4.8rem);
}

.tq-p-single-article {
    max-width: 920px;
}

.tq-p-single-header {
    text-align: center;
    padding: clamp(1.4rem, 3.2vw, 2.4rem) clamp(1rem, 3vw, 2rem);
    margin-bottom: 1.2rem;
    border-radius: 32px;
    background: linear-gradient(135deg, rgba(255,255,255,.92), rgba(234,246,255,.68));
    border: 1px solid rgba(47,130,183,.12);
    box-shadow: 0 14px 42px rgba(31,45,61,.052);
}

.tq-p-single-header h1 {
    max-width: 780px;
    margin-inline: auto;
    font-size: clamp(1.78rem, 3.4vw, 3rem);
}

.tq-p-single-header p {
    max-width: 720px;
    margin: .85rem auto 0;
    color: var(--tq-p-muted);
    font-size: 1.04rem;
}

.tq-p-single-meta {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .55rem;
    margin-bottom: .8rem;
    color: var(--tq-p-teal-dark);
    font-size: .82rem;
    font-weight: 850;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.tq-p-single-meta span {
    display: inline-flex;
    padding: .24rem .62rem;
    border-radius: 999px;
    background: rgba(221,240,255,.85);
}

.tq-p-single-featured-image {
    margin: 0 0 1.2rem;
    overflow: hidden;
    border-radius: 30px;
    border: 1px solid rgba(47,130,183,.12);
    box-shadow: 0 14px 42px rgba(31,45,61,.07);
}

.tq-p-single-featured-image img {
    width: 100%;
    max-height: 520px;
    object-fit: cover;
}

.tq-p-single-content {
    max-width: 820px;
    margin-inline: auto;
    padding: clamp(1.3rem, 3vw, 2.4rem);
    border-radius: 30px;
    background: rgba(255,255,255,.88);
    border: 1px solid rgba(47,130,183,.11);
    box-shadow: 0 12px 34px rgba(31,45,61,.05);
}

.tq-p-single-content > *:first-child {
    margin-top: 0;
}

.tq-p-single-content p,
.tq-p-single-content li {
    font-size: clamp(1rem, 1.35vw, 1.06rem);
}

.tq-p-single-content h2,
.tq-p-single-content h3 {
    margin-top: 1.6em;
}

.tq-p-single-content blockquote {
    margin: 1.4rem 0;
    padding: 1rem 1.2rem;
    border-left: 4px solid var(--tq-p-teal);
    border-radius: 18px;
    background: rgba(234,246,255,.75);
    color: var(--tq-p-charcoal);
}

.tq-p-related-posts {
    margin-top: clamp(2rem, 4vw, 3.4rem);
}

.tq-p-related-head {
    margin-bottom: 1rem;
    text-align: center;
}

.tq-p-related-head h2 {
    font-size: clamp(1.35rem, 2.4vw, 2rem);
}

.tq-p-related-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.tq-p-related-grid .tq-p-news-media {
    min-height: 155px;
}

.tq-p-related-grid .tq-p-news-body h2 {
    font-size: 1.06rem;
}

/* Auth/register page polish */
.tq-elearning-active .tq-lms-auth-wrap {
    grid-template-columns: minmax(0, .82fr) minmax(360px, 1fr) !important;
    gap: clamp(1rem, 2.2vw, 1.6rem) !important;
    align-items: stretch !important;
}

.tq-elearning-active .tq-lms-auth-intro,
.tq-elearning-active .tq-lms-auth-card {
    border-radius: 30px !important;
    border: 1px solid rgba(47,130,183,.13) !important;
    box-shadow: 0 14px 42px rgba(31,45,61,.058) !important;
}

.tq-elearning-active .tq-lms-auth-intro {
    min-height: 360px !important;
    padding: clamp(1.5rem, 3.4vw, 2.4rem) !important;
    background:
        radial-gradient(circle at 18% 18%, rgba(185,221,245,.52), transparent 18rem),
        linear-gradient(135deg, rgba(255,255,255,.93), rgba(234,246,255,.82)) !important;
}

.tq-elearning-active .tq-lms-auth-intro h2 {
    font-size: clamp(1.7rem, 3vw, 2.55rem) !important;
    max-width: 520px;
}

.tq-elearning-active .tq-lms-auth-card {
    padding: clamp(1.3rem, 3vw, 2rem) !important;
    background: rgba(255,255,255,.9) !important;
}

.tq-elearning-active .tq-lms-auth-tabs {
    padding: .35rem !important;
    gap: .35rem !important;
    background: rgba(221,240,255,.78) !important;
    border-radius: 999px !important;
}

.tq-elearning-active .tq-lms-auth-tabs a {
    min-height: 40px !important;
    color: var(--tq-p-teal-dark) !important;
    border-radius: 999px !important;
}

.tq-elearning-active .tq-lms-auth-tabs a.is-active {
    background: #fff !important;
    color: var(--tq-p-charcoal) !important;
}

.tq-elearning-active .tq-lms-auth-form form {
    gap: .8rem !important;
}

.tq-elearning-active .tq-lms-auth-form label {
    color: var(--tq-p-muted) !important;
    font-size: .95rem !important;
}

.tq-elearning-active .tq-lms-auth-form input[type='text'],
.tq-elearning-active .tq-lms-auth-form input[type='email'],
.tq-elearning-active .tq-lms-auth-form input[type='tel'],
.tq-elearning-active .tq-lms-auth-form input[type='password'] {
    min-height: 44px !important;
    border-radius: 16px !important;
    background: rgba(255,255,255,.96) !important;
}

.tq-elearning-active .tq-lms-auth-form .tq-lms-auth-row label {
    display: grid !important;
    grid-template-columns: 20px minmax(0, 1fr) !important;
    gap: .65rem !important;
    align-items: start !important;
    line-height: 1.48 !important;
}

.tq-elearning-active .tq-lms-auth-form input[type='checkbox'] {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    min-height: 18px !important;
    margin-top: .18rem !important;
    accent-color: var(--tq-p-teal) !important;
}

.tq-elearning-active .tq-lms-auth-submit {
    width: 100% !important;
    min-height: 46px !important;
    color: #fff !important;
}

/* Course/card compactness */
.tq-lms-course-card-footer,
.tq-p-card-footer {
    min-width: 0;
}

.tq-lms-course-card-footer .tq-lms-button,
.tq-p-card-footer .tq-p-button {
    flex: 0 0 auto;
}

/* Mobile and tablet refinements */
@media (max-width: 1180px) {
    .tq-p-primary-nav > ul,
    .tq-p-primary-nav .menu {
        gap: .08rem;
    }
    .tq-p-primary-nav a {
        font-size: .82rem;
        padding-inline: .48rem;
    }
}

@media (max-width: 980px) {
    .tq-p-header-actions {
        display: none;
    }

    .tq-p-menu-toggle {
        display: inline-block !important;
    }

    .tq-p-primary-nav {
        position: fixed !important;
        inset: 0 0 0 auto !important;
        width: min(88vw, 380px) !important;
        height: 100vh !important;
        padding: 1rem !important;
        background: rgba(255,255,255,.98) !important;
        border: 0 !important;
        border-left: 1px solid rgba(47,130,183,.12) !important;
        border-radius: 0 !important;
        box-shadow: -24px 0 60px rgba(31,45,61,.15) !important;
        transform: translateX(100%);
        transition: transform .22s ease;
        display: block !important;
        overflow-y: auto !important;
        z-index: 120;
        visibility: visible !important;
    }

    .tq-p-primary-nav.is-open {
        transform: translateX(0);
    }

    .tq-p-menu-backdrop {
        position: fixed;
        inset: 0;
        z-index: 110;
        background: rgba(20,40,56,.32);
        opacity: 0;
        visibility: hidden;
        transition: opacity .2s ease, visibility .2s ease;
    }

    .tq-p-menu-backdrop.is-open {
        opacity: 1;
        visibility: visible;
    }

    .tq-p-mobile-nav-head,
    .tq-p-mobile-nav-actions {
        display: flex !important;
    }

    .tq-p-mobile-nav-head {
        justify-content: space-between;
        align-items: center;
        margin-bottom: .75rem;
        font-weight: 850;
        color: var(--tq-p-charcoal);
    }

    .tq-p-menu-close {
        width: 40px;
        height: 40px;
        padding: 0;
        border-radius: 999px;
        color: var(--tq-p-teal-dark) !important;
        background: rgba(221,240,255,.9) !important;
        font-size: 1.4rem;
        line-height: 1;
    }

    .tq-p-primary-nav > ul,
    .tq-p-primary-nav .menu {
        display: grid !important;
        align-items: stretch !important;
        gap: .15rem !important;
    }

    .tq-p-primary-nav a {
        width: 100%;
        justify-content: flex-start;
        padding: .7rem .78rem !important;
        border-radius: 14px !important;
        font-size: .95rem !important;
    }

    .tq-p-primary-nav .sub-menu,
    .tq-p-primary-nav .children,
    .tq-p-primary-nav .sub-menu .sub-menu,
    .tq-p-primary-nav .children .children {
        position: static !important;
        width: 100% !important;
        min-width: 0 !important;
        padding: .1rem 0 .2rem .8rem !important;
        border: 0 !important;
        border-left: 2px solid rgba(47,130,183,.15) !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        background: transparent !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        pointer-events: auto !important;
        display: grid !important;
    }

    .tq-p-primary-nav .sub-menu a,
    .tq-p-primary-nav .children a {
        font-size: .9rem !important;
        color: var(--tq-p-muted) !important;
    }

    .tq-p-mobile-nav-actions {
        display: grid !important;
        grid-template-columns: 1fr;
        gap: .55rem;
        margin-top: .9rem;
        padding-top: .9rem;
        border-top: 1px solid rgba(47,130,183,.12);
    }

    .tq-p-mobile-nav-actions .tq-p-button {
        width: 100%;
    }

    .tq-p-post-grid-2 {
        grid-template-columns: 1fr;
    }

    .tq-p-post-grid-1 .tq-p-news-card {
        grid-template-columns: 1fr;
    }

    .tq-p-related-grid {
        grid-template-columns: 1fr 1fr;
    }

    .tq-elearning-active .tq-lms-auth-wrap {
        grid-template-columns: 1fr !important;
    }

    .tq-elearning-active .tq-lms-auth-intro {
        min-height: 0 !important;
    }
}

@media (max-width: 760px) {
    body {
        font-size: 15.5px;
    }

    .tq-p-container {
        width: min(100% - 28px, var(--tq-p-container));
    }

    .tq-p-blog-main,
    .tq-p-single-main {
        padding-top: 1rem;
    }

    .tq-p-blog-hero,
    .tq-p-single-header,
    .tq-p-single-content {
        border-radius: 24px;
    }

    .tq-p-post-grid-1 .tq-p-news-media,
    .tq-p-news-media {
        min-height: 180px;
    }

    .tq-p-news-body h2 {
        font-size: 1.18rem;
    }

    .tq-p-related-grid {
        grid-template-columns: 1fr;
    }

    .tq-p-single-featured-image {
        border-radius: 22px;
    }

    .tq-p-single-content {
        padding: 1.1rem;
    }

    .tq-p-section {
        padding-block: 2.2rem;
    }

    .tq-p-course-grid,
    .tq-lms-course-grid,
    .tq-p-instructor-grid,
    .tq-lms-instructor-grid {
        gap: .9rem !important;
    }

    .tq-p-card-body,
    .tq-lms-course-card-body {
        padding: 1.05rem !important;
    }

    .tq-elearning-active .tq-lms-auth-card,
    .tq-elearning-active .tq-lms-auth-intro {
        padding: 1.15rem !important;
    }
}

@media (max-width: 480px) {
    .tq-p-primary-nav {
        width: min(92vw, 360px) !important;
    }

    .tq-p-site-title {
        font-size: .93rem !important;
    }

    .tq-p-blog-hero h1,
    .tq-p-single-header h1 {
        font-size: 1.58rem;
    }

    .tq-p-button,
    .tq-lms-button,
    .tq-lms-auth-submit,
    button,
    input[type='submit'] {
        white-space: normal;
    }
}


/* v1.6.1: desktop dropdown hover bridge and button text visibility fixes */
@media (min-width: 981px) {
    .tq-p-primary-nav li.menu-item-has-children,
    .tq-p-primary-nav li.page_item_has_children {
        position: relative;
    }

    .tq-p-primary-nav li.menu-item-has-children::after,
    .tq-p-primary-nav li.page_item_has_children::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        height: 14px;
        z-index: 99;
        background: transparent;
    }

    .tq-p-primary-nav .sub-menu,
    .tq-p-primary-nav .children {
        top: 100% !important;
        margin-top: 0 !important;
        transform: translateY(8px) !important;
    }

    .tq-p-primary-nav li:hover > .sub-menu,
    .tq-p-primary-nav li:focus-within > .sub-menu,
    .tq-p-primary-nav li:hover > .children,
    .tq-p-primary-nav li:focus-within > .children {
        transform: translateY(6px) !important;
    }

    .tq-p-primary-nav .sub-menu::before,
    .tq-p-primary-nav .children::before {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        top: -14px;
        height: 14px;
        background: transparent;
    }
}

/* Keep white/light buttons readable. */
.tq-p-button-light,
.tq-p-button.tq-p-button-light,
a.tq-p-button-light,
button.tq-p-button-light {
    background: #ffffff !important;
    color: var(--tq-p-teal-dark) !important;
    border: 1px solid rgba(47,130,183,.16) !important;
    box-shadow: 0 14px 34px rgba(31,45,61,.08) !important;
}

.tq-p-button-light:hover,
.tq-p-button.tq-p-button-light:hover,
a.tq-p-button-light:hover,
button.tq-p-button-light:hover {
    background: var(--tq-p-mist) !important;
    color: var(--tq-p-teal-dark) !important;
}

/* Course/list CTAs should never render as empty white pills. */
.tq-lms-course-card-footer a,
.tq-lms-course-card-footer button,
.tq-p-card-footer a.tq-p-button,
.tq-p-card-footer button.tq-p-button,
.tq-lms-register-button,
.tq-lms-receipt-form button,
.tq-lms-quiz-box button,
.tq-lms-auth-submit,
.search-submit,
input[type='submit'] {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 42px !important;
    padding: .72rem 1.06rem !important;
    border-radius: 999px !important;
    background: var(--tq-p-teal) !important;
    color: #ffffff !important;
    border: 1px solid transparent !important;
    text-decoration: none !important;
    line-height: 1.15 !important;
    font-weight: 800 !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.tq-lms-course-card-footer a:hover,
.tq-lms-course-card-footer button:hover,
.tq-p-card-footer a.tq-p-button:hover,
.tq-p-card-footer button.tq-p-button:hover,
.tq-lms-register-button:hover,
.tq-lms-receipt-form button:hover,
.tq-lms-quiz-box button:hover,
.tq-lms-auth-submit:hover,
.search-submit:hover,
input[type='submit']:hover {
    background: var(--tq-p-teal-dark) !important;
    color: #ffffff !important;
}

/* Secondary/ghost actions stay light, but text must remain visible. */
.tq-p-button-ghost,
.tq-lms-button-secondary,
button.tq-lms-button-secondary,
a.tq-lms-button-secondary {
    background: rgba(255,255,255,.9) !important;
    color: var(--tq-p-teal-dark) !important;
    border: 1px solid rgba(47,130,183,.18) !important;
    box-shadow: 0 10px 26px rgba(31,45,61,.06) !important;
}

.tq-p-button-ghost:hover,
.tq-lms-button-secondary:hover,
button.tq-lms-button-secondary:hover,
a.tq-lms-button-secondary:hover {
    background: var(--tq-p-mist) !important;
    color: var(--tq-p-teal-dark) !important;
}

/* Avoid hiding labels in any LMS buttons accidentally styled by plugin/theme collisions. */
.tq-elearning-active a[class*="button"],
.tq-elearning-active button[class*="button"],
.tq-elearning-active input[type='submit'] {
    text-indent: 0 !important;
    text-shadow: none !important;
    font-size: inherit;
}

/* v1.6.2: definitive CTA visibility fix.
   Course-card CTA links are secondary actions, but they must never render as blank white pills.
   Use higher specificity than earlier generic button/secondary rules and possible plugin CSS. */
body .tq-lms-course-card .tq-lms-course-card-footer a.tq-lms-button,
body .tq-lms-course-card .tq-lms-course-card-footer a.tq-lms-button:visited,
body .tq-lms-course-card .tq-lms-course-card-footer a.tq-lms-button.tq-lms-button-secondary,
body .tq-lms-course-card .tq-lms-course-card-footer a.tq-lms-button.tq-lms-button-secondary:visited,
body .tq-p-card-footer a.tq-p-button,
body .tq-p-card-footer a.tq-p-button:visited {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    min-width: 128px !important;
    max-width: 100% !important;
    min-height: 42px !important;
    padding: .72rem 1.12rem !important;
    border-radius: 999px !important;
    background: linear-gradient(135deg, var(--tq-p-teal), var(--tq-p-teal-dark)) !important;
    color: #ffffff !important;
    border: 1px solid rgba(47,130,183,.18) !important;
    box-shadow: 0 14px 32px rgba(47,130,183,.18) !important;
    text-indent: 0 !important;
    text-shadow: none !important;
    font-size: .93rem !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
    letter-spacing: 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
    overflow: visible !important;
    white-space: nowrap !important;
    text-decoration: none !important;
}

body .tq-lms-course-card .tq-lms-course-card-footer a.tq-lms-button:hover,
body .tq-lms-course-card .tq-lms-course-card-footer a.tq-lms-button.tq-lms-button-secondary:hover,
body .tq-p-card-footer a.tq-p-button:hover {
    background: linear-gradient(135deg, var(--tq-p-teal-dark), #174f73) !important;
    color: #ffffff !important;
    transform: translateY(-1px);
}

body .tq-lms-course-card .tq-lms-course-card-footer a.tq-lms-button *,
body .tq-p-card-footer a.tq-p-button * {
    color: inherit !important;
    text-indent: 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Light hero/secondary buttons remain light, but text is always visible. */
body a.tq-p-button-light,
body button.tq-p-button-light,
body .tq-p-button.tq-p-button-light,
body .tq-p-hero-actions .tq-p-button-light {
    background: #ffffff !important;
    color: var(--tq-p-teal-dark) !important;
    border: 1px solid rgba(47,130,183,.18) !important;
    box-shadow: 0 14px 34px rgba(31,45,61,.08) !important;
    text-indent: 0 !important;
    font-size: .95rem !important;
    line-height: 1.15 !important;
}

/* Generic safety net for any visible button-like anchor in LMS blocks. */
body .tq-elearning-active a.tq-lms-button,
body .tq-elearning-active button.tq-lms-button,
body .tq-elearning-active .tq-lms-auth-submit,
body .tq-elearning-active .tq-lms-receipt-form button,
body .tq-elearning-active .tq-lms-quiz-box button {
    text-indent: 0 !important;
    font-size: .95rem !important;
    line-height: 1.15 !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* v1.6.3: global button/readability audit fixes.
   The LMS plugin uses secondary buttons with white backgrounds. Previous broad rules could
   force those labels to white, creating blank white pills. These final rules are intentionally
   last in the cascade and scoped to frontend/theme UI. */
body.tq-pastel-theme a.tq-lms-button,
body.tq-pastel-theme button.tq-lms-button,
body.tq-pastel-theme input.tq-lms-button,
body.tq-pastel-theme .tq-lms-auth-submit,
body.tq-pastel-theme .tq-lms-register-button,
body.tq-pastel-theme .tq-lms-receipt-form button,
body.tq-pastel-theme .tq-lms-quiz-box button,
body.tq-pastel-theme .tq-lms-profile-form button,
body.tq-pastel-theme .tq-lms-comments-form button,
body.tq-pastel-theme .tq-lms-progress-form button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 42px !important;
    padding: .72rem 1.08rem !important;
    border-radius: 999px !important;
    border: 1px solid rgba(47,130,183,.2) !important;
    background: linear-gradient(135deg, #2F82B7, #1E6F9D) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    text-indent: 0 !important;
    text-shadow: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    font-size: .94rem !important;
    font-weight: 850 !important;
    line-height: 1.15 !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
    text-decoration: none !important;
    box-shadow: 0 12px 28px rgba(47,130,183,.2) !important;
    overflow: visible !important;
}

body.tq-pastel-theme a.tq-lms-button:hover,
body.tq-pastel-theme button.tq-lms-button:hover,
body.tq-pastel-theme .tq-lms-auth-submit:hover,
body.tq-pastel-theme .tq-lms-register-button:hover,
body.tq-pastel-theme .tq-lms-receipt-form button:hover,
body.tq-pastel-theme .tq-lms-quiz-box button:hover,
body.tq-pastel-theme .tq-lms-profile-form button:hover,
body.tq-pastel-theme .tq-lms-comments-form button:hover,
body.tq-pastel-theme .tq-lms-progress-form button:hover {
    background: linear-gradient(135deg, #1E6F9D, #174F73) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* Make plugin secondary buttons readable everywhere, not just inside cards. */
body.tq-pastel-theme .tq-elearning-active a.tq-lms-button-secondary,
body.tq-pastel-theme .tq-elearning-active button.tq-lms-button-secondary,
body.tq-pastel-theme a.tq-lms-button.tq-lms-button-secondary,
body.tq-pastel-theme button.tq-lms-button.tq-lms-button-secondary {
    background: #ffffff !important;
    color: #1E5F84 !important;
    -webkit-text-fill-color: #1E5F84 !important;
    border: 1px solid rgba(47,130,183,.26) !important;
    box-shadow: 0 10px 24px rgba(31,45,61,.08) !important;
}

body.tq-pastel-theme .tq-elearning-active a.tq-lms-button-secondary:hover,
body.tq-pastel-theme .tq-elearning-active button.tq-lms-button-secondary:hover,
body.tq-pastel-theme a.tq-lms-button.tq-lms-button-secondary:hover,
body.tq-pastel-theme button.tq-lms-button.tq-lms-button-secondary:hover {
    background: #EAF6FF !important;
    color: #174F73 !important;
    -webkit-text-fill-color: #174F73 !important;
}

/* Course card CTAs are the most important action; keep them prominent and always visible. */
body.tq-pastel-theme .tq-lms-course-card .tq-lms-course-card-footer a.tq-lms-button,
body.tq-pastel-theme .tq-lms-course-card .tq-lms-course-card-footer a.tq-lms-button-secondary,
body.tq-pastel-theme .tq-lms-course-card .tq-lms-course-card-footer a.tq-lms-button:visited,
body.tq-pastel-theme .tq-lms-course-card .tq-lms-course-card-footer a.tq-lms-button-secondary:visited {
    min-width: 136px !important;
    background: linear-gradient(135deg, #2F82B7, #1E6F9D) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border-color: transparent !important;
    box-shadow: 0 14px 32px rgba(47,130,183,.22) !important;
}

body.tq-pastel-theme .tq-lms-course-card .tq-lms-course-card-footer a.tq-lms-button:hover,
body.tq-pastel-theme .tq-lms-course-card .tq-lms-course-card-footer a.tq-lms-button-secondary:hover {
    background: linear-gradient(135deg, #1E6F9D, #174F73) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* Theme ghost/light buttons are intentionally light, so their labels must be teal. */
body.tq-pastel-theme .tq-p-button-ghost,
body.tq-pastel-theme a.tq-p-button-ghost,
body.tq-pastel-theme button.tq-p-button-ghost,
body.tq-pastel-theme .tq-p-button-light,
body.tq-pastel-theme a.tq-p-button-light,
body.tq-pastel-theme button.tq-p-button-light,
body.tq-pastel-theme .tq-p-section-link,
body.tq-pastel-theme .tq-p-read-more {
    background: #ffffff !important;
    color: #1E5F84 !important;
    -webkit-text-fill-color: #1E5F84 !important;
    border-color: rgba(47,130,183,.22) !important;
    text-indent: 0 !important;
    text-shadow: none !important;
}

body.tq-pastel-theme .tq-p-button-ghost:hover,
body.tq-pastel-theme .tq-p-button-light:hover,
body.tq-pastel-theme .tq-p-section-link:hover,
body.tq-pastel-theme .tq-p-read-more:hover {
    background: #EAF6FF !important;
    color: #174F73 !important;
    -webkit-text-fill-color: #174F73 !important;
}

/* Inputs/file buttons and native buttons on frontend should not inherit white-on-white styles. */
body.tq-pastel-theme main button:not(.tq-p-menu-toggle):not(.tq-p-menu-close):not(.customize-partial-edit-shortcut-button),
body.tq-pastel-theme main input[type='submit'],
body.tq-pastel-theme main input[type='button'] {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

body.tq-pastel-theme main button.tq-lms-button-secondary,
body.tq-pastel-theme main a.tq-lms-button-secondary {
    color: #1E5F84 !important;
    -webkit-text-fill-color: #1E5F84 !important;
}

/* Keep labels visible inside buttons even if child spans/icons inherit odd colors. */
body.tq-pastel-theme a.tq-lms-button *,
body.tq-pastel-theme button.tq-lms-button *,
body.tq-pastel-theme .tq-p-button *,
body.tq-pastel-theme .tq-p-header-cta * {
    color: inherit !important;
    -webkit-text-fill-color: inherit !important;
    opacity: 1 !important;
    visibility: visible !important;
    text-indent: 0 !important;
}

/* Desktop/mobile layout sanity checks for the main LMS views. */
body.tq-pastel-theme .tq-lms-course-card-footer,
body.tq-pastel-theme .tq-p-card-footer {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: .85rem !important;
    flex-wrap: wrap !important;
}

@media (max-width: 768px) {
    body.tq-pastel-theme .tq-lms-course-card-footer,
    body.tq-pastel-theme .tq-p-card-footer {
        align-items: stretch !important;
    }

    body.tq-pastel-theme .tq-lms-course-card .tq-lms-course-card-footer a.tq-lms-button,
    body.tq-pastel-theme .tq-lms-course-card .tq-lms-course-card-footer a.tq-lms-button-secondary,
    body.tq-pastel-theme .tq-lms-register-button,
    body.tq-pastel-theme .tq-lms-auth-submit,
    body.tq-pastel-theme .tq-lms-receipt-form button,
    body.tq-pastel-theme .tq-lms-quiz-box button,
    body.tq-pastel-theme .tq-p-button {
        width: 100% !important;
        min-width: 0 !important;
        white-space: normal !important;
    }

    body.tq-pastel-theme .tq-p-button-ghost,
    body.tq-pastel-theme .tq-p-button-light {
        width: 100% !important;
    }
}

/* v1.6.4: final action-button contrast patch.
   Normalize LMS/plugin submit buttons after all previous rules, so no CTA can render as
   a blank white pill. This is intentionally the last CSS block. */
body.tq-pastel-theme a.tq-lms-button,
body.tq-pastel-theme a.tq-lms-button:visited,
body.tq-pastel-theme button.tq-lms-button,
body.tq-pastel-theme button.tq-lms-button-secondary,
body.tq-pastel-theme a.tq-lms-button-secondary,
body.tq-pastel-theme a.tq-lms-button-secondary:visited,
body.tq-pastel-theme .tq-lms-register-button,
body.tq-pastel-theme .tq-lms-auth-submit,
body.tq-pastel-theme .tq-lms-receipt-upload button[type='submit'],
body.tq-pastel-theme .tq-lms-receipt-form button[type='submit'],
body.tq-pastel-theme .tq-lms-quiz-box button[type='submit'],
body.tq-pastel-theme .tq-lms-profile-form button[type='submit'],
body.tq-pastel-theme .tq-lms-comments-form button[type='submit'],
body.tq-pastel-theme .tq-lms-progress-form button[type='submit'],
body.tq-pastel-theme main input[type='submit'],
body.tq-pastel-theme main input[type='button'],
body.tq-pastel-theme .search-submit {
    -webkit-appearance: none !important;
    appearance: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 132px !important;
    min-height: 44px !important;
    padding: .76rem 1.2rem !important;
    border-radius: 999px !important;
    border: 1px solid transparent !important;
    background: linear-gradient(135deg, #2F82B7 0%, #1E6F9D 100%) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    text-indent: 0 !important;
    text-shadow: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    font-family: inherit !important;
    font-size: .95rem !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
    letter-spacing: 0 !important;
    white-space: nowrap !important;
    text-decoration: none !important;
    box-shadow: 0 14px 32px rgba(47, 130, 183, .22) !important;
    cursor: pointer !important;
    overflow: visible !important;
}

body.tq-pastel-theme a.tq-lms-button:hover,
body.tq-pastel-theme button.tq-lms-button:hover,
body.tq-pastel-theme button.tq-lms-button-secondary:hover,
body.tq-pastel-theme a.tq-lms-button-secondary:hover,
body.tq-pastel-theme .tq-lms-register-button:hover,
body.tq-pastel-theme .tq-lms-auth-submit:hover,
body.tq-pastel-theme .tq-lms-receipt-upload button[type='submit']:hover,
body.tq-pastel-theme .tq-lms-receipt-form button[type='submit']:hover,
body.tq-pastel-theme main input[type='submit']:hover,
body.tq-pastel-theme main input[type='button']:hover,
body.tq-pastel-theme .search-submit:hover {
    background: linear-gradient(135deg, #1E6F9D 0%, #174F73 100%) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    transform: translateY(-1px);
}

body.tq-pastel-theme a.tq-lms-button *,
body.tq-pastel-theme button.tq-lms-button *,
body.tq-pastel-theme button.tq-lms-button-secondary *,
body.tq-pastel-theme a.tq-lms-button-secondary *,
body.tq-pastel-theme .tq-lms-register-button *,
body.tq-pastel-theme .tq-lms-auth-submit * {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Receipt submit fallback: even if an old/cached rule hides the native label, render a visible label. */
body.tq-pastel-theme .tq-lms-receipt-upload button[type='submit'].tq-lms-button-secondary {
    font-size: 0 !important;
}

body.tq-pastel-theme .tq-lms-receipt-upload button[type='submit'].tq-lms-button-secondary::after {
    content: 'Gửi biên lai';
    display: inline-block !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    font-size: .95rem !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Keep intentionally light/ghost theme buttons readable, never white-on-white. */
body.tq-pastel-theme a.tq-p-button-light,
body.tq-pastel-theme button.tq-p-button-light,
body.tq-pastel-theme a.tq-p-button-ghost,
body.tq-pastel-theme button.tq-p-button-ghost,
body.tq-pastel-theme .tq-p-section-link,
body.tq-pastel-theme .tq-p-read-more {
    background: #ffffff !important;
    color: #1E5F84 !important;
    -webkit-text-fill-color: #1E5F84 !important;
    border: 1px solid rgba(47, 130, 183, .22) !important;
    box-shadow: 0 12px 28px rgba(31, 45, 61, .08) !important;
}

body.tq-pastel-theme a.tq-p-button-light *,
body.tq-pastel-theme button.tq-p-button-light *,
body.tq-pastel-theme a.tq-p-button-ghost *,
body.tq-pastel-theme button.tq-p-button-ghost *,
body.tq-pastel-theme .tq-p-section-link *,
body.tq-pastel-theme .tq-p-read-more * {
    color: #1E5F84 !important;
    -webkit-text-fill-color: #1E5F84 !important;
}

@media (max-width: 768px) {
    body.tq-pastel-theme .tq-lms-receipt-upload button[type='submit'],
    body.tq-pastel-theme .tq-lms-receipt-form button[type='submit'],
    body.tq-pastel-theme .tq-lms-register-button,
    body.tq-pastel-theme .tq-lms-auth-submit,
    body.tq-pastel-theme .tq-lms-quiz-box button[type='submit'],
    body.tq-pastel-theme main input[type='submit'] {
        width: 100% !important;
        min-width: 0 !important;
    }
}

/* v1.6.5: Stable layout for newly-created courses with no lessons/content/images.
   The goal is to keep course pages readable even when the admin has only entered a title. */
body.tq-pastel-theme.tq-pastel-course-view .tq-lms-course-layout {
    width: min(100%, var(--tq-p-container)) !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 360px) !important;
    gap: clamp(1rem, 2.5vw, 1.6rem) !important;
    align-items: start !important;
}

body.tq-pastel-theme.tq-pastel-course-view .tq-lms-course-main,
body.tq-pastel-theme.tq-pastel-course-view .tq-lms-course-sidebar,
body.tq-pastel-theme.tq-pastel-course-view .tq-lms-course-main > *,
body.tq-pastel-theme.tq-pastel-course-view .tq-lms-sidebar-card,
body.tq-pastel-theme.tq-pastel-course-view .tq-lms-register-box,
body.tq-pastel-theme.tq-pastel-course-view .tq-lms-section-card {
    min-width: 0 !important;
    max-width: 100% !important;
}

body.tq-pastel-theme.tq-pastel-course-view .tq-lms-course-main > h1,
body.tq-pastel-theme.tq-pastel-course-view .tq-lms-course-main > h2,
body.tq-pastel-theme.tq-pastel-course-view .tq-lms-course-main .wp-block-heading,
body.tq-pastel-theme.tq-pastel-course-view .tq-lms-course-main .entry-title {
    max-width: 760px !important;
    font-size: clamp(2rem, 4vw, 3.25rem) !important;
    line-height: 1.12 !important;
    letter-spacing: -.035em !important;
    word-break: normal !important;
    overflow-wrap: anywhere !important;
    hyphens: none !important;
}

body.tq-pastel-theme.tq-pastel-course-empty .tq-lms-section-card,
body.tq-pastel-theme.tq-pastel-course-empty .tq-lms-sidebar-card {
    padding: clamp(1.2rem, 2.4vw, 1.8rem) !important;
}

body.tq-pastel-theme.tq-pastel-course-empty .tq-lms-curriculum,
body.tq-pastel-theme.tq-pastel-course-empty .tq-lms-section-card:has(> h2:first-child) {
    background: linear-gradient(135deg, rgba(234,246,255,.92), rgba(255,255,255,.9)) !important;
}

body.tq-pastel-theme.tq-pastel-course-empty .tq-lms-section-card p {
    color: var(--tq-p-muted) !important;
    max-width: 720px !important;
}

/* Avoid awkward vertical titles in any accidental nested placeholder/card block. */
body.tq-pastel-theme.tq-pastel-course-view .tq-lms-course-main .tq-p-card,
body.tq-pastel-theme.tq-pastel-course-view .tq-lms-course-main .tq-lms-course-card,
body.tq-pastel-theme.tq-pastel-course-view .tq-lms-course-main .wp-block-group,
body.tq-pastel-theme.tq-pastel-course-view .tq-lms-course-main .wp-block-cover,
body.tq-pastel-theme.tq-pastel-course-view .tq-lms-course-main .wp-block-media-text,
body.tq-pastel-theme.tq-pastel-course-view .tq-lms-course-main .wp-block-columns {
    min-width: 0 !important;
    max-width: 100% !important;
}

body.tq-pastel-theme.tq-pastel-course-view .tq-lms-course-main .wp-block-columns {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 1.25rem !important;
}

body.tq-pastel-theme.tq-pastel-course-view .tq-lms-course-main .wp-block-column {
    min-width: 0 !important;
    word-break: normal !important;
    overflow-wrap: anywhere !important;
}

body.tq-pastel-theme.tq-pastel-course-view .tq-lms-sidebar-card > .tq-lms-sidebar-price:first-child {
    margin-top: 0 !important;
}

body.tq-pastel-theme.tq-pastel-course-no-thumbnail .tq-lms-sidebar-card::before {
    content: 'Khóa học';
    display: grid;
    place-items: center;
    min-height: 128px;
    margin-bottom: 1rem;
    border-radius: 22px;
    background: linear-gradient(135deg, #EAF6FF, #F7FBFF);
    border: 1px solid rgba(47, 130, 183, .16);
    color: #2F82B7;
    font-weight: 800;
}

@media (max-width: 1024px) {
    body.tq-pastel-theme.tq-pastel-course-view .tq-lms-course-layout {
        grid-template-columns: 1fr !important;
    }
    body.tq-pastel-theme.tq-pastel-course-view .tq-lms-course-sidebar {
        position: static !important;
    }
}

@media (max-width: 760px) {
    body.tq-pastel-theme.tq-pastel-course-view .tq-lms-course-layout {
        margin-top: 1rem !important;
    }
    body.tq-pastel-theme.tq-pastel-course-view .tq-lms-course-main > h1,
    body.tq-pastel-theme.tq-pastel-course-view .tq-lms-course-main > h2,
    body.tq-pastel-theme.tq-pastel-course-view .tq-lms-course-main .wp-block-heading,
    body.tq-pastel-theme.tq-pastel-course-view .tq-lms-course-main .entry-title {
        font-size: clamp(1.85rem, 9vw, 2.55rem) !important;
        line-height: 1.14 !important;
    }
    body.tq-pastel-theme.tq-pastel-course-view .tq-lms-course-main .wp-block-columns {
        grid-template-columns: 1fr !important;
    }
}
