/*
Theme Name: Healthcare Therapy Guide
Theme URI: https://healthcaretherapyguide.com/
Author: PSEO Expert
Author URI: https://pseo.expert/
Description: ธีมบล็อกสุขภาพสำหรับ healthcaretherapyguide.com — เลย์เอาต์บทความแบบ Grid/Flex แยกตามหมวดหมู่ Sidebar แบบ sticky พร้อมสารบัญอัตโนมัติ บทความยอดนิยม พื้นที่โฆษณา และ Schema สำหรับ SEO รองรับ Elementor เต็มรูปแบบ
Version: 3.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: htg
Tags: blog, health, grid, sidebar, elementor, thai, seo
*/

/* =========================================================
   1. Design tokens
   ---------------------------------------------------------
   แก้สีทั้งหมดได้จาก ปรับแต่ง (Customizer) > สีของธีม
   ค่าตรงนี้เป็นค่าสำรองกรณี Customizer ยังไม่ได้ตั้ง
   ========================================================= */
:root{
  /* ── สีจากพืช: ใบเตย ขมิ้น อัญชัน กระเจี๊ยบ ── */
  --htg-em:        #2e9e63;   /* ใบเตย — สีหลัก */
  --htg-em-deep:   #1f7a4c;
  --htg-em-dark:   #15603b;
  --htg-em-soft:   #e4f2e8;

  --htg-indigo:      #5a5fa8;   /* อัญชัน — ข้อมูล ตาราง ลิงก์อ้างอิง */
  --htg-indigo-soft: #ececf7;
  --htg-amber:       #d9a441;   /* ขมิ้น — เน้น ยอดนิยม */
  --htg-amber-soft:  #fbf2df;
  --htg-rose:        #b24a5c;   /* กระเจี๊ยบ — แม่และเด็ก คำเตือน */
  --htg-rose-soft:   #f7e8ea;

  /* ── พื้นและตัวอักษร ── */
  --htg-paper:     #f6f8f3;
  --htg-surface:   #ffffff;
  --htg-ink:       #1e2a22;
  --htg-ink-soft:  #5f6f63;
  --htg-line:      #e1e7dc;
  --htg-footer:    #1b2f24;

  /* ชื่อเดิม เผื่อส่วนอื่นเรียกใช้ */
  --htg-leaf:      var(--htg-em);
  --htg-leaf-deep: var(--htg-em-deep);
  --htg-leaf-dark: var(--htg-em-dark);
  --htg-leaf-soft: var(--htg-em-soft);
  --htg-mist:      var(--htg-em-soft);
  --htg-sky:       var(--htg-indigo);
  --htg-sky-soft:  var(--htg-indigo-soft);
  --htg-coral:     var(--htg-rose);
  --htg-coral-soft:var(--htg-rose-soft);
  --htg-violet:    #7a6aa8;
  --htg-violet-soft:#efecf7;
  --htg-accent:    var(--htg-amber);

  --htg-radius:    14px;
  --htg-radius-sm: 9px;
  --htg-shadow:    0 1px 2px rgba(30,42,34,.05), 0 16px 34px -24px rgba(30,42,34,.35);
  --htg-shadow-lg: 0 2px 4px rgba(30,42,34,.06), 0 28px 56px -34px rgba(30,42,34,.45);

  --htg-display: "Trirong", Georgia, serif;
  --htg-body:    "Anuphan", "Segoe UI", system-ui, sans-serif;
  --htg-mono:    "IBM Plex Mono", ui-monospace, monospace;

  --htg-wrap: 1240px;
  --htg-gap:  clamp(20px, 3vw, 44px);
  --htg-side: 336px;
}

html[data-htg-theme="night"]{
  --htg-paper:    #131a15;
  --htg-surface:  #1a241d;
  --htg-ink:      #e8efe8;
  --htg-ink-soft: #9aab9f;
  --htg-line:     #2a3830;
  --htg-footer:   #0e1712;
  --htg-em:       #55c187;
  --htg-em-deep:  #7ad3a3;
  --htg-em-dark:  #9ee0bb;
  --htg-em-soft:  #1c3327;
  --htg-indigo-soft:#242542;
  --htg-amber-soft: #33290f;
  --htg-rose-soft:  #332024;
}

/* =========================================================
   2. Reset & base
   ========================================================= */
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth;scroll-padding-top:104px}
body{
  margin:0;
  background:var(--htg-paper);
  color:var(--htg-ink);
  font-family:var(--htg-body);
  font-size:17px;
  line-height:1.9;
  -webkit-font-smoothing:antialiased;
}
img,svg,video{max-width:100%;height:auto;display:block}
a{color:var(--htg-leaf-deep);text-decoration-thickness:1px;text-underline-offset:3px}
a:hover{color:var(--htg-leaf)}
h1,h2,h3,h4,h5,h6{
  font-family:var(--htg-display);
  font-weight:600;
  line-height:1.35;
  color:var(--htg-ink);
  margin:0 0 .6em;
  letter-spacing:-.01em;
}
h1{font-size:clamp(1.9rem,1.2rem + 2.2vw,2.9rem);line-height:1.24}
h2{font-size:clamp(1.4rem,1.1rem + 1.1vw,1.9rem)}
h3{font-size:clamp(1.18rem,1.05rem + .5vw,1.4rem)}
p{margin:0 0 1.15em}
ul,ol{padding-inline-start:1.35em}
blockquote{
  margin:1.8em 0;padding:.2em 0 .2em 1.4em;
  border-inline-start:3px solid var(--htg-leaf);
  font-style:normal;color:var(--htg-ink-soft);
}
:focus-visible{outline:3px solid var(--htg-leaf);outline-offset:3px;border-radius:4px}
.htg-skip{position:absolute;left:-9999px;top:0;z-index:999;background:var(--htg-leaf-deep);color:#fff;padding:12px 20px;border-radius:0 0 10px 0}
.htg-skip:focus{left:0}
.screen-reader-text{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(1px,1px,1px,1px);white-space:nowrap}

.htg-wrap{width:min(100% - 2.4rem,var(--htg-wrap));margin-inline:auto}
.htg-eyebrow{
  font-family:var(--htg-mono);font-size:.68rem;letter-spacing:.16em;
  text-transform:uppercase;color:var(--htg-ink-soft);margin:0 0 .7em;display:block;
}

/* =========================================================
   3. Signature — เส้นเกลียว DNA (helix rule)
   ========================================================= */
.htg-helix{width:100%;height:22px;color:var(--htg-line);opacity:.9}
.htg-helix path{fill:none;stroke:currentColor;stroke-width:1.4}
.htg-helix .htg-helix-b{color:var(--htg-leaf);opacity:.55}

/* =========================================================
   4. Header
   ========================================================= */
.htg-topbar{
  background:var(--htg-em-dark);color:#e2f0e7;
  font-family:var(--htg-mono);font-size:.72rem;letter-spacing:.06em;
}
.htg-topbar .htg-wrap{display:flex;gap:1.2rem;justify-content:space-between;align-items:center;min-height:36px;flex-wrap:wrap}
.htg-topbar a{color:#fff}

.htg-header{
  position:sticky;top:0;z-index:60;
  background:color-mix(in srgb,var(--htg-paper) 88%,transparent);
  backdrop-filter:saturate(150%) blur(12px);
  border-bottom:1px solid var(--htg-line);
}
.htg-header-inner{display:flex;align-items:center;gap:1.5rem;min-height:74px}
.htg-brand{display:flex;align-items:center;gap:.7rem;flex:0 0 auto;text-decoration:none}
.htg-brand img{max-height:46px;width:auto}
.htg-brand-text{font-family:var(--htg-display);font-weight:700;font-size:1.05rem;color:var(--htg-ink);line-height:1.2}
.htg-brand-text small{display:block;font-family:var(--htg-mono);font-weight:400;font-size:.62rem;letter-spacing:.14em;text-transform:uppercase;color:var(--htg-ink-soft)}

.htg-nav{margin-inline-start:auto}
.htg-nav ul{display:flex;gap:.35rem;list-style:none;margin:0;padding:0}
.htg-nav a{
  font-family:var(--htg-display);font-size:.95rem;font-weight:500;
  color:var(--htg-ink);text-decoration:none;padding:.5rem .85rem;border-radius:99px;
  display:block;transition:background .18s,color .18s;
}
.htg-nav a:hover,.htg-nav .current-menu-item > a{background:var(--htg-mist);color:var(--htg-leaf-deep)}
.htg-nav .sub-menu{
  position:absolute;flex-direction:column;min-width:210px;padding:.4rem;
  background:var(--htg-surface);border:1px solid var(--htg-line);border-radius:12px;
  box-shadow:var(--htg-shadow);opacity:0;visibility:hidden;transform:translateY(6px);
  transition:.18s;
}
.htg-nav li{position:relative}
.htg-nav li:hover > .sub-menu,.htg-nav li:focus-within > .sub-menu{opacity:1;visibility:visible;transform:none}

.htg-actions{display:flex;align-items:center;gap:.5rem}
.htg-iconbtn{
  width:40px;height:40px;display:grid;place-items:center;border-radius:99px;
  border:1px solid var(--htg-line);background:var(--htg-surface);color:var(--htg-ink);
  cursor:pointer;transition:.18s;
}
.htg-iconbtn:hover{border-color:var(--htg-leaf);color:var(--htg-leaf-deep)}
.htg-iconbtn svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.7}
.htg-burger{display:none}

/* ค้นหาแบบ overlay */
.htg-searchbar{display:none;border-top:1px solid var(--htg-line);background:var(--htg-surface);padding:1.1rem 0}
.htg-searchbar.is-open{display:block}
.htg-searchbar form{display:flex;gap:.6rem}
.htg-searchbar input[type=search]{flex:1}

/* =========================================================
   5. ปุ่มและฟอร์ม
   ========================================================= */
.htg-btn{
  display:inline-flex;align-items:center;gap:.5rem;
  font-family:var(--htg-display);font-size:.93rem;font-weight:600;
  padding:.72rem 1.4rem;border-radius:99px;border:1px solid transparent;
  background:var(--htg-em-deep);
  color:#fff;text-decoration:none;cursor:pointer;box-shadow:none;
  transition:transform .16s,box-shadow .16s,filter .16s;
}
.htg-btn:hover{
  color:#fff;transform:translateY(-1px);filter:saturate(1.12) brightness(1.06);
  box-shadow:0 6px 20px -6px color-mix(in srgb,var(--htg-leaf) 60%,transparent);
}
.htg-btn--ghost{background:var(--htg-surface);color:var(--htg-ink);border-color:var(--htg-line);box-shadow:none}
.htg-btn--ghost:hover{background:var(--htg-mist);color:var(--htg-leaf-dark);border-color:var(--htg-leaf);filter:none}
.htg-btn--warm{background:var(--htg-amber);color:#2b2410}
.htg-btn--sky{background:var(--htg-indigo)}

input[type=text],input[type=search],input[type=email],input[type=url],input[type=tel],textarea,select{
  width:100%;font-family:var(--htg-display);font-size:.95rem;
  padding:.7rem 1rem;border:1px solid var(--htg-line);border-radius:10px;
  background:var(--htg-surface);color:var(--htg-ink);
}
input:focus,textarea:focus,select:focus{border-color:var(--htg-leaf);outline:none;box-shadow:0 0 0 3px color-mix(in srgb,var(--htg-leaf) 20%,transparent)}

/* =========================================================
   6. โครงหน้า 2 คอลัมน์
   ========================================================= */
.htg-shell{padding:clamp(28px,4vw,56px) 0 72px}
.htg-cols{display:grid;grid-template-columns:minmax(0,1fr) var(--htg-side);gap:var(--htg-gap);align-items:start}
.htg-cols--full{grid-template-columns:minmax(0,1fr)}
@media(max-width:1024px){.htg-cols{grid-template-columns:minmax(0,1fr)}}

/* =========================================================
   7. หัวข้อของหน้า (archive header)
   ========================================================= */
.htg-pagehead{
  padding:clamp(30px,4vw,54px) 0 8px;position:relative;
}
.htg-pagehead::before{
  content:"";position:absolute;inset-block-start:0;inset-inline:calc(50% - 50vw);height:100%;
  background:var(--htg-em-soft);
  z-index:-1;
}
.htg-pagehead h1{margin-bottom:.25em}
.htg-pagehead .htg-desc{color:var(--htg-ink-soft);max-width:62ch;margin:0}
.htg-crumbs{font-family:var(--htg-mono);font-size:.72rem;color:var(--htg-ink-soft);margin:0 0 1rem;display:flex;flex-wrap:wrap;gap:.45rem}
.htg-crumbs a{color:var(--htg-ink-soft);text-decoration:none}
.htg-crumbs a:hover{color:var(--htg-leaf)}

/* แถบกรองหมวดหมู่ */
.htg-catbar{display:flex;gap:.5rem;overflow-x:auto;padding:1.2rem 0 .4rem;scrollbar-width:thin}
.htg-catbar::-webkit-scrollbar{height:4px}
.htg-catbar::-webkit-scrollbar-thumb{background:var(--htg-line);border-radius:9px}
.htg-catbar a{
  flex:0 0 auto;font-family:var(--htg-display);font-size:.85rem;font-weight:500;
  padding:.45rem 1rem;border-radius:99px;border:1px solid var(--htg-line);
  background:var(--htg-surface);color:var(--htg-ink);text-decoration:none;white-space:nowrap;
}
.htg-catbar a:hover,.htg-catbar a.is-active{background:var(--htg-em-deep);border-color:transparent;color:#fff}
.htg-catbar a[style*="--htg-chip"]:hover,
.htg-catbar a[style*="--htg-chip"].is-active{
  background:var(--htg-chip);border-color:transparent;color:#fff;
}

/* =========================================================
   8. การ์ดบทความ — GRID
   ========================================================= */
.htg-grid{display:grid;gap:clamp(18px,2.2vw,30px);grid-template-columns:repeat(auto-fill,minmax(272px,1fr))}
.htg-grid--2{grid-template-columns:repeat(auto-fill,minmax(320px,1fr))}
.htg-grid > .htg-card--lead{grid-column:1/-1}

.htg-card{
  background:var(--htg-surface);border:1px solid var(--htg-line);border-radius:var(--htg-radius);
  overflow:hidden;display:flex;flex-direction:column;
  transition:transform .22s ease,box-shadow .22s ease,border-color .22s ease;
}
.htg-card::before{
  content:"";position:absolute;inset-block-start:0;inset-inline:0;height:4px;z-index:3;
  background:var(--htg-chip,var(--htg-leaf));
  transform:scaleX(0);transform-origin:left;transition:transform .28s ease;
}
.htg-card{position:relative}
.htg-card:hover::before{transform:scaleX(1)}
.htg-card:hover{transform:translateY(-3px);box-shadow:var(--htg-shadow);border-color:color-mix(in srgb,var(--htg-chip,var(--htg-leaf)) 42%,var(--htg-line))}
.htg-card-thumb{position:relative;aspect-ratio:16/10;overflow:hidden;background:var(--htg-mist);display:block}
.htg-card-thumb img{width:100%;height:100%;object-fit:cover;transition:transform .5s ease}
.htg-card:hover .htg-card-thumb img{transform:scale(1.045)}
.htg-card-body{padding:1.15rem 1.25rem 1.35rem;display:flex;flex-direction:column;gap:.55rem;flex:1}
.htg-card-title{font-size:1.08rem;margin:0;line-height:1.45}
.htg-card-title a{color:var(--htg-ink);text-decoration:none}
.htg-card-title a:hover{color:var(--htg-leaf-deep)}
.htg-card-excerpt{margin:0;font-size:.92rem;line-height:1.75;color:var(--htg-ink-soft)}
.htg-card-meta{
  margin-top:auto;padding-top:.7rem;border-top:1px dashed var(--htg-line);
  font-family:var(--htg-mono);font-size:.7rem;letter-spacing:.05em;color:var(--htg-ink-soft);
  display:flex;gap:.75rem;flex-wrap:wrap;align-items:center;
}

/* การ์ดเด่น — FLEX แนวนอน */
.htg-card--lead{flex-direction:row}
.htg-card--lead .htg-card-thumb{flex:0 0 52%;aspect-ratio:auto;min-height:290px}
.htg-card--lead .htg-card-body{padding:clamp(1.3rem,2.4vw,2.2rem);justify-content:center;gap:.8rem}
.htg-card--lead .htg-card-title{font-size:clamp(1.3rem,1rem + 1.1vw,1.85rem)}
.htg-card--lead .htg-card-excerpt{font-size:1rem}
@media(max-width:720px){
  .htg-card--lead{flex-direction:column}
  .htg-card--lead .htg-card-thumb{flex:auto;min-height:0;aspect-ratio:16/10}
}

/* ชิปหมวดหมู่ (สีต่อหมวดคำนวณอัตโนมัติจาก slug) */
.htg-chip{
  display:inline-flex;align-items:center;gap:.35rem;align-self:flex-start;
  font-family:var(--htg-mono);font-size:.65rem;letter-spacing:.12em;text-transform:uppercase;
  padding:.3rem .7rem;border-radius:99px;text-decoration:none;
  background:color-mix(in srgb,var(--htg-chip,var(--htg-leaf)) 14%,transparent);
  color:var(--htg-chip,var(--htg-leaf-deep));
  border:1px solid color-mix(in srgb,var(--htg-chip,var(--htg-leaf)) 30%,transparent);
}
.htg-chip:hover{background:var(--htg-chip,var(--htg-leaf));color:#fff}
.htg-chip--float{position:absolute;inset-block-start:12px;inset-inline-start:12px;background:rgba(255,255,255,.94);backdrop-filter:blur(4px)}

/* =========================================================
   9. แถวหมวดหมู่หน้าแรก — FLEX scroll
   ========================================================= */
.htg-row{margin-bottom:clamp(38px,5vw,68px);position:relative}
.htg-row--tint{
  padding:clamp(26px,3.5vw,46px) clamp(18px,2.5vw,34px);
  border-radius:calc(var(--htg-radius) + 8px);
  background:color-mix(in srgb,var(--htg-chip,var(--htg-leaf)) 7%,var(--htg-surface));
}
.htg-row-head{display:flex;align-items:flex-end;justify-content:space-between;gap:1rem;margin-bottom:1.1rem}
.htg-row-head h2{margin:0}
.htg-row-head .htg-eyebrow{margin-bottom:.35em}
.htg-row--tint .htg-row-head h2{color:color-mix(in srgb,var(--htg-chip,var(--htg-leaf)) 72%,var(--htg-ink))}
.htg-row--tint .htg-btn--ghost:hover{border-color:var(--htg-chip,var(--htg-leaf));color:var(--htg-chip,var(--htg-leaf))}
.htg-rail{display:flex;gap:clamp(16px,2vw,26px);overflow-x:auto;padding-bottom:.8rem;scroll-snap-type:x mandatory;scrollbar-width:thin}
.htg-rail::-webkit-scrollbar{height:5px}
.htg-rail::-webkit-scrollbar-thumb{background:var(--htg-line);border-radius:9px}
.htg-rail > .htg-card{flex:0 0 clamp(258px,30%,340px);scroll-snap-align:start}

/* =========================================================
   10. Sidebar
   ========================================================= */
.htg-sidebar{position:sticky;top:96px;display:flex;flex-direction:column;gap:20px}
@media(max-width:1024px){.htg-sidebar{position:static;top:auto}}
.htg-widget{
  background:var(--htg-surface);border:1px solid var(--htg-line);
  border-radius:var(--htg-radius);padding:1.25rem 1.35rem 1.4rem;
}
.htg-widget-title{
  font-family:var(--htg-display);font-size:.78rem;font-weight:700;letter-spacing:.12em;
  text-transform:uppercase;color:var(--htg-ink-soft);margin:0 0 1rem;
  display:flex;align-items:center;gap:.6rem;
}
.htg-widget-title::after{content:"";flex:1;height:1px;background:var(--htg-line)}
.htg-widget ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.15rem}
.htg-widget li a{color:var(--htg-ink);text-decoration:none;font-family:var(--htg-display);font-size:.92rem}
.htg-widget li a:hover{color:var(--htg-leaf-deep)}

/* รายการโพสต์ในไซด์บาร์ */
.htg-mini{display:flex;gap:.85rem;padding:.7rem 0;border-bottom:1px solid var(--htg-line);align-items:flex-start}
.htg-mini:last-child{border-bottom:0;padding-bottom:0}
.htg-mini:first-child{padding-top:0}
.htg-mini-thumb{flex:0 0 74px;aspect-ratio:1;border-radius:10px;overflow:hidden;background:var(--htg-mist)}
.htg-mini-thumb img{width:100%;height:100%;object-fit:cover}
.htg-mini h4{font-size:.9rem;line-height:1.5;margin:0 0 .3rem;font-weight:600}
.htg-mini h4 a{color:var(--htg-ink);text-decoration:none}
.htg-mini h4 a:hover{color:var(--htg-leaf-deep)}
.htg-mini time{font-family:var(--htg-mono);font-size:.66rem;color:var(--htg-ink-soft)}
.htg-mini-rank{
  flex:0 0 32px;height:32px;display:grid;place-items:center;border-radius:99px;
  font-family:var(--htg-mono);font-size:.78rem;font-weight:600;
  background:var(--htg-amber);color:#2b2410;box-shadow:none;
}
.htg-mini:nth-child(n+4) .htg-mini-rank{background:var(--htg-amber-soft);color:var(--htg-ink-soft);box-shadow:none}

/* หมวดหมู่ในไซด์บาร์ */
.htg-catlist li{display:flex;align-items:center;justify-content:space-between;gap:.6rem;padding:.5rem 0;border-bottom:1px solid var(--htg-line)}
.htg-catlist li:last-child{border-bottom:0}
.htg-catlist .htg-count{font-family:var(--htg-mono);font-size:.7rem;color:var(--htg-ink-soft);background:var(--htg-mist);padding:.15rem .5rem;border-radius:99px}

/* กล่อง CTA */
.htg-cta{
  background:var(--htg-em-dark);
  color:#eaf6f0;border:0;position:relative;overflow:hidden;
}
.htg-cta .htg-widget-title{color:rgba(255,255,255,.65)}
.htg-cta .htg-widget-title::after{background:rgba(255,255,255,.22)}
.htg-cta h3{color:#fff;font-size:1.15rem;margin:0 0 .5rem}
.htg-cta p{font-size:.9rem;line-height:1.7;color:rgba(255,255,255,.82);margin:0 0 1.1rem}
.htg-cta .htg-btn{background:#fff;color:var(--htg-leaf-dark);width:100%;justify-content:center;box-shadow:none}
.htg-cta .htg-btn:hover{background:var(--htg-leaf-soft);color:var(--htg-leaf-dark);filter:none}
.htg-cta-helix{position:absolute;inset-block-end:-14px;inset-inline-end:-24px;width:150px;opacity:.16;color:#fff}

/* พื้นที่โฆษณา */
.htg-ad{
  border:1px dashed var(--htg-line);background:var(--htg-mist);
  border-radius:var(--htg-radius);padding:1rem;text-align:center;
}
.htg-ad-label{font-family:var(--htg-mono);font-size:.6rem;letter-spacing:.18em;text-transform:uppercase;color:var(--htg-ink-soft);margin:0 0 .6rem}
.htg-ad-slot{min-height:250px;display:grid;place-items:center;color:var(--htg-ink-soft);font-family:var(--htg-mono);font-size:.72rem}
.htg-ad-slot img{margin-inline:auto}

/* =========================================================
   11. สารบัญ + เกลียว DNA (signature)
   ========================================================= */
.htg-toc{padding-inline-start:1.35rem;position:relative}
.htg-toc-rail{position:absolute;inset-block:0;inset-inline-start:0;width:16px;pointer-events:none}
.htg-toc-rail svg{width:16px;height:100%}
.htg-toc-rail path{fill:none;stroke-width:1.5;vector-effect:non-scaling-stroke}
.htg-toc-rail .htg-strand{stroke:var(--htg-line)}
.htg-toc-rail .htg-strand-live{stroke:var(--htg-leaf);stroke-dasharray:var(--htg-len,1000);stroke-dashoffset:var(--htg-off,1000);transition:stroke-dashoffset .12s linear}
.htg-toc ol{list-style:none;margin:0;padding:0;counter-reset:htgtoc;display:flex;flex-direction:column;gap:.1rem}
.htg-toc li a{
  display:block;padding:.4rem .1rem;font-family:var(--htg-display);font-size:.88rem;
  line-height:1.55;color:var(--htg-ink-soft);text-decoration:none;border-inline-start:2px solid transparent;padding-inline-start:.7rem;margin-inline-start:-.7rem;
}
.htg-toc li a:hover{color:var(--htg-leaf-deep)}
.htg-toc li.is-current > a{color:var(--htg-leaf-deep);font-weight:600}
.htg-toc li.htg-toc-h3 a{padding-inline-start:1.6rem;font-size:.83rem}

/* แถบความคืบหน้าการอ่าน */
.htg-progress{position:fixed;inset-block-start:0;inset-inline:0;height:3px;background:transparent;z-index:80}
.htg-progress span{display:block;height:100%;width:0;background:var(--htg-em)}

/* =========================================================
   12. บทความเดี่ยว
   ========================================================= */
.htg-hero{padding:clamp(28px,4vw,52px) 0 0}
.htg-hero h1{max-width:22ch}
.htg-hero-meta{
  display:flex;flex-wrap:wrap;gap:.5rem 1.3rem;align-items:center;
  font-family:var(--htg-mono);font-size:.73rem;letter-spacing:.05em;color:var(--htg-ink-soft);
  padding:1rem 0;border-block:1px solid var(--htg-line);margin-top:1.2rem;
}
.htg-hero-meta strong{font-weight:600;color:var(--htg-ink)}
.htg-hero-figure{margin:1.8rem 0 0;border-radius:var(--htg-radius);overflow:hidden;aspect-ratio:16/8;background:var(--htg-mist)}
.htg-hero-figure img{width:100%;height:100%;object-fit:cover}

.htg-article{max-width:none;font-size:1.06rem}
.htg-article > *{max-width:74ch}
.htg-article > .alignwide,.htg-article > .alignfull,.htg-article > figure,.htg-article > .wp-block-image,.htg-article > table,.htg-article > .wp-block-table{max-width:none}

/* หัวข้อ H2 มีแถบสีนำ อ่านแล้วเห็นโครงเรื่องชัด */
.htg-article h2{
  margin-top:2.1em;padding-top:.15em;padding-inline-start:.85rem;
  border-inline-start:5px solid var(--htg-leaf);
  color:var(--htg-leaf-dark);
}
.htg-article h3{margin-top:1.6em;color:var(--htg-ink)}
.htg-article h3::before{
  content:"";display:inline-block;width:7px;height:7px;border-radius:99px;
  background:var(--htg-amber);margin-inline-end:.55rem;vertical-align:middle;
}
.htg-article a{color:var(--htg-sky);text-decoration-color:color-mix(in srgb,var(--htg-sky) 45%,transparent)}
.htg-article a:hover{color:var(--htg-leaf-deep)}
.htg-article strong{color:var(--htg-leaf-dark)}

.htg-article img{border-radius:var(--htg-radius-sm)}
.htg-article figure{margin:1.8em 0}
.htg-article figcaption{font-family:var(--htg-mono);font-size:.72rem;color:var(--htg-ink-soft);margin-top:.6em;text-align:center}

/* ตาราง — หัวเขียว แถวสลับสี ชี้แล้วไฮไลต์ฟ้า */
.htg-article table,.htg-article .wp-block-table table{
  width:100%;border-collapse:separate;border-spacing:0;
  font-family:var(--htg-display);font-size:.93rem;margin:1.8em 0;
  border:1px solid var(--htg-line);border-radius:var(--htg-radius);overflow:hidden;
  box-shadow:var(--htg-shadow);
}
.htg-article thead th{
  background:var(--htg-em-dark);
  color:#fff;font-weight:600;letter-spacing:.01em;border:0;
}
.htg-article th,.htg-article td{padding:.8rem 1rem;text-align:start;border:0;border-block-end:1px solid var(--htg-line)}
.htg-article tbody tr:nth-child(even){background:var(--htg-mist)}
.htg-article tbody tr:hover{background:var(--htg-sky-soft)}
.htg-article tbody tr:last-child td{border-block-end:0}
.htg-article .wp-block-table{overflow-x:auto}

.htg-article li{margin-bottom:.4em}
.htg-article ul li::marker{color:var(--htg-leaf)}
.htg-article ol li::marker{color:var(--htg-amber);font-family:var(--htg-mono);font-weight:600}

/* คำพูดอ้างอิง — กล่องสีอำพัน */
.htg-article blockquote{
  margin:1.9em 0;padding:1.2rem 1.4rem;
  background:var(--htg-amber-soft);
  border:0;border-inline-start:5px solid var(--htg-amber);
  border-radius:0 var(--htg-radius) var(--htg-radius) 0;
  color:var(--htg-ink);font-style:normal;
}
.htg-article blockquote p:last-child{margin-bottom:0}

/* กล่องข้อความพิเศษ — ใส่คลาสในบล็อกย่อหน้าได้เลย */
.htg-note,.htg-tip,.htg-warn{
  padding:1.1rem 1.3rem;border-radius:var(--htg-radius);margin:1.7em 0;
  border-inline-start:5px solid;font-size:.97rem;line-height:1.8;
}
.htg-tip{background:var(--htg-leaf-soft);border-color:var(--htg-leaf)}
.htg-note{background:var(--htg-sky-soft);border-color:var(--htg-sky)}
.htg-warn{background:var(--htg-coral-soft);border-color:var(--htg-coral)}

.htg-anchor{position:relative}

.htg-tags{display:flex;flex-wrap:wrap;gap:.5rem;margin:2.4rem 0 0}
.htg-tags a{
  font-family:var(--htg-mono);font-size:.72rem;padding:.35rem .8rem;border-radius:99px;
  background:var(--htg-mist);color:var(--htg-ink-soft);text-decoration:none;
}
.htg-tags a:hover{background:var(--htg-violet);color:#fff}

.htg-share{display:flex;align-items:center;gap:.6rem;flex-wrap:wrap;margin:1.6rem 0 0;padding-top:1.4rem;border-top:1px solid var(--htg-line)}
.htg-share span{font-family:var(--htg-mono);font-size:.7rem;letter-spacing:.12em;text-transform:uppercase;color:var(--htg-ink-soft)}

.htg-author{
  display:flex;gap:1.1rem;align-items:flex-start;margin:2.4rem 0 0;padding:1.4rem;
  background:var(--htg-mist);border-radius:var(--htg-radius);
}
.htg-author img{border-radius:99px;flex:0 0 62px}
.htg-author h4{margin:0 0 .3rem;font-size:1rem}
.htg-author p{margin:0;font-size:.9rem;color:var(--htg-ink-soft);line-height:1.7}

.htg-related{margin-top:clamp(40px,5vw,66px)}
.htg-related h2{font-size:1.35rem;margin-bottom:1.2rem}

.htg-prevnext{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:2.4rem}
@media(max-width:640px){.htg-prevnext{grid-template-columns:1fr}}
.htg-prevnext a{
  display:block;padding:1rem 1.2rem;border:1px solid var(--htg-line);border-radius:var(--htg-radius);
  background:var(--htg-surface);text-decoration:none;
}
.htg-prevnext a:hover{border-color:var(--htg-leaf)}
.htg-prevnext .htg-eyebrow{margin-bottom:.35em}
.htg-prevnext strong{font-family:var(--htg-display);font-size:.95rem;color:var(--htg-ink);font-weight:600;line-height:1.5;display:block}
.htg-prevnext .htg-next{text-align:end}

/* =========================================================
   13. หน้าแรก — hero
   ========================================================= */
.htg-front-hero{padding:clamp(34px,5vw,68px) 0 clamp(28px,4vw,48px)}
.htg-front-hero h1{max-width:18ch;margin-bottom:.4em}
.htg-front-hero .htg-lead{font-size:1.08rem;color:var(--htg-ink-soft);max-width:56ch;margin:0 0 1.6rem}
.htg-front-split{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,.85fr);gap:var(--htg-gap);align-items:center}
@media(max-width:900px){.htg-front-split{grid-template-columns:1fr}}
.htg-stats{display:flex;gap:1rem;flex-wrap:wrap;margin-top:1.8rem;padding-top:0;border-top:0}
.htg-stat{
  flex:1 1 130px;padding:.9rem 1.1rem;border-radius:var(--htg-radius);
  background:color-mix(in srgb,var(--htg-stat,var(--htg-leaf)) 10%,transparent);
  border:1px solid color-mix(in srgb,var(--htg-stat,var(--htg-leaf)) 24%,transparent);
}
.htg-stat b{
  display:block;font-family:var(--htg-display);font-size:1.7rem;font-weight:700;line-height:1.2;
  color:color-mix(in srgb,var(--htg-stat,var(--htg-leaf)) 78%,var(--htg-ink));
}
.htg-stat span{font-family:var(--htg-mono);font-size:.66rem;letter-spacing:.1em;text-transform:uppercase;color:var(--htg-ink-soft)}

/* =========================================================
   14. Pagination
   ========================================================= */
.htg-pagination{margin-top:clamp(34px,4vw,54px);display:flex;justify-content:center}
.htg-pagination .page-numbers{
  display:inline-grid;place-items:center;min-width:42px;height:42px;padding:0 .8rem;
  border:1px solid var(--htg-line);border-radius:99px;margin:0 .2rem;
  font-family:var(--htg-mono);font-size:.85rem;color:var(--htg-ink);text-decoration:none;background:var(--htg-surface);
}
.htg-pagination .page-numbers:hover{border-color:var(--htg-leaf);color:var(--htg-leaf-deep)}
.htg-pagination .current{background:var(--htg-em-deep);border-color:transparent;color:#fff}
.htg-pagination .dots{border-color:transparent;background:transparent}

/* =========================================================
   15. Comments
   ========================================================= */
.htg-comments{margin-top:clamp(40px,5vw,64px);padding-top:2rem;border-top:1px solid var(--htg-line)}
.htg-comments ol{list-style:none;padding:0;margin:0}
.htg-comments .children{list-style:none;padding-inline-start:1.4rem;margin-top:1rem}
.htg-comments .comment-body{background:var(--htg-surface);border:1px solid var(--htg-line);border-radius:var(--htg-radius);padding:1.1rem 1.3rem;margin-bottom:1rem}
.htg-comments .comment-meta{font-family:var(--htg-mono);font-size:.7rem;color:var(--htg-ink-soft);margin-bottom:.5rem}
.htg-comments .comment-author img{border-radius:99px;display:inline-block;vertical-align:middle;margin-inline-end:.5rem}
.comment-form label{display:block;font-family:var(--htg-display);font-size:.85rem;font-weight:600;margin-bottom:.35rem}
.comment-form p{margin-bottom:1rem}
.comment-form .submit{
  font-family:var(--htg-display);font-weight:600;padding:.72rem 1.5rem;border-radius:99px;
  border:0;background:var(--htg-leaf-deep);color:#fff;cursor:pointer;
}

/* =========================================================
   16. 404 / ไม่พบผลลัพธ์
   ========================================================= */
.htg-empty{text-align:center;padding:clamp(50px,8vw,110px) 0;max-width:56ch;margin-inline:auto}
.htg-empty .htg-code{font-family:var(--htg-mono);font-size:clamp(3rem,10vw,5.5rem);color:var(--htg-line);line-height:1;margin:0 0 .4rem}
.htg-empty p{color:var(--htg-ink-soft)}
.htg-empty form{max-width:420px;margin:1.6rem auto 0;display:flex;gap:.6rem}

/* =========================================================
   17. แถบชวนติดต่อเหนือส่วนท้าย
   ========================================================= */
.htg-prefooter{
  position:relative;overflow:hidden;margin-top:clamp(48px,6vw,84px);
  background:var(--htg-em-dark);
  color:#e6f3ec;padding:clamp(34px,4.5vw,58px) 0;
}
.htg-prefooter-inner{
  display:grid;grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);
  gap:clamp(20px,3vw,48px);align-items:center;position:relative;z-index:2;
}
@media(max-width:820px){.htg-prefooter-inner{grid-template-columns:1fr}}
.htg-prefooter .htg-eyebrow{color:#8fc4ab}
.htg-prefooter h2{color:#fff;margin:0 0 .5rem;max-width:24ch}
.htg-prefooter p{margin:0;color:rgba(255,255,255,.8);max-width:58ch;font-size:.98rem}
.htg-prefooter-action{display:flex;flex-direction:column;gap:1rem;align-items:flex-start}
@media(min-width:821px){.htg-prefooter-action{align-items:flex-end}}
.htg-prefooter .htg-btn{background:#fff;color:var(--htg-leaf-dark);box-shadow:none}
.htg-prefooter .htg-btn:hover{background:var(--htg-leaf-soft);color:var(--htg-leaf-dark);filter:none}
.htg-prefooter-helix{
  position:absolute;inset-block-end:-10px;inset-inline:0;height:70px;
  color:rgba(255,255,255,.16);z-index:1;
}

/* =========================================================
   18. Footer
   ========================================================= */
.htg-footer{background:var(--htg-footer);color:#c4d5c8;padding-top:clamp(44px,5vw,72px)}
.htg-footer a{color:#c4d5c8;text-decoration:none}
.htg-footer a:hover{color:#fff}
.htg-footer-cols{
  display:grid;grid-template-columns:1.6fr 1fr 1fr 1.2fr;
  gap:clamp(26px,3vw,52px);padding-bottom:2.6rem;
}
@media(max-width:940px){.htg-footer-cols{grid-template-columns:1fr 1fr;gap:32px}}
@media(max-width:560px){.htg-footer-cols{grid-template-columns:1fr}}
.htg-footer-col{min-width:0}

/* หัวข้อคอลัมน์ — ครอบวิดเจ็ต WordPress ด้วย */
.htg-f-title,
.htg-footer .htg-widget-title,
.htg-footer .widget-title,
.htg-footer .wp-block-heading,
.htg-footer h2,.htg-footer h3,.htg-footer h4{
  font-family:var(--htg-mono);font-size:.66rem!important;font-weight:600;
  letter-spacing:.15em;text-transform:uppercase;color:rgba(255,255,255,.5)!important;
  margin:0 0 1.1rem;padding:0 0 .7rem;border-bottom:1px solid rgba(255,255,255,.12);
  display:block;line-height:1.6;
}
.htg-f-title::after,.htg-footer .htg-widget-title::after{content:none}

/* รายการลิงก์ */
.htg-footer ul{list-style:none;margin:0;padding:0}
.htg-f-list li,.htg-footer .widget li,.htg-footer .wp-block-list li{
  padding:.4rem 0;font-size:.92rem;border:0;
}
.htg-footer .htg-widget{background:transparent;border:0;padding:0}

/* คอลัมน์แบรนด์ */
.htg-footer-logo{max-height:52px;width:auto;margin-bottom:1rem}
.htg-footer-name{
  font-family:var(--htg-display);font-size:1.2rem;font-weight:600;
  color:#fff;margin:0 0 .8rem;line-height:1.3;
}
.htg-footer-desc{font-size:.9rem;line-height:1.85;color:#93a897;margin:0 0 1.4rem;max-width:38ch}

.htg-contact{display:flex;flex-direction:column;gap:.5rem;margin:0 0 1.3rem;padding:0;list-style:none}
.htg-contact li{display:flex;gap:.8rem;padding:0;font-size:.9rem;line-height:1.65;border:0}
.htg-contact-label{
  flex:0 0 62px;font-family:var(--htg-mono);font-size:.63rem;letter-spacing:.1em;
  text-transform:uppercase;color:#7d9384;padding-top:.28rem;font-weight:500;
}

.htg-social{display:flex;gap:.5rem;flex-wrap:wrap;margin:0;padding:0;list-style:none}
.htg-social li{padding:0;border:0}
.htg-social a{
  width:38px;height:38px;display:grid;place-items:center;border-radius:999px;
  border:1px solid rgba(255,255,255,.18);color:#c4d5c8;transition:.18s;
}
.htg-social a:hover{background:#fff;border-color:#fff;color:var(--htg-footer)}
.htg-social svg{width:17px;height:17px;fill:currentColor}
.htg-prefooter .htg-social a{border-color:rgba(255,255,255,.28);color:#fff}
.htg-prefooter .htg-social a:hover{background:#fff;color:var(--htg-em-dark)}

/* บทความล่าสุดในส่วนท้าย */
.htg-footer-posts{display:flex;flex-direction:column;gap:1rem}
.htg-footer-post{display:flex;gap:.8rem;align-items:flex-start}
.htg-footer-post-thumb{
  flex:0 0 48px;height:48px;border-radius:10px;overflow:hidden;display:grid;place-items:center;
  background:color-mix(in srgb,var(--htg-hue,var(--htg-em)) 26%,transparent);
}
.htg-footer-post-thumb img{width:100%;height:100%;object-fit:cover}
.htg-footer-post-thumb svg{width:22px;height:22px;stroke:#fff;fill:none;stroke-width:1.6;opacity:.8}
.htg-footer-post-text{min-width:0}
.htg-footer-post strong{
  display:block;font-family:var(--htg-body);font-size:.87rem;font-weight:500;
  line-height:1.5;color:#dbe7dd;margin-bottom:.2rem;
}
.htg-footer-post:hover strong{color:#fff}
.htg-footer-post time{font-family:var(--htg-mono);font-size:.65rem;color:#7d9384}
.htg-footer-empty{font-size:.86rem;color:#7d9384;margin:0}

/* ข้อจำกัดความรับผิดชอบ */
.htg-disclaimer{
  display:flex;gap:1.1rem;flex-wrap:wrap;padding:1.15rem 1.35rem;margin-bottom:1.4rem;
  background:rgba(255,255,255,.045);border:1px solid rgba(255,255,255,.1);border-radius:var(--htg-radius);
}
.htg-disclaimer b{
  font-family:var(--htg-mono);font-size:.62rem;letter-spacing:.13em;text-transform:uppercase;
  color:#8bbf9d;padding-top:.25rem;flex:0 0 auto;
}
.htg-disclaimer p{font-size:.82rem;line-height:1.85;color:#93a897;margin:0;flex:1 1 340px}

.htg-footer-bottom{
  border-top:1px solid rgba(255,255,255,.1);padding:1.3rem 0;
  font-family:var(--htg-mono);font-size:.7rem;color:#7d9384;
  display:flex;justify-content:space-between;gap:.8rem 1.6rem;flex-wrap:wrap;align-items:center;
}
.htg-legal-menu{display:flex;gap:1.4rem;list-style:none;margin:0;padding:0;flex-wrap:wrap}
.htg-legal-menu li{padding:0;border:0}

/* =========================================================
   19. Elementor compat + utilities
   ========================================================= */
.htg-elementor-page .htg-shell{padding:0}
.elementor-page .htg-article > *{max-width:none}
.htg-hidden{display:none!important}
.htg-mt0{margin-top:0}

@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important}
}

@media print{
  .htg-header,.htg-footer,.htg-sidebar,.htg-progress,.htg-share,.htg-related{display:none!important}
  .htg-cols{grid-template-columns:1fr}
}

/* =========================================================
   20. ชิ้นส่วนย่อย
   ========================================================= */
.htg-content{min-width:0}
.htg-searchform{display:flex;gap:.6rem;align-items:stretch}
.htg-searchform input[type=search]{flex:1}
.htg-searchform .htg-btn{flex:0 0 auto}

.htg-thumb-placeholder{
  position:absolute;inset:0;display:grid;place-items:center;overflow:hidden;
  background:
    color-mix(in srgb,var(--htg-chip,var(--htg-leaf)) 10%,var(--htg-surface));
}
.htg-thumb-label{
  font-family:var(--htg-mono);font-size:.7rem;letter-spacing:.2em;text-transform:uppercase;
  color:color-mix(in srgb,var(--htg-chip,var(--htg-leaf)) 78%,var(--htg-ink));
  padding:.4rem .9rem;border:1px solid color-mix(in srgb,var(--htg-chip,var(--htg-leaf)) 34%,transparent);
  border-radius:99px;background:color-mix(in srgb,var(--htg-surface) 72%,transparent);
  max-width:80%;text-align:center;line-height:1.4;
}
.htg-thumb-helix{
  position:absolute;inset-inline:0;inset-block-end:14%;height:40px;
  color:color-mix(in srgb,var(--htg-chip,var(--htg-leaf)) 40%,transparent);opacity:.75;
}
.htg-thumb-helix .htg-helix-b{color:color-mix(in srgb,var(--htg-chip,var(--htg-leaf)) 22%,transparent)}

/* Elementor / page builder — ต้องเต็มความกว้างเสมอ */
.htg-builder-page{max-width:none;margin:0}
.htg-builder-page > *{max-width:none}
.htg-elementor-page .htg-shell{padding:0}

.htg-ad--empty{opacity:.7}
.htg-ad--empty .htg-ad-slot{min-height:120px;padding:1rem;line-height:1.7}

.htg-minilist{display:flex;flex-direction:column}

.htg-topbar-menu{display:flex;gap:1rem;list-style:none;margin:0;padding:0}
.htg-topbar-menu a{text-decoration:none;opacity:.85}
.htg-topbar-menu a:hover{opacity:1}

.htg-ad--incontent{margin:2.2rem 0;max-width:none}
.htg-ad--incontent .htg-ad-slot{min-height:0}

.htg-widget--toc{padding-bottom:1.6rem}

@media(max-width:720px){
  .htg-header-cta{display:none}
  .htg-topbar-menu{display:none}
}

/* วิดเจ็ตมาตรฐานของ WordPress ให้เข้าธีม */
.htg-widget .wp-block-search__inside-wrapper{display:flex;gap:.5rem}
.htg-widget select{margin-top:.4rem}
.htg-widget .wp-block-latest-posts li,
.htg-widget .wp-block-categories li,
.htg-widget .wp-block-archives li{padding:.4rem 0;border-bottom:1px solid var(--htg-line)}
.htg-widget .wp-block-latest-posts li:last-child,
.htg-widget .wp-block-categories li:last-child{border-bottom:0}

/* =========================================================
   21. หน้าแรก — บล็อกใหม่
   ========================================================= */
.htg-hero-front{padding:clamp(40px,6vw,86px) 0 clamp(28px,4vw,52px)}
.htg-hero-grid{display:grid;grid-template-columns:minmax(0,1.32fr) minmax(0,1fr);gap:clamp(28px,4vw,64px);align-items:center}
@media(max-width:900px){.htg-hero-grid{grid-template-columns:1fr}}
.htg-hero-copy h1{font-size:clamp(2rem,1.3rem + 2.7vw,3.3rem);line-height:1.24;font-weight:700;margin-bottom:.45em}
.htg-hero-copy h1 em{font-style:normal;color:var(--htg-em-dark);position:relative;display:inline-block}
.htg-hero-copy h1 em::after{
  content:"";position:absolute;left:0;right:0;bottom:.1em;height:.3em;
  background:var(--htg-amber);opacity:.42;border-radius:2px;z-index:-1;
}
.htg-lead{font-size:1.06rem;color:var(--htg-ink-soft);max-width:48ch;margin:0}
.htg-hero-cta{display:flex;gap:.7rem;flex-wrap:wrap;margin-top:1.7rem}

.htg-btn--line{background:var(--htg-surface);color:var(--htg-ink);border-color:var(--htg-line);box-shadow:none}
.htg-btn--line:hover{background:var(--htg-em-soft);border-color:var(--htg-em);color:var(--htg-em-dark);filter:none}
.htg-btn--rose{background:var(--htg-rose)}

/* การ์ดคำถาม */
.htg-ask{
  background:var(--htg-surface);border:1px solid var(--htg-line);
  border-radius:calc(var(--htg-radius) + 6px);padding:1.5rem 1.5rem 1.1rem;
  box-shadow:var(--htg-shadow-lg);
}
.htg-ask-head{display:flex;align-items:baseline;justify-content:space-between;gap:1rem;margin-bottom:.9rem}
.htg-ask-head h2{font-family:var(--htg-body);font-size:1.02rem;font-weight:600;margin:0}
.htg-ask-head span{font-family:var(--htg-mono);font-size:.66rem;color:var(--htg-ink-soft);letter-spacing:.1em}
.htg-ask ol{list-style:none;margin:0;padding:0}
.htg-ask li{border-top:1px solid var(--htg-line)}
.htg-ask li a{
  display:grid;grid-template-columns:auto 1fr auto;gap:.85rem;align-items:center;
  padding:.85rem .2rem;font-size:.96rem;line-height:1.55;color:var(--htg-ink);
  text-decoration:none;transition:.18s;
}
.htg-ask li a:hover{padding-inline:.55rem .2rem;background:var(--htg-em-soft)}
.htg-ask-rank{
  font-family:var(--htg-mono);font-size:.7rem;font-weight:600;
  width:25px;height:25px;border-radius:999px;display:grid;place-items:center;
  background:var(--htg-em-soft);color:var(--htg-em-dark);
}
.htg-ask li a:hover .htg-ask-rank{background:var(--htg-em);color:#fff}
.htg-ask-arrow{color:var(--htg-ink-soft);font-family:var(--htg-mono);transition:transform .18s}
.htg-ask li a:hover .htg-ask-arrow{transform:translateX(3px);color:var(--htg-em-dark)}
.htg-ask-foot{padding-top:.75rem;border-top:1px solid var(--htg-line)}
.htg-ask-foot a{font-size:.86rem;color:var(--htg-em-dark);font-weight:600;text-decoration:none}

/* แถบแหล่งอ้างอิง */
.htg-refs{border-block:1px solid var(--htg-line);background:var(--htg-surface)}
.htg-refs .htg-wrap{display:flex;align-items:center;gap:clamp(16px,3vw,44px);padding:1.1rem 0;flex-wrap:wrap}
.htg-refs b{font-family:var(--htg-mono);font-size:.66rem;letter-spacing:.15em;text-transform:uppercase;color:var(--htg-ink-soft);font-weight:500}
.htg-refs ul{display:flex;gap:clamp(14px,2.4vw,34px);list-style:none;margin:0;padding:0;flex-wrap:wrap}
.htg-refs li{font-size:.88rem;display:flex;align-items:center;gap:.45rem}
.htg-refs li::before{content:"";width:6px;height:6px;border-radius:999px;background:var(--htg-em);flex:0 0 auto}

/* หัวข้อของ section */
.htg-section{padding:clamp(44px,6vw,86px) 0}
.htg-sec-head{display:flex;align-items:flex-end;justify-content:space-between;gap:1.4rem;margin-bottom:2rem;flex-wrap:wrap}
.htg-sec-head h2{margin:0;max-width:20ch}
.htg-sec-head p{margin:0;color:var(--htg-ink-soft);max-width:42ch;font-size:.95rem}

/* การ์ดหัวข้อสุขภาพ */
.htg-topics{display:grid;grid-template-columns:repeat(auto-fit,minmax(238px,1fr));gap:18px}
.htg-topic{
  background:var(--htg-surface);border:1px solid var(--htg-line);border-radius:var(--htg-radius);
  padding:1.5rem 1.4rem 1.4rem;position:relative;overflow:hidden;display:block;
  text-decoration:none;color:var(--htg-ink);
  transition:transform .22s,box-shadow .22s,border-color .22s;
}
.htg-topic::after{
  content:"";position:absolute;inset-inline:0;top:0;height:4px;background:var(--htg-hue,var(--htg-em));
  transform:scaleX(0);transform-origin:left;transition:transform .3s ease;
}
.htg-topic:hover{transform:translateY(-4px);border-color:color-mix(in srgb,var(--htg-hue,var(--htg-em)) 45%,var(--htg-line));box-shadow:0 24px 44px -30px color-mix(in srgb,var(--htg-hue,var(--htg-em)) 80%,transparent)}
.htg-topic:hover::after{transform:scaleX(1)}
.htg-topic-ico{width:44px;height:44px;border-radius:13px;display:grid;place-items:center;margin-bottom:1rem;background:color-mix(in srgb,var(--htg-hue,var(--htg-em)) 14%,transparent)}
.htg-topic-ico svg{width:22px;height:22px;stroke:var(--htg-hue,var(--htg-em));fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.htg-topic h3{font-size:1.15rem;margin-bottom:.4rem}
.htg-topic p{font-size:.9rem;color:var(--htg-ink-soft);margin:0 0 1rem;line-height:1.7}
.htg-topic-more{font-family:var(--htg-mono);font-size:.72rem;letter-spacing:.06em;color:var(--htg-hue,var(--htg-em));font-weight:600}

/* ─── ไทม์ไลน์ ─── */
.htg-band{background:var(--htg-surface);border-block:1px solid var(--htg-line);padding:clamp(44px,6vw,86px) 0}
.htg-tl-intro{max-width:56ch}
.htg-tl-intro p:last-child{color:var(--htg-ink-soft);margin:0}
.htg-ruler{position:relative;margin:3.4rem 0 2.6rem;padding-top:118px}
.htg-ruler-line{position:relative;height:8px;border-radius:999px;background:var(--htg-line)}
.htg-ruler-fill{position:absolute;inset:0;border-radius:999px;background:var(--htg-em);transform-origin:left;transform:scaleX(0);animation:htg-grow 1.4s cubic-bezier(.22,1,.36,1) .2s forwards}
@keyframes htg-grow{to{transform:scaleX(1)}}
.htg-ticks{display:flex;justify-content:space-between;margin-top:.6rem}
.htg-ticks span{font-family:var(--htg-mono);font-size:.7rem;color:var(--htg-ink-soft)}
.htg-mark{position:absolute;bottom:100%;transform:translateX(-50%);padding-bottom:16px;text-align:center;width:158px}
.htg-mark::after{content:"";position:absolute;left:50%;bottom:0;width:2px;height:16px;background:var(--htg-hue);opacity:.55;transform:translateX(-50%)}
.htg-mark b{display:block;font-family:var(--htg-mono);font-size:.82rem;font-weight:600;color:var(--htg-hue);margin-bottom:.15rem}
.htg-mark span{display:block;font-size:.8rem;line-height:1.45;color:var(--htg-ink-soft)}
.htg-mark-dot{position:absolute;left:50%;bottom:-5px;width:11px;height:11px;border-radius:999px;background:var(--htg-hue);border:2.5px solid var(--htg-surface);transform:translateX(-50%);z-index:2}
.htg-tl-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:16px}
.htg-tl-card{border:1px solid var(--htg-line);border-radius:var(--htg-radius);padding:1.2rem 1.3rem;background:color-mix(in srgb,var(--htg-hue) 6%,var(--htg-surface))}
.htg-tl-wk{display:block;font-family:var(--htg-mono);font-size:.68rem;letter-spacing:.12em;text-transform:uppercase;color:var(--htg-hue);font-weight:600;margin-bottom:.5rem}
.htg-tl-card h3{font-size:1.02rem;margin-bottom:.35rem}
.htg-tl-card p{font-size:.88rem;color:var(--htg-ink-soft);margin:0;line-height:1.7}
@media(max-width:820px){.htg-mark{width:100px}.htg-mark span{display:none}}

/* ─── รายการบทความแบบสารบัญ ─── */
.htg-index{border-top:1px solid var(--htg-line)}
.htg-entry{
  display:grid;grid-template-columns:112px minmax(0,1fr) 160px;gap:clamp(14px,2.4vw,34px);
  align-items:center;padding:1.5rem 0;border-bottom:1px solid var(--htg-line);transition:.2s;
}
.htg-entry:hover{padding-inline:.9rem;background:var(--htg-surface)}
.htg-entry-date{font-family:var(--htg-mono);font-size:.72rem;color:var(--htg-ink-soft);line-height:1.7}
.htg-entry-date time,.htg-entry-date span{display:block}
.htg-entry-tag{
  display:inline-block;font-family:var(--htg-mono);font-size:.65rem;letter-spacing:.1em;
  padding:.25rem .65rem;border-radius:999px;text-transform:uppercase;text-decoration:none;
  background:color-mix(in srgb,var(--htg-hue) 13%,transparent);color:var(--htg-hue);margin-bottom:.5rem;
}
.htg-entry-body h3{font-size:clamp(1.05rem,.95rem + .5vw,1.3rem);margin:0 0 .35rem;font-weight:500}
.htg-entry-body h3 a{color:var(--htg-ink);text-decoration:none}
.htg-entry:hover h3 a{color:var(--htg-em-dark)}
.htg-entry-body p{font-size:.9rem;color:var(--htg-ink-soft);margin:0;line-height:1.7}
.htg-entry-thumb{
  aspect-ratio:16/10;border-radius:12px;overflow:hidden;display:grid;place-items:center;
  background:color-mix(in srgb,var(--htg-hue) 11%,var(--htg-surface));
}
.htg-entry-thumb img{width:100%;height:100%;object-fit:cover}
.htg-entry-thumb svg{width:44px;height:44px;stroke:var(--htg-hue);fill:none;stroke-width:1.3;opacity:.85}
.htg-index-foot{margin-top:2rem}
@media(max-width:760px){
  .htg-entry{grid-template-columns:1fr;gap:.6rem}
  .htg-entry-thumb{order:-1;aspect-ratio:16/7}
}

/* ─── สะพานสู่บริการ ─── */
.htg-bridge{
  background:var(--htg-em-dark);color:#dcece1;
  position:relative;overflow:hidden;padding:clamp(46px,6vw,88px) 0;
}
.htg-bridge::before{
  content:"";position:absolute;inset:0;opacity:.13;
  background-image:radial-gradient(circle at 1px 1px,#fff 1px,transparent 0);background-size:24px 24px;
}
.htg-bridge .htg-wrap{position:relative;z-index:1}
.htg-bridge .htg-eyebrow{color:#8fe3c0}
.htg-bridge .htg-eyebrow::before{background:#8fe3c0}
.htg-bridge h2{color:#fff;max-width:22ch}
.htg-bridge-lead{color:rgba(255,255,255,.76);max-width:58ch;margin-bottom:2.4rem}
.htg-svc{display:grid;grid-template-columns:repeat(auto-fit,minmax(232px,1fr));gap:16px;margin-bottom:2.4rem}
.htg-svc-card{background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.14);border-radius:var(--htg-radius);padding:1.3rem 1.35rem;transition:.2s}
.htg-svc-card:hover{background:rgba(255,255,255,.12);border-color:rgba(255,255,255,.3);transform:translateY(-3px)}
.htg-svc-card h3{color:#fff;font-size:1rem;margin-bottom:.45rem}
.htg-svc-card p{font-size:.87rem;color:rgba(255,255,255,.72);margin:0;line-height:1.7}
.htg-svc-badge{display:block;font-family:var(--htg-mono);font-size:.64rem;letter-spacing:.1em;color:#8fe3c0;margin-bottom:.6rem}
.htg-assure{display:flex;gap:1.2rem;align-items:flex-start;flex-wrap:wrap;justify-content:space-between;padding-top:1.8rem;border-top:1px solid rgba(255,255,255,.16)}
.htg-assure p{font-size:.86rem;color:rgba(255,255,255,.7);margin:0;max-width:62ch;line-height:1.75}
.htg-certs{display:block;font-family:var(--htg-mono);font-size:.68rem;color:#8fe3c0;letter-spacing:.08em;margin-top:.5rem}

/* ─── จดหมายข่าว ─── */
.htg-news{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,.9fr);gap:clamp(24px,4vw,60px);align-items:center}
.htg-news h2{margin-bottom:.4rem}
.htg-news p{color:var(--htg-ink-soft);margin:0}
.htg-news small{display:block;margin-top:.8rem;color:var(--htg-ink-soft);font-size:.8rem}
@media(max-width:820px){.htg-news{grid-template-columns:1fr}}

/* =========================================================
   22. แก้สีวิดเจ็ตมาตรฐาน WordPress ในส่วนท้าย (อ่านไม่ออกก่อนหน้านี้)
   ========================================================= */
.htg-footer .widget,
.htg-footer .htg-widget{color:#b8d4c8}
.htg-footer h1,.htg-footer h2,.htg-footer h3,.htg-footer h4,
.htg-footer .wp-block-heading,
.htg-footer .widget-title,
.htg-footer .wp-block-group__inner-container > h2{
  color:#fff!important;font-family:var(--htg-mono);font-size:.68rem!important;
  letter-spacing:.14em;text-transform:uppercase;font-weight:600;margin:0 0 1rem;
}
.htg-footer a,
.htg-footer li a,
.htg-footer .wp-block-latest-posts a,
.htg-footer .wp-block-categories a,
.htg-footer .wp-block-archives a,
.htg-footer .wp-block-latest-comments a,
.htg-footer .wp-block-page-list a{color:#b8d4c8!important;text-decoration:none}
.htg-footer a:hover{color:#fff!important}
.htg-footer li{color:#b8d4c8;border-color:rgba(255,255,255,.1)}
.htg-footer .wp-block-latest-posts__post-date,
.htg-footer .post-date,
.htg-footer time{color:#7d9b8e!important;font-family:var(--htg-mono);font-size:.68rem}
.htg-footer select,
.htg-footer input[type=search]{background:rgba(255,255,255,.08);color:#fff;border-color:rgba(255,255,255,.18)}
.htg-footer .htg-count{color:#7d9b8e;background:rgba(255,255,255,.08)}

/* =========================================================
   23. แท็บหมวดหมู่ (flex) + เนื้อหาในแท็บ (grid)
   ========================================================= */
.htg-tablist{
  display:flex;gap:.5rem;overflow-x:auto;padding-bottom:.9rem;margin-bottom:1.8rem;
  border-bottom:1px solid var(--htg-line);scrollbar-width:thin;
}
.htg-tablist::-webkit-scrollbar{height:4px}
.htg-tablist::-webkit-scrollbar-thumb{background:var(--htg-line);border-radius:9px}
.htg-tab{
  flex:0 0 auto;display:inline-flex;align-items:center;gap:.5rem;cursor:pointer;
  font-family:var(--htg-body);font-size:.93rem;font-weight:500;
  padding:.6rem 1.1rem;border-radius:999px;white-space:nowrap;
  background:var(--htg-surface);border:1px solid var(--htg-line);color:var(--htg-ink);
  transition:background .18s,border-color .18s,color .18s;
}
.htg-tab span{
  font-family:var(--htg-mono);font-size:.66rem;padding:.1rem .45rem;border-radius:999px;
  background:var(--htg-em-soft);color:var(--htg-ink-soft);
}
.htg-tab:hover{border-color:var(--htg-hue,var(--htg-em));color:var(--htg-hue,var(--htg-em))}
.htg-tab.is-active{background:var(--htg-hue,var(--htg-em));border-color:var(--htg-hue,var(--htg-em));color:#fff}
.htg-tab.is-active span{background:rgba(255,255,255,.24);color:#fff}
.htg-tabpanel[hidden]{display:none}
.htg-tab-desc{color:var(--htg-ink-soft);max-width:62ch;margin:0 0 1.5rem;font-size:.95rem}
.htg-tab-more{margin:1.6rem 0 0}

/* =========================================================
   24. แถบทำไมต้องเชื่อเรา — grid 2 คอลัมน์
   ========================================================= */
.htg-about{display:grid;grid-template-columns:minmax(0,.95fr) minmax(0,1.15fr);gap:clamp(28px,4vw,64px);align-items:start}
@media(max-width:900px){.htg-about{grid-template-columns:1fr}}
.htg-about-copy h2{margin-bottom:.5em}
.htg-about-copy p{color:var(--htg-ink-soft);max-width:44ch}
.htg-about-points{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:1fr 1fr;gap:18px}
@media(max-width:620px){.htg-about-points{grid-template-columns:1fr}}
.htg-about-points li{
  display:flex;gap:.9rem;align-items:flex-start;padding:1.2rem 1.3rem;
  background:var(--htg-surface);border:1px solid var(--htg-line);border-radius:var(--htg-radius);
}
.htg-about-num{
  font-family:var(--htg-mono);font-size:.7rem;font-weight:600;flex:0 0 auto;
  color:var(--htg-em-deep);padding-top:.25rem;
}
.htg-about-points h3{font-size:1rem;margin:0 0 .3rem}
.htg-about-points p{font-size:.87rem;color:var(--htg-ink-soft);margin:0;line-height:1.7}

/* =========================================================
   25. คำถามที่พบบ่อย — accordion
   ========================================================= */
.htg-faq{display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.25fr);gap:clamp(28px,4vw,64px);align-items:start}
@media(max-width:900px){.htg-faq{grid-template-columns:1fr}}
.htg-faq-intro h2{margin-bottom:.5em}
.htg-faq-intro p:last-child{color:var(--htg-ink-soft);margin:0;max-width:40ch}
.htg-faq-list{border-top:1px solid var(--htg-line)}
.htg-faq-list details{border-bottom:1px solid var(--htg-line)}
.htg-faq-list summary{
  list-style:none;cursor:pointer;padding:1.15rem 2.4rem 1.15rem 0;position:relative;
  font-family:var(--htg-body);font-size:1rem;font-weight:500;line-height:1.6;color:var(--htg-ink);
}
.htg-faq-list summary::-webkit-details-marker{display:none}
.htg-faq-list summary::after{
  content:"";position:absolute;inset-inline-end:.2rem;top:1.45rem;
  width:11px;height:11px;border-right:2px solid var(--htg-em);border-bottom:2px solid var(--htg-em);
  transform:rotate(45deg);transition:transform .22s;
}
.htg-faq-list details[open] summary::after{transform:rotate(-135deg)}
.htg-faq-list summary:hover{color:var(--htg-em-dark)}
.htg-faq-body{padding:0 2.4rem 1.3rem 0}
.htg-faq-body p{margin:0;font-size:.94rem;line-height:1.85;color:var(--htg-ink-soft)}
