/* =====================================================================
   GenfinyHR - เว็บการตลาด www.genfinyhr.com
   สไตล์: สว่าง พรีเมียม น่าเชื่อถือ ใช้สีแบรนด์เดียวกับตัวระบบ (public/css/app.css)
   ไฟล์นี้แยกจาก app.css โดยตั้งใจ เว็บการตลาดจะได้ปรับหน้าตาได้อิสระ
   ===================================================================== */

:root {
  --b1: #2f7ecd; --b2: #26a06f; --b3: #8cc63f; --b4: #f6b52c;
  --b5: #f07226; --b6: #df3a41; --b7: #bd2f7f; --b8: #6a3fa0;
  --grad: linear-gradient(100deg, var(--b1), var(--b2), var(--b3), var(--b4), var(--b5), var(--b6), var(--b7), var(--b8));

  --bg: #fbfaf7;
  --bg-soft: #f5f1ea;
  --surface: #ffffff;
  --surface-2: #faf7f2;
  --line: rgba(30, 26, 36, .09);
  --line-strong: rgba(30, 26, 36, .16);
  --text: #1d1a22;
  --muted: #625c6c;
  --faint: #8d8798;

  --primary: #0f7d72;
  --primary-dark: #0a5d55;
  --primary-soft: #e2f1ee;
  --accent: #7a3f9e;
  --accent-soft: #f0e6f7;

  --r-sm: 10px; --r: 16px; --r-lg: 24px; --r-xl: 32px;
  --sh-1: 0 1px 2px rgba(24, 20, 30, .05), 0 4px 14px rgba(24, 20, 30, .05);
  --sh-2: 0 2px 6px rgba(24, 20, 30, .06), 0 18px 44px rgba(24, 20, 30, .10);
  --sh-3: 0 30px 80px rgba(24, 20, 30, .18), 0 6px 20px rgba(24, 20, 30, .08);
  --font: 'Segoe UI', 'Leelawadee UI', 'Noto Sans Thai', Tahoma, system-ui, -apple-system, sans-serif;
  --wrap: 1180px;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #14121a; --bg-soft: #1a1722; --surface: #1e1b27; --surface-2: #241f2e;
  --line: rgba(255, 255, 255, .09); --line-strong: rgba(255, 255, 255, .18);
  --text: #f0ecf4; --muted: #a9a2b6; --faint: #7e7789;
  --primary: #35b3a4; --primary-dark: #4ec7b8; --primary-soft: #10403b;
  --accent: #b07fd6; --accent-soft: #33254a;
  --sh-1: 0 1px 2px rgba(0,0,0,.4), 0 4px 14px rgba(0,0,0,.3);
  --sh-2: 0 2px 6px rgba(0,0,0,.45), 0 18px 44px rgba(0,0,0,.45);
  --sh-3: 0 30px 80px rgba(0,0,0,.6), 0 6px 20px rgba(0,0,0,.4);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.65; font-size: 16px; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0 0 .6rem; line-height: 1.22; font-weight: 700; letter-spacing: -.015em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1rem; }
ul { margin: 0 0 1rem; padding-left: 1.2rem; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 1.25rem; }
.muted { color: var(--muted); }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- ปุ่ม ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .8rem 1.5rem; border-radius: 999px;
  border: 1px solid transparent; font: inherit; font-size: .97rem; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .15s ease, box-shadow .2s ease, background .15s, color .15s, border-color .15s; }
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 8px 24px rgba(15, 125, 114, .28); }
.btn-primary:hover { background: var(--primary-dark); box-shadow: 0 14px 34px rgba(15, 125, 114, .34); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--line-strong); box-shadow: var(--sh-1); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-plain { background: none; color: var(--muted); padding: .5rem .8rem; }
.btn-plain:hover { color: var(--text); }
.btn-lg { padding: 1rem 1.9rem; font-size: 1.03rem; }
.btn-sm { padding: .5rem 1rem; font-size: .88rem; }

/* ---------- แถบบน ---------- */
.nav { position: sticky; top: 0; z-index: 60; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s, background .2s; }
.nav.stuck { border-bottom-color: var(--line); background: color-mix(in srgb, var(--bg) 94%, transparent); }
.nav .inner { display: flex; align-items: center; gap: 1.6rem; height: 72px; }
.nav-brand { display: flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.15rem; color: var(--text); letter-spacing: -.02em; }
.nav-brand:hover { text-decoration: none; }
.nav-brand img { width: 36px; height: 36px; object-fit: contain; }
.nav-links { display: flex; align-items: center; gap: .3rem; margin-left: auto; }
.nav-links a { padding: .5rem .8rem; border-radius: 999px; color: var(--muted); font-size: .93rem; font-weight: 500; }
.nav-links a:hover { color: var(--text); background: var(--bg-soft); text-decoration: none; }
.nav-actions { display: flex; align-items: center; gap: .5rem; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line-strong); border-radius: 10px; width: 40px; height: 40px; font-size: 1.2rem; cursor: pointer; color: var(--text); }
@media (max-width: 980px) {
  .nav-links { display: none; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--sh-2); padding: .5rem; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: .8rem 1rem; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; order: 3; }
  .nav .inner { gap: .5rem; }
  .nav-actions .btn-ghost { display: none; }
}

/* ตัวสลับภาษา */
.lang { position: relative; }
.lang-btn { display: inline-flex; align-items: center; gap: .35rem; padding: .45rem .75rem; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--text); font: inherit; font-size: .88rem; cursor: pointer; }
.lang-btn:hover { border-color: var(--primary); }
.lang-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 160px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-sm); box-shadow: var(--sh-2); padding: .3rem; z-index: 70; }
.lang-menu a { display: flex; align-items: center; gap: .5rem; padding: .5rem .7rem; border-radius: 8px; color: var(--text); font-size: .9rem; }
.lang-menu a:hover { background: var(--bg-soft); text-decoration: none; }
.lang-menu a.on { color: var(--primary); font-weight: 600; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(3rem, 7vw, 6rem) 0 clamp(3.5rem, 8vw, 7rem); overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: -30% -10% auto -10%; height: 130%; pointer-events: none; z-index: 0;
  background:
    radial-gradient(46% 42% at 78% 8%, rgba(122, 63, 158, .16), transparent 70%),
    radial-gradient(40% 40% at 12% 4%, rgba(15, 125, 114, .16), transparent 70%),
    radial-gradient(60% 50% at 50% 100%, rgba(246, 181, 44, .10), transparent 70%); }
[data-theme="dark"] .hero::before { opacity: .55; }
.hero .inner { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (max-width: 980px) { .hero .inner { grid-template-columns: minmax(0, 1fr); } }

.badge-pill { display: inline-flex; align-items: center; gap: .5rem; padding: .4rem .9rem .4rem .5rem; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1); font-size: .85rem; font-weight: 500; color: var(--muted); margin-bottom: 1.4rem; }
.badge-pill .dot { width: 22px; height: 22px; border-radius: 50%; background: var(--grad); display: inline-block; }

.hero h1 { margin-bottom: 1.1rem; }
.hero h1 .grad { background: linear-gradient(96deg, #0f8f7e 0%, #2f7ecd 34%, #7a3f9e 68%, #bd2f7f 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-lead { font-size: clamp(1rem, 1.6vw, 1.13rem); color: var(--muted); max-width: 56ch; margin-bottom: 1.9rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 1rem; }
.hero-note { font-size: .87rem; color: var(--faint); display: flex; align-items: center; gap: .45rem; }
.hero-proof { display: flex; flex-wrap: wrap; gap: 1.8rem; margin-top: 2.4rem; padding-top: 1.6rem; border-top: 1px solid var(--line); }
.hero-proof div b { display: block; font-size: 1.5rem; line-height: 1.1; letter-spacing: -.02em; }
.hero-proof div span { font-size: .84rem; color: var(--muted); }

/* ---------- หน้าจอจำลองแบบ 3 มิติ ---------- */
.scene { position: relative; perspective: 1700px; padding: 1.5rem 0; }
.win { position: relative; border-radius: 18px; overflow: hidden; background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--sh-3); transform: rotateY(-15deg) rotateX(7deg) rotateZ(1deg); transform-style: preserve-3d;
  animation: float-win 11s ease-in-out infinite; }
@keyframes float-win { 0%, 100% { transform: rotateY(-15deg) rotateX(7deg) rotateZ(1deg) translateY(0); } 50% { transform: rotateY(-12deg) rotateX(5deg) rotateZ(.5deg) translateY(-14px); } }
.win::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, rgba(255,255,255,.42) 0%, rgba(255,255,255,0) 42%); }
[data-theme="dark"] .win::after { background: linear-gradient(115deg, rgba(255,255,255,.10) 0%, rgba(255,255,255,0) 42%); }

.win-bar { display: flex; align-items: center; gap: .4rem; padding: .6rem .9rem; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.win-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); display: block; }
.win-bar .url { margin-left: .6rem; flex: 1; font-size: .72rem; color: var(--faint); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: .18rem .7rem; }
.win-body { display: grid; grid-template-columns: 132px minmax(0, 1fr); min-height: 320px; font-size: .72rem; }
.win-side { background: #241f2c; color: #cdc5d3; padding: .7rem .55rem; }
.win-side .b { display: flex; align-items: center; gap: .4rem; color: #fff; font-weight: 700; font-size: .82rem; padding: 0 .3rem .6rem; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: .5rem; }
.win-side .b img { width: 20px; height: 20px; }
.win-side em { display: block; font-style: normal; padding: .3rem .45rem; border-radius: 7px; margin-bottom: 2px; opacity: .82; }
.win-side em.on { background: var(--primary); color: #fff; opacity: 1; }
.win-main { padding: .85rem .95rem; background: var(--bg-soft); }
.win-h { display: flex; align-items: center; margin-bottom: .7rem; }
.win-h b { font-size: .95rem; }
.win-h .pill { margin-left: auto; background: var(--primary); color: #fff; border-radius: 6px; padding: .2rem .55rem; font-size: .66rem; }
.win-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .45rem; margin-bottom: .7rem; }
.win-stats div { background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: .45rem .55rem; }
.win-stats b { display: block; font-size: 1rem; letter-spacing: -.02em; }
.win-stats span { color: var(--faint); font-size: .64rem; }
.win-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.win-table th, .win-table td { padding: .32rem .5rem; text-align: left; border-bottom: 1px solid var(--line); }
.win-table th { background: var(--surface-2); color: var(--faint); font-weight: 600; font-size: .64rem; }
.win-table tr:last-child td { border-bottom: 0; }
.tag { display: inline-block; padding: .05rem .4rem; border-radius: 999px; font-size: .6rem; font-weight: 600; }
.tag.ok { background: #e0f0e2; color: #2f8f4e; } .tag.warn { background: #fbeed6; color: #b9782a; } .tag.info { background: #ddebf6; color: #2b6fa8; }
[data-theme="dark"] .tag.ok { background: #1e4429; color: #6cc887; }
[data-theme="dark"] .tag.warn { background: #533a17; color: #e8b465; }
[data-theme="dark"] .tag.info { background: #1c3d55; color: #6fb3e0; }

.float-card { position: absolute; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--sh-2);
  padding: .7rem .85rem; font-size: .78rem; display: flex; gap: .6rem; align-items: flex-start; max-width: 250px; }
.float-card .ic { width: 30px; height: 30px; flex: none; border-radius: 9px; display: grid; place-items: center; font-size: .95rem; }
.float-card b { display: block; font-size: .82rem; }
.float-card span { color: var(--muted); font-size: .72rem; }
.card-a { top: 6%; right: -4%; animation: float-a 9s ease-in-out infinite; }
.card-a .ic { background: var(--primary-soft); }
.card-b { bottom: 8%; left: -6%; animation: float-b 10.5s ease-in-out infinite; }
.card-b .ic { background: var(--accent-soft); }
@keyframes float-a { 0%, 100% { transform: translateY(0) rotate(1.5deg); } 50% { transform: translateY(-16px) rotate(0deg); } }
@keyframes float-b { 0%, 100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(13px) rotate(0deg); } }
@media (max-width: 620px) { .card-a { right: 0; } .card-b { left: 0; } .float-card { max-width: 200px; } }

/* ---------- โครงหมวด ---------- */
.sec { padding: clamp(3rem, 6vw, 5.5rem) 0; }
.sec-alt { background: var(--bg-soft); }
.sec-head { max-width: 62ch; margin: 0 auto clamp(2rem, 4vw, 3rem); text-align: center; }
.sec-head p { color: var(--muted); font-size: 1.03rem; margin: 0; }
.eyebrow { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--primary); margin-bottom: .6rem; }

/* ตัวเลข */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 880px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1.4rem; box-shadow: var(--sh-1); position: relative; overflow: hidden; }
.stat-box::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--grad); }
.stat-box b { display: block; font-size: 2.1rem; line-height: 1; letter-spacing: -.03em; margin-bottom: .3rem; }
.stat-box .lbl { font-weight: 600; margin-bottom: .35rem; }
.stat-box .note { color: var(--muted); font-size: .85rem; }

/* ปัญหา -> ทางออก */
.swap { display: grid; gap: .7rem; max-width: 900px; margin: 0 auto; }
.swap-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: center; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r); padding: 1rem 1.2rem; box-shadow: var(--sh-1); }
.swap-row .bad { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(223, 58, 65, .5); }
.swap-row .arrow { color: var(--primary); font-weight: 700; }
.swap-row .good { font-weight: 600; }
@media (max-width: 700px) { .swap-row { grid-template-columns: 1fr; gap: .3rem; text-align: center; } }

/* โมดูล */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1.5rem; box-shadow: var(--sh-1);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.card:hover { transform: translateY(-4px); box-shadow: var(--sh-2); border-color: color-mix(in srgb, var(--primary) 35%, transparent); }
.card .ico { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; font-size: 1.4rem; margin-bottom: .9rem;
  background: linear-gradient(145deg, var(--primary-soft), var(--surface-2)); box-shadow: inset 0 0 0 1px var(--line); }
.card h3 { margin-bottom: .4rem; font-size: 1.05rem; }
.card p { color: var(--muted); font-size: .92rem; margin: 0; }

/* จุดเด่นเชิงลึก */
.deep-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; padding: clamp(1.5rem, 4vw, 3rem) 0; }
.deep-row:nth-child(even) .deep-text { order: 2; }
@media (max-width: 900px) { .deep-row { grid-template-columns: minmax(0, 1fr); } .deep-row:nth-child(even) .deep-text { order: 0; } }
.deep-tag { display: inline-block; padding: .25rem .75rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: .78rem; font-weight: 700; margin-bottom: .8rem; }
.deep-text h3 { font-size: clamp(1.3rem, 2.4vw, 1.8rem); margin-bottom: .7rem; }
.deep-text p { color: var(--muted); }
.deep-points { list-style: none; padding: 0; margin: 1.2rem 0 0; }
.deep-points li { position: relative; padding-left: 1.8rem; margin-bottom: .6rem; }
.deep-points li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%;
  background: var(--primary-soft); color: var(--primary); font-size: .72rem; font-weight: 700; display: grid; place-items: center; }
.deep-visual { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-2); padding: 1.3rem; }

.mini-slip { width: 100%; border-collapse: collapse; font-size: .87rem; }
.mini-slip td { padding: .4rem .2rem; border-bottom: 1px solid var(--line); }
.mini-slip td:last-child { text-align: right; font-family: Consolas, monospace; }
.mini-slip tr.h td { color: var(--faint); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; border-bottom-color: transparent; padding-top: .8rem; }
.mini-slip tr.net td { font-weight: 700; font-size: 1rem; border-bottom: 0; padding-top: .7rem; color: var(--primary); }
.mini-row { display: flex; align-items: center; gap: .7rem; padding: .6rem .2rem; border-bottom: 1px solid var(--line); font-size: .88rem; }
.mini-row:last-child { border-bottom: 0; }
.mini-row .av { width: 30px; height: 30px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-weight: 700; font-size: .78rem; flex: none; }
.mini-row .grow { flex: 1; min-width: 0; }
.mini-row small { display: block; color: var(--faint); font-size: .75rem; }
.pipe { display: flex; flex-wrap: wrap; gap: .3rem; }
.pipe span { flex: 1 1 auto; text-align: center; padding: .45rem .5rem; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); font-size: .76rem; color: var(--muted); }
.pipe span.on { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); font-weight: 700; }

/* ทำไมต้องเรา */
.why-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 1.6rem 2rem; }
.why-item { display: flex; gap: .9rem; }
.why-item .ic { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; font-size: 1.15rem; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1); }
.why-item h3 { font-size: 1rem; margin-bottom: .25rem; }
.why-item p { color: var(--muted); font-size: .9rem; margin: 0; }

/* ขั้นตอน */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; counter-reset: st; }
@media (max-width: 820px) { .steps { grid-template-columns: minmax(0, 1fr); } }
.step { counter-increment: st; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1.6rem 1.4rem; box-shadow: var(--sh-1); position: relative; }
.step::before { content: counter(st); position: absolute; top: -18px; left: 1.4rem; width: 38px; height: 38px; border-radius: 50%;
  background: var(--primary); color: #fff; font-weight: 700; display: grid; place-items: center; box-shadow: 0 6px 18px rgba(15,125,114,.32); }
.step h3 { margin-top: .8rem; font-size: 1.05rem; }
.step p { color: var(--muted); font-size: .92rem; margin: 0; }

/* บทความ */
.posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.4rem; }
.post { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
  box-shadow: var(--sh-1); transition: transform .18s, box-shadow .18s; color: var(--text); }
.post:hover { transform: translateY(-4px); box-shadow: var(--sh-2); text-decoration: none; }
.post .thumb { aspect-ratio: 16 / 9; background: var(--bg-soft); position: relative; overflow: hidden; }
.post .thumb img { width: 100%; height: 100%; object-fit: cover; }
.post .thumb.empty { background: var(--grad); opacity: .85; display: grid; place-items: center; font-size: 2rem; }
.post .body { padding: 1.15rem 1.25rem 1.35rem; display: flex; flex-direction: column; flex: 1; }
.post .cat { display: inline-block; align-self: flex-start; padding: .15rem .6rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: .72rem; font-weight: 700; margin-bottom: .6rem; }
.post h3 { font-size: 1.05rem; margin-bottom: .4rem; }
.post p { color: var(--muted); font-size: .89rem; flex: 1; margin-bottom: .8rem; }
.post .meta { display: flex; gap: .7rem; font-size: .78rem; color: var(--faint); }

/* คำถามพบบ่อย */
.faq { max-width: 820px; margin: 0 auto; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: .6rem; box-shadow: var(--sh-1); overflow: hidden; }
.faq summary { list-style: none; cursor: pointer; padding: 1.05rem 1.3rem; font-weight: 600; display: flex; align-items: center; gap: .8rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; margin-left: auto; font-size: 1.3rem; color: var(--primary); font-weight: 400; line-height: 1; transition: transform .18s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .a { padding: 0 1.3rem 1.2rem; color: var(--muted); }

/* แถบปิดท้าย */
.cta-band { position: relative; overflow: hidden; border-radius: var(--r-xl); padding: clamp(2.5rem, 5vw, 4rem); text-align: center;
  background: linear-gradient(135deg, #0f7d72, #12564f 55%, #3b2b52); color: #fff; box-shadow: var(--sh-3); }
.cta-band::before { content: ""; position: absolute; inset: -40% -10% auto -10%; height: 120%;
  background: radial-gradient(45% 60% at 20% 0%, rgba(255,255,255,.20), transparent 70%), radial-gradient(40% 50% at 85% 10%, rgba(189,47,127,.35), transparent 70%); }
.cta-band > * { position: relative; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.82); max-width: 56ch; margin: 0 auto 1.8rem; }
.cta-band .btn-primary { background: #fff; color: #0f5f57; box-shadow: 0 10px 30px rgba(0,0,0,.22); }
.cta-band .btn-primary:hover { background: #f2fbf9; }
.cta-band .btn-ghost { background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.34); color: #fff; }
.cta-band .btn-ghost:hover { background: rgba(255,255,255,.18); color: #fff; border-color: #fff; }

/* ---------- ท้ายเว็บ ---------- */
.foot { background: var(--bg-soft); border-top: 1px solid var(--line); padding: 3rem 0 2rem; margin-top: 3rem; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.3fr; gap: 2rem; margin-bottom: 2.2rem; }
@media (max-width: 820px) { .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.foot h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); margin-bottom: .8rem; }
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot ul li { margin-bottom: .45rem; }
.foot ul a { color: var(--muted); font-size: .92rem; }
.foot ul a:hover { color: var(--primary); }
.foot .about { color: var(--muted); font-size: .92rem; max-width: 38ch; }
.foot-bottom { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; align-items: center; padding-top: 1.4rem; border-top: 1px solid var(--line); font-size: .85rem; color: var(--faint); }
.foot-bottom .sp { margin-left: auto; display: flex; gap: 1.2rem; }

/* ---------- หน้าบทความ ---------- */
.page-hero { padding: clamp(2.5rem, 5vw, 4rem) 0 1.5rem; }
.page-hero h1 { margin-bottom: .6rem; }
.page-hero p { color: var(--muted); max-width: 62ch; }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 2rem; }
.filters form { display: flex; gap: .5rem; flex: 1 1 260px; }
.filters input[type="search"] { flex: 1; padding: .65rem 1rem; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font: inherit; font-size: .92rem; }
.filters input[type="search"]:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.chip { padding: .42rem .95rem; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--muted); font-size: .86rem; }
.chip:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.chip.on { background: var(--primary); border-color: var(--primary); color: #fff; }

.article { max-width: 760px; margin: 0 auto; }
.article-cover { border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-2); margin-bottom: 2rem; }
.article-meta { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; color: var(--faint); font-size: .88rem; margin-bottom: 1.8rem; padding-bottom: 1.2rem; border-bottom: 1px solid var(--line); }
.prose { font-size: 1.05rem; line-height: 1.85; }
.prose h2 { font-size: 1.6rem; margin: 2.2rem 0 .8rem; }
.prose h3 { font-size: 1.22rem; margin: 1.8rem 0 .6rem; }
.prose p { margin-bottom: 1.15rem; }
.prose ul, .prose ol { margin-bottom: 1.15rem; padding-left: 1.4rem; }
.prose li { margin-bottom: .4rem; }
.prose img { border-radius: var(--r); margin: 1.5rem 0; box-shadow: var(--sh-1); }
.prose blockquote { margin: 1.5rem 0; padding: .2rem 0 .2rem 1.3rem; border-left: 3px solid var(--primary); color: var(--muted); font-style: italic; }
.prose code { background: var(--bg-soft); padding: .1rem .35rem; border-radius: 5px; font-size: .92em; }
.prose pre { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 1rem; overflow: auto; }
.prose table { width: 100%; border-collapse: collapse; margin-bottom: 1.4rem; font-size: .95rem; }
.prose th, .prose td { padding: .55rem .7rem; border: 1px solid var(--line); text-align: left; }
.prose th { background: var(--bg-soft); }
.prose a { text-decoration: underline; }

/* ---------- ฟอร์มสมัคร ---------- */
.form-wrap { max-width: 720px; margin: 0 auto; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-2); padding: clamp(1.5rem, 4vw, 2.5rem); }
.steps-bar { display: flex; gap: .5rem; justify-content: center; margin-bottom: 2rem; flex-wrap: wrap; }
.steps-bar span { display: inline-flex; align-items: center; gap: .45rem; padding: .35rem .9rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: .85rem; }
.steps-bar span i { width: 20px; height: 20px; border-radius: 50%; background: var(--bg-soft); color: var(--faint); font-style: normal; font-size: .72rem; font-weight: 700; display: grid; place-items: center; }
.steps-bar span.on { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.steps-bar span.on i { background: var(--primary); color: #fff; }
.steps-bar span.done i { background: var(--primary); color: #fff; }

.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.1rem; }
@media (max-width: 640px) { .fields { grid-template-columns: minmax(0, 1fr); } }
.f { margin-bottom: 1.1rem; }
.f.full { grid-column: 1 / -1; }
.f label { display: block; font-size: .88rem; font-weight: 600; margin-bottom: .35rem; }
.f label .req { color: #c0392f; }
.f input[type="text"], .f input[type="email"], .f input[type="tel"], .f input[type="password"], .f select, .f textarea {
  width: 100%; padding: .7rem .9rem; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); color: var(--text); font: inherit; font-size: .95rem; }
.f input:focus, .f select:focus, .f textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.f .hint { font-size: .8rem; color: var(--faint); margin-top: .3rem; }
.f .err { font-size: .82rem; color: #c0392f; margin-top: .3rem; }
.f input.bad, .f select.bad { border-color: #c0392f; }
.choice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
@media (max-width: 560px) { .choice { grid-template-columns: minmax(0, 1fr); } }
.choice label { display: flex; gap: .7rem; align-items: flex-start; padding: .9rem 1rem; border: 1px solid var(--line-strong); border-radius: var(--r-sm); cursor: pointer; background: var(--surface); transition: border-color .15s, background .15s; }
.choice label:hover { border-color: var(--primary); }
.choice input { margin-top: .25rem; accent-color: var(--primary); }
.choice b { display: block; font-size: .95rem; }
.choice span { color: var(--muted); font-size: .82rem; }
.choice input:checked + div { color: var(--primary); }
.checkline { display: flex; gap: .6rem; align-items: flex-start; font-size: .9rem; }
.checkline input { margin-top: .28rem; accent-color: var(--primary); }

.otp-input { font-size: 1.9rem !important; letter-spacing: .5em; text-align: center; font-family: Consolas, monospace; padding: .9rem !important; }
.note { padding: .9rem 1.1rem; border-radius: var(--r-sm); font-size: .9rem; margin-bottom: 1.2rem; display: flex; gap: .6rem; align-items: flex-start; }
.note-info { background: var(--primary-soft); color: var(--text); }
.note-warn { background: #fbeed6; color: #6b4a12; }
.note-danger { background: #fbe3df; color: #7d271f; }
[data-theme="dark"] .note-warn { background: #533a17; color: #f0dcb4; }
[data-theme="dark"] .note-danger { background: #5c2420; color: #f5cdc7; }
.kv-box { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--r); padding: 1.2rem 1.4rem; margin-bottom: 1.4rem; }
.kv-box dl { display: grid; grid-template-columns: auto 1fr; gap: .6rem 1.2rem; margin: 0; }
.kv-box dt { color: var(--muted); font-size: .88rem; }
.kv-box dd { margin: 0; font-weight: 600; font-family: Consolas, monospace; word-break: break-all; }

/* ---------- เคลื่อนไหวตอนเลื่อนหน้าจอ ----------
   ซ่อนไว้เฉพาะเมื่อ JavaScript ทำงาน (คลาส js ถูกใส่จากสคริปต์ใน head)
   ถ้าเบราว์เซอร์หรือบอตไม่รัน JS เนื้อหาจะแสดงครบตามปกติ ไม่หายไปทั้งหน้า */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.2,.7,.3,1), transform .7s cubic-bezier(.2,.7,.3,1); }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .win, .card-a, .card-b { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .card:hover, .post:hover { transform: none; }
}

@media print {
  .nav, .foot, .cta-band, .hero-visual { display: none !important; }
  body { background: #fff; color: #000; }
}

/* ---- หน้าราคา ---- */
.pricing .price { text-align: center; }
.pricing .price.featured { border-color: var(--primary); box-shadow: 0 10px 30px rgba(15,125,114,.15); }
.pricing .price .amt { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; margin: .3rem 0 .2rem; }
.pricing .price .amt span, .amt-sm span { font-size: .85rem; font-weight: 500; color: var(--faint); margin-left: .2rem; }
.pricing .price .yearly { font-size: .85rem; color: var(--faint); }
.amt-sm { font-weight: 700; font-size: 1.1rem; margin-top: .6rem; }
.badge-inc { display: inline-block; font-size: .78rem; font-weight: 700; padding: .25rem .6rem; border-radius: 999px; background: rgba(15,125,114,.1); color: var(--primary); }
