/* ═══════════════════════════════════════════════════════════════════════
   css/tb1-info-page.css — ธีมกลางของหน้าในเมนู "เกี่ยวกับโรงเรียน" · 3 ต.ค. 2569
   ใช้กับ about.php · vision.php · community.php · achievements2.php (หน้าที่อ่านจากฐานข้อมูล)
   หน้าตาชุดเดียวกับ budget.php / contact.php / history.php:
     ส่วนหัวน้ำเงินเต็มจอ · การ์ดตัวเลขซ้อนขอบส่วนหัว · แถบข้อมูลปัจจุบันจากระบบ
     เมนูหัวข้อติดใต้แถบเมนูหลัก · หัวข้อกลางหน้าพร้อมป้าย · การ์ดมุมโค้ง 18px · กล่องที่มาของข้อมูล
   มือถือก่อน · โหมดมืด ([data-theme=dark] / html.dark-mode) · ความคมชัดสูง (html.tb1-contrast-high) · พิมพ์
   สีข้อมูล (ชุดที่ตรวจตาบอดสีแล้วของหน้างบประมาณ): น้ำเงิน #2a78d6 · ส้ม #eb6834 · เขียวอมฟ้า #1baf7a · ม่วง #4a3aa7
   ตัวอักษรใช้สีหมึกเสมอ สีข้อมูลอยู่ที่แถบ จุด และไอคอนเท่านั้น
   แอนิเมชันทำงานเฉพาะเมื่อมี JavaScript (html.ip-js) และผู้ใช้ไม่ได้ตั้งลดการเคลื่อนไหว
   คลาสของหน้าแต่ละหน้าอยู่ท้ายไฟล์ (ab- / vi- / cm-) ส่วนหน้าผลงานอยู่ที่ css/tb1-school-pride.css
   ═══════════════════════════════════════════════════════════════════════ */

:root {
    --ip-ink1: #0F172A;
    --ip-ink2: #334155;
    --ip-ink3: #56657A;
    --ip-page: #F4F7FB;
    --ip-card: #FFFFFF;
    --ip-alt: #F1F5F9;
    --ip-line: #E2E8F0;
    --ip-line2: #CBD5E1;
    --ip-navy: #1E3A8A;
    --ip-brand: #1D4ED8;
    --ip-link: #1D4ED8;
    --ip-gold: #B45309;
    --ip-blue: #2a78d6;
    --ip-orange: #eb6834;
    --ip-green: #1baf7a;
    --ip-purple: #4a3aa7;
    --ip-slate: #8193AA;
    --ip-ok-ink: #047857;
    --ip-sh: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(30, 58, 138, .07);
    --ip-sh2: 0 4px 12px rgba(30, 58, 138, .08), 0 18px 44px rgba(30, 58, 138, .12);
    --ip-r: 18px;
    --ip-rs: 12px;
    --ip-mw: var(--tb1-page-max-width, 1280px);
    --ip-gut: 16px;
    --ip-fd: var(--tb1-font-display, 'Noto Sans Thai Looped', sans-serif);
    --ip-fb: var(--tb1-font-body, 'Sarabun', system-ui, -apple-system, 'Segoe UI', sans-serif);
    --ip-ease: cubic-bezier(.22, .8, .24, 1);
}

[data-theme="dark"],
html.dark,
html.dark-mode,
body.dark-mode {
    --ip-ink1: #F1F5F9;
    --ip-ink2: #CBD5E1;
    --ip-ink3: #9FB0C6;
    --ip-page: #0A1322;
    --ip-card: #111C2E;
    --ip-alt: #16233A;
    --ip-line: #22324A;
    --ip-line2: #34465F;
    --ip-link: #93C5FD;
    --ip-gold: #FBBF24;
    --ip-blue: #3987e5;
    --ip-orange: #d95926;
    --ip-green: #199e70;
    --ip-purple: #9085e9;
    --ip-slate: #8193AA;
    --ip-ok-ink: #6EE7B7;
    --ip-sh: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 26px rgba(0, 0, 0, .28);
    --ip-sh2: 0 6px 18px rgba(0, 0, 0, .35), 0 24px 50px rgba(0, 0, 0, .4);
}

@media (min-width: 640px) {
    :root {
        --ip-gut: 24px;
    }
}

/* ═══ พื้นฐาน ═══ */
.ip-page,
.ip-page *,
.ip-page *::before,
.ip-page *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 132px;
}

body.ip-page {
    margin: 0;
    font-family: var(--ip-fb);
    font-size: 16px;
    line-height: 1.65;
    color: var(--ip-ink1);
    background: var(--ip-page);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* รีเซ็ตแบบน้ำหนักศูนย์ (:where) คลาสของหน้าจึงกำหนดระยะทับได้เสมอ */
:where(.ip-main, .ip-hero) :where(h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote, address) {
    margin: 0;
    padding: 0;
}

:where(.ip-main, .ip-hero) :where(ul, ol) {
    list-style: none;
}

.ip [hidden] {
    display: none !important;
}

.ip-num {
    font-variant-numeric: tabular-nums;
    font-feature-settings: 'tnum';
    white-space: nowrap;
}

.ip .sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ชื่อเฉพาะที่ห้ามตัดกลางคำ (ภาษาไทยไม่มีช่องว่างระหว่างคำ) */
.ip .ip-nw {
    white-space: nowrap;
}

body.ip-page a.ip-skip {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: 10000;
    padding: .7rem 1.2rem;
    border-radius: 0 0 12px 12px;
    background: var(--ip-navy);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    transition: top .2s;
}

body.ip-page a.ip-skip:focus {
    top: 0;
}

.ip :focus-visible {
    outline: 3px solid #F59E0B;
    outline-offset: 2px;
    border-radius: 6px;
}

.ip-main {
    max-width: var(--ip-mw);
    margin: 0 auto;
    padding: 0 var(--ip-gut) 3rem;
    outline: none;
}

.ip-main a {
    color: var(--ip-link);
}

.ip .ip-link {
    color: var(--ip-link);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ═══ ส่วนหัว ═══ */
.ip-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(120% 90% at 0% 0%, #2563EB 0%, transparent 55%),
        radial-gradient(90% 90% at 100% 20%, #0B78C2 0%, transparent 50%),
        linear-gradient(135deg, #172554 0%, #1E3A8A 45%, #1D4ED8 100%);
    padding: 2.25rem var(--ip-gut) 6.5rem;
    isolation: isolate;
}

[data-theme="dark"] .ip-hero,
html.dark-mode .ip-hero {
    background:
        radial-gradient(110% 90% at 0% 0%, rgba(37, 99, 235, .45) 0%, transparent 55%),
        radial-gradient(90% 90% at 100% 20%, rgba(14, 165, 233, .28) 0%, transparent 50%),
        linear-gradient(135deg, #060D1A 0%, #0B1A33 50%, #0F2447 100%);
}

/* ส่วนหัวที่ไม่มีการ์ดตัวเลขซ้อนขอบ */
.ip-hero.is-flat {
    padding-bottom: 3rem;
}

.ip-hero-deco {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

.ip-hero-deco .orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
    opacity: .5;
    background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, .28), rgba(255, 255, 255, 0) 70%);
}

.ip-hero-deco .o1 {
    width: 340px;
    height: 340px;
    left: -90px;
    top: -120px;
}

.ip-hero-deco .o2 {
    width: 220px;
    height: 220px;
    right: 12%;
    top: -60px;
}

.ip-hero-deco .o3 {
    width: 160px;
    height: 160px;
    left: 38%;
    bottom: -70px;
}

/* ภาพประกอบจาง ๆ มุมขวาล่าง (ตำแหน่งเดียวกับแท่งกราฟของหน้างบประมาณ) */
.ip-hero-art {
    position: absolute;
    right: 3%;
    bottom: 3.4rem;
    width: min(280px, 40vw);
    height: auto;
    opacity: .2;
    overflow: visible;
}

.ip-hero-art * {
    transform-box: fill-box;
}

.ip-hero-art .fill {
    fill: #fff;
}

.ip-hero-art .line {
    fill: none;
    stroke: #fff;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ip-hero-in {
    position: relative;
    max-width: var(--ip-mw);
    margin: 0 auto;
    text-align: center;
}

.ip-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    max-width: 100%;
    padding: .35rem .95rem;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 999px;
    background: rgba(255, 255, 255, .1);
    font-size: .86rem;
    font-weight: 600;
    letter-spacing: .01em;
    backdrop-filter: blur(6px);
}

.ip-hero h1 {
    margin: .9rem 0 .35rem;
    font-family: var(--ip-fd);
    font-weight: 800;
    font-size: clamp(2rem, 6.5vw, 3.25rem);
    line-height: 1.25;
    letter-spacing: -.01em;
    color: #fff;
    text-shadow: 0 2px 18px rgba(15, 23, 42, .35);
}

.ip-lead {
    max-width: 52rem;
    margin: 0 auto !important;
    font-size: clamp(1rem, 2.6vw, 1.2rem);
    color: rgba(255, 255, 255, .94);
}

.ip-lead strong {
    color: #FDE68A;
    font-weight: 700;
}

.ip-hero-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .45rem .6rem;
    margin-top: 1rem !important;
}

.ip-hero-meta li {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .3rem .8rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, .3);
    font-size: .88rem;
    color: #fff;
}

.ip-hero-meta a {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ข้อความยกในส่วนหัว (วิสัยทัศน์): การ์ดขาวกลางส่วนหัว */
.ip-hero-quote {
    position: relative;
    max-width: 46rem;
    margin: 1.4rem auto 0 !important;
    padding: 1.1rem 1.4rem 1.15rem 3.1rem;
    text-align: left;
    color: var(--ip-ink1);
    background: var(--ip-card);
    border: 1px solid rgba(255, 255, 255, .5);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .28);
    font-family: var(--ip-fd);
    font-size: clamp(1.05rem, 2.8vw, 1.32rem);
    font-weight: 700;
    line-height: 1.6;
}

.ip-hero-quote::before {
    content: '\201C';
    position: absolute;
    left: .9rem;
    top: .2rem;
    font-size: 3rem;
    line-height: 1;
    color: var(--ip-blue);
}

.ip-hero-quote cite {
    display: block;
    margin-top: .45rem;
    font-family: var(--ip-fb);
    font-size: .82rem;
    font-weight: 600;
    font-style: normal;
    color: var(--ip-ink3);
}

/* ช่องค้นหาในส่วนหัว (หน้าผลงาน) */
.ip-hero-search {
    display: flex;
    align-items: center;
    gap: .5rem;
    width: min(100%, 40rem);
    margin: 1.35rem auto 0;
    padding: .4rem .4rem .4rem 1rem;
    background: var(--ip-card);
    border: 1px solid rgba(255, 255, 255, .5);
    border-radius: 999px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .28);
}

.ip-hero-search > i {
    color: var(--ip-ink3);
}

.ip-hero-search input {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 44px;
    padding: 0 .25rem;
    border: 0;
    background: transparent;
    color: var(--ip-ink1);
    font: inherit;
    font-size: 1rem;
}

.ip-hero-search input::placeholder {
    color: var(--ip-ink3);
    opacity: 1;
}

.ip-hero-search input:focus {
    outline: none;
}

.ip-hero-search:focus-within {
    outline: 3px solid #F59E0B;
    outline-offset: 2px;
}

/* ═══ การ์ดตัวเลข: ซ้อนขอบส่วนหัว ═══ */
.ip-kpis {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
    margin-top: -4.5rem !important;
}

@media (min-width: 980px) {
    .ip-kpis {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 1rem;
    }

    .ip-kpis.is-5 {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

.ip-kpis > li {
    display: flex;
    min-width: 0;
}

/* ห้าการ์ดบนจอแคบ (สองคอลัมน์): ใบสุดท้ายเต็มแถว ไม่เหลือช่องว่าง */
@media (max-width: 979px) {
    .ip-kpis.is-5 > li:last-child {
        grid-column: 1 / -1;
    }
}

.ip .ip-kpi {
    position: relative;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
    padding: 1rem 1rem 1.05rem;
    border-radius: var(--ip-r);
    background: var(--ip-card);
    border: 1px solid var(--ip-line);
    box-shadow: var(--ip-sh);
    overflow: hidden;
    color: var(--ip-ink1);
    text-decoration: none;
}

.ip-kpi::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: var(--k, var(--ip-blue));
}

.ip-kpi.k-blue,
.ip-card-ic.is-blue {
    --k: var(--ip-blue);
}

.ip-kpi.k-orange,
.ip-card-ic.is-orange {
    --k: var(--ip-orange);
}

.ip-kpi.k-green,
.ip-card-ic.is-green {
    --k: var(--ip-green);
}

.ip-kpi.k-purple,
.ip-card-ic.is-purple {
    --k: var(--ip-purple);
}

.ip-kpi.k-gold,
.ip-card-ic.is-gold {
    --k: #D97706;
}

.ip-kpi-top {
    display: flex;
    align-items: center;
    gap: .55rem;
}

.ip-kpi-k {
    font-size: .92rem;
    font-weight: 600;
    color: var(--ip-ink2);
    line-height: 1.35;
}

.ip-kpi-ic {
    flex: none;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #fff;
    background: var(--k);
    font-size: .9rem;
}

.ip-kpi-v {
    margin-top: .55rem !important;
    font-size: clamp(1.35rem, 5vw, 1.9rem);
    font-weight: 700;
    line-height: 1.2;
    color: var(--ip-ink1);
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}

.ip-kpi-v small {
    margin-left: .25rem;
    font-size: .8rem;
    font-weight: 500;
    color: var(--ip-ink3);
}

.ip-kpi-f {
    margin-top: auto !important;
    padding-top: .45rem;
    font-size: .82rem;
    color: var(--ip-ink3);
    line-height: 1.45;
}

.ip a.ip-kpi:hover .ip-kpi-k {
    color: var(--ip-ink1);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ═══ ข้อมูลปัจจุบันจากระบบ ═══ */
.ip-live {
    margin-top: 1rem;
    padding: 1rem 1.1rem;
    border-radius: var(--ip-r);
    background:
        radial-gradient(120% 140% at 0% 0%, color-mix(in srgb, var(--ip-green) 12%, transparent) 0%, transparent 60%),
        var(--ip-card);
    border: 1px solid color-mix(in srgb, var(--ip-green) 45%, var(--ip-line));
    box-shadow: var(--ip-sh);
}

.ip-live-h {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: .2rem 1rem;
}

.ip-live-h h2 {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--ip-ink1);
}

.ip-live-h p {
    font-size: .84rem;
    color: var(--ip-ink3);
}

.ip-pulse {
    position: relative;
    flex: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--ip-green);
}

.ip-pulse::after {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 2px solid var(--ip-green);
    opacity: 0;
}

.ip-live-f {
    margin-top: .6rem !important;
    font-size: .86rem;
    color: var(--ip-ink2);
}

/* ═══ เมนูหัวข้อ ═══ */
.ip-subnav {
    position: sticky;
    top: var(--ip-top, 56px);
    z-index: 20;
    display: flex;
    gap: .4rem;
    margin: 1.25rem calc(var(--ip-gut) * -1) 0;
    padding: .6rem var(--ip-gut);
    overflow-x: auto;
    scrollbar-width: none;
    background: color-mix(in srgb, var(--ip-page) 88%, transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--ip-line);
}

.ip-subnav::-webkit-scrollbar {
    display: none;
}

.ip .ip-subnav a {
    flex: none;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    padding: .3rem .9rem;
    border-radius: 999px;
    border: 1px solid var(--ip-line2);
    background: var(--ip-card);
    color: var(--ip-ink2);
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
    transition: background .2s, color .2s, border-color .2s;
}

.ip .ip-subnav a:hover {
    border-color: var(--ip-brand);
}

.ip .ip-subnav a.is-on {
    background: var(--ip-navy);
    border-color: var(--ip-navy);
    color: #fff;
}

[data-theme="dark"] .ip .ip-subnav a.is-on,
html.dark-mode .ip .ip-subnav a.is-on {
    background: #93C5FD;
    border-color: #93C5FD;
    color: #0A1322;
}

/* ═══ หัวข้อส่วน ═══ */
.ip-sec {
    margin-top: 3rem;
    scroll-margin-top: 132px;
}

.ip-sec-h {
    text-align: center;
    margin-bottom: 1.4rem;
}

.ip-badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .25rem .8rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--ip-blue) 12%, transparent);
    color: var(--ip-ink1);
    font-size: .8rem;
    font-weight: 700;
}

.ip-badge i {
    color: var(--ip-blue);
}

.ip-sec-h h2 {
    margin-top: .5rem !important;
    font-family: var(--ip-fd);
    font-size: clamp(1.45rem, 4.5vw, 2rem);
    font-weight: 800;
    line-height: 1.3;
    color: var(--ip-ink1);
}

.ip-sec-h p {
    max-width: 720px;
    margin: .35rem auto 0 !important;
    color: var(--ip-ink3);
    font-size: .95rem;
}

/* ═══ การ์ด ═══ */
.ip-card {
    position: relative;
    min-width: 0;
    padding: 1.1rem;
    border-radius: var(--ip-r);
    background: var(--ip-card);
    border: 1px solid var(--ip-line);
    box-shadow: var(--ip-sh);
}

.ip-card-h {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    margin-bottom: .8rem;
}

.ip-card-h h3 {
    font-family: var(--ip-fb);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ip-ink1);
    line-height: 1.45;
}

.ip-card-h p {
    font-size: .86rem;
    color: var(--ip-ink3);
}

.ip-card-ic {
    --k: var(--ip-blue);
    flex: none;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: color-mix(in srgb, var(--k) 14%, transparent);
    color: var(--k);
}

.ip-card-ic.is-gold {
    color: var(--ip-gold);
}

.ip-card p.ip-card-txt {
    color: var(--ip-ink2);
    font-size: .95rem;
}

.ip-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 700px) {
    .ip-grid.g2,
    .ip-grid.g3,
    .ip-grid.g4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1000px) {
    .ip-grid.g3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .ip-grid.g4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* ป้ายเล็กในการ์ด */
.ip-chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .15rem .65rem;
    border-radius: 999px;
    background: var(--ip-alt);
    border: 1px solid var(--ip-line);
    color: var(--ip-ink2);
    font-size: .8rem;
    font-weight: 600;
    line-height: 1.6;
}

.ip-chip i {
    color: var(--ip-ink3);
}

.ip-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

/* ปุ่มและลิงก์แบบเม็ดยา */
.ip .ip-pill,
.ip .ip-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    min-height: 40px;
    padding: .3rem 1rem;
    color: var(--ip-link);
    background: var(--ip-card);
    border: 1px solid var(--ip-line2);
    border-radius: 999px;
    font: inherit;
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: border-color .16s ease, background-color .16s ease;
}

.ip .ip-pill:hover,
.ip .ip-btn:hover {
    border-color: var(--ip-brand);
    background: color-mix(in srgb, var(--ip-blue) 8%, var(--ip-card));
}

.ip .ip-btn.is-primary {
    color: #fff;
    background: var(--ip-navy);
    border-color: var(--ip-navy);
}

.ip .ip-btn.is-primary:hover {
    background: #172554;
}

[data-theme="dark"] .ip .ip-btn.is-primary,
html.dark-mode .ip .ip-btn.is-primary {
    color: #0A1322;
    background: #93C5FD;
    border-color: #93C5FD;
}

/* ═══ อ่านจากตัวเลข ═══ */
.ip-insights {
    padding: 1.1rem;
    border-radius: var(--ip-r);
    background: linear-gradient(160deg, color-mix(in srgb, var(--ip-blue) 9%, var(--ip-card)) 0%, var(--ip-card) 70%);
    border: 1px solid var(--ip-line);
    box-shadow: var(--ip-sh);
}

.ip-insights h3 {
    margin-bottom: .5rem !important;
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--ip-ink1);
}

.ip-insights h3 i {
    color: var(--ip-gold);
}

.ip-insights li {
    display: flex;
    gap: .7rem;
    align-items: flex-start;
    padding: .65rem 0;
    border-top: 1px dashed var(--ip-line2);
    color: var(--ip-ink2);
    font-size: .94rem;
}

.ip-insights li:first-child {
    border-top: 0;
}

.ip-insights li > i {
    flex: none;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    margin-top: .05rem;
    border-radius: 9px;
    background: color-mix(in srgb, var(--ip-blue) 13%, transparent);
    color: var(--ip-blue);
    font-size: .85rem;
}

.ip-insights strong {
    color: var(--ip-ink1);
    font-variant-numeric: tabular-nums;
}

/* ═══ ข้อมูลแบบหัวข้อ-ค่า ═══ */
.ip-facts {
    display: grid;
    grid-template-columns: 1fr;
    gap: .75rem;
}

@media (min-width: 700px) {
    .ip-facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1000px) {
    .ip-facts.is-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.ip-facts > div {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    padding: .95rem 1rem;
    border-radius: var(--ip-rs);
    background: var(--ip-card);
    border: 1px solid var(--ip-line);
    box-shadow: var(--ip-sh);
}

.ip-facts dt {
    font-size: .84rem;
    font-weight: 600;
    color: var(--ip-ink3);
}

.ip-facts dd {
    margin: .1rem 0 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--ip-ink1);
    line-height: 1.5;
}

/* ═══ การ์ดลิงก์ไปหน้าอื่น ═══ */
.ip-go {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: .85rem;
}

.ip .ip-go a {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: .2rem .85rem;
    align-items: center;
    height: 100%;
    padding: .95rem 1rem;
    border-radius: var(--ip-r);
    background: var(--ip-card);
    border: 1px solid var(--ip-line);
    box-shadow: var(--ip-sh);
    color: var(--ip-ink1);
    text-decoration: none;
    transition: border-color .2s, box-shadow .25s, transform .25s var(--ip-ease);
}

.ip-go a > i:first-child {
    grid-row: span 2;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: color-mix(in srgb, var(--ip-blue) 13%, transparent);
    color: var(--ip-blue);
}

.ip-go b {
    font-size: 1rem;
    line-height: 1.4;
}

.ip-go span {
    grid-column: 2;
    font-size: .86rem;
    color: var(--ip-ink3);
    line-height: 1.5;
}

.ip-go a > i:last-child {
    grid-column: 3;
    grid-row: 1 / span 2;
    color: var(--ip-ink3);
    font-size: .85rem;
}

.ip .ip-go a:hover {
    border-color: var(--ip-brand);
    box-shadow: var(--ip-sh2);
}

.ip .ip-go a:hover b {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.ip .ip-go a[aria-current="page"] {
    border-color: var(--ip-brand);
    box-shadow: inset 4px 0 0 var(--ip-brand), var(--ip-sh);
}

/* ═══ แถบสัดส่วน ═══ */
.ip-meter {
    display: block;
    height: 8px;
    margin-top: .45rem;
    overflow: hidden;
    border-radius: 999px;
    background: var(--ip-alt);
}

.ip-meter > i {
    display: block;
    width: var(--w, 0%);
    height: 100%;
    border-radius: inherit;
    background: var(--k, var(--ip-blue));
    transform-origin: left center;
}

/* ═══ ที่มาของข้อมูล ═══ */
.ip-about h2 {
    margin-bottom: .6rem !important;
    font-family: var(--ip-fd);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--ip-ink1);
}

.ip-about h2 i {
    color: var(--ip-blue);
}

.ip-about > ul > li {
    position: relative;
    padding: .45rem 0 .45rem 1.1rem;
    font-size: .92rem;
    color: var(--ip-ink2);
    border-top: 1px solid var(--ip-line);
}

.ip-about > ul > li:first-child {
    border-top: 0;
}

.ip-about > ul > li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 1.05rem;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ip-blue);
}

.ip-about > ul b {
    margin-right: .3rem;
    color: var(--ip-ink1);
}

.ip-about-note {
    margin-top: .75rem !important;
    padding: .75rem .9rem;
    border-radius: var(--ip-rs);
    background: color-mix(in srgb, #F59E0B 10%, var(--ip-card));
    border: 1px solid color-mix(in srgb, #F59E0B 40%, var(--ip-line));
    font-size: .9rem;
    color: var(--ip-ink2);
}

/* ═══ อ่านต่อ ═══ */
.ip-next {
    margin-top: 2.5rem;
}

.ip-next h2 {
    margin-bottom: .75rem !important;
    font-family: var(--ip-fd);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--ip-ink1);
    text-align: center;
}

.ip-next ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .5rem;
}

.ip-next a {
    min-height: 44px;
}

/* ═══ ปุ่มกางทั้งหมดของรายการพับได้ ═══ */
.ip-tools {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .5rem;
    margin-bottom: 1rem !important;
}

/* ═══ รายการพับได้ (details) ═══ */
.ip-fold {
    border-radius: var(--ip-r);
    background: var(--ip-card);
    border: 1px solid var(--ip-line);
    box-shadow: var(--ip-sh);
    overflow: hidden;
}

.ip-fold + .ip-fold {
    margin-top: .75rem;
}

.ip-fold > summary {
    display: flex;
    align-items: center;
    gap: .85rem;
    min-height: 56px;
    padding: .85rem 1rem;
    cursor: pointer;
    list-style: none;
}

.ip-fold > summary::-webkit-details-marker {
    display: none;
}

.ip-fold > summary::after {
    content: '\f078';
    flex: none;
    margin-left: auto;
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: .8rem;
    color: var(--ip-ink3);
    transition: transform .25s var(--ip-ease);
}

.ip-fold[open] > summary::after {
    transform: rotate(180deg);
}

.ip-fold > summary:hover {
    background: color-mix(in srgb, var(--ip-blue) 5%, var(--ip-card));
}

.ip-fold-body {
    padding: 0 1rem 1rem;
    border-top: 1px solid var(--ip-line);
}

/* ═══ จอแคบ ═══ */
@media (max-width: 640px) {
    .ip-hero {
        padding-top: 1.75rem;
    }

    .ip .ip-kpi {
        padding: .85rem .85rem .9rem;
    }

    .ip-kpi-k {
        font-size: .86rem;
    }

    .ip-hero-quote {
        padding: 1rem 1rem 1rem 2.6rem;
    }

    .ip-hero-quote::before {
        left: .6rem;
        font-size: 2.5rem;
    }

    .ip-hero-art {
        opacity: .14;
    }
}

@media (max-width: 380px) {
    .ip-kpis {
        grid-template-columns: 1fr;
    }
}

/* ═══ แอนิเมชัน (เฉพาะเมื่อมี JS และไม่ได้ตั้งลดการเคลื่อนไหว) ═══ */
@media (prefers-reduced-motion: no-preference) {

    .ip-hero-deco .o1 {
        animation: ipFloat 16s ease-in-out infinite alternate;
    }

    .ip-hero-deco .o2 {
        animation: ipFloat 20s ease-in-out -6s infinite alternate-reverse;
    }

    .ip-hero-deco .o3 {
        animation: ipFloat 24s ease-in-out -3s infinite alternate;
    }

    .ip-js .ip-hero-art .rise {
        animation: ipRise 1s var(--ip-ease) both;
        animation-delay: calc(.15s + var(--i, 0) * .09s);
    }

    .ip-js .ip-hero-in > * {
        animation: ipUp .8s var(--ip-ease) both;
    }

    .ip-js .ip-hero-in > *:nth-child(2) {
        animation-delay: .08s;
    }

    .ip-js .ip-hero-in > *:nth-child(3) {
        animation-delay: .16s;
    }

    .ip-js .ip-hero-in > *:nth-child(4) {
        animation-delay: .24s;
    }

    .ip-js .ip-hero-in > *:nth-child(5) {
        animation-delay: .32s;
    }

    .ip-pulse::after {
        animation: ipPulse 2.2s ease-out infinite;
    }

    /* เผยทีละส่วนเมื่อเลื่อนถึง */
    .ip-js .ip-rv {
        opacity: 0;
        transform: translateY(22px);
        transition: opacity .7s var(--ip-ease), transform .7s var(--ip-ease);
        transition-delay: calc(var(--i, 0) * 90ms);
    }

    .ip-js .ip-rv.is-in,
    .ip-js.ip-ready .ip-rv {
        opacity: 1;
        transform: none;
    }

    .ip-js .ip-rv .ip-meter > i {
        transform: scaleX(0);
        transition: transform 1s var(--ip-ease) .2s;
    }

    .ip-js .ip-rv.is-in .ip-meter > i,
    .ip-js.ip-ready .ip-rv .ip-meter > i {
        transform: none;
    }

    .ip-kpi,
    .ip-card,
    .ip-fold {
        transition: box-shadow .25s ease, transform .25s var(--ip-ease), opacity .7s var(--ip-ease), border-color .2s ease;
    }

    .ip a.ip-kpi:hover {
        transform: translateY(-2px);
        box-shadow: var(--ip-sh2);
    }

    .ip .ip-go a:hover {
        transform: translateY(-2px);
    }

    .ip-sec:target .ip-sec-h h2,
    .ip-card:target {
        animation: ipFlash 1.1s ease-out .3s 2;
    }
}

@keyframes ipFloat {
    from {
        transform: translate3d(0, 0, 0) scale(1);
    }

    to {
        transform: translate3d(40px, 26px, 0) scale(1.12);
    }
}

@keyframes ipUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes ipRise {
    from {
        opacity: 0;
        transform: translateY(18px) scale(.9);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes ipPulse {
    0% {
        transform: scale(.6);
        opacity: .9;
    }

    100% {
        transform: scale(1.8);
        opacity: 0;
    }
}

@keyframes ipFlash {
    0%,
    100% {
        box-shadow: 0 0 0 3px color-mix(in srgb, var(--ip-blue) 30%, transparent), var(--ip-sh2);
    }

    40% {
        box-shadow: 0 0 0 8px color-mix(in srgb, var(--ip-blue) 18%, transparent), var(--ip-sh2);
    }
}

/* ═══════════════════════════════════════════════════════════════════════
   คลาสของแต่ละหน้า
   ═══════════════════════════════════════════════════════════════════════ */

/* ── about.php (ab-) ───────────────────────────────────────────────── */
.ab-trophies {
    position: absolute;
    right: 2%;
    bottom: 6.2rem;
    display: flex;
    align-items: flex-end;
    gap: .4rem;
    pointer-events: none;
}

.ab-trophies img {
    display: block;
    width: auto;
    height: clamp(100px, 10.5vw, 150px);
    border-radius: 10px;
    filter: drop-shadow(0 10px 18px rgba(2, 6, 23, .45));
}

@media (max-width: 1099px) {
    .ab-trophies {
        display: none;
    }
}

.ab-sar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 900px) {
    .ab-sar {
        grid-template-columns: minmax(0, 15rem) minmax(0, 1fr);
    }
}

.ab-sar-sum {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    text-align: center;
}

.ab-sar-sum b {
    font-family: var(--ip-fd);
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--ip-ink1);
}

.ab-sar-sum span {
    font-size: .86rem;
    color: var(--ip-ink3);
}

.ab-level {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .2rem .8rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--ip-green) 16%, var(--ip-card));
    border: 1px solid color-mix(in srgb, var(--ip-green) 55%, var(--ip-line));
    color: var(--ip-ok-ink);
    font-size: .88rem;
    font-weight: 700;
}

.ab-std li {
    padding: .7rem 0;
    border-top: 1px solid var(--ip-line);
}

.ab-std li:first-child {
    border-top: 0;
    padding-top: .1rem;
}

.ab-std-h {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: .2rem 1rem;
}

.ab-std-h span {
    color: var(--ip-ink1);
    font-weight: 600;
}

.ab-std-h span small {
    margin-right: .4rem;
    color: var(--ip-ink3);
    font-weight: 600;
}

.ab-std-h b {
    color: var(--ip-ink1);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.ab-std .ip-meter {
    --k: var(--ip-green);
}

/* ── vision.php (vi-) ──────────────────────────────────────────────── */
.vi-parts {
    display: grid;
    grid-template-columns: 1fr;
    gap: .85rem;
    counter-reset: vipart;
}

@media (min-width: 900px) {
    .vi-parts {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.vi-part {
    border-top: 4px solid var(--k, var(--ip-blue));
}

.vi-part b {
    display: block;
    font-family: var(--ip-fd);
    font-size: 1.12rem;
    font-weight: 700;
    line-height: 1.5;
    color: var(--ip-ink1);
}

.vi-part span {
    display: block;
    margin-bottom: .3rem;
    font-size: .82rem;
    font-weight: 700;
    color: var(--ip-ink3);
}

.vi-missions {
    counter-reset: vimis;
}

.vi-mission {
    display: flex;
    gap: .85rem;
    align-items: flex-start;
}

.vi-mission .ip-card-ic {
    font-family: var(--ip-fd);
    font-size: 1.1rem;
    font-weight: 800;
}

.vi-mission b {
    display: block;
    color: var(--ip-ink1);
    font-size: 1rem;
    line-height: 1.55;
}

.vi-mission span {
    display: block;
    margin-top: .2rem;
    font-size: .84rem;
    color: var(--ip-ink3);
}

.vi-str > summary {
    align-items: flex-start;
}

.vi-str-n {
    flex: none;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--ip-navy);
    color: #fff;
    font-family: var(--ip-fd);
    font-size: 1.15rem;
    font-weight: 800;
}

[data-theme="dark"] .vi-str-n,
html.dark-mode .vi-str-n {
    background: #93C5FD;
    color: #0A1322;
}

.vi-str-t {
    flex: 1 1 auto;
    min-width: 0;
}

.vi-str-t b {
    display: block;
    color: var(--ip-ink1);
    font-size: 1.02rem;
    line-height: 1.5;
}

.vi-str-t span {
    display: block;
    margin-top: .15rem;
    font-size: .84rem;
    color: var(--ip-ink3);
}

.vi-str-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    padding-top: .9rem;
}

@media (min-width: 900px) {
    .vi-str-grid {
        grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    }
}

.vi-str-grid h3 {
    margin-bottom: .45rem !important;
    font-size: .88rem;
    font-weight: 700;
    color: var(--ip-ink3);
}

.vi-tactics li {
    display: flex;
    gap: .6rem;
    align-items: flex-start;
    padding: .45rem 0;
    border-top: 1px dashed var(--ip-line2);
    color: var(--ip-ink2);
}

.vi-tactics li:first-child {
    border-top: 0;
}

.vi-tactics li b {
    flex: none;
    min-width: 2.4rem;
    color: var(--ip-ink1);
    font-variant-numeric: tabular-nums;
}

.vi-goal {
    margin-top: .9rem !important;
    padding: .75rem .9rem;
    border-radius: var(--ip-rs);
    background: color-mix(in srgb, var(--ip-green) 10%, var(--ip-card));
    border: 1px solid color-mix(in srgb, var(--ip-green) 40%, var(--ip-line));
    color: var(--ip-ink1);
    font-weight: 600;
}

.vi-goal small {
    display: block;
    font-size: .8rem;
    font-weight: 700;
    color: var(--ip-ok-ink);
}

.vi-id {
    text-align: center;
    padding: 1.4rem 1.2rem;
}

.vi-id .ip-card-ic {
    margin: 0 auto .6rem;
}

.vi-id h3 {
    font-size: .88rem;
    font-weight: 700;
    color: var(--ip-ink3);
}

.vi-id p {
    margin-top: .4rem !important;
    font-family: var(--ip-fd);
    font-size: clamp(1.1rem, 3vw, 1.3rem);
    font-weight: 700;
    line-height: 1.6;
    color: var(--ip-ink1);
}

.vi-id .ip-chips {
    justify-content: center;
    margin-top: .8rem;
}

/* ── community.php (cm-) ───────────────────────────────────────────── */
.cm-comm {
    display: flex;
    gap: .8rem;
    align-items: center;
}

.cm-comm b {
    display: block;
    color: var(--ip-ink1);
    font-size: 1.05rem;
}

.cm-comm span {
    display: block;
    font-size: .84rem;
    color: var(--ip-ink3);
}

.cm-temple .ip-card-h {
    margin-bottom: .5rem;
}

.cm-temple-where {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    margin-top: .1rem !important;
    font-size: .86rem;
    font-weight: 600;
    color: var(--ip-ink2);
}

.cm-uses li {
    display: flex;
    gap: .6rem;
    justify-content: space-between;
    align-items: baseline;
    padding: .4rem 0;
    border-top: 1px dashed var(--ip-line2);
    font-size: .9rem;
    color: var(--ip-ink2);
}

.cm-uses li:first-child {
    border-top: 0;
}

.cm-uses li b {
    flex: none;
    color: var(--ip-ink1);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.cm-temple-f {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    margin-top: .75rem;
}

.cm-note {
    font-size: .84rem;
    color: var(--ip-ink3);
}

.cm-map {
    position: relative;
    min-height: 20rem;
    margin-top: 1rem;
    overflow: hidden;
    padding: 0;
}

.cm-map iframe {
    display: block;
    width: 100%;
    height: 24rem;
    border: 0;
}

.cm-map-cover {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    min-height: 20rem;
    padding: 1.5rem;
    text-align: center;
    background:
        linear-gradient(color-mix(in srgb, var(--ip-blue) 7%, transparent) 1px, transparent 1px) 0 0 / 28px 28px,
        linear-gradient(90deg, color-mix(in srgb, var(--ip-blue) 7%, transparent) 1px, transparent 1px) 0 0 / 28px 28px,
        var(--ip-card);
}

.cm-map-cover > i {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--ip-navy);
    color: #fff;
    font-size: 1.2rem;
}

.cm-map-cover b {
    font-size: 1.05rem;
    color: var(--ip-ink1);
}

.cm-map-cover p {
    max-width: 30rem;
    font-size: .88rem;
    color: var(--ip-ink3);
}

.cm-trad {
    padding: 0;
    overflow: hidden;
}

.cm-trad-h {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 7.5rem;
    padding: 1rem 1.1rem;
    color: #fff;
    background: linear-gradient(135deg, #1E3A8A, #4a3aa7);
}

.cm-trad-h.is-warm {
    background: linear-gradient(135deg, #7C2D12, #B45309);
}

.cm-trad-h > i {
    position: absolute;
    right: 1rem;
    top: .9rem;
    font-size: 3.4rem;
    opacity: .2;
}

.cm-trad-h h3 {
    font-family: var(--ip-fd);
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.45;
    color: #fff;
}

.cm-trad-month {
    position: absolute;
    left: 1.1rem;
    top: .9rem;
    padding: .1rem .7rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, .45);
    color: #fff;
    font-size: .8rem;
    font-weight: 700;
}

.cm-trad-b {
    padding: 1rem 1.1rem 1.1rem;
}

.cm-trad-b p {
    color: var(--ip-ink2);
    font-size: .94rem;
}

.cm-trad-b .cm-do {
    margin-top: .7rem !important;
    padding: .6rem .8rem;
    border-radius: var(--ip-rs);
    background: var(--ip-alt);
    font-size: .9rem;
    color: var(--ip-ink1);
}

.cm-do b {
    color: var(--ip-ink1);
}

.cm-clubs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .6rem;
}

.cm-clubs li {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    min-height: 48px;
    padding: .45rem 1rem .45rem .5rem;
    border-radius: 999px;
    background: var(--ip-card);
    border: 1px solid var(--ip-line);
    box-shadow: var(--ip-sh);
    color: var(--ip-ink1);
    font-weight: 600;
}

.cm-clubs li i {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: color-mix(in srgb, var(--ip-green) 15%, transparent);
    color: var(--ip-green);
}

.cm-wise li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .2rem .8rem;
    padding: .55rem 0;
    border-top: 1px dashed var(--ip-line2);
}

.cm-wise li:first-child {
    border-top: 0;
}

.cm-wise li span {
    color: var(--ip-ink1);
    font-weight: 600;
}

.cm-wise li small {
    grid-column: 1;
    color: var(--ip-ink3);
    font-size: .84rem;
}

.cm-wise li b {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    color: var(--ip-ink1);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.cm-swot li {
    display: flex;
    gap: .6rem;
    align-items: flex-start;
    padding: .55rem 0;
    border-top: 1px dashed var(--ip-line2);
    color: var(--ip-ink2);
    font-size: .95rem;
}

.cm-swot li:first-child {
    border-top: 0;
}

.cm-swot li > i {
    flex: none;
    margin-top: .3rem;
    color: var(--ip-green);
}

.cm-swot.is-limit li > i {
    color: var(--ip-orange);
}

/* ═══ ความคมชัดสูง ═══
   ไฟล์กลาง (css/tb1-display-scale.css) บังคับตัวอักษรขาว ลิงก์เหลือง พื้นดำ ด้วย !important
   ที่นี่จึงเปลี่ยนพื้นการ์ดทุกชั้นเป็นดำ เส้นขาว/เหลือง ตัวอักษรจะอ่านได้ทุกจุด */
html.tb1-contrast-high {
    --ip-ink1: #fff;
    --ip-ink2: #fff;
    --ip-ink3: #fff;
    --ip-page: #000;
    --ip-card: #000;
    --ip-alt: #000;
    --ip-line: #fff;
    --ip-line2: #facc15;
    --ip-link: #facc15;
    --ip-ok-ink: #fff;
    --ip-gold: #facc15;
    --ip-sh: none;
    --ip-sh2: none;
}

html.tb1-contrast-high .ip-hero,
html.tb1-contrast-high .cm-trad-h {
    background: #000 !important;
    border-bottom: 2px solid #facc15;
}

html.tb1-contrast-high .ip-hero-deco,
html.tb1-contrast-high .ip-hero-art,
html.tb1-contrast-high .ab-trophies {
    display: none;
}

html.tb1-contrast-high .ip :is(.ip-kpi, .ip-card, .ip-live, .ip-insights, .ip-fold, .ip-facts > div, .ip-go a, .ip-eyebrow, .ip-hero-meta li, .ip-hero-quote, .ip-hero-search, .ip-subnav a, .ip-pill, .ip-btn, .ip-chip, .ip-badge, .ip-about-note, .ab-level, .vi-goal, .cm-clubs li, .cm-do, .cm-trad-month, .cm-map-cover) {
    background: #000 !important;
    border: 2px solid #fff;
    box-shadow: none !important;
}

html.tb1-contrast-high .ip :is(.ip-kpi, .ip-pill, .ip-btn, .ip-subnav a, .ip-go a) {
    border-color: #facc15 !important;
}

html.tb1-contrast-high .ip :is(.ip-kpi-ic, .ip-card-ic, .ip-go a > i:first-child, .ip-insights li > i, .vi-str-n, .cm-clubs li i, .cm-map-cover > i) {
    background: #000 !important;
    color: #fff !important;
    border: 1px solid #fff;
}

html.tb1-contrast-high .ip .ip-kpi::before,
html.tb1-contrast-high .ip .ip-meter > i {
    background: #facc15 !important;
}

html.tb1-contrast-high .ip .ip-meter {
    border: 1px solid #fff;
}

html.tb1-contrast-high .ip .ip-subnav {
    background: #000;
}

html.tb1-contrast-high .ip .ip-subnav a.is-on,
html.tb1-contrast-high .ip .ip-btn.is-primary {
    background: #facc15 !important;
}

html.tb1-contrast-high .ip .ip-subnav a.is-on,
html.tb1-contrast-high .ip .ip-subnav a.is-on *,
html.tb1-contrast-high .ip .ip-btn.is-primary,
html.tb1-contrast-high .ip .ip-btn.is-primary * {
    color: #000 !important;
}

/* <button> ตอนชี้/โฟกัส: ไฟล์กลางกลับสีเป็นดำบนเหลือง (ตัวอักษรดำ) พื้นต้องเหลืองตาม */
html.tb1-contrast-high .ip button.ip-btn:is(:hover, :focus-visible) {
    background: #facc15 !important;
}

html.tb1-contrast-high .ip :is(.vi-part, .ip-go a[aria-current="page"]) {
    border-top-color: #facc15 !important;
}

html.tb1-contrast-high .ip-hero-search input {
    color: #fff;
}

/* ═══ พิมพ์ ═══ */
@media print {

    .ip-skip,
    .ip-subnav,
    .ip-hero-deco,
    .ip-hero-art,
    .ab-trophies,
    .ip-hero-search,
    .ip-tools,
    .ip-next,
    .cm-map,
    .tb1-navbar,
    nav.navbar,
    header.tb1-header,
    footer {
        display: none !important;
    }

    body.ip-page {
        background: #fff;
        font-size: 12px;
    }

    .ip-hero {
        padding: 1rem 0 1rem;
        color: #000;
        background: none !important;
    }

    .ip-hero h1,
    .ip-lead,
    .ip-lead strong {
        color: #000;
        text-shadow: none;
    }

    .ip-hero-meta li,
    .ip-eyebrow {
        background: none;
        color: #000;
        border: 1px solid #999;
    }

    .ip-hero-meta a {
        color: #000;
    }

    .ip-kpis {
        margin-top: 0 !important;
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .ip-rv,
    .ip-js .ip-rv {
        opacity: 1 !important;
        transform: none !important;
    }

    .ip-js .ip-rv .ip-meter > i {
        transform: none !important;
    }

    .ip-kpi,
    .ip-card,
    .ip-fold,
    .ip-facts > div,
    .ip-go a {
        box-shadow: none;
        break-inside: avoid;
    }

    .ip-page * {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .ip-sec {
        margin-top: 1.5rem;
    }

    .ip-sec-h {
        break-after: avoid;
        page-break-after: avoid;
    }

    /* รายการพับได้: กางทุกข้อบนกระดาษ */
    .ip-fold > summary::after {
        display: none;
    }
}
