/*
Theme Name: ALLFORBET Base
Theme URI: https://allforbet.dev/
Author: ALLFORBET
Description: ธีมโครงน้ำหนักเบาของ ALLFORBET ดูแล Document Shell, Design Tokens, ฟอนต์ในเครื่อง, Base CSS, คอมโพเนนต์หน้า Owner/บทความ และ Breadcrumb ของบทความ ส่วน Header/Footer และ Homepage Sections เป็นของ ALLFORBET Control
Version: 1.0.14
Requires at least: 6.4
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: allforbet-base
*/

html{overflow-x:hidden;overflow-x:clip;-webkit-text-size-adjust:100%}
/* ---------- Fonts (local WOFF2, Thai/Latin split) ---------- */
@font-face{font-family:'AFB Anuphan';font-weight:500;font-display:swap;src:url(assets/fonts/anuphan-thai-500-normal.woff2) format('woff2');unicode-range:U+0E01-0E5B,U+200C-200D,U+25CC}
@font-face{font-family:'AFB Anuphan';font-weight:600;font-display:swap;src:url(assets/fonts/anuphan-thai-600-normal.woff2) format('woff2');unicode-range:U+0E01-0E5B,U+200C-200D,U+25CC}
@font-face{font-family:'AFB Anuphan';font-weight:700;font-display:swap;src:url(assets/fonts/anuphan-thai-700-normal.woff2) format('woff2');unicode-range:U+0E01-0E5B,U+200C-200D,U+25CC}
@font-face{font-family:'AFB Anuphan';font-weight:500;font-display:swap;src:url(assets/fonts/anuphan-latin-500-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+2000-206F,U+2190-21FF}
@font-face{font-family:'AFB Anuphan';font-weight:600;font-display:swap;src:url(assets/fonts/anuphan-latin-600-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+2000-206F,U+2190-21FF}
@font-face{font-family:'AFB Anuphan';font-weight:700;font-display:swap;src:url(assets/fonts/anuphan-latin-700-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+2000-206F,U+2190-21FF}
@font-face{font-family:'AFB Plex Thai';font-weight:400;font-display:swap;src:url(assets/fonts/ibm-plex-sans-thai-thai-400-normal.woff2) format('woff2');unicode-range:U+0E01-0E5B,U+200C-200D,U+25CC}
@font-face{font-family:'AFB Plex Thai';font-weight:500;font-display:swap;src:url(assets/fonts/ibm-plex-sans-thai-thai-500-normal.woff2) format('woff2');unicode-range:U+0E01-0E5B,U+200C-200D,U+25CC}
@font-face{font-family:'AFB Plex Thai';font-weight:600;font-display:swap;src:url(assets/fonts/ibm-plex-sans-thai-thai-600-normal.woff2) format('woff2');unicode-range:U+0E01-0E5B,U+200C-200D,U+25CC}
@font-face{font-family:'AFB Plex Thai';font-weight:400;font-display:swap;src:url(assets/fonts/ibm-plex-sans-thai-latin-400-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+2000-206F,U+2190-21FF}
@font-face{font-family:'AFB Plex Thai';font-weight:500;font-display:swap;src:url(assets/fonts/ibm-plex-sans-thai-latin-500-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+2000-206F,U+2190-21FF}
@font-face{font-family:'AFB Plex Thai';font-weight:600;font-display:swap;src:url(assets/fonts/ibm-plex-sans-thai-latin-600-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+2000-206F,U+2190-21FF}
@font-face{font-family:'AFB Plex Mono';font-weight:500;font-display:swap;src:url(assets/fonts/ibm-plex-mono-latin-500-normal.woff2) format('woff2')}
@font-face{font-family:'AFB Plex Mono';font-weight:600;font-display:swap;src:url(assets/fonts/ibm-plex-mono-latin-600-normal.woff2) format('woff2')}

/* ---------- Tokens ---------- */
:root{
  --afb-red:#8F1220;--afb-red-dark:#6E0D18;--afb-red-soft:#C4404E;--afb-red-tint:#F8ECED;--afb-red-on-dark:#E2707C;
  --afb-ink:#1A1719;--afb-ink-2:#2A2629;--afb-ink-3:#3A3538;--afb-footer:#161416;
  --afb-text:#1A1719;--afb-text-2:#4E4950;--afb-text-3:#55505A;--afb-text-on-dark:#D3CCCE;--afb-muted:#6E676B;
  --afb-line:#E7E2E2;--afb-line-2:#D9D2D3;--afb-surface:#F7F5F4;--afb-white:#FFFFFF;
  --afb-font-display:'AFB Anuphan','AFB Plex Thai',sans-serif;
  --afb-font-body:'AFB Plex Thai',sans-serif;
  --afb-font-mono:'AFB Plex Mono','AFB Plex Thai',monospace;
  --afb-container:1200px;--afb-gutter:24px;--afb-section-y:112px;
  --afb-r-btn:12px;--afb-r-card:20px;--afb-r-panel:24px;
  --afb-header-h:72px;--afb-ease:200ms ease;
}
@media (max-width:599px){:root{--afb-gutter:16px;--afb-section-y:56px}}

/* ---------- Scoped base ---------- */
.afb-page{margin:0;background:var(--afb-white);color:var(--afb-text);font-family:var(--afb-font-body);font-size:16px;line-height:1.75;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
.afb-page *,.afb-page *::before,.afb-page *::after{box-sizing:border-box}
.afb-page img{max-width:100%;height:auto;display:block}
.afb-page a{color:var(--afb-red);text-underline-offset:3px}
.afb-page a:hover{color:var(--afb-red-dark)}
.afb-nav__list{display:flex;align-items:center;gap:2px;list-style:none;margin:0;padding:0}
.afb-page h1,.afb-page h2,.afb-page h3,.afb-page p,.afb-page ul,.afb-page ol,.afb-page dl,.afb-page dd,.afb-page figure{margin:0}
.afb-page :focus-visible{outline:2px solid var(--afb-red);outline-offset:3px;border-radius:4px}
.afb-on-dark :focus-visible,.afb-page .afb-on-dark :focus-visible{outline-color:#fff}
.afb-main{padding-top:var(--afb-header-h)}
.afb-page [id]{scroll-margin-top:calc(var(--afb-header-h) + 16px)}
.afb-skip{position:absolute;left:16px;top:-60px;z-index:200;background:var(--afb-ink);color:#fff!important;padding:10px 16px;border-radius:8px;text-decoration:none}
.afb-skip:focus{top:12px}
.afb-sr{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.afb-lock{overflow:hidden}

/* ---------- Layout ---------- */
.afb-container{max-width:calc(var(--afb-container) + var(--afb-gutter)*2);margin:0 auto;padding:0 var(--afb-gutter)}
.afb-section{padding:var(--afb-section-y) 0}
.afb-section--surface{background:var(--afb-surface)}
.afb-section--line{border-top:1px solid var(--afb-line)}
.afb-section--ink{background:var(--afb-ink);color:#fff;position:relative;overflow:hidden;isolation:isolate}
.afb-section--ink::before{content:"";position:absolute;inset:0;z-index:-1;background-image:linear-gradient(rgba(255,255,255,.04) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.04) 1px,transparent 1px);background-size:64px 64px;-webkit-mask-image:linear-gradient(to bottom,#000 0%,transparent 85%);mask-image:linear-gradient(to bottom,#000 0%,transparent 85%)}
.afb-section-heading{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:16px 32px;margin-bottom:56px}
.afb-section-heading__text{max-width:860px;display:flex;flex-direction:column;gap:14px}
.afb-section-heading__desc{color:var(--afb-text-2);font-size:17px}
.afb-eyebrow{display:inline-flex;align-items:center;gap:10px;font-family:var(--afb-font-mono);font-size:13px;font-weight:600;letter-spacing:.1em;color:var(--afb-red);text-transform:uppercase}
.afb-eyebrow::before{content:"";width:8px;height:8px;border-radius:2px;background:currentColor;flex-shrink:0}
.afb-eyebrow--line::before{width:32px;height:2px;border-radius:1px}
.afb-h1{font-family:var(--afb-font-display);font-weight:700;font-size:56px;line-height:1.14;letter-spacing:-.012em;color:var(--afb-ink)}
.afb-h1--page{font-size:48px;line-height:1.18}
.afb-h2{font-family:var(--afb-font-display);font-weight:700;font-size:44px;line-height:1.2;letter-spacing:-.008em;color:var(--afb-ink)}
.afb-h3{font-family:var(--afb-font-display);font-weight:600;font-size:20px;line-height:1.35;color:var(--afb-ink)}
.afb-lead{font-size:18px;line-height:1.75;color:var(--afb-text-2);max-width:34em}
.afb-accent{color:var(--afb-red)}
.afb-on-dark .afb-h1,.afb-on-dark .afb-h2,.afb-on-dark .afb-h3{color:#fff}
.afb-on-dark .afb-accent{color:var(--afb-red-soft)}
.afb-on-dark .afb-eyebrow{color:var(--afb-red-on-dark)}
.afb-on-dark .afb-lead,.afb-on-dark .afb-section-heading__desc{color:var(--afb-text-on-dark)}
.afb-page .afb-on-dark a:not(.afb-btn){color:var(--afb-red-on-dark)}
.afb-page .afb-on-dark a:not(.afb-btn):hover{color:#fff}
@media (max-width:1199px){.afb-h1{font-size:48px}.afb-h1--page{font-size:42px}.afb-h2{font-size:38px}}
@media (max-width:959px){.afb-h1{font-size:40px}.afb-h1--page{font-size:36px}.afb-h2{font-size:32px}}
@media (max-width:599px){.afb-h1{font-size:32px;line-height:1.24}.afb-h1--page{font-size:30px}.afb-h2{font-size:27px}.afb-h3{font-size:18px}.afb-lead{font-size:16px}.afb-section-heading{margin-bottom:32px}.afb-section-heading__desc{font-size:15px}}

/* ---------- Buttons & links ---------- */
.afb-btn{display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:48px;padding:12px 22px;border-radius:var(--afb-r-btn);font-family:var(--afb-font-body);font-size:16px;font-weight:600;line-height:1.3;text-decoration:none;border:1.5px solid transparent;cursor:pointer;transition:background-color var(--afb-ease),color var(--afb-ease),border-color var(--afb-ease),transform var(--afb-ease),box-shadow var(--afb-ease)}
.afb-btn svg{flex-shrink:0}
.afb-page .afb-btn--primary{background:var(--afb-red);color:#fff;border-color:var(--afb-red);box-shadow:0 12px 28px -12px rgba(143,18,32,.75),inset 0 1px 0 rgba(255,255,255,.14)}
.afb-page .afb-btn--primary:hover{background:var(--afb-red-dark);border-color:var(--afb-red-dark);color:#fff;transform:translateY(-1px);box-shadow:0 16px 32px -12px rgba(143,18,32,.85)}
.afb-page .afb-btn--outline{background:#fff;color:var(--afb-ink);border-color:var(--afb-ink)}
.afb-page .afb-btn--outline:hover{background:var(--afb-ink);color:#fff}
.afb-page .afb-btn--ghost{background:#fff;color:var(--afb-ink);border-color:var(--afb-line-2)}
.afb-page .afb-btn--ghost:hover{border-color:var(--afb-ink);color:var(--afb-ink)}
.afb-page .afb-btn--light{background:#fff;color:var(--afb-red);border-color:#fff;box-shadow:0 12px 28px -14px rgba(0,0,0,.6)}
.afb-page .afb-btn--light:hover{background:var(--afb-red-tint);color:var(--afb-red-dark);transform:translateY(-1px)}
.afb-page .afb-btn--line-light{background:rgba(255,255,255,.04);color:#fff;border-color:rgba(255,255,255,.34)}
.afb-page .afb-btn--line-light:hover{background:#fff;color:var(--afb-ink);border-color:#fff}
.afb-btn--lg{min-height:56px;padding:15px 28px;font-size:17px}
.afb-btn--sm{min-height:44px;padding:10px 16px;font-size:15px}
.afb-link-arrow{display:inline-flex;align-items:center;gap:8px;font-weight:600;text-decoration:none;min-height:44px}
.afb-link-arrow svg{transition:transform var(--afb-ease)}
.afb-link-arrow:hover svg{transform:translateX(3px)}
.afb-chip{display:inline-flex;align-items:center;gap:6px;padding:5px 12px;border-radius:999px;font-family:var(--afb-font-mono);font-size:12px;font-weight:600;letter-spacing:.06em;background:var(--afb-red-tint);color:var(--afb-red)}
.afb-pending{display:inline-flex;align-items:center;gap:6px;padding:2px 8px;border-radius:6px;border:1px dashed #B9B1B2;font-family:var(--afb-font-mono);font-size:11px;letter-spacing:.04em;color:var(--afb-muted);background:#fff;white-space:nowrap}
.afb-card{background:#fff;border:1px solid var(--afb-line);border-radius:var(--afb-r-card)}

/* shared helper */
.afb-nowrap{white-space:nowrap}
.afb-page .afb-skip-link{position:absolute;z-index:100000;left:16px;top:-80px;padding:10px 16px;border-radius:0 0 10px 10px;background:var(--afb-red);color:#fff;font-weight:700;text-decoration:none}
.afb-page .afb-skip-link:focus{top:0}

/* ---------- Owner page template ---------- */
.afb-page-hero{position:relative;isolation:isolate;overflow:hidden;background:var(--afb-ink);color:#fff;padding:32px 0 72px}
.afb-page-hero::before{content:"";position:absolute;inset:0;z-index:-1;background-image:linear-gradient(rgba(255,255,255,.04) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.04) 1px,transparent 1px);background-size:64px 64px;-webkit-mask-image:radial-gradient(ellipse 70% 80% at 70% 20%,#000 20%,transparent 75%);mask-image:radial-gradient(ellipse 70% 80% at 70% 20%,#000 20%,transparent 75%)}
.afb-page-hero .afb-breadcrumb ol{color:#B8B0B3}
.afb-page .afb-page-hero .afb-breadcrumb a{color:#D3CCCE!important}
.afb-page-hero .afb-breadcrumb [aria-current]{color:#fff}
.afb-page-hero .afb-summary{color:var(--afb-ink)}
.afb-page .afb-page-hero .afb-summary a{color:var(--afb-red)}
.afb-breadcrumb ol{list-style:none;padding:0;display:flex;flex-wrap:wrap;gap:6px 8px;font-size:14px;color:var(--afb-text-3)}
.afb-breadcrumb li{display:inline-flex;gap:8px}
.afb-breadcrumb li+li::before{content:"/";color:#A39B9F}
.afb-breadcrumb a{display:inline-flex;align-items:center;min-height:44px;color:var(--afb-text-3)!important;text-decoration:none}
.afb-breadcrumb li{align-items:center}
.afb-breadcrumb a:hover{text-decoration:underline}
.afb-breadcrumb [aria-current]{color:var(--afb-ink);font-weight:500}
.afb-page-hero__grid{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(0,1fr);gap:48px;margin-top:32px;align-items:start}
.afb-page-hero__copy{display:flex;flex-direction:column;gap:20px}
.afb-page-hero__copy .afb-chip{align-self:flex-start;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.14);color:var(--afb-red-on-dark)}
.afb-summary{padding:24px;display:flex;flex-direction:column;gap:14px}
.afb-summary dl{display:flex;flex-direction:column;gap:14px;font-size:15px}
.afb-summary dt{font-size:13px;color:var(--afb-text-3)}
.afb-summary dd{font-weight:500}
.afb-shot{margin-top:44px;border-radius:26px;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.12);padding:10px;box-shadow:0 50px 90px -50px rgba(0,0,0,.8)}
.afb-shot img{width:100%;aspect-ratio:16/7;object-fit:cover;border-radius:18px}
.afb-doc{display:grid;grid-template-columns:220px minmax(0,1fr);gap:56px}
.afb-toc{align-self:start;position:sticky;top:calc(var(--afb-header-h) + 24px)}
.afb-toc details{border:0}
.afb-toc summary{font-family:var(--afb-font-mono);font-size:12px;letter-spacing:.08em;color:var(--afb-text-3);list-style:none;margin-bottom:8px;pointer-events:none}
.afb-toc summary::-webkit-details-marker{display:none}
.afb-toc ol{list-style:none;padding:0;display:flex;flex-direction:column}
.afb-toc a{display:flex;align-items:center;min-height:44px;padding:6px 14px;border-left:2px solid var(--afb-line);color:var(--afb-text-3)!important;text-decoration:none;font-size:15px;line-height:1.4}
.afb-toc a:hover,.afb-toc a.afb-is-current{border-left-color:var(--afb-red);color:var(--afb-ink)!important;font-weight:600}
.afb-prose{min-width:0;display:flex;flex-direction:column;gap:56px;max-width:760px}
.afb-prose section{display:flex;flex-direction:column;gap:20px}
.afb-prose h2{font-family:var(--afb-font-display);font-weight:700;font-size:32px;line-height:1.3;color:var(--afb-ink)}
.afb-prose p{font-size:17px;line-height:1.85;color:#3F3A40}
.afb-feature-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:12px;list-style:none;padding:0}
.afb-feature-grid li{padding:22px;display:flex;flex-direction:column;gap:6px}
.afb-feature-grid .afb-index-row__no{font-size:13px}
.afb-feature-grid b{font-family:var(--afb-font-display);font-weight:600;font-size:18px}
.afb-feature-grid span{font-size:15px;line-height:1.6;color:var(--afb-text-3)}
.afb-table-wrap{overflow-x:auto;border:1px solid var(--afb-line);border-radius:16px}
.afb-table{width:100%;min-width:560px;border-collapse:collapse;font-size:15px;line-height:1.6}
.afb-table th,.afb-table td{padding:14px 18px;text-align:left;vertical-align:top;border-top:1px solid var(--afb-line)}
.afb-table thead th{border-top:0;background:var(--afb-surface);font-weight:600}
.afb-table--dark thead th{background:var(--afb-ink);color:#fff}
.afb-table td.afb-table__ph{color:var(--afb-muted)}
.afb-checklist{list-style:none;padding:0;border-top:1px solid var(--afb-line)}
.afb-checklist li{display:flex;gap:14px;padding:16px 0;border-bottom:1px solid var(--afb-line);font-size:16px;line-height:1.6}
.afb-checklist li span{font-family:var(--afb-font-mono);font-weight:600;color:var(--afb-red)}
.afb-qa{display:flex;flex-direction:column;gap:12px}
.afb-qa details{border:1px solid var(--afb-line);border-radius:16px;padding:0 22px;background:#fff}
.afb-qa summary{display:flex;justify-content:space-between;gap:16px;align-items:center;min-height:64px;font-family:var(--afb-font-display);font-weight:600;font-size:18px;cursor:pointer;list-style:none}
.afb-qa summary::-webkit-details-marker{display:none}
.afb-qa summary::after{content:"+";color:var(--afb-red);font-size:22px}
.afb-qa details[open] summary::after{content:"−"}
.afb-qa details p{padding-bottom:20px;font-size:16px;line-height:1.75;color:var(--afb-text-2)}
.afb-related__grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;list-style:none;padding:0}
.afb-related a{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:22px 24px;text-decoration:none;color:var(--afb-ink)!important;transition:border-color var(--afb-ease)}
.afb-related a:hover{border-color:var(--afb-ink)}
.afb-related small{display:block;font-family:var(--afb-font-mono);font-size:12px;color:var(--afb-red)}
.afb-related b{font-family:var(--afb-font-display);font-weight:600;font-size:18px}
.afb-cta-band{position:relative;isolation:isolate;overflow:hidden;background:var(--afb-red);color:#fff;padding:64px 0}
.afb-cta-band::before{content:"";position:absolute;inset:0;z-index:-1;background-image:linear-gradient(rgba(255,255,255,.07) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.07) 1px,transparent 1px);background-size:48px 48px;-webkit-mask-image:linear-gradient(90deg,transparent 30%,#000);mask-image:linear-gradient(90deg,transparent 30%,#000)}
.afb-cta-band__inner{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:24px}
.afb-cta-band .afb-h2{color:#fff;font-size:30px}
.afb-cta-band p{color:#F4DCDF;margin-top:8px}
.afb-cta-band__actions{display:flex;flex-wrap:wrap;gap:10px}
.afb-compare th[scope="col"]{min-width:200px}
.afb-compare .afb-is-featured{background:var(--afb-red-tint)}
.afb-compare thead .afb-is-featured{background:var(--afb-red);color:#fff}
.afb-compare ul{list-style:none;padding:0;display:flex;flex-direction:column;gap:8px}
.afb-compare li{display:flex;gap:8px}
.afb-compare li svg{flex-shrink:0;margin-top:4px;color:var(--afb-red)}
.afb-compare__price{font-family:var(--afb-font-display);font-weight:700;font-size:22px}
.afb-footnote{font-size:13px;color:var(--afb-text-3);line-height:1.6}
@media (max-width:959px){.afb-page-hero__grid{grid-template-columns:minmax(0,1fr);gap:24px}.afb-doc{grid-template-columns:minmax(0,1fr);gap:24px}.afb-toc{position:static;border:1px solid var(--afb-line);border-radius:14px;padding:6px 16px}.afb-toc summary{pointer-events:auto;cursor:pointer;margin:0;min-height:44px;display:flex;align-items:center}.afb-related__grid{grid-template-columns:1fr}}
@media (max-width:599px){.afb-prose h2{font-size:26px}.afb-prose p{font-size:16px}.afb-cta-band__actions .afb-btn{width:100%}.afb-cta-band .afb-h2{font-size:24px}}

/* ---------- Post template ---------- */
.afb-article-head{padding:32px 0 0}
.afb-article-head__text{display:flex;flex-direction:column;gap:18px;max-width:860px;margin-top:28px}
.afb-article-head .afb-h1{font-size:44px;line-height:1.25}
.afb-article-cover{margin-top:28px}
.afb-article-cover img{width:100%;aspect-ratio:1200/630;object-fit:cover;border-radius:var(--afb-r-panel)}
.afb-article-layout{display:grid;grid-template-columns:minmax(0,760px) minmax(0,300px);justify-content:space-between;gap:56px;padding:56px 0 var(--afb-section-y)}
.afb-article{min-width:0;display:flex;flex-direction:column;gap:28px;font-size:18px;line-height:1.9;color:#2E2A2F}
.afb-article h2{font-family:var(--afb-font-display);font-weight:700;font-size:30px;line-height:1.35;color:var(--afb-ink);margin-top:16px}
.afb-article__first{font-size:19px}
.afb-keybox{background:var(--afb-surface);border-radius:var(--afb-r-card);padding:26px 28px;display:flex;flex-direction:column;gap:12px}
.afb-keybox ul{padding-left:20px;font-size:16px;line-height:1.75;color:#3F3A40}
.afb-quote{font-family:var(--afb-font-display);font-weight:600;font-size:26px;line-height:1.5;color:var(--afb-red);margin:8px 0}
.afb-author{display:flex;gap:16px;align-items:flex-start;padding-top:28px;border-top:1px solid var(--afb-line);font-size:15px;line-height:1.7}
.afb-avatar{width:52px;height:52px;flex-shrink:0;border-radius:50%;background:var(--afb-ink);color:#fff;display:flex;align-items:center;justify-content:center;font-family:var(--afb-font-display);font-weight:700;font-size:16px}
.afb-avatar--sm{width:32px;height:32px;font-size:12px}
.afb-rail{display:flex;flex-direction:column;gap:16px;align-self:start;position:sticky;top:calc(var(--afb-header-h) + 24px)}
.afb-rail__cta{background:var(--afb-ink);color:#fff;border-radius:var(--afb-r-card);padding:24px;display:flex;flex-direction:column;gap:14px}
.afb-rail__cta p{font-size:14px;line-height:1.7;color:var(--afb-text-on-dark)}
.afb-rail .afb-toc{align-self:stretch;position:static;border:1px solid var(--afb-line);border-radius:var(--afb-r-card);padding:20px}
@media (max-width:959px){.afb-article-layout{grid-template-columns:minmax(0,1fr);gap:32px}.afb-rail{position:static;order:-1}.afb-rail__cta{display:none}.afb-article-head .afb-h1{font-size:34px}}
@media (max-width:599px){.afb-article-head .afb-h1{font-size:28px}.afb-article{font-size:17px}.afb-article__first{font-size:17px}.afb-article h2{font-size:24px}.afb-quote{font-size:21px}}
.afb-article-end-cta{display:none}
@media (max-width:959px){.afb-article-end-cta{display:flex}}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion:reduce){
  .afb-page *,.afb-page *::before,.afb-page *::after{transition:none!important;animation:none!important;scroll-behavior:auto!important}
  .afb-portfolio-card:hover,.afb-index-row:hover svg,.afb-link-arrow:hover svg,.afb-process__step:hover,.afb-faq-card:hover,.afb-game-card:hover{transform:none}
}

/* ---------- Theme fallbacks (search / 404 / archive / breadcrumb) ---------- */
.afb-shell{width:min(880px,100% - 40px);margin:0 auto;padding:56px 0 72px}
.afb-shell h1{margin:0 0 16px;font-family:var(--afb-font-display);font-size:clamp(28px,4vw,40px);font-weight:700;line-height:1.25}
.afb-shell a{color:var(--afb-red)}
.afb-shell a:hover{color:var(--afb-red-dark)}

/* =========================================================
   GLOBAL SINGLE POST BREADCRUMB
   Site-level navigation only. Article components remain per-content CSS.
   ========================================================= */

.afb-global-breadcrumb {
  width: min(1110px, calc(100% - 40px));
  margin: 26px auto 22px;
  color: #4f4f53;
  font-size: 13px;
  line-height: 1.6;
}

.afb-global-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.afb-global-breadcrumb li {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.afb-global-breadcrumb li:not(:last-child)::after {
  content: "›";
  margin-left: 6px;
  color: #a3a3a8;
}

.afb-global-breadcrumb a {
  color: inherit;
  text-decoration: none;
}

.afb-global-breadcrumb a:hover {
  color: #8F1220;
}

.afb-global-breadcrumb [aria-current="page"] {
  overflow: hidden;
  color: #252529;
  text-overflow: ellipsis;
}

@media (max-width: 640px) {
  .afb-global-breadcrumb {
    width: min(100% - 28px, 1110px);
    margin-top: 18px;
    margin-bottom: 18px;
    font-size: 12px;
  }
}


/* =========================================================
   FALLBACK ARCHIVE / BLOG
   ใช้เฉพาะ index.php เมื่อไม่มี archive controller เฉพาะ
   ไม่ render post_content เต็มก้อน เพื่อไม่ดึง HTML/CSS ของ Single Post มาชนกัน
   ========================================================= */

.afb-archive-fallback {
  width: min(1040px, 100% - 40px);
}

.afb-archive-fallback__header {
  margin-bottom: 28px;
}

.afb-archive-fallback__description {
  max-width: 760px;
  color: #646469;
}

.afb-archive-fallback__list {
  display: grid;
  gap: 18px;
}

.afb-archive-fallback__item {
  padding: 24px;
  border: 1px solid #e6e6e3;
  border-radius: 18px;
  background: #fff;
}

.afb-archive-fallback__item h2 {
  margin: 0 0 10px;
  font-size: clamp(20px, 3vw, 28px);
  line-height: 1.35;
}

.afb-archive-fallback__item h2 a {
  color: #1A1719;
  text-decoration: none;
}

.afb-archive-fallback__item h2 a:hover {
  color: #8F1220;
}

.afb-archive-fallback__item p {
  margin: 0;
  color: #5f5f64;
}

.afb-archive-fallback .navigation.pagination {
  margin-top: 30px;
}


/* Control plugin safety fallback — visible only when afb_site_header/footer have no owner. */
.afb-base-fallback-header,
.afb-base-fallback-footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0;
  font: 600 14px/1.5 var(--afb-font-body);
}
.afb-base-fallback-header a { color: #1A1719; text-decoration: none; }
.afb-base-fallback-footer { border-top: 1px solid #ececeb; color: #646469; }

/* ---------- WordPress integration (breadcrumb / cover / auto frames) ---------- */
.afb-page .afb-global-breadcrumb{width:auto;max-width:calc(var(--afb-container) + var(--afb-gutter)*2);margin:0 auto;padding:20px var(--afb-gutter) 0;color:var(--afb-text-3);font-size:14px}
.afb-page .afb-global-breadcrumb a{display:inline-flex;align-items:center;min-height:44px;color:var(--afb-text-3)}
.afb-page .afb-global-breadcrumb a:hover{color:var(--afb-red)}
.afb-page .afb-global-breadcrumb [aria-current="page"]{color:var(--afb-ink);font-weight:500}
.afb-page .afb-article-cover{margin:0 auto 28px}
.afb-page .afb-article--auto .afb-article-cover{width:100%;margin:0;border:0;border-radius:var(--afb-r-panel);box-shadow:var(--afb-shadow-2,0 24px 48px -28px rgba(26,23,25,.35))}
.afb-page .afb-article--auto .afb-article-cover img{border-radius:0}
.afb-article-head--auto{padding-top:8px}
.afb-article-head--auto .afb-article-head__text{margin-top:8px}
.afb-post-meta{font-size:14px;color:var(--afb-text-3)}
.afb-article-head--auto + .afb-container .afb-article-layout{padding-top:40px}
@media (max-width:959px){.afb-rail--auto{display:none}.afb-article-head--auto + .afb-container .afb-article-layout{padding-top:28px}}
.afb-article--auto h3{font-family:var(--afb-font-display);font-weight:600;font-size:22px;line-height:1.4;color:var(--afb-ink)}
.afb-article--auto ul,.afb-article--auto ol,.afb-prose ul,.afb-prose ol{padding-left:22px}
.afb-article--auto table,.afb-prose table{width:100%;border-collapse:collapse;font-size:15px;display:block;overflow-x:auto}
.afb-article--auto th,.afb-article--auto td,.afb-prose th,.afb-prose td{border:1px solid var(--afb-line);padding:10px 14px;text-align:left}
.afb-article--auto th,.afb-prose th{background:var(--afb-surface);font-weight:600;color:var(--afb-ink)}
.afb-prose{display:flex;flex-direction:column;gap:18px;font-size:17px;line-height:1.85}
.afb-page .afb-article-head .afb-article-cover{width:100%;margin:28px 0 0;border:0;box-shadow:none;background:none;border-radius:var(--afb-r-panel)}
.afb-page h1,.afb-page h2,.afb-page h3,.afb-global-breadcrumb li,.afb-post-feature__title,.afb-post-compact__title,.afb-hub__card-title{overflow-wrap:anywhere}
.afb-main:focus{outline:0}
.afb-shell{overflow-wrap:anywhere}
.afb-search__form{margin:8px 0 20px}
.afb-search__form .search-form{display:flex;gap:8px;flex-wrap:wrap}
.afb-search__form .search-field{flex:1;min-width:0;min-height:48px;padding:0 14px;border:1px solid var(--afb-line-2,#D6CFD1);border-radius:12px;font:inherit}
.afb-search__form .search-submit{min-height:48px;padding:0 20px;border:0;border-radius:12px;background:var(--afb-red);color:#fff;font:inherit;font-weight:700;cursor:pointer}
.afb-search__count{color:var(--afb-text-3);font-size:14px;margin-bottom:12px}
.afb-search__list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:12px}
.afb-search__item{padding:18px 20px;border:1px solid var(--afb-line);border-radius:var(--afb-r-card);display:flex;flex-direction:column;gap:6px}
.afb-search__type{font-family:var(--afb-font-mono);font-size:12px;letter-spacing:.06em;color:var(--afb-red)}
.afb-page .afb-search__title{font-family:var(--afb-font-display);font-weight:600;font-size:19px;line-height:1.45;color:var(--afb-ink);text-decoration:none}
.afb-page .afb-search__title:hover{color:var(--afb-red)}
.afb-search__item p{font-size:15px;color:var(--afb-text-2)}
.afb-shell .navigation.pagination{margin-top:24px}
.afb-shell .nav-links{display:flex;flex-wrap:wrap;gap:8px}
.afb-page .afb-shell .page-numbers{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;padding:0 12px;border:1px solid var(--afb-line);border-radius:12px;text-decoration:none;color:var(--afb-ink)}
.afb-shell .page-numbers.current{background:var(--afb-red);border-color:var(--afb-red);color:#fff}
.afb-page-links{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:24px 0;font-weight:600}
.afb-page .afb-page-links a,.afb-page-links .post-page-numbers.current{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;padding:0 12px;border:1px solid var(--afb-line);border-radius:12px;text-decoration:none;color:var(--afb-ink)}
.afb-page-links .post-page-numbers.current{background:var(--afb-red);border-color:var(--afb-red);color:#fff}
.afb-prose h2{font-family:var(--afb-font-display);font-weight:700;font-size:26px;line-height:1.35;color:var(--afb-ink);margin-top:12px}
/* =========================================================
   v1.0.11 PAGE HERO — กึ่งกลางแบบหน้าแรก + ภาพพื้นหลังแบรนด์ (ไฟล์เดียวกับหน้าแรก)
========================================================= */
.afb-page-hero{background-color:#141214;background-image:radial-gradient(ellipse 55% 70% at 50% 45%,rgba(20,18,20,.9) 0%,rgba(20,18,20,.66) 55%,rgba(20,18,20,.22) 88%),linear-gradient(rgba(20,18,20,.45),rgba(20,18,20,.12) 45%,#141214 100%),url("/wp-content/uploads/2026/10/afb-hero-bg-1200.webp");background-size:cover;background-position:center 35%;background-repeat:no-repeat;padding:36px 0 96px}
@media (min-width:1300px){.afb-page-hero{background-image:radial-gradient(ellipse 55% 70% at 50% 45%,rgba(20,18,20,.9) 0%,rgba(20,18,20,.66) 55%,rgba(20,18,20,.22) 88%),linear-gradient(rgba(20,18,20,.45),rgba(20,18,20,.12) 45%,#141214 100%),url("/wp-content/uploads/2026/10/afb-hero-bg-1672.webp")}}
@media (max-width:599px){.afb-page-hero{background-image:linear-gradient(rgba(20,18,20,.8),rgba(20,18,20,.86) 60%,#141214 100%),url("/wp-content/uploads/2026/10/afb-hero-bg-mobile.webp");background-position:center bottom;padding:24px 0 72px}}
.afb-page-hero::before{display:none}
.afb-page-hero--center .afb-container{display:flex;flex-direction:column;align-items:center;text-align:center}
.afb-page-hero--center .afb-breadcrumb ol{justify-content:center}
.afb-page-hero--center .afb-page-hero__copy{align-items:center;max-width:880px;margin-top:28px;gap:20px}
.afb-page-hero--center .afb-page-hero__copy .afb-chip{align-self:center}
.afb-page-hero--center .afb-lead{max-width:780px}
.afb-page-hero--center .afb-page-hero__ctas{justify-content:center}
.afb-page-hero .afb-h1,.afb-page-hero .afb-lead{text-shadow:0 2px 16px rgba(0,0,0,.55)}
/* หน้าที่ยังไม่ได้นำเข้า HTML ใหม่: ซ่อนกล่องสรุปเดิม */
.afb-page-hero .afb-summary{display:none}
.afb-page-hero__grid{grid-template-columns:minmax(0,1fr)}
@media (max-width:599px){.afb-page-hero--center .afb-page-hero__copy{margin-top:16px;gap:16px}.afb-page-hero--center .afb-page-hero__ctas{flex-direction:column;width:100%}.afb-page-hero--center .afb-page-hero__ctas .afb-btn{width:100%;justify-content:center}}

/* รูปหน้าปก (Featured Image) ใต้ Hero: เกยขอบล่างของ Hero เหมือนการ์ดตัวเลขหน้าแรก */
.afb-page-hero:has(+ .afb-page-cover){padding-bottom:136px}
.afb-page-cover{position:relative;z-index:2;margin-top:-88px}
.afb-page-cover__fig{margin:0;border-radius:24px;overflow:hidden;background:#1A1719;box-shadow:0 30px 60px -28px rgba(26,23,25,.5)}
.afb-page-cover__img{display:block;width:100%;height:auto;max-height:560px;object-fit:cover}
@media (max-width:599px){.afb-page-hero:has(+ .afb-page-cover){padding-bottom:92px}.afb-page-cover{margin-top:-56px}.afb-page-cover__fig{border-radius:16px}}
/* v1.0.12 หน้ารวมบทความ /article/: Hero แบบเดียวกับหน้าแรกและหน้าย่อย */
.afb-page .afb-hub-hero{background-color:#141214;background-image:radial-gradient(ellipse 55% 70% at 50% 45%,rgba(20,18,20,.9) 0%,rgba(20,18,20,.66) 55%,rgba(20,18,20,.22) 88%),linear-gradient(rgba(20,18,20,.45),rgba(20,18,20,.12) 45%,#141214 100%),url("/wp-content/uploads/2026/10/afb-hero-bg-1200.webp");background-size:cover;background-position:center 35%;background-repeat:no-repeat;padding:72px 0 136px}
@media (min-width:1300px){.afb-page .afb-hub-hero{background-image:radial-gradient(ellipse 55% 70% at 50% 45%,rgba(20,18,20,.9) 0%,rgba(20,18,20,.66) 55%,rgba(20,18,20,.22) 88%),linear-gradient(rgba(20,18,20,.45),rgba(20,18,20,.12) 45%,#141214 100%),url("/wp-content/uploads/2026/10/afb-hero-bg-1672.webp")}}
@media (max-width:599px){.afb-page .afb-hub-hero{background-image:linear-gradient(rgba(20,18,20,.8),rgba(20,18,20,.86) 60%,#141214 100%),url("/wp-content/uploads/2026/10/afb-hero-bg-mobile.webp");background-position:center bottom;padding:44px 0 112px}}
.afb-page .afb-hub-hero::before,.afb-page .afb-hub-hero::after{display:none}
.afb-page .afb-hub-hero .afb-hub-hero__inner{align-items:center;text-align:center}
.afb-page .afb-hub-hero p{margin:0 auto;max-width:780px}
.afb-page .afb-hub-hero h1,.afb-page .afb-hub-hero p{text-shadow:0 2px 16px rgba(0,0,0,.55)}
.afb-page .afb-hub .afb-hub__meta{justify-content:center}
