/* V.1 — Premium Dark Editorial. Edit tokens here. */
:root {
  --bg: #07140f;
  --bg-2: #0b1d16;
  --surface: #10261d;
  --surface-2: #153126;
  --border: rgba(140, 230, 180, 0.12);
  --border-strong: rgba(140, 230, 180, 0.24);
  --text: #eef8f2;
  --text-muted: #a3c4b2;
  --primary: #16b364;
  --secondary: #0e9f6e;
  --accent: #a3e635;
  --grad: linear-gradient(120deg, var(--primary), var(--secondary));
  --grad-text: linear-gradient(100deg, var(--accent), var(--primary) 50%, var(--secondary));
  --glow: 0 0 0 1px var(--border), 0 20px 50px -20px rgba(22, 179, 100, 0.45);
  --radius: 16px;
  --font-head: "Anuphan", "IBM Plex Sans Thai", system-ui, sans-serif;
  --font-body: "IBM Plex Sans Thai", system-ui, sans-serif;
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: 17px; line-height: 1.8;
  background-image: radial-gradient(900px 500px at 85% -10%, rgba(14, 159, 110, 0.16), transparent 60%),
                    radial-gradient(800px 500px at -10% 10%, rgba(22, 179, 100, 0.14), transparent 60%);
  background-repeat: no-repeat;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.35; margin: 0 0 .6em; letter-spacing: -0.005em; }
.container { width: min(1200px, 100% - 40px); margin-inline: auto; }
html, body { overflow-x: clip; }
.article, .article-section, .faq-item, .info-card, .def-card { min-width: 0; overflow-wrap: break-word; }
.narrow { width: min(820px, 100% - 40px); }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--primary); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 12px; }

/* Placeholder marker — remove class "ph" when real content is inserted */
.ph { color: var(--text-muted); border-left: 2px dashed var(--border-strong); padding-left: 12px; font-style: italic; }

.grad { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); padding: 4px 12px; border: 1px solid var(--border-strong); border-radius: 999px; background: rgba(163, 230, 53, 0.06); margin-bottom: 16px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 22px; border-radius: 12px; font-weight: 600; font-size: 15px; text-decoration: none; transition: transform .2s, box-shadow .2s, background .2s; white-space: nowrap; }
.btn-primary { position: relative; overflow: hidden; background: var(--grad); color: #fff; box-shadow: 0 8px 24px -8px rgba(22, 179, 100, .6); animation: cta-glow 2.6s ease-in-out infinite; }
.btn-primary::before { content: ""; position: absolute; top: 0; left: -75%; width: 50%; height: 100%; background: linear-gradient(115deg, transparent, rgba(255, 255, 255, .55), transparent); transform: skewX(-20deg); animation: cta-shine 3.2s ease-in-out infinite; }
.btn-primary::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35); }
.btn-primary > * { position: relative; z-index: 1; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 34px -10px rgba(14, 159, 110, .8), 0 0 26px rgba(22, 179, 100, .45); animation-play-state: paused; }
.btn-primary:hover::before { animation-duration: 1.2s; }
.btn-primary:active { transform: translateY(0) scale(.97); }
.btn-ghost { color: var(--text); border: 1px solid var(--border-strong); background: rgba(255,255,255,.02); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
@keyframes cta-glow {
  0%, 100% { box-shadow: 0 8px 24px -8px rgba(22, 179, 100, .6), 0 0 0 rgba(22, 179, 100, 0); }
  50% { box-shadow: 0 10px 28px -8px rgba(14, 159, 110, .75), 0 0 24px rgba(22, 179, 100, .5); }
}
@keyframes cta-shine {
  0% { left: -75%; }
  55%, 100% { left: 130%; }
}
@media (prefers-reduced-motion: reduce) {
  .btn-primary, .btn-primary::before { animation: none; }
  .btn-primary { box-shadow: 0 8px 24px -8px rgba(22, 179, 100, .6); }
}

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(7, 20, 15, .78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
.header-inner { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-family: var(--font-head); font-weight: 700; font-size: 19px; }
.logo-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--grad); box-shadow: 0 0 20px rgba(22,179,100,.5); }
.logo-img { height: 44px; width: auto; max-width: 220px; object-fit: contain; }
.site-footer .logo-img { height: 56px; max-width: 280px; }
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav ul { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; }
.site-nav ul a { color: var(--text-muted); text-decoration: none; font-size: 15px; font-weight: 500; transition: color .2s; }
.site-nav ul a:hover { color: var(--text); }
.nav-toggle { display: none; background: none; border: 1px solid var(--border-strong); border-radius: 10px; width: 44px; height: 44px; padding: 12px 11px; cursor: pointer; flex-direction: column; justify-content: space-between; }
.nav-toggle span { display: block; height: 2px; background: var(--text); border-radius: 2px; transition: transform .25s, opacity .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Hero */
.hero { padding: 0 0 40px; }
.hero-copy { padding-top: 40px; }
.hero h1 { font-size: clamp(30px, 4.4vw, 52px); font-weight: 700; }
.lead { font-size: 18px; margin: 0 0 16px; }
.lead:last-of-type { margin-bottom: 28px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-media, .banner-media { margin: 0; width: 100%; overflow: hidden; }
.hero-media img, .banner-media img { width: 100%; aspect-ratio: 12 / 5; object-fit: cover; }
.banner-media img { aspect-ratio: 3 / 1; }
.hero-copy h1, .hero-copy .lead { max-width: 900px; }
.summary-cards { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.summary-cards li { padding: 18px 22px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column; }
.summary-cards strong { font-family: var(--font-head); font-size: 24px; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.summary-cards span { color: var(--text-muted); font-size: 14px; }

/* Overview */
.overview { padding: 64px 0; }
.section-head { margin-bottom: 32px; }
.section-head h2 { font-size: clamp(24px, 3vw, 34px); }
.ov-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.ov-card { padding: 24px; background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--border); border-radius: var(--radius); transition: transform .25s, border-color .25s, box-shadow .25s; }
.ov-card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--glow); }
.ov-card h3 { font-size: 18px; margin-top: 16px; }
.ov-card p { margin: 0; font-size: 15px; }
.ov-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: rgba(22,179,100,.12); border: 1px solid var(--border-strong); }
.ov-icon svg { width: 24px; height: 24px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Article layout */
.article-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 56px; padding: 32px 0 64px; align-items: start; }
.toc { position: sticky; top: calc(var(--header-h) + 20px); max-height: calc(100vh - var(--header-h) - 40px); overflow: auto; }
.toc-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }
.toc-box summary { font-family: var(--font-head); font-weight: 700; cursor: pointer; list-style: none; font-size: 16px; }
.toc-box summary::-webkit-details-marker { display: none; }
.toc ol { list-style: none; padding: 0; margin: 12px 0 0; }
.toc li a { display: flex; gap: 10px; padding: 7px 10px; border-radius: 8px; color: var(--text-muted); text-decoration: none; font-size: 14px; line-height: 1.5; border-left: 2px solid transparent; transition: background .2s, color .2s; }
.toc li a span { color: var(--primary); font-weight: 600; font-variant-numeric: tabular-nums; }
.toc li a:hover { background: rgba(255,255,255,.03); color: var(--text); }
.toc li a.active { color: var(--text); background: rgba(22,179,100,.1); border-left-color: var(--accent); }

.article { max-width: 760px; }
.article-section { padding: 8px 0 40px; margin-bottom: 40px; border-bottom: 1px solid var(--border); }
.article-section:last-child { border-bottom: 0; }
.sec-num { font-size: 13px; color: var(--accent); font-weight: 600; letter-spacing: .06em; }
.article h2 { font-size: clamp(24px, 2.8vw, 32px); margin-top: 6px; }
.article h3 { font-size: 21px; margin-top: 1.6em; }
.article p { margin: 0 0 1.2em; }
.article ul, .article ol { padding-left: 1.3em; margin: 0 0 1.4em; }
.article li { margin-bottom: .4em; }
.checklist { list-style: none; padding-left: 0 !important; }
.checklist li { position: relative; padding-left: 30px; }
.checklist li::before { content: ""; position: absolute; left: 0; top: .55em; width: 16px; height: 16px; border-radius: 5px; background: var(--grad); }
.steps { counter-reset: s; list-style: none; padding-left: 0 !important; }
.steps li { counter-increment: s; position: relative; padding: 14px 16px 14px 60px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.steps li::before { content: counter(s); position: absolute; left: 16px; top: 14px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; font-weight: 700; font-size: 14px; }

.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 0 0 1.4em; }
.info-card { padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.info-card h4 { font-size: 16px; }
.info-card p { font-size: 14px; margin: 0; }
.keypoint { margin: 1.4em 0; padding: 20px 22px; border-radius: 14px; background: linear-gradient(120deg, rgba(22,179,100,.12), rgba(14,159,110,.1)); border: 1px solid var(--border-strong); }
.keypoint strong { color: var(--accent); font-family: var(--font-head); }
.keypoint p { margin: 6px 0 0; }
.def-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 0 0 1.4em; }
.def-card { padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.def-card dt { font-family: var(--font-head); font-weight: 700; color: var(--text); }
.def-card dd { margin: 4px 0 0; font-size: 15px; }
.figure { margin: 1.4em 0; }
.img-slot { display: grid; place-items: center; text-align: center; padding: 20px; border-radius: 14px; border: 1px dashed var(--border-strong); background: repeating-linear-gradient(45deg, var(--surface), var(--surface) 12px, var(--bg-2) 12px, var(--bg-2) 24px); color: var(--text-muted); font-size: 14px; }
.figure figcaption { font-size: 14px; color: var(--text-muted); margin-top: 8px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; margin: 0 0 1.4em; }
table { width: 100%; border-collapse: collapse; min-width: 560px; font-size: 15px; }
caption { text-align: left; padding: 12px 16px; color: var(--text-muted); font-size: 13px; caption-side: bottom; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); }
thead th { background: var(--surface-2); font-family: var(--font-head); font-weight: 600; }
tbody tr:hover { background: rgba(255,255,255,.02); }

/* FAQ */
.faq { padding: 64px 0 80px; background: linear-gradient(180deg, transparent, var(--bg-2)); }
.faq-list { display: grid; gap: 12px; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; transition: border-color .2s; }
.faq-item[open] { border-color: var(--border-strong); }
.faq-item summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 22px; cursor: pointer; font-family: var(--font-head); font-weight: 600; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary i { flex: none; width: 22px; height: 22px; position: relative; }
.faq-item summary i::before, .faq-item summary i::after { content: ""; position: absolute; left: 4px; right: 4px; top: 10px; height: 2px; background: var(--accent); border-radius: 2px; transition: transform .25s; }
.faq-item summary i::after { transform: rotate(90deg); }
.faq-item[open] summary i::after { transform: rotate(0); }
.faq-a { padding: 0 22px 18px; }
.faq-a p { margin: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 56px 0 24px; background: var(--bg-2); font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 32px; }
.f-title { font-size: 15px; color: var(--text); margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a:not(.logo) { color: var(--text-muted); text-decoration: none; }
.site-footer a:not(.logo):hover { color: var(--accent); }
.footer-bottom { display: flex; justify-content: space-between; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border); color: var(--text-muted); font-size: 14px; }
.footer-bottom p { margin: 0; }
.footer-note { max-width: 640px; }

/* Responsive */
@media (max-width: 1024px) {

  .ov-grid { grid-template-columns: repeat(2, 1fr); }
  .article-layout { grid-template-columns: 1fr; gap: 24px; }
  .toc { position: static; max-height: none; }
  .toc-box:not([open]) { padding-bottom: 18px; }
  .article { max-width: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .hero-media img, .banner-media img { width: 100%; height: auto; aspect-ratio: auto; object-fit: contain; }
  .nav-toggle { display: flex; }
  .site-nav { position: absolute; top: var(--header-h); left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 16px; padding: 20px; background: var(--bg); border-bottom: 1px solid var(--border); display: none; }
  .site-nav.open { display: flex; }
  .site-nav ul { flex-direction: column; gap: 4px; }
  .site-nav ul a { display: block; padding: 10px 4px; font-size: 16px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .container, .narrow { width: calc(100% - 40px); }
  .hero { padding: 0 0 24px; }
  .hero-copy { padding-top: 24px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .btn { white-space: normal; text-align: center; }
  .header-inner > .btn, .site-header .btn-primary { padding: 9px 14px; font-size: 14px; }
  .steps li { padding: 14px 14px 14px 54px; }
  .toc-box, .faq-item summary { padding-left: 16px; padding-right: 16px; }
  .faq-a { padding: 0 16px 16px; }
  .keypoint { padding: 16px; }
  table { min-width: 0; font-size: 13px; }
  th, td { padding: 9px 10px; }
  .lead { font-size: 16px; }
  .summary-cards { grid-template-columns: 1fr; gap: 10px; margin-top: 24px; }
  .summary-cards li { flex-direction: row; align-items: baseline; gap: 12px; padding: 14px 18px; }
  .summary-cards strong { font-size: 20px; }
  .overview { padding: 40px 0; }
  .ov-grid, .info-grid, .def-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 8px; }
}

/* TOC number stays on the same line */
.toc li a { align-items: baseline; overflow-wrap: normal; word-break: normal; }
.toc li a span { flex: none; min-width: 1.6em; }

/* Partner logos */
.partners { padding: 64px 0; }
.logo-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.logo-slot { aspect-ratio: 2 / 1; display: grid; place-items: center; padding: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; color: var(--text-muted); font-size: 12px; }
.logo-slot { min-width: 0; overflow: hidden; }
.logo-slot img { width: 100%; height: 100%; max-height: 64px; object-fit: contain; opacity: .85; transition: opacity .2s, transform .2s; }
.logo-slot:hover img { opacity: 1; transform: scale(1.05); }
@media (max-width: 1024px) { .logo-grid { grid-template-columns: repeat(5, 1fr); } }
@media (max-width: 640px) { .partners { padding: 40px 0; } .logo-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; } }
.article-img img { width: 100%; border-radius: 14px; border: 1px solid var(--border); }
