/**
 * Tier 6: AI Knowledge Ecosystem, Entity Grounding Pages (/ai/, /wiki/) & Interactive Verification Components CSS
 * Includes 5 Anti-Breakage Specificity Rules for WordPress Themes
 */

/* ==========================================================================
   RULE 1 & 2: Anti-Breakage Resets for Global Theme Selectors
   ========================================================================== */
:where(.tp-hoi-ai, .tp-ai-facts, .tp-post-tldr, .tp-entity-summary, .tp-compare-matrix, .tp-ai-hub-page, .tp-wiki-page) {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    box-sizing: border-box;
    color: #0f172a;
    line-height: 1.6;
}

:where(.tp-hoi-ai, .tp-ai-facts, .tp-post-tldr, .tp-entity-summary, .tp-compare-matrix, .tp-ai-hub-page, .tp-wiki-page) *,
:where(.tp-hoi-ai, .tp-ai-facts, .tp-post-tldr, .tp-entity-summary, .tp-compare-matrix, .tp-ai-hub-page, .tp-wiki-page) *::before,
:where(.tp-hoi-ai, .tp-ai-facts, .tp-post-tldr, .tp-entity-summary, .tp-compare-matrix, .tp-ai-hub-page, .tp-wiki-page) *::after {
    box-sizing: border-box;
}

/* Disable centered decorative underlines inside left-aligned data boxes */
.tp-hoi-ai h1::after,
.tp-hoi-ai h2::after,
.tp-hoi-ai h3::after,
.tp-ai-facts h2::after,
.tp-ai-facts h3::after,
.tp-post-tldr h2::after,
.tp-post-tldr h3::after,
.tp-entity-summary h2::after,
.tp-entity-summary h3::after,
.tp-compare-matrix h2::after,
.tp-compare-matrix h3::after,
.tp-ai-hub-page h1::after,
.tp-ai-hub-page h2::after,
.tp-ai-hub-page h3::after,
.tp-wiki-page h1::after,
.tp-wiki-page h2::after,
.tp-wiki-page h3::after {
    content: none !important;
    display: none !important;
}

/* Ensure scroll animation never hides AI & Entity sections */
.tp-hoi-ai,
.tp-ai-facts,
.tp-post-tldr,
.tp-entity-summary,
.tp-compare-matrix,
.tp-ai-hub-page,
.tp-ai-hub-page section,
.tp-wiki-page,
.tp-wiki-page section {
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
}

/* ==========================================================================
   1. #hoi-ai — Interactive AI Verification Block
   ========================================================================== */
.tp-hoi-ai {
    margin: 2.5rem auto !important;
    padding: 0 1rem !important;
    max-width: 1240px;
}

.tp-hoi-ai__inner {
    background: linear-gradient(145deg, #f8fafc 0%, #eff6ff 55%, #f0fdf4 100%);
    border: 1px solid #cbd5e1;
    border-radius: 16px;
    padding: 1.75rem 2rem !important;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.06);
}

.tp-hoi-ai__header {
    margin-bottom: 1.25rem;
}

.tp-hoi-ai__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #0369a1;
    background: #e0f2fe;
    border: 1px solid #bae6fd;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    margin-bottom: 0.75rem;
}

.tp-hoi-ai__pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #0284c7;
    box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.2);
}

.tp-hoi-ai__title {
    font-size: clamp(1.25rem, 2.2vw, 1.6rem) !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    margin: 0 0 0.5rem 0 !important;
    line-height: 1.35 !important;
    text-align: left !important;
}

.tp-hoi-ai__desc {
    font-size: 0.95rem;
    color: #334155;
    margin: 0;
    line-height: 1.6;
}

.tp-hoi-ai__desc a {
    color: #0284c7;
    font-weight: 600;
    text-decoration: underline;
}

.tp-hoi-ai__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.15rem 0;
}

.tp-hoi-ai__tab {
    appearance: none;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 36px !important;
    background: #ffffff !important;
    color: #334155 !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 10px !important;
    padding: 0.45rem 0.95rem !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.18s ease;
    line-height: 1.3 !important;
}

.tp-hoi-ai__tab:hover {
    border-color: #0284c7 !important;
    color: #0284c7 !important;
    background: #f0f9ff !important;
}

.tp-hoi-ai__tab.is-active {
    background: #0f172a !important;
    color: #ffffff !important;
    border-color: #0f172a !important;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.15);
}

.tp-hoi-ai__prompt-box {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-left: 4px solid #0284c7;
    border-radius: 12px;
    padding: 0.95rem 1.15rem;
    margin-bottom: 1.15rem;
}

.tp-hoi-ai__prompt-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.45rem;
}

.tp-hoi-ai__prompt-tag {
    background: #f1f5f9;
    color: #0f172a;
    padding: 0.15rem 0.55rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
}

.tp-hoi-ai__prompt-text {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    font-size: 0.92rem !important;
    font-style: normal !important;
    color: #0f172a !important;
    line-height: 1.55 !important;
}

.tp-hoi-ai__actions {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.65rem;
    margin-bottom: 1rem;
}

/* Rule 3: Match border-radius and layout between <a> and <button> */
.tp-hoi-ai__btn,
button.tp-hoi-ai__btn {
    display: flex !important;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.15rem;
    padding: 0.65rem 0.85rem !important;
    border-radius: 12px !important;
    border: 1px solid #cbd5e1 !important;
    background: #ffffff !important;
    color: #0f172a !important;
    text-decoration: none !important;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    text-align: left !important;
    min-height: 58px;
}

.tp-hoi-ai__btn:hover,
button.tp-hoi-ai__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(15, 23, 42, 0.08);
    border-color: #0284c7 !important;
}

.tp-hoi-ai__btn-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.25;
}

.tp-hoi-ai__btn-badge {
    font-size: 0.72rem;
    font-weight: 500;
    color: #64748b;
}

.tp-hoi-ai__btn--chatgpt { border-left: 3px solid #10a37f !important; }
.tp-hoi-ai__btn--claude { border-left: 3px solid #d97757 !important; }
.tp-hoi-ai__btn--google { border-left: 3px solid #2563eb !important; }
.tp-hoi-ai__btn--perplexity { border-left: 3px solid #0d9488 !important; }
.tp-hoi-ai__btn--grok { border-left: 3px solid #1e293b !important; }
.tp-hoi-ai__btn--copy {
    background: #0f172a !important;
    border-color: #0f172a !important;
}
.tp-hoi-ai__btn--copy .tp-hoi-ai__btn-name { color: #ffffff !important; }
.tp-hoi-ai__btn--copy .tp-hoi-ai__btn-badge { color: #cbd5e1 !important; }

.tp-hoi-ai__footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.8rem;
    color: #475569;
    padding-top: 0.75rem;
    border-top: 1px dashed #cbd5e1;
}

.tp-hoi-ai__footer a {
    color: #0369a1;
    font-weight: 600;
    text-decoration: none;
}

.tp-hoi-ai__footer a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   2. #tom-tat-nhanh (.tp-ai-facts) & #tom-tat-bai-viet (.tp-post-tldr)
   ========================================================================== */
.tp-ai-facts,
.tp-post-tldr {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-left: 4px solid #0284c7;
    border-radius: 14px;
    padding: 1.25rem 1.5rem !important;
    margin: 0 0 1.75rem 0 !important;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.tp-ai-facts__head,
.tp-post-tldr__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.9rem;
}

.tp-ai-facts__badge,
.tp-post-tldr__badge {
    display: inline-block;
    background: #0f172a;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
}

.tp-ai-facts__meta-links,
.tp-post-tldr__meta-links {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: #64748b;
}

.tp-ai-facts__meta-links a,
.tp-post-tldr__meta-links a {
    color: #0284c7;
    font-weight: 600;
    text-decoration: none;
}

.tp-ai-facts__meta-links a:hover,
.tp-post-tldr__meta-links a:hover {
    text-decoration: underline;
}

.tp-ai-facts__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    align-items: stretch;
    margin: 0 0 1rem 0;
}

.tp-ai-facts__card,
.tp-ai-facts__item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem 1.15rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.3rem;
}

.tp-ai-facts__item dt {
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #0369a1;
}

.tp-ai-facts__item dd {
    margin: 0;
    font-size: 0.9rem;
    color: #0f172a;
    line-height: 1.5;
}

.tp-ai-facts__label {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
}

.tp-ai-facts__value {
    font-size: 0.92rem;
    font-weight: 700;
    color: #0f172a;
}

.tp-ai-facts__value--price {
    color: #b91c1c;
    font-size: 1rem;
}

.tp-post-tldr__lead {
    font-size: 1rem;
    font-weight: 500;
    color: #1e293b;
    margin: 0 0 0.95rem 0;
    line-height: 1.65;
}

.tp-post-tldr__topics {
    margin-bottom: 0.95rem;
}

.tp-post-tldr__topics-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: #475569;
    margin-bottom: 0.4rem;
    text-transform: uppercase;
}

.tp-post-tldr__pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tp-post-tldr__pill {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
}

.tp-post-tldr__dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem 1rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    margin: 0 0 0.9rem 0;
}

.tp-post-tldr__dl-item {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    font-size: 0.84rem;
}

.tp-post-tldr__dl-item dt {
    font-weight: 600;
    color: #64748b;
}

.tp-post-tldr__dl-item dt::after {
    content: ":";
}

.tp-post-tldr__dl-item dd {
    margin: 0;
    font-weight: 700;
    color: #0f172a;
}

.tp-post-tldr__ai-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px dashed #cbd5e1;
}

.tp-post-tldr__ai-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: #334155;
}

.tp-post-tldr__ai-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tp-post-tldr__ai-pill {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 36px !important;
    padding: 0.35rem 0.85rem !important;
    border-radius: 999px !important;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #0f172a !important;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.15s ease;
}

.tp-post-tldr__ai-pill:hover {
    border-color: #0284c7;
    background: #f0f9ff;
    color: #0284c7 !important;
}

.tp-ai-facts__drawer {
    margin-top: 0.75rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.6rem 0.9rem;
}

.tp-ai-facts__summary {
    font-size: 0.85rem;
    font-weight: 700;
    color: #0369a1;
    cursor: pointer;
}

.tp-ai-facts__dl {
    margin: 0.75rem 0 0 0;
    display: grid;
    gap: 0.45rem;
}

.tp-ai-facts__dl-row {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 0.75rem;
    font-size: 0.85rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px dashed #e2e8f0;
}

.tp-ai-facts__dl-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.tp-ai-facts__dl-row dt {
    font-weight: 600;
    color: #475569;
}

.tp-ai-facts__dl-row dd {
    margin: 0;
    color: #0f172a;
    font-weight: 500;
}

/* ==========================================================================
   3. Homepage Entity Summary (#thuong-hieu-la-gi) & Comparison Matrix
   ========================================================================== */
.tp-entity-summary {
    padding: 3rem 0 !important;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.tp-entity-summary__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr);
    gap: 1.75rem;
    align-items: start;
    margin-bottom: 2.25rem;
}

.tp-entity-summary__main {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.75rem 2rem;
}

.tp-entity-summary__eyebrow {
    display: inline-block;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #0369a1;
    background: #e0f2fe;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    margin-bottom: 0.65rem;
}

.tp-entity-summary__title {
    font-size: clamp(1.35rem, 2.3vw, 1.75rem) !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    margin: 0 0 0.75rem 0 !important;
    line-height: 1.35 !important;
    text-align: left !important;
}

.tp-entity-summary__lead {
    font-size: 0.98rem;
    color: #334155;
    margin: 0 0 1rem 0;
}

.tp-entity-summary__pillars {
    margin: 0 0 1.25rem 0;
    padding-left: 1.25rem;
    display: grid;
    gap: 0.6rem;
    color: #1e293b;
    font-size: 0.94rem;
}

.tp-entity-summary__links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tp-entity-summary__btn {
    display: inline-flex;
    align-items: center;
    padding: 0.65rem 1.15rem;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none !important;
    transition: all 0.18s ease;
}

.tp-entity-summary__btn--primary {
    background: #0f172a;
    color: #ffffff !important;
}

.tp-entity-summary__btn--primary:hover {
    background: #0284c7;
}

.tp-entity-summary__btn--ghost {
    background: #f1f5f9;
    color: #0f172a !important;
    border: 1px solid #cbd5e1;
}

.tp-entity-summary__btn--ghost:hover {
    border-color: #0284c7;
    color: #0284c7 !important;
}

.tp-entity-summary__card {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-top: 4px solid #0f172a;
    border-radius: 16px;
    padding: 1.5rem 1.5rem;
}

.tp-entity-summary__card-title {
    font-size: 1.05rem !important;
    font-weight: 800 !important;
    margin: 0 0 1rem 0 !important;
    color: #0f172a !important;
}

.tp-entity-summary__dl {
    margin: 0;
    display: grid;
    gap: 0.6rem;
}

.tp-entity-summary__dl-row {
    display: grid;
    grid-template-columns: 125px minmax(0, 1fr);
    gap: 0.5rem;
    font-size: 0.86rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed #e2e8f0;
}

.tp-entity-summary__dl-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.tp-entity-summary__dl-row dt {
    color: #64748b;
    font-weight: 600;
}

.tp-entity-summary__dl-row dd {
    margin: 0;
    color: #0f172a;
    font-weight: 600;
}

.tp-compare-matrix {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1.75rem 2rem;
}

.tp-compare-matrix__head {
    margin-bottom: 1.15rem;
}

.tp-compare-matrix__title {
    font-size: 1.3rem !important;
    font-weight: 800 !important;
    margin: 0 0 0.35rem 0 !important;
    color: #0f172a !important;
}

.tp-compare-matrix__sub {
    margin: 0;
    font-size: 0.92rem;
    color: #475569;
}

.tp-compare-matrix__table-wrap {
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.tp-compare-matrix__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    min-width: 680px;
}

.tp-compare-matrix__table th,
.tp-compare-matrix__table td {
    padding: 0.85rem 1rem;
    border: 1px solid #cbd5e1;
    text-align: left;
    vertical-align: top;
}

.tp-compare-matrix__table thead th {
    background: #f1f5f9;
    font-weight: 700;
    color: #0f172a;
}

.tp-compare-matrix__table th.is-highlighted {
    background: #0f172a;
    color: #ffffff;
}

.tp-compare-matrix__table td.is-highlighted {
    background: #f0f9ff;
    color: #0f172a;
}

.tp-compare-matrix__guarantees {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.9rem;
}

.tp-guarantee-card {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.tp-guarantee-card strong {
    font-size: 0.92rem;
    color: #0f172a;
}

.tp-guarantee-card span {
    font-size: 0.83rem;
    color: #475569;
    line-height: 1.5;
}

/* ==========================================================================
   4. Tier 2 Virtual Pages: /ai/ (.tp-ai-hub-page) & /wiki/ (.tp-wiki-page)
   ========================================================================== */
.tp-ai-hub-page,
.tp-wiki-page {
    max-width: 1240px;
    margin: 2rem auto 3.5rem auto;
    padding: 0 1rem;
}

/* Rule 4: Force padding on card <section> inside /ai/ and /wiki/ */
.tp-ai-hub-page section.tp-ai-hub-section,
.tp-wiki-page section.tp-wiki-section,
.tp-wiki-article > section {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    padding: 1.5rem 1.75rem !important;
    margin-bottom: 1.5rem !important;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.03);
}

.tp-ai-hub-hero,
.tp-wiki-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    border-radius: 16px;
    padding: 2rem 2.25rem !important;
    margin-bottom: 1.75rem !important;
}

.tp-ai-hub-hero h1,
.tp-wiki-title {
    color: #ffffff !important;
    font-size: clamp(1.5rem, 2.6vw, 2.15rem) !important;
    font-weight: 800 !important;
    margin: 0.5rem 0 0.75rem 0 !important;
    line-height: 1.3 !important;
}

.tp-ai-hub-hero p,
.tp-wiki-subtitle {
    color: #cbd5e1 !important;
    margin: 0 0 1rem 0 !important;
    font-size: 0.98rem;
}

.tp-ai-hub-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.5rem;
}

.tp-hoi-ai__tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(56, 189, 248, 0.16);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #38bdf8 !important;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.tp-ai-hub-updated {
    font-size: 0.8rem;
    color: #cbd5e1;
}

.tp-ai-hub-updated code {
    background: rgba(255, 255, 255, 0.12);
    color: #f8fafc;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
}

.tp-ai-hub-quicklinks {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1rem;
}

.tp-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 38px !important;
    padding: 0.45rem 0.95rem !important;
    border-radius: 10px !important;
    font-size: 0.84rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    cursor: pointer;
    transition: all 0.18s ease;
}

.tp-btn--secondary {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.24) !important;
}

.tp-btn--secondary:hover {
    background: #0284c7 !important;
    border-color: #0284c7 !important;
}

.tp-table-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

.tp-table-more-wrap .tp-btn--secondary {
    background: #f1f5f9 !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
}

.tp-table-more-wrap .tp-btn--secondary:hover {
    background: #0f172a !important;
    color: #ffffff !important;
}

/* 2-Column Sticky TOC Layout for /ai/ */
.tp-ai-hub-grid {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 1.75rem;
    align-items: start;
}

.tp-ai-hub-toc {
    position: sticky;
    top: 90px;
}

.tp-ai-hub-toc__box {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    padding: 1.25rem;
}

.tp-ai-hub-toc__title {
    font-size: 0.95rem !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    margin: 0 0 0.75rem 0 !important;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #0f172a;
}

.tp-ai-hub-toc__list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: grid;
    gap: 0.45rem;
}

.tp-ai-hub-toc__list li a {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
    text-decoration: none;
    padding: 0.35rem 0.5rem;
    border-radius: 8px;
    transition: all 0.15s ease;
}

.tp-ai-hub-toc__list li a:hover {
    background: #e0f2fe;
    color: #0369a1;
}

.tp-ai-hub-table-wrap,
.tp-table-scroll {
    overflow-x: auto;
}

.tp-ai-hub-table,
.tp-compare-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.tp-compare-table caption {
    text-align: left;
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 0.5rem;
    font-style: italic;
}

.tp-ai-hub-table th,
.tp-ai-hub-table td,
.tp-compare-table th,
.tp-compare-table td {
    border: 1px solid #cbd5e1;
    padding: 0.75rem 0.9rem;
    text-align: left;
    vertical-align: top;
}

.tp-ai-hub-table thead th,
.tp-compare-table thead th {
    background: #f1f5f9;
    font-weight: 700;
    color: #0f172a;
}

.tp-compare-table th.is-highlight {
    background: #0f172a;
    color: #ffffff;
}

.tp-compare-table td.is-highlight {
    background: #f0f9ff;
    color: #0f172a;
}

.tp-cmp-ok { color: #16a34a; font-weight: 800; margin-right: 4px; }
.tp-cmp-warn { color: #d97706; font-weight: 800; margin-right: 4px; }
.tp-cmp-no { color: #dc2626; font-weight: 800; margin-right: 4px; }

.tp-ai-faq-item {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.85rem 1.1rem;
    margin-bottom: 0.75rem;
    background: #f8fafc;
}

.tp-ai-faq-item summary {
    font-weight: 700;
    color: #0f172a;
    cursor: pointer;
    font-size: 0.94rem;
}

.tp-ai-faq-ans p {
    margin: 0.65rem 0 0 0;
    color: #334155;
    font-size: 0.9rem;
}

/* Wikipedia 2-column layout for /wiki/ */
.tp-wiki-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 1.75rem;
    align-items: start;
}

.tp-wiki-sidebar {
    position: sticky;
    top: 90px;
    display: grid;
    gap: 1.25rem;
}

.tp-wiki-infobox,
.tp-wiki-infobox__card,
.tp-wiki-toc {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    padding: 1.15rem 1.25rem;
}

.tp-wiki-infobox__header {
    border-bottom: 2px solid #0f172a;
    padding-bottom: 0.6rem;
    margin-bottom: 0.85rem;
}

.tp-wiki-infobox__header h2 {
    font-size: 1.05rem !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    margin: 0 !important;
}

.tp-wiki-infobox__header p {
    font-size: 0.78rem;
    color: #64748b;
    margin: 0.15rem 0 0 0;
}

.tp-wiki-infobox__title,
.tp-wiki-toc__title {
    font-size: 0.95rem !important;
    font-weight: 800 !important;
    margin: 0 0 0.75rem 0 !important;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #0f172a;
    color: #0f172a !important;
}

.tp-wiki-infobox dl,
.tp-wiki-infobox__dl {
    margin: 0;
    display: grid;
    gap: 0.55rem;
    font-size: 0.83rem;
}

.tp-wiki-infobox dt,
.tp-wiki-infobox__dl dt {
    font-weight: 700;
    color: #475569;
}

.tp-wiki-infobox dd,
.tp-wiki-infobox__dl dd {
    margin: 0 0 0.45rem 0;
    color: #0f172a;
    padding-bottom: 0.45rem;
    border-bottom: 1px dashed #cbd5e1;
}

/* ==========================================================================
   5. Semantic Article Blocks (.block-note, .block-cta, .block-table)
   ========================================================================== */
.block-note {
    background: #f0f9ff;
    border-left: 4px solid #0284c7;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin: 1.25rem 0;
    color: #0f172a;
}

.block-cta {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    border-radius: 14px;
    padding: 1.5rem 1.75rem;
    margin: 1.75rem 0;
}

.block-cta h3,
.block-cta p,
.block-cta strong {
    color: #ffffff !important;
}

.block-cta a {
    display: inline-block;
    margin-top: 0.5rem;
    background: #0284c7;
    color: #ffffff !important;
    padding: 0.55rem 1.15rem;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none !important;
}

/* ==========================================================================
   6. Responsive Breakpoints
   ========================================================================== */
@media (max-width: 991px) {
    .tp-hoi-ai__actions {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .tp-entity-summary__grid,
    .tp-ai-hub-grid,
    .tp-wiki-layout {
        grid-template-columns: 1fr;
    }
    .tp-ai-hub-toc,
    .tp-wiki-sidebar {
        position: static;
    }
    .tp-compare-matrix__guarantees {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .tp-hoi-ai__inner {
        padding: 1.25rem 1.1rem !important;
    }
    .tp-hoi-ai__actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .tp-ai-facts__grid,
    .tp-post-tldr__dl,
    .tp-compare-matrix__guarantees {
        grid-template-columns: 1fr;
    }
    .tp-ai-facts__dl-row {
        grid-template-columns: 1fr;
        gap: 0.15rem;
    }
}
