/* Smart Factory — โทนเขียวตามโลโก้ (ตี๋เล็กเลือก 9 ต.ค. 2569 · ฟอนต์ Leelawadee UI ตาม deck)
   เขียวมะนาว #C1FF72 คือสีโลโก้ แต่บนพื้นขาวคอนทราสต์แค่ ~1.2:1 → ห้ามใช้เป็นตัวอักษร/ปุ่มบนพื้นอ่อน
   ใช้เป็นจุดเน้นบนพื้นเข้มเท่านั้น · ตัวอักษรและปุ่มใช้เขียวเข้ม #2E5E14 · พื้นเข้มใช้ #1D2B14
   (ชื่อตัวแปร --gold-* ยังคงไว้จากธีมเดิม เพื่อไม่ต้องแก้ทุกกฎ — ค่าจริงเป็นเขียวแล้ว) */
:root {
  --deep: #1D2B14;
  --brand: #2E5E14;
  --brand-ink: #ffffff;
  --brand-dark: #234A0F;
  --brand-2: #24470F;
  --brand-soft: #F1FAE5;
  --gold: #1D2B14;
  --gold-text: #3D6E12;
  --gold-deep: #2E5E14;
  --cream: #F6FCEC;
  --cream-line: #CFE8AE;
  --logo-green: #C1FF72;
  --accent: #24470F;
  --warn: #3D6E12;
  --warn-soft: #F6FCEC;
  --bad: #B42318;
  --line-green: #06C755;
  --bg: #ffffff;
  --bg-alt: #F1FAE5;
  --text: #1A1A1A;
  --muted: #595959;
  --border: #D3EBB8;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(46,94,20,.06), 0 12px 32px rgba(46,94,20,.10);
  --font-body: "Leelawadee UI", "Noto Sans Thai", "IBM Plex Sans Thai", system-ui, sans-serif;
  --font-head: "Leelawadee UI", "Noto Sans Thai", "IBM Plex Sans Thai", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: 17px; line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  /* ภาษาไทยห้าม justify — ช่องไฟจะกว้างผิดปกติบนมือถือ (บทเรียนจาก benchmark R10) */
  text-align: left;
}
img, svg { max-width: 100%; }
a { color: var(--brand); }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.35; margin: 0; }
p { margin: 0; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 760px) { .wrap { padding: 0 32px; } }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: #fff; padding: 8px 12px; }

/* ---------- ปุ่ม ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 22px; border-radius: 10px; border: 1px solid transparent;
  font: 600 16px/1.3 var(--font-body); text-decoration: none; cursor: pointer;
  text-align: center;
}
.btn-sm { padding: 8px 14px; font-size: 15px; min-height: 44px; }

/* ---------- เมนูมือถือ (<1040px ที่เมนูหลักถูกซ่อน) ---------- */
.menu-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 1px solid var(--border); border-radius: 10px;
  background: #fff; color: var(--brand); cursor: pointer;
}
@media (min-width: 1040px) { .menu-btn { display: none; } .mnav { display: none !important; } }
.mnav { border-top: 1px solid var(--border); background: #fff; padding: 8px 16px 16px; display: grid; gap: 2px; }
.mnav[hidden] { display: none; }
.mnav a { display: flex; align-items: center; min-height: 48px; padding: 0 8px; border-radius: 10px; color: var(--text); text-decoration: none; font-weight: 600; }
.mnav a:hover { background: var(--brand-soft); }
.mnav .mnav-cta { margin-top: 8px; justify-content: center; background: var(--brand); color: #fff; }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { background: #fff; color: var(--brand); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--brand); }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 2px;
}

/* ---------- หัวเว็บ ---------- */
.top {
  position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--border);
}
.top-inner { display: flex; align-items: center; gap: 20px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); min-height: 44px; }
.brand-name { font: 700 19px/1 var(--font-head); white-space: nowrap; }
.nav { display: none; gap: 24px; margin-left: 12px; }
.nav a { color: var(--muted); text-decoration: none; font-size: 15px; white-space: nowrap; }
.nav a:hover { color: var(--brand); }
@media (min-width: 1040px) { .nav { display: flex; } }
.top-actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.hide-sm { display: none; }
@media (min-width: 560px) { .hide-sm { display: inline-flex; } }

.login { position: relative; }
.login summary { list-style: none; }
.login summary::-webkit-details-marker { display: none; }
.login-menu {
  position: absolute; right: 0; top: calc(100% + 8px); width: 270px;
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow); padding: 6px;
}
.login-menu a { display: block; padding: 10px 12px; border-radius: 8px; text-decoration: none; color: var(--text); }
.login-menu a:hover { background: var(--brand-soft); }
.login-menu b { display: block; font-size: 15px; }
.login-menu span { font-size: 13px; color: var(--muted); }

/* ---------- hero ---------- */
.hero { padding: 48px 0 88px; background: linear-gradient(180deg, var(--brand-soft), #fff 70%); border-top: 4px solid var(--logo-green); }
@media (min-width: 960px) { .hero { padding: 80px 0 88px; } }
.hero-grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.05fr 1fr; } }
.kicker { color: var(--gold-text); font-weight: 600; font-size: 15px; margin-bottom: 10px; }
h1, .sec-title, .card h3, .steps h3 { color: var(--brand); }
h1 { font-size: clamp(32px, 5vw, 52px); letter-spacing: -.01em; margin-bottom: 18px; }
.hl { color: var(--bad); }
.lead { font-size: 18px; color: var(--muted); max-width: 36em; margin-bottom: 28px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.trust { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 6px; font-size: 15px; color: var(--muted); }
.trust li::before { content: "✓ "; color: var(--gold-text); font-weight: 700; }
.trust b { color: var(--text); }

/* hero พื้นภาพโรงงาน — ลดความสดของหุ่นยนต์สีส้มลงด้วย filter ไม่ให้แย่งสีเขียวของแบรนด์
   แล้วไล่เฉดเขียวเข้มทับจากฝั่งตัวหนังสือ ให้ข้อความขาวมีคอนทราสต์พอโดยไม่ต้องพึ่งภาพ */
.hero { position: relative; overflow: hidden; isolation: isolate; background: var(--deep); }
.hero::before, .hero::after { content: ""; position: absolute; inset: 0; z-index: -1; }
.hero::before { background: url("assets/hero-factory-m.jpg") center 35% / cover no-repeat; filter: saturate(.7) brightness(1); }
.hero::after { background: linear-gradient(180deg, rgba(18,30,10,.82) 0%, rgba(18,30,10,.9) 45%, rgba(18,30,10,.96) 100%); }
@media (min-width: 960px) {
  .hero { padding: 104px 0 112px; }
  .hero::before { background-image: url("assets/hero-factory.jpg"); background-position: center 40%; }
  .hero::after { background: linear-gradient(90deg, rgba(18,30,10,.94) 0%, rgba(18,30,10,.82) 36%, rgba(18,30,10,.4) 62%, rgba(18,30,10,.12) 100%), linear-gradient(0deg, rgba(18,30,10,.5), rgba(18,30,10,0) 35%); }
}
.hero h1 { color: #fff; }
.hero .hl { color: #FF8A7A; }
.hero .kicker { color: var(--logo-green); }
.hero .lead { color: #DCE8D2; }
.hero .trust { color: #DCE8D2; }
.hero .trust b { color: #fff; }
.hero .trust li::before { color: var(--logo-green); }
.hero .btn-primary { background: var(--logo-green); color: var(--deep); font-weight: 700; }
.hero .btn-primary:hover { background: #D6FF9E; }
.hero .btn-ghost { background: rgba(255,255,255,.06); color: #fff; border-color: rgba(255,255,255,.45); }
.hero .btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,.12); }
.hero-panel { box-shadow: 0 24px 60px rgba(0,0,0,.45); }

.panel {
  background: #fff; border: 1px solid var(--border); border-radius: 18px;
  box-shadow: var(--shadow); padding: 20px; margin: 0; min-width: 0;
}
.panel-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: baseline; margin-bottom: 14px; }
.panel-head b { font-size: 15px; }
.live { font-size: 13px; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); display: inline-block; }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; margin-bottom: 12px; }
.kpi { background: var(--bg-alt); border-radius: 10px; padding: 10px; min-width: 0; }
.kpi small { display: block; font-size: 13px; color: var(--muted); line-height: 1.4; }
.kpi b { font: 700 20px/1.3 var(--font-head); }
.kpi b span { font-size: 13px; font-weight: 500; color: var(--muted); }
.kpi em { display: block; font-style: normal; font-size: 13px; }
.kpi em.bad { color: var(--bad); }
.spark { width: 100%; height: auto; display: block; }
.spark .th { stroke: var(--bad); stroke-width: 1.5; stroke-dasharray: 5 4; }
.spark-wrap { position: relative; }
/* เส้นเกณฑ์อยู่ที่ y=44 จาก 120 ของ viewBox = 36.7% จากบน · ป้ายนั่งเหนือเส้นพอดีทุกความกว้าง */
.th-label { position: absolute; right: 2px; bottom: calc(63.3% + 3px); font-size: 13px; line-height: 1.2; color: var(--bad); background: rgba(255,255,255,.85); padding: 0 4px; border-radius: 4px; }
.spark .area { fill: var(--brand); opacity: .12; }
.spark .line { fill: none; stroke: var(--brand); stroke-width: 2.5; stroke-linejoin: round; }
.line-alert { display: flex; gap: 10px; align-items: flex-start; background: var(--warn-soft); border-radius: 10px; padding: 10px 12px; margin-top: 12px; font-size: 14px; line-height: 1.6; }
/* ขาวบนเขียว LINE คอนทราสต์แค่ 2.26 → ใช้ตัวอักษรเข้มแทน (ใบ W3 ข้อ 11) */
.line-badge { flex: none; background: var(--line-green); color: #0B2A12; font: 700 13px/1 var(--font-body); padding: 5px 7px; border-radius: 6px; margin-top: 2px; }
figcaption { font-size: 13px; color: var(--muted); margin-top: 10px; }

/* ---------- สองฝั่ง ---------- */
/* การ์ดสองฝั่งใต้ hero — ตามดีไซน์ Claude Design canvas เวอร์ชัน 9
   ยกขึ้นทับขอบล่าง hero ให้สองส่วนต่อกัน · ภาพประกอบอยู่ข้างข้อความเมื่อการ์ดกว้างพอ */
.split-wrap { position: relative; z-index: 2; padding: 0 0 40px; margin-top: -40px; }
@media (min-width: 960px) { .split-wrap { margin-top: -64px; } }
.split { display: grid; gap: 20px; }
@media (min-width: 1040px) { .split { grid-template-columns: 1fr 1fr; gap: 24px; } }
.split-card {
  display: grid; gap: 8px 12px; align-items: center; text-decoration: none; color: var(--text);
  border: 1px solid var(--border); border-radius: 22px; padding: 24px;
  background: #fff; box-shadow: 0 18px 44px rgba(29,43,20,.14); transition: transform .15s, box-shadow .15s;
}
@media (min-width: 560px) { .split-card { grid-template-columns: 1.1fr 1fr; padding: 28px 24px 28px 30px; } }
.split-card:hover { transform: translateY(-2px); box-shadow: 0 22px 50px rgba(29,43,20,.2); }
@media (prefers-reduced-motion: reduce) { .split-card, .split-card:hover { transition: none; transform: none; } }
.split-card.alt { color: #fff; border-color: transparent; background: radial-gradient(120% 90% at 100% 0%, #3F7A1E 0%, var(--brand) 55%, #24470F 100%); box-shadow: 0 18px 44px rgba(29,43,20,.28); }
.split-card.alt .tag { background: var(--logo-green); color: var(--deep); }
.split-card.alt p, .split-card.alt .split-points { color: #DDEBCF; }
.split-card h2 { font-size: 22px; margin: 10px 0 8px; color: var(--deep); }
.split-card.alt h2 { color: #fff; }
.split-card p { color: var(--muted); margin-bottom: 12px; }
.split-points { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 4px; font-size: 15px; color: #404040; }
.split-points li::before { content: "✓ "; font-weight: 700; color: var(--brand); }
.split-card.alt .split-points li::before { color: var(--logo-green); }
.split-art { width: 100%; max-width: 320px; height: auto; display: block; justify-self: center; }
@media (max-width: 559px) { .split-art { order: -1; max-width: 240px; } }
/* ลิงก์ท้ายการ์ดเป็นปุ่มทรงแคปซูล */
.arrow { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; background: var(--brand); color: #fff; font-weight: 600; font-size: 15px; }
.split-card.alt .arrow { background: var(--logo-green); color: var(--deep); font-weight: 700; }
.tag { display: inline-block; font-size: 13px; font-weight: 600; background: var(--brand-soft); color: var(--brand); padding: 3px 10px; border-radius: 999px; }

/* ---------- section ---------- */
.sec { padding: 64px 0; }
@media (min-width: 960px) { .sec { padding: 88px 0; } }
.sec-alt { background: var(--bg-alt); }
.sec-title { font-size: clamp(26px, 3.4vw, 36px); margin-bottom: 12px; }
.sec-sub { color: var(--muted); font-size: 17px; max-width: 44em; margin-bottom: 36px; }
.grid2, .grid3, .grid4 { display: grid; gap: 18px; }
@media (min-width: 760px) { .grid2, .grid3 { grid-template-columns: repeat(2, minmax(0,1fr)); } .grid4 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (min-width: 1040px) { .grid3 { grid-template-columns: repeat(3, minmax(0,1fr)); } .grid4 { grid-template-columns: repeat(4, minmax(0,1fr)); } }
.card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; min-width: 0; }
.card h3 { font-size: 19px; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 16px; }
.ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font: 700 15px/1 var(--font-head); margin-bottom: 14px; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; counter-reset: s; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(4, minmax(0,1fr)); } }
.steps li { position: relative; padding-top: 52px; }
.steps li::before {
  counter-increment: s; content: counter(s); position: absolute; top: 0; left: 0;
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand); color: #fff; font: 700 17px/1 var(--font-head);
}
.steps h3 { font-size: 18px; margin-bottom: 6px; }
.steps p { color: var(--muted); font-size: 16px; }

/* ---------- เครื่องคำนวณ ---------- */
.calc-grid { display: grid; gap: 32px; align-items: start; }
@media (min-width: 960px) { .calc-grid { grid-template-columns: 1fr 1fr; } }
.calc { display: grid; gap: 14px; }
label { display: grid; gap: 6px; font-size: 15px; font-weight: 500; }
input, select {
  font: 16px/1.4 var(--font-body); padding: 11px 12px; border: 1px solid var(--border);
  border-radius: 10px; background: #fff; color: var(--text); width: 100%; min-width: 0;
}
.calc-out { background: var(--brand); color: #fff; border-radius: 18px; padding: 24px; display: grid; gap: 14px; }
.out-row { background: rgba(255,255,255,.1); border-radius: 12px; padding: 14px 16px; }
.out-row span { display: block; font-size: 15px; opacity: .85; }
.out-row b { display: block; font: 700 30px/1.3 var(--font-head); }
.out-row small { display: block; font-size: 14px; opacity: .85; }
.calc-out .fine { color: rgba(255,255,255,.75); }
.calc-out .btn-primary { background: #fff; color: var(--brand); }
.fine { font-size: 13px; color: var(--muted); line-height: 1.6; }

/* ---------- Company Brain ---------- */
.brain-grid { display: grid; gap: 32px; align-items: start; }
@media (min-width: 960px) { .brain-grid { grid-template-columns: 1fr 1fr; } }
.h3 { font-size: 20px; margin: 0 0 12px; }
.mini-steps { margin: 0 0 14px; padding-left: 22px; display: grid; gap: 8px; }
.mini-steps b { color: var(--brand); margin-right: 6px; }
.note { background: var(--brand-soft); border-radius: 10px; padding: 12px 14px; font-size: 15px; margin-bottom: 28px; }
.small { color: var(--muted); font-size: 15px; margin-bottom: 12px; }
.apps { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.apps li { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; }
.apps span { color: var(--muted); font-size: 14px; }
.chat { display: flex; flex-direction: column; gap: 12px; }
.msg { padding: 12px 16px; border-radius: 14px; font-size: 15px; line-height: 1.7; max-width: 92%; }
.msg.me { align-self: flex-end; background: var(--brand); color: #fff; border-bottom-right-radius: 4px; }
.msg.bot { align-self: flex-start; background: var(--bg-alt); border-bottom-left-radius: 4px; }
.who { display: block; color: var(--brand); font-size: 13px; margin-bottom: 4px; }
.src { display: block; margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--border); font-size: 13px; color: var(--muted); }
.rules { display: grid; gap: 14px; margin-top: 36px; }
@media (min-width: 760px) { .rules { grid-template-columns: repeat(3, minmax(0,1fr)); } }
.rules div { border-left: 3px solid var(--brand); padding: 4px 0 4px 16px; }
.rules p { color: var(--muted); font-size: 15px; }

.fact b { display: block; font-family: var(--font-head); margin-bottom: 4px; }
.fact p { color: var(--muted); font-size: 15px; }

/* ---------- co-brand ---------- */
.co-head { margin-bottom: 14px; }
.co-logo { display: inline-block; font: 700 14px/1 var(--font-head); letter-spacing: .08em; color: var(--brand); border: 2px solid var(--brand); padding: 8px 12px; border-radius: 8px; }
.co-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 18px; }
.link { font-weight: 600; display: inline-flex; align-items: center; min-height: 44px; }

.lane ul { margin: 12px 0 0; padding-left: 20px; color: var(--muted); font-size: 15px; display: grid; gap: 4px; }
.lane h3 { margin-top: 10px; }
.center { text-align: center; margin-top: 32px; }

/* ---------- ติดต่อ ---------- */
.contact-grid { display: grid; gap: 32px; align-items: start; }
@media (min-width: 760px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.channels { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.channels li { display: flex; gap: 14px; align-items: baseline; }
.channels span { width: 72px; flex: none; color: var(--muted); font-size: 15px; }
.channels a { font-weight: 600; font-size: 18px; word-break: break-all; display: inline-flex; align-items: center; min-height: 44px; }
.lead { display: grid; gap: 14px; }
/* ช่องล่อบอท — ซ่อนจากคนด้วยการย้ายออกนอกจอ ไม่ใช้ display:none เพราะบอทบางตัวข้ามช่องที่ซ่อนแบบนั้น */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.lead { position: relative; }
.form-msg { margin: 0; padding: 10px 14px; border-radius: 10px; font-size: 15px; }
.form-msg.ok { background: var(--brand-soft); color: var(--brand); border: 1px solid var(--border); }
.form-msg.err { background: #FEF3F2; color: #B42318; border: 1px solid #FECDCA; }
.fine a { color: var(--brand); text-decoration: underline; }
.lead .btn[disabled] { opacity: .65; cursor: progress; }
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
legend { font-weight: 600; margin-bottom: 6px; }
/* ทั้งแถวเป็นพื้นที่กด สูง ≥44px ให้นิ้วกดง่ายบนมือถือ (ใบ W3 ข้อ 9) */
.radio { display: flex; gap: 12px; align-items: center; font-weight: 400; min-height: 44px; cursor: pointer; }
.radio input { width: 20px; height: 20px; margin: 0; accent-color: var(--brand); }

/* ---------- footer (พื้นอ่อน เพราะตัวอักษรในโลโก้เป็นสีเข้ม) ---------- */
.foot { background: var(--bg-alt); border-top: 1px solid var(--border); color: #404040; padding: 48px 0 24px; font-size: 15px; }
.foot a, .foot span { color: #404040; text-decoration: none; display: flex; align-items: center; min-height: 44px; }
.foot a:hover { color: var(--brand); }
.foot b { color: var(--brand); display: block; margin-bottom: 8px; }
.foot-grid { display: grid; gap: 28px; }
@media (min-width: 760px) { .foot-grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; } }
.foot-logo { height: 40px; width: auto; display: block; margin-bottom: 12px; }
.foot-bottom { margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 24px; }
.foot-bottom p { margin: 0; }
.foot-bottom span { display: inline; min-height: 0; color: inherit; }
.foot-bottom a { display: inline-flex; color: var(--muted); text-decoration: underline; }

/* ---------- โลโก้ ---------- */
.logo { height: 44px; width: auto; display: block; }
@media (max-width: 420px) { .logo { height: 36px; } }

/* ---------- section พื้นกรมท่า (ทำงานอย่างไร · พาร์ทเนอร์) ---------- */
.sec-navy { background: var(--deep); color: #fff; }
.sec-navy .sec-title { color: #fff; }
.sec-navy .sec-sub { color: #DDEBCF; }
.sec-navy .steps li { background: var(--brand-2); border-radius: 16px; padding: 24px; }
.sec-navy .steps li::before { position: static; display: grid; margin-bottom: 14px; background: var(--logo-green); color: #1A1A1A; }
.sec-navy .steps p { color: #DDEBCF; }
/* หัวข้อขั้นตอนบนพื้นเข้มต้องเป็นขาว — กฎ h3 สี brand ด้านบนเคยทับจนคอนทราสต์เหลือ 1.38 (ใบ W3 ข้อ 1) */
.sec-navy .steps h3 { color: #fff; }
.sec-navy .card { border-color: transparent; }
.sec-navy .btn-primary { background: var(--logo-green); color: #1A1A1A; }
.sec-navy .btn-primary:hover { background: #D6FF9E; }
/* ภาพหน้าจอ PowerIQ จริง — ใส่กรอบเหมือนหน้าต่างเบราว์เซอร์ ให้คนอ่านรู้ว่าเป็นหน้าจอของระบบ ไม่ใช่ภาพประกอบ */
.shots { display: grid; gap: 20px; margin: 0 0 12px; }
.shot { margin: 0; background: #fff; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; box-shadow: 0 16px 40px rgba(29,43,20,.12); }
.shot img { display: block; width: 100%; height: auto; }
.shot figcaption { padding: 12px 16px; font-size: 15px; color: var(--muted); border-top: 1px solid var(--border); }
.shot-bar { display: flex; align-items: center; gap: 6px; padding: 9px 14px; background: #F4F6F2; border-bottom: 1px solid var(--border); }
.shot-bar i { width: 10px; height: 10px; border-radius: 50%; background: #D0D5CC; }
.shot-bar span { margin-left: 10px; font-size: 13px; color: var(--muted); }
.shot-note { margin: 0 0 36px; }
.partner-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin: 0 0 32px; padding: 20px 24px; border: 1px solid rgba(255,255,255,.18); border-radius: 18px; background: rgba(255,255,255,.05); }
.partner-strip p { margin: 4px 0 0; color: #DDEBCF; max-width: 40em; }
.partner-strip b { color: #fff; }
.partner-label { font-size: 13px; font-weight: 700; letter-spacing: .04em; color: var(--logo-green); }
.partner-logo { flex: none; display: flex; align-items: center; background: #fff; border-radius: 12px; padding: 14px 20px; }
.partner-logo img { display: block; width: 190px; height: auto; }

/* ---------- แผนภาพสมองกลาง (ตามสไลด์) ---------- */
.diagram { margin: 8px 0 44px; }
/* 4 กล่องต่อแถว: มือถือ 1 · แท็บเล็ต 2×2 · จอใหญ่ 4 — auto-fit จะได้ 3+1 ที่ดูไม่สมดุล */
.d-row { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* มือถือ 2 คอลัมน์ตั้งแต่แรก — เดิม 1 คอลัมน์ ส่วน Chamnarn AI สูง 2,963px บนจอ 375 (ใบ W6 ข้อ 2) · ขนาดตัวอักษรย่อของกล่องอยู่ท้ายไฟล์ ให้ทับกฎหลัก */
@media (min-width: 560px) { .d-row { gap: 14px; } }
@media (min-width: 1040px) { .d-row { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.d-src { background: var(--bg-alt); border: 1px solid var(--border); border-radius: 16px; padding: 16px; text-align: center; }
.d-src b, .d-app b { display: block; font-size: 17px; }
.d-src b { color: var(--brand); }
.d-src span, .d-app span { font-size: 14px; }
.d-src span { color: var(--muted); }
.d-link { display: flex; justify-content: center; align-items: center; gap: 12px; padding: 8px 0; color: var(--brand); font-weight: 700; }
.d-link::before { content: ""; width: 3px; height: 28px; background: #9DBF7A; }
.d-brain { background: var(--gold); color: #fff; border-radius: 22px; padding: 26px 20px; text-align: center; }
.d-brain h3 { font-size: clamp(22px, 3vw, 30px); }
.d-brain p { font-weight: 600; margin-top: 4px; }
.d-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; }
.d-pills span { background: var(--logo-green); color: var(--deep); border-radius: 999px; padding: 8px 22px; font-weight: 600; }
.d-app { background: var(--brand); color: #fff; border-radius: 16px; padding: 20px; text-align: center; }
.d-app span { color: #DDEBCF; }
.d-app.plan { background: #fff; color: var(--brand); border: 2px dashed #9DBF7A; }
.d-app.plan span { color: var(--muted); }
.d-line { background: var(--bg-alt); border: 1px solid var(--border); border-radius: 16px; padding: 16px; text-align: center; font-weight: 700; font-size: 18px; color: var(--brand); }
.cream-cards { display: grid; gap: 14px; }
.cream { background: var(--cream); border: 1px solid var(--cream-line); border-radius: 16px; padding: 18px 20px; }
.cream b { display: block; font-size: 18px; color: var(--gold-deep); }
.cream p { color: #404040; font-size: 15px; }

/* มือถือ: การ์ดหลายใบเรียงเป็นแถวเลื่อนข้างแทนการต่อกันยาวลงไป (ใบ W4 ข้อ 3)
   หน้ามือถือเคยยาว 15,094px · ใบถัดไปโผล่ขอบขวา 15% ให้รู้ว่าเลื่อนได้ */
@media (max-width: 759px) {
  .swipe {
    display: grid; grid-auto-flow: column; grid-auto-columns: 85%; grid-template-columns: none;
    gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    margin-inline: -16px; padding: 4px 16px 14px; scroll-padding-inline: 16px;
  }
  .swipe > * { scroll-snap-align: start; }
  .steps.swipe li { margin: 0; }
}
.co-logo-img { display: block; height: 52px; width: auto; }

/* จอคอม: ภาพหน้าเครื่องกับกราฟ PF วางคู่กัน — เดิมซ้อนกันเต็มกว้าง ส่วน PowerIQ สูง 1,831px (ใบ W6 ข้อ 1)
   คอลัมน์ขวากว้างราว 360px พอดีภาพกราฟ PF 364px จึงไม่ต้องขยายภาพ */
@media (min-width: 1040px) {
  .shots { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
}
.shot-zoom { display: block; cursor: zoom-in; }
.d-legend { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; font-size: 14px; color: var(--muted); }
.d-legend i { flex: none; width: 22px; height: 14px; border: 2px dashed #9DBF7A; border-radius: 4px; }
@media (max-width: 559px) { .d-src, .d-app { padding: 12px 10px; } .d-src b, .d-app b { font-size: 15px; } .d-src span, .d-app span { font-size: 13px; } }

/* กรอบโฟกัสบนพื้นมืด: กรอบปกติเป็นเขียวเข้มโปร่ง 45% แทบมองไม่เห็นบนพื้น #1D2B14 (ใบ W7 ข้อ 2) */
.hero :focus-visible, .sec-navy :focus-visible, .calc-out :focus-visible, .foot-cta :focus-visible {
  outline: 3px solid var(--logo-green); outline-offset: 3px;
}
/* แท็บเล็ต: ภาพหน้าจอวางคู่กัน ใช้ภาพขนาดมือถือทั้งสองภาพ (ใบ W7 ข้อ 3) */
@media (min-width: 760px) and (max-width: 1039px) {
  .shots { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
}
/* .split เป็น .wrap เองอยู่แล้ว (มี padding 16px) จึงไม่ต้องดึงขอบออกแบบ .swipe ทั่วไป — ดึงแล้วล้นจอ 16px */
@media (max-width: 759px) { .split.swipe { margin-inline: 0; } .split-card { align-content: start; } .split-card h2 { font-size: 20px; } }
/* แท็บเล็ต: การ์ดสองใบเคียงกัน ภาพอยู่บนข้อความ — ถ้าเรียงลงทีละใบ หน้าแท็บเล็ตยาวขึ้นเกือบ 470px */
@media (min-width: 760px) and (max-width: 1039px) { .split { grid-template-columns: 1fr 1fr; } .split-card { grid-template-columns: 1fr; align-content: start; } .split-art { order: -1; max-width: 260px; } }
.card-ex { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--brand-soft); font-size: 15px; color: var(--text); }
.card-ex b { color: var(--brand); }

/* ส่วนปัญหา — ตามดีไซน์ Claude Design canvas เวอร์ชัน 14
   การ์ดมีภาพประกอบด้านบน · เลขลำดับ · ป้ายอยู่ในบิล/ไม่อยู่ในบิล
   การ์ดที่ 3 ใช้สีส้มเพราะเป็นความเสี่ยง ไม่ใช่ค่าใช้จ่ายในบิล */
.probs { background: linear-gradient(180deg, #fff 0%, #F7FBF1 100%); }
.pill { display: inline-block; font-size: 14px; font-weight: 700; color: var(--deep); background: var(--logo-green); border-radius: 999px; padding: 5px 14px; margin-bottom: 14px; }
.probs .sec-title { color: var(--deep); }
.pcards { gap: 24px; align-items: stretch; }
.pcard { display: flex; flex-direction: column; background: #fff; border: 1px solid #E3F0D4; border-radius: 22px; overflow: hidden; box-shadow: 0 14px 36px rgba(29,43,20,.08); }
.pcard-art { position: relative; background: linear-gradient(180deg, var(--brand-soft) 0%, #E6F3D6 100%); padding: 20px 18px 8px; }
.pcard-art img { display: block; width: 100%; height: auto; margin-top: 18px; }
.pnum { position: absolute; left: 16px; top: 14px; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 16px; }
.pchip { position: absolute; right: 14px; top: 16px; font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: #fff; color: var(--brand); border: 1px solid var(--border); }
.pcard-body { display: flex; flex-direction: column; flex: 1; padding: 20px 24px 24px; }
.pcard-body h3 { font-size: 21px; color: var(--deep); margin: 0 0 8px; }
.pcard-body p { color: #404040; margin: 0 0 14px; }
.pcard .card-ex { margin: auto 0 0; padding: 12px 14px; border-radius: 12px; background: var(--brand-soft); border-left: 4px solid var(--logo-green); }
.pcard.warn .pchip { background: #FFFAEB; color: #B54708; border-color: #FEDF89; }
.pcard.warn .card-ex { background: #FFFAEB; border-left-color: #F79009; }
.pcard.warn .card-ex b { color: #B54708; }
@media (max-width: 559px) { .pcard-body { padding: 18px 18px 20px; } .pcard-body h3 { font-size: 19px; } }
/* แท็บเล็ต: grid3 เป็น 2 คอลัมน์ การ์ดใบที่ 3 จึงตกแถวอยู่ตัวเดียว ส่วนนี้สูง 1,421px — ใช้แถวปัดข้างแทน */
@media (min-width: 760px) and (max-width: 1039px) { .pcards { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 46%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 14px; } .pcards > * { scroll-snap-align: start; } }

/* ส่วนทำงานอย่างไร — ตามดีไซน์ Claude Design canvas เวอร์ชัน 15
   การ์ดมีภาพประกอบด้านบน · เลขขั้น (counter เดิม) วางทับมุมภาพ · ลูกศรเชื่อมขั้นเมื่อเรียง 4 คอลัมน์ */
.how { background: radial-gradient(90% 120% at 0% 0%, #2B4A1A 0%, var(--deep) 60%); }
.how .sec-sub { max-width: 40em; }
.sec-navy .how .steps li, .how .steps li { position: relative; padding: 0; background: var(--brand-2); border: 1px solid rgba(193,255,114,.14); border-radius: 20px; display: flex; flex-direction: column; }
.how .steps li::before { position: absolute; left: 16px; top: 14px; z-index: 1; margin: 0; }
.step-art { background: rgba(255,255,255,.05); border-radius: 20px 20px 0 0; padding: 18px 16px 6px; }
.step-art img { display: block; width: 100%; height: auto; margin-top: 14px; }
.step-body { padding: 18px 22px 24px; }
.how .steps h3 { font-size: 19px; margin: 0 0 6px; }
.how .steps p { font-size: 15px; }
@media (min-width: 900px) {
  .how .steps { gap: 24px; }
  .how .steps li:not(:last-child)::after {
    content: "→"; position: absolute; right: -19px; top: 92px; z-index: 2; width: 26px; height: 26px; border-radius: 50%;
    display: grid; place-items: center; background: var(--logo-green); color: var(--deep); font-weight: 700; font-size: 15px;
  }
}
@media (min-width: 760px) and (max-width: 899px) { .how .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ส่วนความปลอดภัย — ตามดีไซน์ Claude Design canvas เวอร์ชัน 16 · การ์ดมีภาพประกอบด้านบน */
.scards { gap: 20px; align-items: stretch; }
.scard { padding: 0; background: #fff; border: 1px solid #E3F0D4; border-radius: 20px; overflow: hidden; box-shadow: 0 10px 28px rgba(29,43,20,.07); }
.scard-art { background: linear-gradient(180deg, #F7FBF1 0%, #EEF7E3 100%); padding: 16px 14px 4px; }
.scard-art img { display: block; width: 100%; height: auto; }
.scard-body { padding: 16px 20px 22px; }
.scard-body b { font-size: 18px; color: var(--deep); }
.sec-alt .sec-title { color: var(--deep); }

/* ส่วนพาร์ทเนอร์ — ตามดีไซน์ Claude Design canvas เวอร์ชัน 17 · การ์ดมีภาพประกอบด้านบน */
.ptn-sec { background: radial-gradient(90% 120% at 100% 0%, #2B4A1A 0%, var(--deep) 60%); }
.ptns { gap: 24px; align-items: stretch; }
.ptn { padding: 0; border-radius: 22px; overflow: hidden; box-shadow: 0 18px 40px rgba(0,0,0,.25); }
.ptn-art { background: linear-gradient(180deg, var(--brand-soft) 0%, #E6F3D6 100%); padding: 16px 16px 4px; }
.ptn-art img { display: block; width: 100%; height: auto; }
.ptn-body { padding: 18px 24px 24px; }
.ptn h3 { color: var(--deep); margin: 10px 0 10px; }
.ptn ul { list-style: none; padding: 0; margin: 0; gap: 6px; }
.ptn li::before { content: "✓ "; font-weight: 700; color: var(--brand); }
.ptn-sec .center { margin-top: 36px; }
.ptn-sec .center .btn { border-radius: 999px; }
/* แท็บเล็ต: การ์ดพาร์ทเนอร์ 3 ใบใน grid 2 คอลัมน์ ใบที่ 3 ตกแถวตัวเดียว (ส่วนนี้สูง 1,481px) — ใช้แถวปัดข้างแบบส่วนปัญหา */
@media (min-width: 760px) and (max-width: 1039px) { .ptns { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 46%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 14px; } .ptns > * { scroll-snap-align: start; } }

/* เครื่องคำนวณ — ตามดีไซน์ Claude Design canvas เวอร์ชัน 18 · ช่องกรอกเป็นแถบเลื่อน + ช่องตัวเลขคู่กัน */
.calc-sec { background: linear-gradient(180deg, #fff 0%, #F7FBF1 100%); }
.calc-sec .sec-title { color: var(--deep); }
.calc { gap: 18px; }
.cfield { background: #fff; border: 1px solid #E3F0D4; border-radius: 16px; padding: 16px 18px 12px; box-shadow: 0 6px 18px rgba(29,43,20,.05); margin: 0; }
.cfield-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.cfield-head label { display: block; font-weight: 600; color: var(--deep); }
.cval { display: inline-flex; align-items: center; gap: 6px; flex: none; background: var(--brand-soft); border: 1px solid var(--border); border-radius: 10px; padding: 0 10px 0 4px; }
.cval input { width: 82px; border: 0; background: transparent; padding: 8px 6px; font: 700 18px/1 var(--font-head); color: var(--brand); text-align: right; min-height: 40px; }
.cval em { font-style: normal; font-size: 14px; color: var(--muted); }
/* แถบเลื่อน: ระบายสีเขียวถึงตำแหน่ง --p · ปุ่มจับใหญ่ 26px ให้ลากด้วยนิ้วบนมือถือได้ */
.crange { -webkit-appearance: none; appearance: none; width: 100%; height: 26px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.crange::-webkit-slider-runnable-track { height: 8px; border-radius: 999px; background: linear-gradient(90deg, var(--brand) var(--p, 50%), #E3F0D4 var(--p, 50%)); }
.crange::-moz-range-track { height: 8px; border-radius: 999px; background: linear-gradient(90deg, var(--brand) var(--p, 50%), #E3F0D4 var(--p, 50%)); }
.crange::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -9px; border-radius: 50%; background: var(--logo-green); border: 3px solid var(--brand); box-shadow: 0 2px 6px rgba(29,43,20,.3); }
.crange::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--logo-green); border: 3px solid var(--brand); }
/* แถบ PF: 70% แรก (0.50–0.85) คือโซนโดนปรับ ใช้พื้นแดงอ่อนแทนสีเทา */
.crange.pf::-webkit-slider-runnable-track { background: linear-gradient(90deg, var(--brand) var(--p, 50%), transparent var(--p, 50%)), linear-gradient(90deg, #FECDCA 70%, #E3F0D4 70%); }
.crange.pf::-moz-range-track { background: linear-gradient(90deg, var(--brand) var(--p, 50%), transparent var(--p, 50%)), linear-gradient(90deg, #FECDCA 70%, #E3F0D4 70%); }
.crange:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 4px; border-radius: 8px; }
.cticks { position: relative; display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-top: 2px; }
.cmark { position: absolute; left: 70%; transform: translateX(-50%); color: var(--bad); font-weight: 600; }
/* แรงดัน: ปุ่มสลับสองตัวเลือก แทน select */
.cseg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cseg legend { font-weight: 600; color: var(--deep); margin-bottom: 10px; padding: 0; }
.cseg label { display: block; position: relative; cursor: pointer; }
.cseg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cseg span { display: grid; gap: 2px; min-height: 56px; padding: 10px 12px; border: 2px solid #E3F0D4; border-radius: 12px; font-weight: 700; color: var(--deep); }
.cseg small { font-size: 13px; font-weight: 500; color: var(--muted); }
.cseg input:checked + span { border-color: var(--brand); background: var(--brand-soft); }
.cseg input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 2px; }
/* ฝั่งผลลัพธ์: ตัวเลขรวมต่อปีเด่นที่สุด แล้วแยกรายละเอียดเป็น "ตอนนี้ → ถ้าแก้" */
.calc-out { background: radial-gradient(120% 80% at 100% 0%, #3F7A1E 0%, var(--brand) 55%, #24470F 100%); border-radius: 22px; padding: 26px; box-shadow: 0 18px 44px rgba(29,43,20,.22); }
.out-total { background: var(--logo-green); color: var(--deep); border-radius: 16px; padding: 18px 20px; }
.out-total span, .out-total small { display: block; font-size: 15px; font-weight: 600; }
.out-total b { display: block; font: 700 40px/1.2 var(--font-head); }
.out-cmp { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.out-cmp i { font-style: normal; opacity: .7; }
.out-row .out-cmp b { font-size: 24px; }
.out-row .out-cmp b.good { color: var(--logo-green); }
.calc-out .btn-primary { border-radius: 999px; }
@media (max-width: 559px) { .out-total b { font-size: 32px; } .cval input { width: 70px; } }
.out-row small span { display: inline; font-size: inherit; opacity: 1; }
/* [hidden] ต้องชนะเสมอ — .out-row small { display:block } เคยทับจนข้อความ "คิดให้แค่ 30% ของพีค" โผล่ตลอดบนเว็บจริง
   แม้ลดพีคแค่ 50 kW (เจอตอนทำแถบเลื่อน 10 ต.ค. 2569) */
[hidden] { display: none !important; }
/* legend ปกติวางทับเส้นขอบ fieldset · float ทำให้เป็นบรรทัดธรรมดาในกล่อง */
.cseg legend { float: left; width: 100%; grid-column: 1 / -1; }

/* ภาพหน้าจอ PowerIQ: ป้าย "กดเพื่อขยาย" และหน้าต่างขยาย (dialog) */
.shot-zoom { position: relative; }
.zoom-hint { position: absolute; right: 10px; bottom: 10px; z-index: 1; padding: 4px 10px; border-radius: 999px; background: rgba(29,43,20,.82); color: #fff; font-size: 13px; font-weight: 600; pointer-events: none; }
.lightbox { width: min(1200px, 94vw); max-width: none; max-height: 92vh; padding: 0; border: 0; border-radius: 18px; background: #fff; box-shadow: 0 30px 80px rgba(0,0,0,.45); overflow: hidden; }
.lightbox::backdrop { background: rgba(18,30,10,.78); }
.lb-body { max-height: calc(92vh - 60px); overflow: auto; background: #F4F6F2; }
.lb-body img { display: block; width: 100%; height: auto; }
.lb-cap { margin: 0; padding: 14px 56px 16px 18px; font-size: 15px; color: var(--muted); }
.lb-close { position: absolute; right: 10px; top: 10px; z-index: 2; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--deep); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; }
.lb-close:focus-visible { outline: 3px solid var(--logo-green); outline-offset: 2px; }
/* มือถือ: ภาพหน้าจอจอคอมกว้าง 1520px ให้เลื่อนข้างดูรายละเอียดได้ แทนที่จะย่อจนอ่านไม่ออก */
@media (max-width: 759px) { .lb-body img { width: 900px; max-width: none; } }

/* การ์ดความสามารถ PowerIQ — ภาพประกอบด้านบน (ตี๋เล็กสั่ง 10 ต.ค. 2569) */
.feats { gap: 20px; align-items: stretch; }
.feat { padding: 0; overflow: hidden; border-radius: 20px; border-color: #E3F0D4; box-shadow: 0 10px 28px rgba(29,43,20,.07); display: flex; flex-direction: column; }
.feat-art { background: linear-gradient(180deg, #F7FBF1 0%, #EEF7E3 100%); padding: 14px 16px 2px; }
.feat-art img { display: block; width: 100%; height: auto; }
.feat-body { padding: 16px 22px 22px; }
.feat-body h3 { color: var(--deep); margin-bottom: 6px; }
.feat-body p { color: var(--muted); font-size: 15px; }

/* ส่วน AI Application — หน้างานกับออฟฟิศใช้สมองกลางเดียวกัน (ตี๋เล็กสั่ง 10 ต.ค. 2569)
   พื้นเข้มต่อจาก #brain ที่เป็นพื้นขาว ให้เห็นว่าเป็นอีกผลิตภัณฑ์ ไม่ใช่ส่วนต่อของ PowerIQ */
.apps-sec { background: radial-gradient(90% 70% at 50% 0%, #2B4A1A 0%, var(--deep) 65%); }
.app-tag { display: inline-block; font-size: 13px; font-weight: 700; color: var(--brand); background: var(--brand-soft); border-radius: 999px; padding: 3px 12px; }
.app-hubgrid { display: grid; gap: 18px; align-items: stretch; }
@media (min-width: 1040px) { .app-hubgrid { grid-template-columns: minmax(0,1fr) 200px minmax(0,1fr); gap: 20px; } }
.app-side { display: flex; flex-direction: column; background: #fff; color: var(--text); border-radius: 22px; overflow: hidden; box-shadow: 0 18px 40px rgba(0,0,0,.25); }
.app-art { background: linear-gradient(180deg, #F7FBF1 0%, #E6F3D6 100%); padding: 14px 18px 0; }
.app-side.office .app-art { background: linear-gradient(180deg, #FFFFFF 0%, #EEF7E3 100%); }
.app-art img { display: block; width: 100%; max-width: 380px; height: auto; margin: 0 auto; }
.app-side-body { padding: 18px 22px 22px; }
.app-side-body h3 { font-size: 21px; color: var(--deep); margin: 10px 0 2px; }
.app-who { color: var(--muted); font-size: 15px; margin: 0 0 14px; }
.app-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.app-list li { display: grid; grid-template-columns: 44px minmax(0,1fr); gap: 12px; align-items: start; }
.app-list img { display: block; width: 44px; height: 44px; }
.app-list b { display: block; color: var(--deep); font-size: 16px; }
.app-list p { margin: 2px 0 0; color: #404040; font-size: 15px; }
.app-hub { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 4px; padding: 6px 0; }
.app-hub img { width: 170px; height: auto; }
.app-hub b { color: #fff; font-size: 19px; }
.app-hub > span { color: var(--logo-green); font-weight: 600; }
.app-hub-in { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.app-hub-in li { font-size: 14px; color: #DDEBCF; border: 1px solid rgba(193,255,114,.35); border-radius: 999px; padding: 4px 12px; }
/* มือถือและแท็บเล็ต: สมองกลางอยู่ระหว่างสองฝั่ง ใช้ภาพเล็กลง วางภาพข้างข้อความ */
@media (max-width: 1039px) {
  .app-hub { display: grid; grid-template-columns: 96px minmax(0,1fr); text-align: left; justify-items: start; column-gap: 14px; padding: 4px 4px; }
  .app-hub img { grid-row: 1 / span 3; width: 96px; }
  .app-hub-in { justify-content: flex-start; margin-top: 6px; }
}
@media (min-width: 760px) and (max-width: 1039px) { .app-hub { justify-content: center; } }

.app-flow { margin-top: 44px; }
.app-flow h3 { color: #fff; font-size: 22px; margin-bottom: 16px; }
.app-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; counter-reset: none; }
@media (min-width: 760px) { .app-steps { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (min-width: 1040px) { .app-steps { grid-template-columns: repeat(4, minmax(0,1fr)); gap: 26px; } }
.app-steps li { position: relative; background: rgba(255,255,255,.06); border: 1px solid rgba(193,255,114,.16); border-radius: 18px; padding: 18px 18px 20px; }
.app-steps img { display: block; width: 44px; height: 44px; margin-bottom: 10px; }
.app-steps .app-tag { background: var(--logo-green); color: var(--deep); }
.app-steps p { margin: 10px 0 0; color: #DDEBCF; font-size: 15px; }
@media (min-width: 1040px) {
  .app-steps li:not(:last-child)::after { content: "→"; position: absolute; right: -21px; top: 30px; width: 24px; height: 24px; border-radius: 50%; background: var(--logo-green); color: var(--deep); display: grid; place-items: center; font-weight: 700; font-size: 14px; z-index: 1; }
}
.app-note { margin: 12px 0 0; font-size: 14px; color: rgba(255,255,255,.7); }

.app-more { display: grid; gap: 20px; margin-top: 44px; }
@media (min-width: 900px) { .app-more { grid-template-columns: 1fr 1fr; } }
.app-card { display: flex; flex-direction: column; border-radius: 22px; overflow: hidden; }
.app-card-art { padding: 16px 18px 0; }
.app-card-art img { display: block; width: 100%; max-width: 400px; height: auto; margin: 0 auto; }
.app-card-body { padding: 18px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.app-card-body h3 { font-size: 21px; margin-bottom: 8px; }
.app-card.connect { background: #fff; color: var(--text); box-shadow: 0 18px 40px rgba(0,0,0,.25); }
.app-card.connect .app-card-art { background: linear-gradient(180deg, #F7FBF1 0%, #E6F3D6 100%); }
.app-card.connect h3 { color: var(--deep); }
.app-card.connect p { color: #404040; }
.app-card.connect .app-note { color: var(--muted); margin-top: auto; padding-top: 12px; }
.app-chips { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.app-chips li { font-size: 14px; font-weight: 600; color: var(--brand); background: var(--brand-soft); border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px; }
.app-card.build { background: #24470F; border: 1px solid rgba(193,255,114,.3); color: #fff; }
.app-card.build h3 { color: #fff; }
.app-card.build p { color: #DDEBCF; }
.app-build-steps { list-style: none; margin: 14px 0 20px; padding: 0; display: grid; gap: 10px; }
.app-build-steps li { display: flex; align-items: center; gap: 12px; color: #fff; }
.app-build-steps b { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--logo-green); color: var(--deep); display: grid; place-items: center; font-size: 15px; }
.app-card.build .arrow { margin-top: auto; align-self: flex-start; background: var(--logo-green); color: var(--deep); font-weight: 700; }
@media (max-width: 559px) { .app-side-body, .app-card-body { padding: 16px 18px 20px; } .app-side-body h3, .app-card-body h3 { font-size: 19px; } }
.app-card.build .arrow { text-decoration: none; }
/* แท็บเล็ต: การ์ดสองฝั่งเต็มกว้าง ภาพประกอบจึงสูงเกินจำเป็น — วางภาพข้างข้อความแทน · การ์ดล่างเป็นสองคอลัมน์ */
@media (min-width: 760px) and (max-width: 1039px) {
  .app-side { display: grid; grid-template-columns: 280px minmax(0,1fr); }
  .app-art { display: flex; align-items: center; padding: 18px; }
  .app-more { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 559px) { .app-art img { max-width: 300px; } }

/* แชท Chamnarn AI แบบแอปแชท + ภาพประกอบการ์ดข้างแชท (ตี๋เล็กสั่ง 10 ต.ค. 2569) */
.chat-app { margin: 0; background: #fff; border: 1px solid #E3F0D4; border-radius: 22px; overflow: hidden; box-shadow: 0 18px 40px rgba(29,43,20,.10); }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: var(--deep); color: #fff; }
.chat-head img { width: 40px; height: 40px; flex: none; }
.chat-head b { display: block; font-size: 16px; }
.chat-head span { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #DDEBCF; }
.chat-head i { width: 8px; height: 8px; border-radius: 50%; background: var(--logo-green); }
.chat-body { display: flex; flex-direction: column; gap: 14px; padding: 16px 16px 18px; background: linear-gradient(180deg, #F7FBF1 0%, #EEF7E3 100%); }
.chat-day { align-self: center; font-size: 12px; color: var(--muted); background: rgba(255,255,255,.85); border-radius: 999px; padding: 2px 12px; }
.msg-row { display: flex; align-items: flex-end; gap: 8px; }
.msg-row.me { flex-direction: row-reverse; }
.msg-row .msg { max-width: 82%; box-shadow: 0 1px 2px rgba(29,43,20,.08); }
.msg-row .msg.me { border-radius: 18px 18px 4px 18px; }
.msg-row .msg.bot { background: #fff; border-radius: 18px 18px 18px 4px; }
.msg-ava { width: 32px; height: 32px; flex: none; align-self: flex-start; }
.msg-time { flex: none; font-size: 11px; line-height: 1.3; color: var(--muted); text-align: right; }
.msg-row.bot .msg-time { text-align: left; }
.chat-input { display: flex; align-items: center; gap: 10px; margin: 0; padding: 10px 12px 10px 18px; border-top: 1px solid #E3F0D4; background: #fff; }
.chat-input span { flex: 1; color: #8A8A8A; font-size: 15px; }
.chat-input i { width: 36px; height: 36px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-style: normal; font-size: 15px; }
.chat-app figcaption { margin: 0; padding: 8px 18px 12px; background: #fff; }
.cream { display: grid; grid-template-columns: 112px minmax(0,1fr); gap: 16px; align-items: center; }
.cream > img { width: 112px; height: auto; }
@media (max-width: 759px) {
  .cream { grid-template-columns: 1fr; align-content: start; }
  .cream > img { width: 110px; }
  .msg-row .msg { max-width: 86%; }
  .msg-ava { display: none; }
}
/* ช่องทางที่ทีมใช้คุยกับผู้ช่วย: ไอคอน LINE กับ Telegram หน้าข้อความ (ตี๋เล็กสั่ง 10 ต.ค. 2569) */
.d-line { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; }
.d-chans { display: inline-flex; gap: 8px; flex: none; }
.d-chans img { width: 40px; height: 40px; display: block; }
@media (max-width: 559px) { .d-line { font-size: 16px; } }

/* เส้นเชื่อมสมองกลางกับการ์ดสองฝั่ง (ตี๋เล็กสั่ง 10 ต.ค. 2569) — ให้เห็นว่าหน้างานกับออฟฟิศต่อถึงกันผ่านสมองกลาง
   จอคอม: เส้นประแนวนอนวิ่งออกสองข้าง ปลายเป็นจุดเกาะขอบการ์ด · มือถือ/แท็บเล็ต: เส้นประแนวตั้งต่อการ์ดบนกับล่าง */
.app-side { position: relative; z-index: 1; }
.app-hub-core { position: relative; display: block; }
.app-hub-core img { position: relative; z-index: 1; display: block; }
.app-link { position: absolute; z-index: 2; height: 4px; top: calc(50% - 2px); border-radius: 2px;
  background: repeating-linear-gradient(90deg, var(--logo-green) 0 8px, transparent 8px 14px); background-size: 14px 4px; }
.app-link::after { content: ""; position: absolute; top: -5px; width: 14px; height: 14px; border-radius: 50%; background: var(--logo-green); border: 3px solid var(--deep); box-sizing: border-box; }
@media (min-width: 1040px) {
  .app-link.l { right: calc(100% - 16px); width: 52px; animation: app-flow-l 1.2s linear infinite; }
  .app-link.r { left: calc(100% - 16px); width: 52px; animation: app-flow-r 1.2s linear infinite; }
  .app-link.l::after { left: -7px; }
  .app-link.r::after { right: -7px; }
}
@keyframes app-flow-l { to { background-position: -14px 0; } }
@keyframes app-flow-r { to { background-position: 14px 0; } }
@media (max-width: 1039px) {
  /* จอแคบ: สมองกลางเรียงแนวตั้งกลางจอ เส้นต่อเข้าจากการ์ดบนและออกไปการ์ดล่าง (ไม่ลากผ่านตัวหนังสือ) */
  .app-hub { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 26px 0 30px; }
  .app-hub img { width: 110px; }
  .app-hub-in { justify-content: center; }
  .app-link { display: none; }
  .app-hub::before, .app-hub::after { content: ""; position: absolute; left: calc(50% - 2px); width: 4px;
    background: repeating-linear-gradient(180deg, var(--logo-green) 0 8px, transparent 8px 14px); }
  .app-hub::before { top: -20px; height: 44px; }
  .app-hub::after { bottom: -20px; height: 46px; }
}
@media (prefers-reduced-motion: reduce) { .app-link { animation: none !important; } }
/* โลโก้ Smart Factory กลางวงสมองกลาง (ตี๋เล็กสั่ง 10 ต.ค. 2569) — พื้นโลโก้ #1D2B14 สีเดียวกับวงใน SVG จึงตัดเป็นวงกลมแล้วกลืนกัน
   ขนาดเป็น % ของภาพวง (วงใน r48 จาก viewBox กว้าง 220 = 43.6%) จึงตรงกันทั้งจอคอม 170px และจอแคบ 110px */
.app-hub-core img.app-hub-logo { position: absolute; z-index: 2; left: 50%; top: 50%; width: 41%; height: auto; transform: translate(-50%, -50%); border-radius: 50%; }

/* ส่วน "คุยกับเรา" ออกแบบใหม่ (ตี๋เล็กสั่ง 10 ต.ค. 2569) */
.contact-sec { background: linear-gradient(180deg, #FFFFFF 0%, var(--brand-soft) 100%); }
@media (min-width: 960px) { .contact-grid { grid-template-columns: 1fr 1.05fr; gap: 48px; } }
.contact-side .sec-sub { margin-bottom: 18px; }
.contact-art img { display: block; width: 100%; max-width: 380px; height: auto; margin: 0 0 18px; }
.ch-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ch-cards a { display: grid; grid-template-columns: 44px minmax(0,1fr) auto; gap: 14px; align-items: center; padding: 12px 16px; background: #fff; border: 1px solid #E3F0D4; border-radius: 16px; color: var(--text); text-decoration: none; box-shadow: 0 6px 16px rgba(29,43,20,.05); transition: border-color .15s, transform .15s; }
.ch-cards a:hover { border-color: var(--brand); transform: translateY(-1px); }
.ch-cards img { width: 44px; height: 44px; border-radius: 12px; }
.ch-cards small { display: block; color: var(--muted); font-size: 13px; }
.ch-cards b { display: block; color: var(--deep); font-size: 17px; overflow-wrap: anywhere; }
.ch-cards i { font-style: normal; font-weight: 700; color: var(--brand); width: 32px; height: 32px; border-radius: 50%; background: var(--brand-soft); display: grid; place-items: center; }
.contact-person { display: flex; align-items: center; gap: 12px; margin: 16px 0 0; }
.cp-ava { width: 44px; height: 44px; border-radius: 50%; background: var(--deep); color: var(--logo-green); display: grid; place-items: center; font-weight: 700; font-size: 18px; flex: none; }
.contact-person small { display: block; color: var(--muted); font-size: 13px; }
.contact-person b { color: var(--deep); }
.next-steps { list-style: none; margin: 22px 0 0; padding: 16px 18px; display: grid; gap: 10px; background: #fff; border: 1px dashed var(--cream-line); border-radius: 16px; }
.next-steps li { display: flex; align-items: center; gap: 12px; font-size: 15px; color: #404040; }
.next-steps b { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--logo-green); color: var(--deep); display: grid; place-items: center; font-size: 14px; }

.lead-card { gap: 0; background: #fff; border: 1px solid #E3F0D4; border-radius: 24px; overflow: hidden; box-shadow: 0 24px 56px rgba(29,43,20,.12); }
.lead-head { display: grid; gap: 2px; padding: 20px 24px; background: radial-gradient(120% 140% at 100% 0%, #3F7A1E 0%, var(--deep) 70%); color: #fff; }
.lead-head b { font-size: 20px; }
.lead-head span { color: #DDEBCF; font-size: 14px; }
.lead-body { display: grid; gap: 16px; padding: 22px 24px 24px; }
.lead-row { display: grid; gap: 16px; }
@media (min-width: 560px) { .lead-row { grid-template-columns: 1fr 1fr; } }
.lead-card input:not([type="radio"]) { min-height: 50px; border-radius: 12px; background: #FBFDF8; }
.lead-card input:not([type="radio"]):focus { background: #fff; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(193,255,114,.45); outline: none; }
.role-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.role-grid legend { float: left; width: 100%; grid-column: 1 / -1; margin-bottom: 2px; }
.role-tile { position: relative; display: block; cursor: pointer; font-weight: 500; }
.role-tile input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.role-tile span { display: flex; align-items: center; gap: 10px; height: 100%; min-height: 64px; padding: 10px 12px; border: 2px solid #E3F0D4; border-radius: 14px; background: #fff; font-size: 14px; line-height: 1.4; transition: border-color .15s, background .15s; }
.role-tile img { width: 40px; height: 40px; flex: none; }
.role-tile:hover span { border-color: var(--border); }
.role-tile input:checked + span { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.role-tile input:checked + span::after { content: "✓"; margin-left: auto; flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.role-tile input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 2px; }
.lead-btn { min-height: 54px; font-size: 17px; border-radius: 14px; }
.lead-fine { margin: 0; padding: 12px 14px; background: var(--brand-soft); border-radius: 12px; }
@media (max-width: 559px) { .role-tile span { flex-direction: column; align-items: flex-start; } .role-tile input:checked + span::after { position: absolute; right: 10px; top: 10px; } .lead-body, .lead-head { padding-left: 18px; padding-right: 18px; } }
/* มือถือ: ฟอร์มขึ้นต่อจากหัวข้อทันที (ตี๋เล็กสั่ง 10 ต.ค. 2569) — เดิมฟอร์มอยู่ใต้ภาพ การ์ดช่องทาง และขั้นตอน ต้องเลื่อนราว 1,000px กว่าจะถึง
   display: contents ทำให้ลูกของฝั่งซ้ายกลายเป็นลูกของ flex ตัวนอก จึงสลับลำดับด้วย order ได้โดยไม่ต้องมี HTML สองชุด */
@media (max-width: 759px) {
  .contact-grid { display: flex; flex-direction: column; gap: 0; }
  .contact-side { display: contents; }
  .contact-side .pill { align-self: flex-start; }
  .lead-card { order: 1; margin: 4px 0 28px; }
  .contact-art, .ch-cards, .contact-person, .next-steps { order: 2; }
  .contact-art img { max-width: 300px; }
}

/* footer ออกแบบใหม่ (ตี๋เล็กสั่ง 10 ต.ค. 2569) — พื้นเขียวเข้มปิดท้ายหน้า · แถบชวนลงมือ · ลิงก์มีคำอธิบายสั้น */
.foot { position: relative; overflow: hidden; background: radial-gradient(70% 90% at 100% 0%, #2B4A1A 0%, var(--deep) 60%); border-top: 0; color: #DDEBCF; padding: 56px 0 24px; }
.foot::before { content: ""; position: absolute; right: -60px; bottom: -40px; width: 340px; height: 340px; background: url("assets/logo-symbol.png") center / contain no-repeat; opacity: .05; pointer-events: none; }
.foot .wrap { position: relative; }
.foot b { color: var(--logo-green); font-size: 15px; letter-spacing: .02em; margin-bottom: 10px; }
.foot a, .foot span { color: #fff; }
.foot a:hover, .foot a:hover span { color: var(--logo-green); }
.foot-cta { display: grid; gap: 18px; align-items: center; padding: 26px 28px; margin-bottom: 44px; border-radius: 22px; background: linear-gradient(120deg, rgba(193,255,114,.16) 0%, rgba(193,255,114,.05) 100%); border: 1px solid rgba(193,255,114,.28); }
@media (min-width: 900px) { .foot-cta { grid-template-columns: 1fr auto; } }
.foot-cta b { display: block; color: #fff; font-size: clamp(20px, 2.4vw, 26px); margin: 0 0 4px; letter-spacing: 0; }
.foot-cta p { margin: 0; color: #DDEBCF; }
.foot-cta-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.foot .foot-cta-btns a { display: inline-flex; min-height: 48px; padding: 0 22px; border-radius: 999px; font-weight: 700; }
.foot .foot-btn-lime { background: var(--logo-green); color: var(--deep); }
.foot .foot-btn-lime:hover { background: #D6FF9E; color: var(--deep); }
.foot .foot-btn-ghost { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.5); }
.foot .foot-btn-ghost:hover { border-color: var(--logo-green); color: var(--logo-green); }
.foot-grid { gap: 32px; }
@media (min-width: 760px) { .foot-grid { grid-template-columns: 1.3fr 1fr 1fr 1.25fr; } }
.foot-logo { height: 44px; margin-bottom: 14px; }
.foot-brand p { margin: 0; color: #C9DBB8; line-height: 1.7; }
.foot-col { display: grid; align-content: start; gap: 2px; }
.foot-col a { display: grid; gap: 0; min-height: 44px; align-content: center; padding: 4px 0; }
.foot-col a span { display: block; min-height: 0; font-weight: 600; }
.foot-col small { color: #A9C194; font-size: 13px; }
.foot-item { margin: 0; display: flex; align-items: center; min-height: 44px; }
.foot-item span { display: inline; min-height: 0; font-weight: 600; }
.foot-contact a { grid-template-columns: 32px minmax(0,1fr); align-items: center; gap: 10px; }
.foot-contact img { width: 32px; height: 32px; border-radius: 9px; }
.foot-contact a span { overflow-wrap: anywhere; }
.foot-bottom { margin-top: 40px; border-top: 1px solid rgba(221,235,207,.16); color: #A9C194; }
.foot-bottom span { color: inherit; }
.foot-bottom a { color: #DDEBCF; }
.foot-bottom a:hover { color: var(--logo-green); }
@media (max-width: 759px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-brand, .foot-contact { grid-column: 1 / -1; } .foot-cta { padding: 22px 20px; } }
.foot :focus-visible { outline: 3px solid var(--logo-green); outline-offset: 3px; }

/* ---------- เมนูหลักออกแบบใหม่ + ภาพเคลื่อนไหว (ตี๋เล็กสั่ง 10 ต.ค. 2569) ----------
   จอคอม: เมนูอยู่ในแคปซูลเขียวอ่อน มีแถบไฮไลต์ (nav-ind) เลื่อนตามเมาส์ และค้างที่ส่วนที่กำลังอ่าน (app.js คำนวณตำแหน่ง)
   เลื่อนหน้าลงแล้วหัวเว็บเตี้ยลงและมีเงา · มือถือ: ปุ่มสามขีดกลายเป็นกากบาท เมนูเลื่อนลงและลิงก์ทยอยโผล่ */
.top { transition: box-shadow .25s ease, background-color .25s ease; animation: top-in .5s ease-out both; }
.top-inner { transition: height .25s ease; }
.top.scrolled { background: rgba(255,255,255,.97); box-shadow: 0 8px 24px rgba(29,43,20,.08); }
.top.scrolled .top-inner { height: 60px; }
@keyframes top-in { from { transform: translateY(-100%); opacity: 0; } to { transform: none; opacity: 1; } }

.nav { position: relative; align-items: center; gap: 2px; margin-left: 8px; padding: 4px; border-radius: 999px; background: var(--brand-soft); border: 1px solid #E3F0D4; }
.nav a { position: relative; z-index: 1; display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px; border-radius: 999px; color: #3B4A33; font-weight: 500; transition: color .2s ease; }
.nav a:hover, .nav a.is-hover { color: var(--brand); }
.nav a.is-active { color: #fff; font-weight: 600; }
.nav a.is-active.is-dim { color: #3B4A33; }
.nav-ind { position: absolute; z-index: 0; top: 4px; left: 0; height: calc(100% - 8px); width: 0; border-radius: 999px; background: #fff; box-shadow: 0 2px 8px rgba(29,43,20,.10); opacity: 0;
  transition: transform .35s cubic-bezier(.3,1.3,.5,1), width .35s cubic-bezier(.3,1.3,.5,1), background-color .2s ease, opacity .2s ease; }
.nav-ind.on { opacity: 1; }
.nav-ind.active { background: var(--brand); box-shadow: 0 4px 12px rgba(46,94,20,.30); }
.nav a { animation: nav-in .45s ease-out both; }
.nav a:nth-of-type(1) { animation-delay: .10s; } .nav a:nth-of-type(2) { animation-delay: .15s; } .nav a:nth-of-type(3) { animation-delay: .20s; }
.nav a:nth-of-type(4) { animation-delay: .25s; } .nav a:nth-of-type(5) { animation-delay: .30s; } .nav a:nth-of-type(6) { animation-delay: .35s; } .nav a:nth-of-type(7) { animation-delay: .40s; }
@keyframes nav-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
/* จอคอมเล็ก 1040–1239px: เมนู 7 ข้อในแคปซูลเบียดกับปุ่มขวา จึงลดระยะ */
@media (min-width: 1040px) and (max-width: 1239px) { .nav a { padding: 0 9px; font-size: 14px; } .top-inner { gap: 12px; } .nav { margin-left: 0; } }

.btn-primary.btn-sm { transition: background-color .2s ease, transform .2s ease, box-shadow .2s ease; }
.top .btn-primary.btn-sm:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(46,94,20,.28); }

/* ปุ่มสามขีด → กากบาท */
.menu-btn svg path { transition: transform .25s ease, opacity .2s ease; transform-origin: 12px 12px; }
.menu-btn[aria-expanded="true"] { background: var(--brand-soft); }
.mnav:not([hidden]) { animation: mnav-in .28s ease-out both; }
.mnav:not([hidden]) a { animation: nav-in .3s ease-out both; }
.mnav a:nth-child(1) { animation-delay: .03s; } .mnav a:nth-child(2) { animation-delay: .06s; } .mnav a:nth-child(3) { animation-delay: .09s; } .mnav a:nth-child(4) { animation-delay: .12s; }
.mnav a:nth-child(5) { animation-delay: .15s; } .mnav a:nth-child(6) { animation-delay: .18s; } .mnav a:nth-child(7) { animation-delay: .21s; } .mnav a:nth-child(8) { animation-delay: .24s; }
.mnav a.is-active { background: var(--brand-soft); color: var(--brand); box-shadow: inset 3px 0 0 var(--brand); }
@keyframes mnav-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .top, .nav a, .mnav:not([hidden]), .mnav:not([hidden]) a { animation: none !important; }
  .nav-ind, .top-inner, .menu-btn svg path { transition: none !important; }
}
.menu-btn[aria-expanded="true"] .mb1 { transform: rotate(45deg) translateY(5px); }
.menu-btn[aria-expanded="true"] .mb2 { opacity: 0; }
.menu-btn[aria-expanded="true"] .mb3 { transform: rotate(-45deg) translateY(-5px); }

/* SEO (ใบ W8): kicker ย้ายเข้าไปอยู่ใน h1 เพื่อให้ h1 มีคำ "ระบบเฝ้าไฟฟ้าโรงงาน" · หน้าตาเหมือน kicker เดิมทุกอย่าง */
.h1-kicker { display: block; font-family: var(--font-body); font-weight: 600; font-size: 15px; line-height: 1.5; letter-spacing: 0; margin-bottom: 10px; }
/* ชื่อที่การไฟฟ้าใช้ในบิล — คนค้นด้วยคำนี้ (R13) */
.pcard-term { margin: -4px 0 10px; font-size: 14px; font-weight: 600; color: var(--brand); }

/* ---------- หน้าเนื้อหาแยกตามปัญหา (ใบ W9 จาก R13 SEO) ---------- */
.pcard-more { display: inline-flex; align-items: center; min-height: 44px; margin-top: 10px; font-weight: 700; color: var(--brand); }
.art-wrap { max-width: 820px; }
.art-hero { padding: 36px 0 28px; background: linear-gradient(180deg, var(--brand-soft) 0%, #fff 100%); border-top: 4px solid var(--logo-green); }
.art-hero h1 { font-size: clamp(28px, 4vw, 40px); line-height: 1.3; color: var(--deep); margin: 0 0 14px; }
.art-lead { font-size: 18px; color: #404040; margin: 0; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); margin-bottom: 16px; }
.crumbs a { color: var(--brand); min-height: 44px; display: inline-flex; align-items: center; }
.art-body { padding-top: 8px; padding-bottom: 64px; }
.art-body h2 { font-size: clamp(22px, 2.6vw, 28px); color: var(--deep); margin: 44px 0 12px; scroll-margin-top: 80px; }
.art-body p { color: #333; line-height: 1.8; }
.art-sum { margin: 8px 0 8px; padding: 20px 22px; background: #fff; border: 1px solid #E3F0D4; border-left: 6px solid var(--logo-green); border-radius: 16px; box-shadow: 0 10px 28px rgba(29,43,20,.06); }
.art-sum b { display: block; color: var(--deep); margin-bottom: 8px; }
.art-sum ol { margin: 0; padding-left: 22px; display: grid; gap: 6px; }
.art-list { padding-left: 22px; display: grid; gap: 10px; line-height: 1.75; color: #333; }
.art-list b { color: var(--deep); }
.art-table-wrap { overflow-x: auto; border: 1px solid #E3F0D4; border-radius: 14px; }
.art-table { width: 100%; border-collapse: collapse; font-size: 16px; }
.art-table th, .art-table td { text-align: left; vertical-align: top; padding: 14px 16px; border-bottom: 1px solid #E3F0D4; line-height: 1.7; }
.art-table tr:last-child th, .art-table tr:last-child td { border-bottom: 0; }
.art-table th { width: 28%; background: var(--brand-soft); color: var(--deep); font-weight: 700; }
.art-src { font-size: 14px; color: var(--muted) !important; }
.art-src a { color: var(--brand); text-decoration: underline; }
.art-callout { margin: 24px 0; padding: 18px 20px; border-radius: 16px; background: #FFFAEB; border: 1px solid #FEDF89; }
.art-callout b { color: #B54708; }
.art-callout p { margin: 6px 0 0; }
.art-formula { padding: 14px 18px; border-radius: 12px; background: var(--deep); color: var(--logo-green) !important; font-weight: 700; font-size: 17px; }
.art-steps { list-style: none; counter-reset: st; margin: 12px 0; padding: 0; display: grid; gap: 8px; }
.art-steps li { counter-increment: st; display: grid; grid-template-columns: 32px minmax(0,1fr); grid-template-areas: "n s" "n b"; column-gap: 12px; padding: 12px 14px; background: #fff; border: 1px solid #E3F0D4; border-radius: 12px; }
.art-steps li::before { content: counter(st); grid-area: n; width: 32px; height: 32px; border-radius: 50%; background: var(--logo-green); color: var(--deep); display: grid; place-items: center; font-weight: 700; }
.art-steps span { grid-area: s; font-size: 14px; color: var(--muted); }
.art-steps b { grid-area: b; color: var(--deep); overflow-wrap: anywhere; }
.pfc { margin: 36px 0 8px; padding: 22px; border-radius: 20px; background: radial-gradient(120% 80% at 100% 0%, #3F7A1E 0%, var(--brand) 55%, #24470F 100%); color: #fff; }
.pfc h2 { color: #fff; margin-top: 0; }
.pfc p { color: #DDEBCF; }
.pfc .art-src { color: rgba(255,255,255,.75) !important; }
.pfc .art-src a { color: var(--logo-green); }
.pfc-grid { display: grid; gap: 12px; }
@media (min-width: 560px) { .pfc-grid { grid-template-columns: 1fr 1fr; } }
.pfc-grid label { color: #fff; }
.pfc-grid input { font-size: 18px; font-weight: 700; }
.pfc-out { margin: 16px 0 0; display: grid; gap: 8px; }
@media (min-width: 560px) { .pfc-out { grid-template-columns: 1fr 1fr; } }
.pfc-out div { padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.1); }
.pfc-out dt { font-size: 14px; color: #DDEBCF; }
.pfc-out dd { margin: 2px 0 0; font-size: 20px; font-weight: 700; }
.pfc-out .pfc-main { grid-column: 1 / -1; background: var(--logo-green); color: var(--deep); }
.pfc-out .pfc-main dt { color: var(--deep); font-weight: 600; }
.pfc-out .pfc-main dd { font-size: 30px; }
.pfc :focus-visible { outline: 3px solid var(--logo-green); outline-offset: 3px; }
.art-shot { margin: 12px 0; max-width: 420px; border: 1px solid #E3F0D4; border-radius: 14px; overflow: hidden; background: #fff; }
.art-shot img { display: block; width: 100%; height: auto; }
.art-shot figcaption { margin: 0; padding: 10px 14px; font-size: 14px; }
.art-faq { display: grid; gap: 10px; }
.art-faq details { border: 1px solid #E3F0D4; border-radius: 14px; background: #fff; }
.art-faq summary { cursor: pointer; padding: 14px 18px; font-weight: 700; color: var(--deep); min-height: 44px; }
.art-faq details p { margin: 0; padding: 0 18px 16px; }
.art-cta { display: grid; gap: 16px; align-items: center; margin: 44px 0 12px; padding: 24px; border-radius: 20px; background: var(--brand-soft); border: 1px solid var(--border); }
@media (min-width: 760px) { .art-cta { grid-template-columns: 1fr auto; } }
.art-cta b { display: block; font-size: 20px; color: var(--deep); }
.art-cta p { margin: 4px 0 0; }
.art-cta-btns { display: flex; flex-wrap: wrap; gap: 10px; }

/* หน้าอ่านบิลค่าไฟโรงงาน (W9 หน้าที่ 2) — บิลจำลองและตารางอัตรา */
.art-h3 { display: flex; align-items: center; gap: 8px; font-size: 19px; color: var(--deep); margin: 26px 0 6px; }
.bill-no { flex: none; display: inline-grid; place-items: center; width: 26px; height: 26px; margin-right: 8px; border-radius: 50%; background: var(--deep); color: var(--logo-green); font-size: 13px; font-weight: 700; }
.art-h3 .bill-no { margin-right: 0; }
.bill { margin: 14px 0 8px; border: 2px dashed var(--cream-line); border-radius: 18px; background: #fff; overflow: hidden; }
.bill-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding: 14px 18px; background: var(--brand-soft); border-bottom: 1px dashed var(--cream-line); }
.bill-head b { color: var(--deep); }
.bill-head span { font-size: 13px; color: var(--muted); }
.bill-wrap { border: 0; border-radius: 0; }
.bill-table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 520px; }
.bill-table th, .bill-table td { padding: 11px 14px; border-bottom: 1px solid #EEF3E8; text-align: left; }
.bill-table thead th { font-size: 13px; color: var(--muted); font-weight: 600; }
.bill-how { color: var(--muted); font-size: 14px; }
.bill-v { text-align: right !important; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--deep); white-space: nowrap; }
.bill-sub td { background: #FBFDF8; font-weight: 700; color: var(--deep); }
.bill figcaption { margin: 0; padding: 10px 16px; font-size: 13px; }
.art-rates td, .art-rates thead th { text-align: right; font-variant-numeric: tabular-nums; }
.art-rates thead th:first-child { text-align: left; }
.art-rates thead th { background: var(--brand-soft); color: var(--deep); font-size: 14px; }
.art-reduce thead th { background: var(--brand-soft); color: var(--deep); font-size: 14px; }
.tag-yes, .tag-no { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.tag-yes { background: #DCFCE7; color: #166534; }
.tag-no { background: #F3F4F6; color: #4B5563; }
.art-table td a { color: var(--brand); text-decoration: underline; }
/* มือถือ: ช่อง "คิดอย่างไร" ย้ายไปอยู่ใต้ชื่อรายการ ไม่ต้องเลื่อนตารางข้างเพื่อดูยอดเงิน */
.bill-how-m { display: none; }
@media (max-width: 559px) {
  .bill-table { min-width: 0; }
  .bill-table thead th:nth-child(2), .bill-table td.bill-how { display: none; }
  .bill-how-m { display: block; margin: 2px 0 0 34px; font-size: 13px; color: var(--muted); font-weight: 400; }
  .bill-table td:first-child { padding-right: 6px; }
}

/* หน้าระบบมอนิเตอร์หม้อแปลง (W9 หน้าที่ 3) — ตารางเกณฑ์แจ้งเตือน */
.xf-table thead th { width: auto; background: var(--brand-soft); color: var(--deep); font-size: 14px; }
.xf-table tbody th { width: 30%; background: #fff; }
.xf-w, .xf-c { white-space: nowrap; font-weight: 700; font-variant-numeric: tabular-nums; }
.xf-w { color: #B54708; }
.xf-c { color: #B42318; }
/* มือถือ: ตาราง 4 คอลัมน์อ่านไม่ไหว เปลี่ยนแต่ละแถวเป็นการ์ด */
@media (max-width: 559px) {
  .xf-table thead { display: none; }
  .xf-table, .xf-table tbody, .xf-table tr, .xf-table th, .xf-table td { display: block; width: 100%; }
  .xf-table tr { padding: 12px 14px; border-bottom: 1px solid #E3F0D4; }
  .xf-table tr:last-child { border-bottom: 0; }
  .xf-table th, .xf-table td { padding: 2px 0; border: 0; }
  .xf-table tbody th { font-size: 16px; }
  .xf-table .xf-w, .xf-table .xf-c { display: inline-block; width: auto; margin-right: 14px; font-size: 14px; }
  .xf-table .xf-w::before { content: "เตือน "; font-weight: 400; color: var(--muted); }
  .xf-table .xf-c::before { content: "วิกฤต "; font-weight: 400; color: var(--muted); }
  .xf-table td:last-child { font-size: 14px; color: #404040; }
  /* ตารางตัวเลขหลายคอลัมน์ (อัตรา On/Off-Peak · เงินที่ประหยัดตามแรงดัน) หัวตารางถูกซ่อน ตัวเลขจึงไม่รู้ว่าเป็นของคอลัมน์ไหน
     ใส่ data-label ที่ td แล้วแสดงเป็นป้ายนำหน้า (เจอ 10 ต.ค. 2569 ตอนทำหน้า /off-peak-load-shifting/) */
  .xf-table td[data-label]::before { content: attr(data-label) " "; font-weight: 400; color: var(--muted); }
}

/* หน้าค่าพีค (W9 หน้าที่ 4) — ช่องเลือกแรงดันกินเต็มแถว */
.pkc-grid .pkc-volt { grid-column: 1 / -1; }
.pfc-grid select { font: 600 16px/1.4 var(--font-body); padding: 11px 12px; border: 1px solid var(--border); border-radius: 10px; background: #fff; color: var(--text); width: 100%; }
.calc-out .fine a, .calc-sec .fine a { text-decoration: underline; }

/* หน้าหม้อแปลงร้อน (W9 หน้าที่ 5) */
.art-danger { background: #FEF3F2; border-color: #FECDCA; }
.art-danger b { color: #B42318; }
.hot-table thead th:first-child { width: 22%; }
.hot-chk { color: var(--deep); font-weight: 500; }
@media (max-width: 559px) { .hot-table .hot-chk::before { content: "ตรวจ: "; font-weight: 700; color: var(--brand); } .hot-table td { font-size: 14px; } }
@media (max-width: 559px) { .xf-table tbody th { width: 100%; } }

/* หน้า Chamnarn AI (W9 หน้าที่ 6) */
.brain-more { margin: 28px 0 0; text-align: center; }
.brain-more .arrow { text-decoration: none; }
.ai-chat { max-width: 560px; }
.ai-helpers { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 12px; }
@media (min-width: 640px) { .ai-helpers { grid-template-columns: 1fr 1fr; } }
.ai-helpers li { display: grid; grid-template-columns: 44px minmax(0,1fr); gap: 12px; padding: 14px 16px; background: #fff; border: 1px solid #E3F0D4; border-radius: 14px; }
.ai-helpers b { display: block; color: var(--deep); }
.ai-helpers small { display: block; font-size: 13px; color: var(--brand); font-weight: 600; }
.ai-helpers p { margin: 4px 0 0; font-size: 15px; line-height: 1.6; }
.ai-rules { display: grid; gap: 12px; margin: 12px 0 8px; }

/* ---------- diagram ประกอบหน้าเนื้อหา (ตี๋เล็กสั่ง 10 ต.ค. 2569) ----------
   HTML + CSS ล้วน ตัวหนังสือจึงคมและขนาดคงที่ทุกจอ (SVG ที่มีตัวหนังสือย่อตาม viewBox จนอ่านไม่ออกบนมือถือ — บทเรียน W4→W7)
   โทนสี: t-good เขียว · t-base เทาเขียว · t-warn ส้ม · t-bad แดง · t-off จาง */
.dg { margin: 18px 0 22px; padding: 18px; border: 1px solid #E3F0D4; border-radius: 18px; background: linear-gradient(180deg, #FBFDF8 0%, #F4FAEC 100%); }
.dg figcaption { margin: 12px 0 0; font-size: 13px; line-height: 1.6; color: var(--muted); }
.t-good { background: var(--brand); } .t-base { background: #9DBF7A; } .t-warn { background: #F79009; } .t-bad { background: #D92D20; } .t-off { background: #D3EBB8; }
/* แถบเทียบ */
.dg-bars { display: grid; gap: 10px; }
.dg-bar-row { display: grid; grid-template-columns: minmax(0, 180px) minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 14px; }
.dg-bar-l { color: #333; }
.dg-bar-track { height: 18px; border-radius: 999px; background: #E9F2DE; overflow: hidden; }
.dg-bar { display: block; height: 100%; border-radius: 999px; }
.dg-bar-v { font-size: 14px; color: var(--deep); white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 559px) { .dg-bar-row { grid-template-columns: 1fr auto; } .dg-bar-track { grid-column: 1 / -1; grid-row: 2; } .dg-bar-v { white-space: normal; text-align: right; } }
/* ลำดับขั้น */
.dg-flow { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.dg-flow li { position: relative; padding: 12px; border-radius: 14px; background: #fff; border: 1px solid #E3F0D4; text-align: center; }
.dg-flow li:not(:last-child)::after { content: "→"; position: absolute; right: -9px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; border-radius: 50%; background: var(--logo-green); color: var(--deep); font-size: 11px; font-weight: 700; display: grid; place-items: center; z-index: 1; }
.dg-n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--deep); color: var(--logo-green); font-size: 12px; font-weight: 700; margin-bottom: 6px; }
.dg-flow b { display: block; font-size: 14px; color: var(--deep); line-height: 1.4; }
.dg-flow small { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); line-height: 1.5; }
@media (max-width: 759px) {
  .dg-flow { grid-auto-flow: row; }
  .dg-flow li { display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 10px; text-align: left; align-items: center; }
  .dg-flow .dg-n { grid-row: 1 / span 2; margin: 0; }
  .dg-flow li:not(:last-child)::after { content: "↓"; right: auto; left: 50%; top: auto; bottom: -9px; transform: translateX(-50%); }
}
/* เหตุ → ผล */
.dg-chain, .dg-ai-row { display: flex; align-items: center; gap: 10px; }
.dg-causes { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; flex: 1.3; }
.dg-causes li { padding: 7px 12px; border-radius: 10px; background: #fff; border: 1px solid #E3F0D4; font-size: 14px; color: #333; }
.dg-arrow { flex: none; font-weight: 700; color: var(--brand); font-size: 20px; }
.dg-effect { flex: 1; padding: 12px; border-radius: 14px; background: #FFFAEB; border: 1px solid #FEDF89; color: #B54708; font-weight: 700; font-size: 14px; text-align: center; }
.dg-effect.last { background: #FEF3F2; border-color: #FECDCA; color: #B42318; }
.dg-effect small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; margin-top: 2px; }
@media (max-width: 759px) { .dg-chain, .dg-ai-row { flex-direction: column; align-items: stretch; } .dg-arrow { transform: rotate(90deg); align-self: center; } }
/* กล่องไอคอน */
.dg-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.dg-grid li { padding: 14px; border-radius: 14px; background: #fff; border: 1px solid #E3F0D4; }
.dg-grid img { display: block; width: auto; height: 40px; margin-bottom: 8px; }
.dg-grid b { display: block; font-size: 15px; color: var(--deep); }
.dg-grid small { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); line-height: 1.5; }
/* คอลัมน์แนวตั้ง + เส้นเกณฑ์ · พื้นที่แท่งสูง 120px เส้นเกณฑ์จึงเทียบกับพื้นที่นี้ตรง ๆ */
.dg-cols-wrap { overflow-x: auto; padding-top: 22px; }
.dg-cols { position: relative; display: flex; align-items: flex-end; gap: 6px; height: 120px; margin-bottom: 24px; min-width: 260px; border-bottom: 1px solid #D3EBB8; }
.dg-col { position: relative; flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 18px; }
.dg-col i { display: block; width: 100%; max-width: 46px; border-radius: 6px 6px 2px 2px; }
.dg-col-v { font-size: 12px; font-weight: 700; color: var(--deep); white-space: nowrap; margin-bottom: 3px; line-height: 1.2; }
.dg-col-l { position: absolute; bottom: -20px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.dg-line { position: absolute; left: 0; right: 0; height: 0; border-top: 2px dashed #B42318; z-index: 1; pointer-events: none; }
.dg-line em { position: absolute; right: 0; bottom: 2px; font-style: normal; font-size: 12px; font-weight: 700; color: #B42318; background: rgba(251,253,248,.92); padding: 0 4px; white-space: nowrap; }
.dg-legend { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: #404040; }
.dg-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
/* แถบโซน PF */
.dg-zone-bar { display: grid; grid-template-columns: 1fr 1fr 1fr; border-radius: 12px; overflow: hidden; font-size: 13px; text-align: center; }
.dg-zone-bar span { padding: 10px 6px; color: #fff; font-weight: 600; }
.dg-zone-bar b { display: block; font-size: 14px; }
.z-bad { background: #D92D20; } .z-mid { background: #B54708; } .z-good { background: var(--brand); }
/* รหัสประเภท */
.dg-code-row { display: flex; align-items: stretch; justify-content: center; gap: 6px; }
.dg-code-row > div { flex: 1; max-width: 190px; padding: 10px 6px; border-radius: 14px; background: #fff; border: 1px solid #E3F0D4; text-align: center; }
.dg-code-row b { display: block; font-size: 34px; line-height: 1.1; color: var(--deep); }
.dg-code-row small { display: block; font-size: 12px; color: var(--muted); }
.dg-code-row em { display: block; font-style: normal; font-size: 13px; font-weight: 700; color: var(--brand); margin-top: 4px; }
.dg-code-row > span { align-self: center; font-size: 30px; font-weight: 700; color: var(--deep); }
/* วันเดียว 24 ชั่วโมง */
.dg-day-row { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 10px; align-items: center; margin-bottom: 8px; font-size: 13px; }
.dg-day-bar { display: flex; height: 30px; border-radius: 8px; overflow: hidden; }
.dg-day-bar i { display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; }
.dg-day-bar .on { background: #B54708; color: #fff; } .dg-day-bar .off { background: #D3EBB8; color: var(--deep); }
.dg-day-axis { position: relative; margin-left: 140px; height: 16px; font-size: 11px; color: var(--muted); }
.dg-day-axis span { position: absolute; transform: translateX(-50%); } .dg-day-axis span:nth-child(1) { left: 0; transform: none; } .dg-day-axis span:nth-child(2) { left: 37.5%; } .dg-day-axis span:nth-child(3) { left: 91.7%; } .dg-day-axis span:nth-child(4) { right: 0; transform: none; }
@media (max-width: 559px) { .dg-day-row { grid-template-columns: 1fr; gap: 4px; } .dg-day-axis { margin-left: 0; } .dg-day-axis span:nth-child(3) { display: none; } }
/* แถบสัดส่วน */
.dg-stack { display: flex; height: 34px; border-radius: 10px; overflow: hidden; }
.dg-stack i { display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 12px; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; }
.dg-stack .t-base { color: var(--deep); }
/* เปรียบสองแบบ */
.dg-two { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
.dg-two-h { display: block; font-size: 14px; } .dg-two-h.bad { color: #B42318; } .dg-two-h.good { color: var(--brand); }
.dg-two .dg-cols { min-width: 0; }
@media (max-width: 559px) { .dg-two { grid-template-columns: 1fr; } }
/* AI */
.dg-hub { background: var(--deep) !important; border-color: var(--deep) !important; color: #fff !important; }
.dg-hub img { display: block; margin: 0 auto 4px; border-radius: 50%; }
.dg-hub small { color: var(--logo-green) !important; }
.dg-hubmap-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.dg-hubmap-grid span { padding: 10px 8px; border-radius: 12px; background: #fff; border: 1px solid #E3F0D4; text-align: center; font-size: 13px; font-weight: 600; color: var(--deep); }
.dg-hubmap-c { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 10px; border-radius: 12px; background: var(--deep); color: var(--logo-green); font-size: 15px; }
.dg-hubmap-c img { border-radius: 50%; }
@media (max-width: 559px) { .dg-hubmap-grid { grid-template-columns: 1fr 1fr; } }
.dg-qa { display: grid; gap: 10px; }
.dg-qa-q { justify-self: end; max-width: 85%; padding: 10px 14px; border-radius: 16px 16px 4px 16px; background: var(--brand); color: #fff; font-size: 15px; }
.dg-qa-a { justify-self: start; max-width: 85%; padding: 10px 14px; border-radius: 16px 16px 16px 4px; background: #fff; border: 1px solid #E3F0D4; font-size: 15px; color: #333; }
.dg-cite { display: block; width: fit-content; margin-top: 8px; padding: 2px 10px; border-radius: 999px; background: var(--brand-soft); border: 1px solid var(--border); font-size: 12px; font-weight: 600; color: var(--brand); }
/* ป้ายตัวเลขแท่งแรกชิดซ้าย ไม่งั้นถูกตัดขอบเมื่อแท่งแคบกว่าตัวเลข (เจอบนมือถือ: "1,000" เหลือ ",000") · ใช้ first-of-type เพราะลูกตัวแรกคือเส้นเกณฑ์ (span) */
.dg-col:first-of-type .dg-col-v { align-self: flex-start; }
.dg-col:last-child .dg-col-v { align-self: flex-end; }
/* diagram AI: ปลายทางคือคำตอบ เป็นเรื่องดี ใช้สีเขียว ไม่ใช่แดงแบบ diagram เหตุและผล */
.dg-ai .dg-effect.last { background: var(--brand-soft); border-color: var(--border); color: var(--brand); }

/* ---------- เทมเพลตบทความรุ่น 2 (ตี๋เล็กสั่ง 10 ต.ค. 2569 ปรับดีไซน์หน้าเนื้อหาทั้ง 6 หน้าให้สวยและอ่านง่าย) ----------
   hero สองคอลัมน์ · สารบัญติดข้างจอ · เลขหัวข้อ · การ์ดอ่านต่อ · แถบความคืบหน้า · ตัวหนังสือ 17px บรรทัดห่าง 1.85 */
.read-progress { position: fixed; left: 0; right: 0; top: 0; height: 3px; z-index: 30; pointer-events: none; }
.read-progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--logo-green), var(--brand)); }

.art-hero2 { padding: 40px 0 44px; background: radial-gradient(80% 120% at 100% 0%, #E3F5CC 0%, var(--brand-soft) 45%, #FFFFFF 100%); border-top: 0; border-bottom: 1px solid #E3F0D4; }
.art-hero-grid { display: grid; gap: 28px; align-items: center; }
@media (min-width: 960px) { .art-hero-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: 48px; } }
.art-hero2 h1 { font-size: clamp(28px, 3.6vw, 42px); line-height: 1.28; letter-spacing: -0.01em; }
.art-hero2 .art-lead { font-size: 18px; line-height: 1.8; color: #3A3A3A; max-width: 40em; }
.art-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; }
.art-meta span { display: inline-flex; align-items: center; min-height: 30px; padding: 0 12px; border-radius: 999px; background: #fff; border: 1px solid #E3F0D4; font-size: 13px; font-weight: 600; color: var(--brand); }
.art-hero-card { padding: 18px; border-radius: 24px; background: #fff; border: 1px solid #E3F0D4; box-shadow: 0 24px 56px rgba(29,43,20,.10); }
.art-hero-card > img { display: block; width: 100%; height: auto; max-height: 200px; object-fit: contain; border-radius: 16px; background: linear-gradient(180deg, #F7FBF1 0%, #EEF7E3 100%); padding: 10px; }
.art-stats { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.art-stats li { padding: 10px 8px; border-radius: 14px; background: var(--brand-soft); text-align: center; }
.art-stats b { display: block; font-size: 20px; line-height: 1.2; color: var(--deep); }
.art-stats span { display: block; margin-top: 2px; font-size: 12px; line-height: 1.4; color: var(--muted); }
@media (max-width: 959px) { .art-hero-card { max-width: 520px; } .art-hero-card > img { max-height: 150px; } }

/* โครงสองคอลัมน์: สารบัญ | เนื้อหา */
.art-layout { display: grid; gap: 28px; padding-top: 32px; padding-bottom: 72px; }
@media (min-width: 1040px) { .art-layout { grid-template-columns: 250px minmax(0, 760px); justify-content: center; gap: 56px; } }
.art-layout .art-body { padding: 0; min-width: 0; }
.art-toc { min-width: 0; }
@media (min-width: 1040px) { .art-toc { position: sticky; top: 88px; align-self: start; max-height: calc(100vh - 110px); overflow: auto; } }
.toc-box { border: 1px solid #E3F0D4; border-radius: 16px; background: #fff; }
.toc-box summary { cursor: pointer; list-style: none; padding: 12px 16px; font-weight: 700; color: var(--deep); min-height: 44px; display: flex; align-items: center; justify-content: space-between; }
.toc-box summary::-webkit-details-marker { display: none; }
.toc-box summary::after { content: "▾"; color: var(--brand); transition: transform .2s; }
.toc-box:not([open]) summary::after { transform: rotate(-90deg); }
.toc-box ol { list-style: none; margin: 0; padding: 0 8px 10px; display: grid; gap: 2px; }
.toc-box a { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 6px; align-items: baseline; padding: 7px 10px; border-radius: 10px; font-size: 14px; line-height: 1.5; color: #3B4A33; text-decoration: none; }
.toc-box a span { font-size: 12px; font-weight: 700; color: #9DBF7A; }
.toc-box a:hover { background: var(--brand-soft); color: var(--brand); }
.toc-box a.is-active { background: var(--brand); color: #fff; font-weight: 600; }
.toc-box a.is-active span { color: var(--logo-green); }
.toc-cta { display: none; margin-top: 14px; padding: 14px 16px; border-radius: 16px; background: var(--deep); color: #fff; text-decoration: none; }
.toc-cta b { display: block; font-size: 15px; }
.toc-cta span { display: block; margin-top: 2px; font-size: 13px; color: var(--logo-green); }
@media (min-width: 1040px) { .toc-cta { display: block; } }

/* ตัวหนังสือและหัวข้อ */
.art-layout .art-body p, .art-layout .art-list { font-size: 17px; line-height: 1.85; color: #2B2B2B; }
.art-layout .art-body h2 { display: flex; align-items: baseline; gap: 12px; margin: 52px 0 14px; padding-top: 22px; border-top: 1px solid #E3F0D4; font-size: clamp(22px, 2.4vw, 28px); line-height: 1.35; }
.art-layout .art-body > h2:first-of-type, .art-layout .art-sum + h2 { border-top: 0; padding-top: 0; margin-top: 40px; }
.h2-no { flex: none; display: inline-grid; place-items: center; min-width: 40px; height: 30px; padding: 0 8px; border-radius: 10px; background: var(--deep); color: var(--logo-green); font-size: 14px; font-weight: 700; letter-spacing: .04em; transform: translateY(-3px); }
.pfc h2 .h2-no { background: var(--logo-green); color: var(--deep); }
.art-layout .art-list { padding-left: 0; list-style: none; }
.art-layout .art-list > li { position: relative; padding-left: 26px; }
.art-layout .art-list > li::before { content: ""; position: absolute; left: 4px; top: .72em; width: 10px; height: 10px; border-radius: 3px; background: var(--logo-green); box-shadow: 0 0 0 2px var(--brand) inset; }
.art-layout .art-ol { counter-reset: ol; }
.art-layout .art-ol > li { counter-increment: ol; padding-left: 36px; }
.art-layout .art-ol > li::before { content: counter(ol); width: 24px; height: 24px; top: .3em; left: 0; border-radius: 50%; box-shadow: none; background: var(--brand); color: #fff; font-size: 13px; font-weight: 700; display: grid; place-items: center; }

/* สรุป 3 บรรทัด */
.art-layout .art-sum { margin-top: 0; padding: 22px 24px; border: 0; border-radius: 20px; background: var(--deep); color: #fff; box-shadow: 0 18px 40px rgba(29,43,20,.18); }
.art-layout .art-sum b { color: var(--logo-green); font-size: 15px; letter-spacing: .02em; }
.art-layout .art-sum ol { list-style: none; padding: 0; counter-reset: sum; gap: 10px; }
.art-layout .art-sum li { counter-increment: sum; position: relative; padding-left: 38px; font-size: 16px; line-height: 1.75; color: #E6F1DA; }
.art-layout .art-sum li::before { content: counter(sum); position: absolute; left: 0; top: .15em; width: 26px; height: 26px; border-radius: 50%; background: var(--logo-green); color: var(--deep); font-size: 13px; font-weight: 700; display: grid; place-items: center; }
.art-layout .art-sum strong { color: #fff; }

/* กล่องเตือน */
.art-layout .art-callout { position: relative; padding: 18px 20px 18px 58px; border-radius: 18px; }
.art-layout .art-callout::before { content: "!"; position: absolute; left: 18px; top: 18px; width: 28px; height: 28px; border-radius: 50%; background: #F79009; color: #fff; font-weight: 700; display: grid; place-items: center; }
.art-layout .art-danger::before { background: #D92D20; }

/* การ์ดอ่านต่อ */
.art-related { margin-top: 56px; }
.art-related h2 { border-top: 0 !important; padding-top: 0 !important; }
.rel-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.rel-card { display: flex; flex-direction: column; border: 1px solid #E3F0D4; border-radius: 18px; overflow: hidden; background: #fff; text-decoration: none; color: var(--text); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.rel-card:hover { transform: translateY(-3px); border-color: var(--brand); box-shadow: 0 14px 30px rgba(29,43,20,.12); }
.rel-img { display: block; padding: 10px; background: linear-gradient(180deg, #F7FBF1 0%, #EEF7E3 100%); }
.rel-img img { display: block; width: 100%; height: 110px; object-fit: contain; }
.rel-card b { display: block; padding: 12px 14px 0; font-size: 16px; color: var(--deep); }
.rel-card small { display: block; padding: 2px 14px 14px; font-size: 13px; line-height: 1.55; color: var(--muted); }
@media (max-width: 559px) { .rel-grid { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 78%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; } .rel-card { scroll-snap-align: start; } }
@media (prefers-reduced-motion: reduce) { .rel-card { transition: none; } .rel-card:hover { transform: none; } }

/* แถบชวนติดต่อท้ายบทความ: พื้นเข้ม */
.art-layout .art-cta { background: radial-gradient(120% 140% at 100% 0%, #3F7A1E 0%, var(--deep) 65%); border: 0; color: #fff; padding: 28px; border-radius: 22px; }
.art-layout .art-cta b { color: #fff; }
.art-layout .art-cta p { color: #DDEBCF; }
.art-layout .art-cta .btn-primary { background: var(--logo-green); color: var(--deep); font-weight: 700; }
.art-layout .art-cta .btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.art-layout .art-cta :focus-visible { outline: 3px solid var(--logo-green); outline-offset: 3px; }
/* หัวข้อเลื่อนไปแล้วไม่ถูกหัวเว็บบัง */
.art-layout [id] { scroll-margin-top: 84px; }

/* หน้า /poweriq/: การ์ดความสามารถกับการ์ดความปลอดภัยที่ยกจากหน้าแรก อยู่ในคอลัมน์บทความกว้าง 760px · 3–4 คอลัมน์แคบเกิน จึงเหลือ 2 */
@media (min-width: 760px) { .art-layout .feats, .art-layout .scards { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: row; grid-auto-columns: auto; overflow: visible; } }
.art-layout .feat-body p, .art-layout .scard-body p { font-size: 15px; line-height: 1.7; }
.art-layout .feats, .art-layout .scards, .art-layout .shots { margin: 14px 0 8px; }

/* หน้า /sitemap/ แผนผังเว็บไซต์ (10 ต.ค. 2569) · ใช้การ์ดแบบเดียวกับ "อ่านต่อ"
   แต่บนมือถือเรียงลงเป็นแนวตั้ง ไม่ปัดข้าง เพราะหน้านี้มีไว้กวาดตาดูทั้งหมด การ์ดที่ซ่อนอยู่ด้านขวาจะไม่มีใครเห็น */
.sm-wrap { padding-top: 28px; padding-bottom: 72px; }
.sm-group { margin-top: 36px; }
.sm-group:first-child { margin-top: 8px; }
.sm-group h2 { margin: 0; font-size: clamp(22px, 2.4vw, 28px); color: var(--deep); }
.sm-sub { margin: 4px 0 14px; color: var(--muted); font-size: 15px; }
.sm-page .sm-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); grid-auto-flow: row; grid-auto-columns: auto; overflow: visible; padding-bottom: 0; }
/* padding ล่างของ small ทำให้บรรทัดที่ 4 โผล่มาครึ่งบรรทัดเมื่อตัดด้วย line-clamp → ย้ายระยะไปเป็น margin */
.sm-page .sm-grid .rel-card small { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; padding-bottom: 0; margin: 0 0 14px; }
/* มือถือ: ซ่อนภาพ เหลือชื่อกับคำอธิบาย การ์ดมีภาพสูงราว 270px ทำให้ 11 หน้าต้องเลื่อนยาวเกินไปสำหรับหน้าที่มีไว้กวาดตา */
@media (max-width: 559px) { .sm-page .sm-grid { grid-template-columns: 1fr; gap: 10px; } .sm-page .sm-grid .rel-img { display: none; } }
.sm-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sm-links a { display: flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid #E3F0D4; border-radius: 12px; background: #fff; color: var(--brand); font-weight: 600; text-decoration: none; }
.sm-links a:hover { border-color: var(--brand); background: var(--brand-soft); }

/* footer 5 คอลัมน์ (เพิ่มคอลัมน์ความรู้ 10 ต.ค. 2569)
   จอคอม ≥1040: เรียงครบห้าคอลัมน์ · แท็บเล็ต 760–1039: สามคอลัมน์ บริษัทเต็มแถวบน (ห้าคอลัมน์ที่ 820px แคบจนชื่อบทความขึ้นสามบรรทัด)
   มือถือใช้กฎเดิม: สองคอลัมน์ บริษัทกับช่องทางติดต่อเต็มแถว */
@media (min-width: 760px) and (max-width: 1039px) { .foot-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .foot-brand { grid-column: 1 / -1; } }
@media (min-width: 1040px) { .foot-grid { grid-template-columns: 1.2fr 1fr 1.1fr 1fr 1.2fr; gap: 28px; } }
/* 4 บรรทัด × 33px = 132px เท่าคอลัมน์ติดต่อ (3 × 44px) · 33px ยังเกินขนาดเป้ากดขั้นต่ำ 24px ของ WCAG 2.2 */
.foot-learn a { min-height: 33px; padding: 2px 0; }
.foot-learn .foot-all span { color: var(--logo-green); }
.foot-learn .foot-all:hover span { text-decoration: underline; }
