/*!
 * สล็อตเรกูเลเตอร์ — light editorial iGaming/Tech design system
 * Palette: primary #0f766e / accent #f59e0b / secondary #134e4a
 */
:root {
  --primary: #0f766e;
  --primary-rgb: 15, 118, 110;
  --secondary: #134e4a;
  --accent: #f59e0b;
  --accent-rgb: 245, 158, 11;
  --bg: #ffffff;
  --surface: #f7fafa;
  --text: #1a1d2e;
  --muted: #6b7280;
  --border: rgba(15, 118, 110, .10);
  --radius: 12px;
  --radius-lg: calc(12px + 6px);
  --shadow-sm: 0 2px 8px rgba(20,24,40,.06);
  --shadow-md: 0 6px 20px rgba(20,24,40,.08);
  --font-thai: "Sarabun", "Noto Sans Thai", "Sarabun", sans-serif;
  --font-latin: "Poppins", "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", "Menlo", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-thai);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--secondary); }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.container { max-width: 900px; margin: 0 auto; padding: 0 20px; }
.container-fluid { max-width: 1400px; margin: 0 auto; padding: 0 32px; }

/* ---------- Header ---------- */
.site-header {
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 72px; gap: 24px;
}
.brand { display: inline-flex; align-items: center; }
.brand-logo { height: 44px; width: auto; }
.main-nav ul {
  display: flex; list-style: none; gap: 28px; margin: 0; padding: 0;
  font-family: var(--font-thai); font-weight: 600; font-size: 15px;
}
.main-nav a { color: var(--text); padding: 8px 0; position: relative; }
.main-nav a:hover { color: var(--primary); }
.main-nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 2px;
}
.nav-toggle-checkbox, .nav-toggle-label { display: none; }

@media (max-width: 991px) {
  .header-inner { min-height: 64px; }
  .nav-toggle-label {
    display: flex; flex-direction: column; gap: 5px; cursor: pointer;
    width: 32px; height: 32px; justify-content: center; align-items: center;
  }
  .nav-toggle-label span {
    display: block; width: 24px; height: 2px; background: var(--text);
    transition: transform .3s, opacity .3s;
  }
  .main-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    max-height: 0; overflow: hidden; transition: max-height .3s;
  }
  .main-nav ul { flex-direction: column; gap: 0; padding: 12px 20px; }
  .main-nav li { border-bottom: 1px solid var(--border); }
  .main-nav li:last-child { border-bottom: 0; }
  .main-nav a { display: block; padding: 14px 0; }
  .nav-toggle-checkbox:checked ~ .main-nav { max-height: 500px; }
  .nav-toggle-checkbox:checked + .nav-toggle-label span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle-checkbox:checked + .nav-toggle-label span:nth-child(2) { opacity: 0; }
  .nav-toggle-checkbox:checked + .nav-toggle-label span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ---------- Hero ---------- */
.hero { padding: 56px 0 40px; position: relative; }
.hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero-eyebrow {
  font-family: var(--font-mono); font-size: 13px; letter-spacing: .06em;
  color: var(--primary); font-weight: 600; margin-bottom: 8px; text-transform: uppercase;
}
.hero h1 {
  font-family: var(--font-thai); font-weight: 700;
  font-size: clamp(28px, 4.2vw, 44px); line-height: 1.2; margin: 0 0 18px;
  color: var(--text); letter-spacing: -0.01em;
}
.hero p.lede { font-size: 19px; color: var(--muted); margin: 0 0 24px; line-height: 1.65; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 0; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 999px;
  background: rgba(var(--primary-rgb), .08);
  color: var(--primary);
  font-family: var(--font-latin); font-weight: 600;
  font-size: 12.5px; letter-spacing: .04em; text-transform: uppercase;
}
.hero-image { position: relative; }
.hero-image img { border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.breadcrumbs { font-size: 13px; color: var(--muted); margin-bottom: 16px; font-family: var(--font-mono); }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--primary); }

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 32px; }
  .hero { padding: 32px 0 24px; }
}

/* ---------- Byline ---------- */
.byline {
  display: flex; align-items: center; gap: 16px;
  margin: 24px 0 32px; padding: 16px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.byline img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.byline-meta { font-size: 14.5px; line-height: 1.5; }
.byline-meta strong { color: var(--text); }
.byline-meta small { color: var(--muted); display: block; margin-top: 2px; font-family: var(--font-mono); font-size: 12px; }

/* ---------- Article body ---------- */
article.article { padding: 32px 0 64px; }
article.article h2 {
  font-family: var(--font-thai); font-weight: 700; font-size: clamp(22px, 2.8vw, 30px);
  line-height: 1.3; margin: 56px 0 12px; letter-spacing: -0.005em;
  color: var(--text); position: relative; padding-left: 20px;
}
article.article h2::before {
  content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 4px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 4px;
}
article.article h3 {
  font-family: var(--font-thai); font-weight: 700; font-size: 20px;
  margin: 32px 0 8px; color: var(--text); line-height: 1.4;
}
article.article p { margin: 12px 0 20px; }
article.article ul, article.article ol { padding-left: 22px; margin: 16px 0 24px; }
article.article ul li, article.article ol li { margin-bottom: 8px; }
article.article strong { color: var(--text); font-weight: 700; }

/* Data-viz row-tint tables */
article.article table {
  width: 100%; border-collapse: collapse; margin: 24px 0;
  font-family: var(--font-latin); font-size: 15px;
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
article.article th, article.article td {
  padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border);
}
article.article th { background: rgba(var(--primary-rgb), .06); font-weight: 600; color: var(--primary); }
article.article tr:nth-child(even) td { background: rgba(var(--primary-rgb), .03); }

/* ---------- Table of Contents ---------- */
.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 28px; margin: 32px 0;
}
.toc-heading { font-size: 15px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--primary); font-family: var(--font-mono); margin: 0 0 16px; font-weight: 600; }
.toc-list {
  list-style: none; padding: 0; margin: 0;
  counter-reset: toc-counter;
  column-count: 2; column-gap: 32px; column-rule: 1px solid var(--border);
}
.toc-list li {
  counter-increment: toc-counter;
  break-inside: avoid; -webkit-column-break-inside: avoid; page-break-inside: avoid;
  padding: 6px 0 6px 40px; position: relative;
}
.toc-list li::before {
  content: counter(toc-counter, decimal-leading-zero);
  position: absolute; left: 0; top: 6px;
  font-family: var(--font-mono); font-size: 13px; color: var(--accent); font-weight: 600;
}
.toc-list a { color: var(--text); font-size: 15px; }
.toc-list a:hover { color: var(--primary); }
@media (max-width: 700px) {
  .toc-list { column-count: 1; column-rule: none; }
}

/* ---------- Steps (alternating zigzag on desktop) ---------- */
.steps { list-style: none; padding: 0; margin: 48px 0 52px; position: relative; }
.steps li:not(:last-child)::before {
  content: ""; position: absolute; left: 50%; top: 50%; bottom: -66px;
  width: 2px; transform: translateX(-50%);
  background: repeating-linear-gradient(to bottom, var(--border) 0 5px, transparent 5px 10px);
}
.steps li { position: relative; margin: 0 0 28px; min-height: 76px; display: flex; align-items: center; }
.step-num {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff; border: 4px solid var(--bg);
  box-shadow: 0 6px 16px rgba(var(--primary-rgb), .32);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-weight: 700; font-size: 18px;
  z-index: 2;
}
.step-body {
  padding: 18px 22px; text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow .25s, transform .25s;
}
.step-body:hover {
  box-shadow: 0 8px 24px rgba(var(--primary-rgb), .12), 0 0 0 1px rgba(var(--primary-rgb), .08);
}
.step-body strong { color: var(--primary); font-weight: 700; }
@media (min-width: 992px) {
  .steps li { padding: 0 46px; }
  .steps li:nth-child(odd) .step-body { width: calc(50% - 46px); margin-right: auto; }
  .steps li:nth-child(odd) .step-body::after {
    content: ""; position: absolute; right: -8px; top: 50%;
    width: 14px; height: 14px; background: var(--surface);
    border-right: 1px solid var(--border); border-top: 1px solid var(--border);
    transform: translateY(-50%) rotate(45deg);
  }
  .steps li:nth-child(even) .step-body { width: calc(50% - 46px); margin-left: auto; }
  .steps li:nth-child(even) .step-body::after {
    content: ""; position: absolute; left: -8px; top: 50%;
    width: 14px; height: 14px; background: var(--surface);
    border-left: 1px solid var(--border); border-bottom: 1px solid var(--border);
    transform: translateY(-50%) rotate(45deg);
  }
}
@media (max-width: 991px) {
  .steps li:not(:last-child)::before { left: 24px; }
  .steps li { padding-left: 60px; }
  .step-num { left: 24px; }
  .step-body { width: 100%; }
}

/* ---------- FAQ ---------- */
.faq-section { margin: 48px 0; }
.faq-section details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  background: var(--surface);
  interpolate-size: allow-keywords;
  transition: box-shadow .2s, border-color .2s;
}
.faq-section details[open] { box-shadow: var(--shadow-sm); border-color: rgba(var(--primary-rgb), .3); }
.faq-section summary {
  padding: 18px 56px 18px 22px;
  position: relative; list-style: none; cursor: pointer;
  font-family: var(--font-thai); font-weight: 600; font-size: 17px; color: var(--text);
}
.faq-section summary::-webkit-details-marker { display: none; }
.faq-section summary::before,
.faq-section summary::after {
  content: ""; position: absolute; right: 24px; top: 50%;
  width: 14px; height: 2px; background: var(--primary);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
}
.faq-section summary::before { transform: translateY(-50%) rotate(0deg); }
.faq-section summary::after { transform: translateY(-50%) rotate(90deg); }
.faq-section details[open] summary::after { transform: translateY(-50%) rotate(0deg); }
.faq-section details::details-content {
  height: 0; opacity: 0; overflow: clip;
  transition: height .35s cubic-bezier(.4,0,.2,1),
              opacity .3s ease-out, content-visibility .35s allow-discrete;
}
.faq-section details[open]::details-content { height: auto; opacity: 1; }
.faq-section details > *:not(summary) {
  padding: 0 22px 18px 22px; animation: faqSlideDown .32s cubic-bezier(.4,0,.2,1);
}
@keyframes faqSlideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--secondary); color: rgba(255,255,255,.82); padding: 56px 0 24px; margin-top: 96px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.2fr; gap: 40px; }
.footer-brand img { height: 40px; margin-bottom: 12px; }
.footer-brand p { font-size: 14px; line-height: 1.6; color: rgba(255,255,255,.65); margin: 8px 0; }
.footer-col h3 {
  color: #fff; font-family: var(--font-thai); font-weight: 600;
  font-size: 15px; text-transform: uppercase; letter-spacing: .08em;
  margin: 0 0 16px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: rgba(255,255,255,.72); font-size: 14.5px; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1); margin-top: 40px; padding-top: 24px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  font-size: 13px; color: rgba(255,255,255,.55);
}
.age-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border: 2px solid #fff; border-radius: 50%;
  color: #fff; font-family: var(--font-mono); font-weight: 700; font-size: 13px;
  margin-right: 12px;
}
.footer-age { display: flex; align-items: center; font-size: 13.5px; color: rgba(255,255,255,.7); }
.copyright { font-family: var(--font-mono); margin: 0; }
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- Utility bits ---------- */
.cta-band {
  background: linear-gradient(135deg, rgba(var(--primary-rgb),.06), rgba(var(--accent-rgb),.05));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px; margin: 40px 0;
}
.cta-band h2 { margin-top: 0; padding-left: 0; }
.cta-band h2::before { display: none; }
.num-mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; color: var(--primary); font-weight: 600; }
.small-print { font-size: 13px; color: var(--muted); }

/* ---------- Inline content figures (supporting images) ---------- */
.content-figure {
  margin: 40px 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}
.content-figure img {
  width: 100%;
  height: auto;
  display: block;
}
.content-figure figcaption {
  padding: 12px 20px;
  background: var(--surface);
  font-size: 14px;
  color: var(--muted);
  font-family: var(--font-mono);
  text-align: center;
}

/* ---------- Author box (below FAQ) ---------- */
.author-box {
  margin: 64px 0 0;
  padding: 32px;
  background: linear-gradient(135deg, rgba(var(--primary-rgb),.05), rgba(var(--accent-rgb),.04));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.author-box-heading {
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--primary);
  font-weight: 600;
  margin: 0 0 20px;
  padding: 0;
}
.author-box-heading::before { display: none; }
.author-box-inner {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 28px;
  align-items: start;
}
.author-box-inner img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--bg);
  box-shadow: 0 6px 20px rgba(var(--primary-rgb),.18);
}
.author-box-body { min-width: 0; }
.author-box-name {
  font-family: var(--font-thai);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin: 0 0 4px;
}
.author-box-role {
  font-family: var(--font-thai);
  font-size: 15px;
  color: var(--primary);
  font-weight: 600;
  margin: 0 0 14px;
}
.author-box-bio {
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--text);
  margin: 0 0 16px;
}
.author-box-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
@media (max-width: 640px) {
  .author-box { padding: 24px 20px; }
  .author-box-inner { grid-template-columns: 1fr; gap: 16px; text-align: left; }
  .author-box-inner img { width: 96px; height: 96px; }
}
