/* ==========================================================================
   patch-delta.css — R6.2-NEXT (สำเนาตรวจภายใน ยังไม่เผยแพร่)
   ไม่กำหนดสีใหม่: ใช้ currentColor / ตัวแปรเดิมของแต่ละหน้า / สีที่มีอยู่แล้วใน R6.2 เท่านั้น
   ========================================================================== */

/* D5 — มุมมอง: public ซ่อนข้อมูลภายใน, review แสดงทั้งหมด (DOM ไม่ถูกลบ ย้อนกลับได้) */
html[data-view="public"] .internal-note,
html[data-view="public"] .card-id,
html[data-view="public"] .card-pending-badge,
html[data-view="public"] .card-proposal-badge,
html[data-view="public"] .placeholder-badge,
html[data-view="public"] .placeholder-file,
html[data-view="public"] .card-path,
html[data-view="public"] .archive-table .col-status,
html[data-view="public"] .archive-table thead th:nth-child(5),
html[data-view="public"] .btn-template-link,
html[data-view="public"] .btn-table-sample { display: none !important; }

/* ปุ่มสลับมุมมองในแถบสถานะ */
.staging-banner { font-size: .875rem; line-height: 1.5; }
.view-toggle { font: inherit; font-size: .8125rem; min-height: 44px; padding: 0 14px; margin-left: 8px; border: 1px solid currentColor; border-radius: 8px; background: transparent; color: inherit; cursor: pointer; }

/* D1/D2/D9 — ขนาดตัวอักษรขั้นต่ำและเป้าแตะ (เกณฑ์ที่เสนอ 13px / 44px ไม่ใช่การรับรอง WCAG) */
.footer-links a, .footer-col a, footer a { display: inline-flex; align-items: center; min-height: 44px; }
.nav-toggle { min-height: 44px; min-width: 44px; }
.nav-links a, nav a { min-height: 44px; display: inline-flex; align-items: center; }
.btn-nav, .btn-cta, .btn-secondary, .btn-submit, .btn-talk-service, .card-action,
.btn-download, .btn-download-word, .btn-read-link, .btn-template-link, .btn-table-action,
.btn-table-sample, .chip-btn, .btn-toggle-group, .btn-back-to-filter, .problem-cta, .tool-link, .journey-tab-btn {
  display: inline-flex; align-items: center; min-height: 44px; }
.badge-status, .badge-unknown, .topic-badge, .brand-badge, .badge-row-status, .group-count, .svc-scope-badge,
.card-badge, .card-date, .card-id, .card-pending-badge, .card-proposal-badge, .placeholder-badge, .placeholder-file,
.step-circle, .section-eyebrow, .read-next-label, .tool-meta, .article-mini-date { font-size: .8125rem; }
.row-summary-text, .card-summary, .faq-a, .privacy-notice, .form-hint, .svc-label, .card-meta, .tag, .tool-tag { font-size: max(.8125rem, 1em); }
small { font-size: .8125rem; }
.table-container td, .archive-table td, .archive-table th, .services-table td, .services-table th { font-size: .875rem; }

/* D8 — โฟกัสคีย์บอร์ดมองเห็นได้ (ไม่เปลี่ยนสี) */
a:focus-visible, button:focus-visible, summary:focus-visible, select:focus-visible,
input:focus-visible, textarea:focus-visible,
.search-input-wrap input:focus-visible, .form-group input:focus-visible,
.form-group select:focus-visible, .form-group textarea:focus-visible { outline: 3px solid var(--accent, currentColor) !important; outline-offset: 2px !important; }

/* เป้าหมายลิงก์ลึกและองค์ประกอบรับโฟกัสคีย์บอร์ด (กันหัวแถบ sticky บังตอน Tab / Shift+Tab / 200% zoom) */
html { scroll-padding-top: 96px; }
.svc-item-card, .game-proto, [id],
main a, main button, main input, main select, main textarea, main summary,
main [tabindex]:not([tabindex="-1"]),
footer a, footer button { scroll-margin-top: 96px; }
header.site-header [id], .staging-banner [id], .skip-link { scroll-margin-top: 0; }

/* D6 — แผงสถานะฟอร์ม + ข้อความสถานะ */
.contact-pending { border: 1px solid currentColor; border-radius: 8px; padding: 14px 18px; font-size: .9375rem; line-height: 1.6; margin: 0 0 16px; }
.contact-pending strong { display: block; margin-bottom: 4px; }
.form-status { margin-top: 12px; font-size: .9375rem; line-height: 1.6; }
.form-status:empty { display: none; }
.form-status-ok, .form-status-warn { border-left: 4px solid currentColor; padding: 8px 12px; }

/* ต้นแบบเกม (placeholder ที่ซื่อตรง) */
.game-callout, .game-proto { border: 1px solid currentColor; border-radius: 12px; padding: 20px; margin: 28px 0; }
.game-callout-tag { display: inline-block; font-size: .8125rem; font-weight: 700; border: 1px solid currentColor; border-radius: 999px; padding: 2px 12px; margin-bottom: 8px; }
.game-callout h2, .game-callout h3, .game-proto h2 { margin: 6px 0 8px; }
.game-proto-grid { display: grid; gap: 16px; grid-template-columns: 1fr; margin-top: 12px; }
@media (min-width: 768px) { .game-proto-grid { grid-template-columns: 1fr 1fr; } }
.game-card { border: 1px solid currentColor; border-radius: 10px; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.game-card label { font-size: .9375rem; font-weight: 600; }
.game-card input[type=text], .game-card input[type=email], .game-card textarea { font: inherit; padding: 10px 12px; min-height: 44px; border: 1px solid currentColor; border-radius: 8px; width: 100%; box-sizing: border-box; background: transparent; color: inherit; }
.game-check { display: flex; gap: 10px; align-items: center; min-height: 44px; }
.game-check input[type="checkbox"], .game-check input { width: 44px; height: 44px; min-width: 44px; min-height: 44px; cursor: pointer; flex-shrink: 0; margin: 0; }
.game-sub { font-weight: 400 !important; }
.btn-game { font: inherit; min-height: 44px; padding: 0 18px; border: 1px solid currentColor; border-radius: 8px; background: transparent; color: inherit; cursor: pointer; align-self: flex-start; }
.game-note, .game-limit, .game-score { font-size: .9375rem; line-height: 1.6; margin: 4px 0; }
.svc-prototype-link { font-size: .9375rem; margin: 8px 0; }

/* CTA คู่ (ใช้เมื่อต้องแยกองค์กร/ผู้เรียนในบล็อกเดียว) */
.cta-pair { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .cta-pair { grid-template-columns: 1fr 1fr; } }

/* D9b — เก็บตกจากการวัดบน R6.2: ข้อความ inline-style ที่เล็กกว่า 13px, ปุ่มตารางทะเบียน, สรุปตาราง, ลิงก์สปอตไลต์ */
.role, .tab-badge { font-size: .8125rem; }
.btn-table-action, .btn-table-sample { font-size: .875rem; }
[style*="font-size: 0.7"], [style*="font-size:0.7"], [style*="font-size: .7"], [style*="font-size:.7"],
[style*="font-size: 0.8rem"], [style*="font-size:0.8rem"], [style*="font-size: .8rem"], [style*="font-size:.8rem"],
[style*="font-size: 0.78"], [style*="font-size:0.78"], [style*="font-size: 0.75"], [style*="font-size:0.75"],
[style*="font-size: 0.76"], [style*="font-size:0.76"], [style*="font-size: 0.79"], [style*="font-size:0.79"],
[style*="font-size: 0.80"], [style*="font-size:0.80"], [style*="font-size: 0.81"], [style*="font-size:0.81"],
.tool-card code, code { font-size: .8125rem !important; }
.matrix-details summary { min-height: 44px; display: flex; align-items: center; }
.spotlight-mini-card a, .spotlight-pro-section a { min-height: 44px; display: inline-flex !important; align-items: center; }
.brand .role, .brand span.role { font-size: .8125rem; }
.archive-table td strong, .archive-table td::before { font-size: .875rem; }
header .brand, .site-header .brand { min-height: 44px; display: inline-flex; align-items: center; flex-wrap: wrap; }
.staging-banner { display: flex; flex-wrap: wrap; gap: 4px 8px; justify-content: center; align-items: center; }
.nowrap { white-space: nowrap; }
.sample-notice { border: 1px solid currentColor; border-radius: 8px; padding: 10px 14px; margin: 0 0 16px; font-size: .9375rem; line-height: 1.6; }

/* PACK-LOCAL-IMPL-1 — 44px tap-target & responsive header/video library coverage (no new palette colors) */
.btn-cta-tools, .btn-tool-start, .btn-tool-next, .btn-tool-reset, .btn-tool-sublink, .btn-tool-restart,
.sm-choice-btn, .preview-pill-box a, .video-jump-pill, #videos a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.sm-choice-btn { width: 100%; justify-content: flex-start; text-align: left; }
input[type="text"], input[type="email"], input[type="search"], select { min-height: 44px; }
.video-jump-pill {
  gap: 8px;
  padding: 10px 18px;
  border: 1.5px solid currentColor;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  color: var(--accent, #0271ab);
  background: #ffffff;
}
@media (max-width: 768px) {
  header.site-header .nav-links a { width: 100%; justify-content: flex-start; flex-shrink: 0; }
  header.site-header .nav-links.active {
    flex-wrap: nowrap;
    max-height: calc(100vh - 88px);
    max-height: calc(100dvh - 88px);
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
  }
}

/* DAVE-UI-CLOSE-20261115-1750 — Active nav state parity & prepared image replacement slots (no new palette colors) */
header.site-header .nav-links a[aria-current="page"]:not(.btn-nav) {
  color: var(--primary);
  font-weight: 700;
  background: rgba(20, 49, 61, 0.06);
}
html[data-view="public"] .img-slot[data-slot-empty="true"] { display: none !important; }
.img-slot {
  border: 1.5px dashed currentColor;
  border-radius: 12px;
  padding: 10px 14px;
  color: var(--muted);
  font-size: .8125rem;
  line-height: 1.45;
  box-sizing: border-box;
  max-width: 100%;
}
.img-slot strong { color: var(--primary, currentColor); display: block; margin-bottom: 2px; }
.img-slot img { display: block; max-width: 100%; height: auto; border-radius: inherit; }
.img-slot-avatar {
  width: 84px;
  min-height: 84px;
  margin: 0 auto 12px;
  border-radius: 999px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px;
}
@media (max-width: 640px) {
  .img-slot-avatar { width: 72px; min-height: 72px; margin-bottom: 8px; font-size: .75rem !important; }
}
.img-slot-landscape {
  margin: 0 0 28px;
  aspect-ratio: 3 / 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.img-slot-card-thumb {
  margin: 0 0 12px;
  padding: 8px 10px;
  border-radius: 8px;
  text-align: left;
}
.img-slot-portrait {
  max-width: 200px;
  margin: 0 auto 16px;
  border-radius: 16px;
  padding: 14px 12px;
  text-align: center;
}
@media (max-width: 640px) {
  .img-slot-portrait { max-width: 148px; padding: 10px; margin-bottom: 12px; }
}


/* ==========================================================================
   DAVE-WEB-MIGRATION-GATES-20261116
   1) Unified ~60/30/10 Palette (Warm Light / Deep Navy / Terracotta-Orange)
   2) Dark-Alternating-Light Rhythm (.band-navy, .band-warm, .site-footer)
   3) Strict WCAG AA Contrast on BOTH Light & Dark Surfaces (Text, Buttons, Focus)
   4) Real CC BY-NC 4.0 Tool Previews & Prepared Missing-Asset Slots
   ========================================================================== */
:root {
  --bg: #fbf9f5;
  --surface: #ffffff;
  --surface-subtle: #f4efe6;
  --surface-warm: #f3ede2;
  --text: #14313d;
  --secondary: #2c4652;
  --muted: #435a64;
  --primary: #14313d;
  --primary-hover: #1d4454;
  --navy-deep: #0f2731;
  --navy-card: #1a3d4c;
  --navy-border: rgba(226, 236, 240, 0.2);
  --accent: #a84b30;
  --accent-text: #9a4026;
  --accent-hover: #8e3c24;
  --accent-light: #fbeee9;
  --accent-on-dark: #fed7aa;
  --border: #dfd9ce;
  --badge-bg: #eef4f7;
  --badge-text: #14313d;
}

html, body {
  background-color: var(--bg) !important;
  color: var(--text) !important;
}

/* Unified Site Header across all 6 pages */
header.site-header {
  background: #ffffff !important;
  border-bottom: 1px solid var(--border) !important;
  box-shadow: 0 2px 10px -2px rgba(20, 49, 61, 0.06) !important;
}
header.site-header .brand {
  color: var(--primary) !important;
  font-weight: 800 !important;
  font-size: 1.15rem !important;
  gap: 6px;
}
header.site-header .brand .dot {
  color: var(--accent) !important;
  font-size: 1.4rem;
  line-height: 0;
}
header.site-header .brand .role {
  color: var(--muted) !important;
  font-weight: 500 !important;
}
@media (max-width: 768px) {
  header.site-header .brand .role {
    display: none !important;
  }
}
header.site-header .nav-links a:not(.btn-nav) {
  color: var(--secondary) !important;
  font-weight: 600;
}
header.site-header .nav-links a:not(.btn-nav):hover {
  color: var(--accent-text) !important;
  background: var(--accent-light) !important;
}
header.site-header .nav-links a[aria-current="page"]:not(.btn-nav),
header.site-header .nav-links a.active:not(.btn-nav) {
  color: var(--primary) !important;
  font-weight: 700 !important;
  background: rgba(20, 49, 61, 0.09) !important;
}
header.site-header .nav-links a.btn-nav,
.btn-nav {
  background: var(--accent) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  border-radius: 8px !important;
  padding: 8px 16px !important;
  box-shadow: 0 2px 8px rgba(168, 75, 48, 0.22);
}
header.site-header .nav-links a.btn-nav:hover,
.btn-nav:hover {
  background: var(--accent-hover) !important;
  color: #ffffff !important;
}

/* High-contrast Eyebrows, Links & Primary Terracotta CTAs on Light Surfaces */
.hero-eyebrow,
.card-badge.accent,
.svc-scope-badge.accent,
.tool-chip.featured {
  background: var(--accent-light) !important;
  color: var(--accent-text) !important;
  border-color: #f3d1c4 !important;
}
.section-eyebrow,
.svc-label {
  color: var(--accent-text) !important;
}
.card-action,
.preview-pill-box a,
.tool-link {
  color: var(--accent-text) !important;
  font-weight: 700;
}
.card-action:hover,
.preview-pill-box a:hover,
.tool-link:hover {
  color: var(--accent-hover) !important;
}
.btn-primary,
.btn-cta,
.btn-talk-service,
.btn-submit,
.btn-tool-start,
.btn-tool-next,
.btn-tool-restart,
.btn-read-link,
.btn-table-action,
.btn-cta-tools {
  background: var(--accent) !important;
  color: #ffffff !important;
  border-color: var(--accent) !important;
}
.btn-primary:hover,
.btn-cta:hover,
.btn-talk-service:hover,
.btn-submit:hover,
.btn-tool-start:hover,
.btn-tool-next:hover,
.btn-tool-restart:hover,
.btn-read-link:hover,
.btn-table-action:hover,
.btn-cta-tools:hover {
  background: var(--accent-hover) !important;
  color: #ffffff !important;
  border-color: var(--accent-hover) !important;
}

/* Secondary Buttons & Small Badges Contrast Guard (>= 4.5:1) */
.btn-secondary,
.btn-download {
  background: #ffffff !important;
  color: var(--primary) !important;
  border: 1.5px solid var(--primary) !important;
  font-weight: 700 !important;
}
.btn-secondary:hover,
.btn-download:hover {
  background: var(--surface-subtle) !important;
  color: var(--primary) !important;
}
.btn-download-word {
  background: #ffffff !important;
  color: var(--secondary) !important;
  border: 1.5px solid var(--muted) !important;
  font-weight: 600 !important;
}
.badge-status {
  background: #dcfce7 !important;
  color: #166534 !important;
}
.badge-unknown,
.badge-row-status,
.card-id {
  background: #eef2f5 !important;
  color: #334e5c !important;
}
.topic-badge,
.badge-interactive,
.tool-tag {
  background: #e8f1f5 !important;
  color: #14313d !important;
}
.tab-badge {
  background: #eae5dc !important;
  color: #2c4652 !important;
}
.journey-tab-btn.active,
.chip-btn.active {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #ffffff !important;
}
.journey-tab-btn.active .tab-badge {
  background: rgba(255, 255, 255, 0.2) !important;
  color: #ffffff !important;
}

/* Warm Sand Alternating Band (Light rhythm) */
.band-warm {
  background: var(--surface-warm) !important;
  border: 1px solid #e3dacb !important;
  border-radius: 20px;
  padding: 36px 28px;
}
@media (max-width: 640px) {
  .band-warm { padding: 24px 16px; border-radius: 16px; }
}

/* Deep Navy Alternating Band (~30% Deep Navy rhythm) */
.band-navy {
  background: linear-gradient(145deg, #14313d 0%, #0f2731 100%) !important;
  color: #f8fafc !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 20px;
  padding: 40px 32px;
  box-shadow: 0 14px 30px -10px rgba(15, 39, 49, 0.28);
}
@media (max-width: 640px) {
  .band-navy { padding: 26px 18px; border-radius: 16px; }
}
.band-navy h2,
.band-navy h3,
.band-navy h4,
.band-navy strong,
.band-navy .section-title,
.band-navy .spotlight-title,
.band-navy .process-step-title {
  color: #ffffff !important;
}
.band-navy p,
.band-navy li,
.band-navy .section-subtitle,
.band-navy .spotlight-desc,
.band-navy .process-step-desc {
  color: #e2ecf0 !important;
}
.band-navy .section-eyebrow,
.band-navy .process-step-num,
.band-navy .step-num,
.band-navy .eyebrow-on-dark {
  color: var(--accent-on-dark) !important;
}
.band-navy .card-badge.accent,
.band-navy .badge-on-dark {
  background: rgba(254, 215, 170, 0.16) !important;
  color: var(--accent-on-dark) !important;
  border: 1px solid rgba(254, 215, 170, 0.4) !important;
}
.band-navy .band-navy-card,
.band-navy .step-card,
.band-navy .fw-step-card {
  background: var(--navy-card) !important;
  border: 1px solid var(--navy-border) !important;
  border-radius: 14px;
  padding: 22px 20px;
  color: #f8fafc !important;
}
.band-navy a:not(.btn-primary):not(.btn-cta):not(.btn-secondary):not(.btn-cta-tools):not(.spotlight-card-link) {
  color: var(--accent-on-dark) !important;
  text-decoration: underline;
  font-weight: 700;
}
.band-navy .btn-primary,
.band-navy .btn-cta,
.band-navy .btn-cta-tools {
  background: #b5492b !important;
  color: #ffffff !important;
  border: 1.5px solid rgba(254, 215, 170, 0.72) !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}
.band-navy .btn-primary:hover,
.band-navy .btn-cta:hover,
.band-navy .btn-cta-tools:hover {
  background: #9c3d22 !important;
  color: #ffffff !important;
}
.band-navy .btn-secondary {
  background: #fbf9f5 !important;
  color: #14313d !important;
  border: 1.5px solid #fbf9f5 !important;
}
.band-navy .btn-secondary:hover {
  background: #f3ede2 !important;
  color: #0f2731 !important;
}

/* White Spotlight Inner Cards inside a Deep Navy Band (articles.html) */
.band-navy .spotlight-mini-card {
  background: #ffffff !important;
  border: 1px solid #dfd9ce !important;
  color: var(--text) !important;
}
.band-navy .spotlight-mini-card h3,
.band-navy .spotlight-mini-card strong {
  color: var(--primary) !important;
}
.band-navy .spotlight-mini-card p {
  color: var(--muted) !important;
}
.band-navy .spotlight-mini-card a.spotlight-card-link {
  color: var(--accent-text) !important;
  text-decoration: none;
  font-weight: 700;
}
.band-navy .spotlight-mini-card a.spotlight-card-link:hover {
  color: var(--accent-hover) !important;
  text-decoration: underline;
}

/* Unified Deep Navy Site Footer across all 6 pages */
footer.site-footer {
  background: var(--navy-deep) !important;
  border-top: 4px solid var(--accent) !important;
  color: #e2ecf0 !important;
  margin-top: 64px;
}
footer.site-footer .footer-brand,
footer.site-footer .footer-title {
  color: #ffffff !important;
}
footer.site-footer .footer-desc {
  color: #d5e2e8 !important;
}
footer.site-footer .footer-links {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 4px !important;
}
footer.site-footer .footer-links a {
  color: #e2ecf0 !important;
}
footer.site-footer .footer-links a:hover {
  color: var(--accent-on-dark) !important;
  text-decoration: underline;
}
footer.site-footer .footer-bottom {
  border-top: 1px solid rgba(226, 236, 240, 0.16) !important;
  color: #c5d6de !important;
}

/* Focus-Visible Contrast Guard: Crisp Terracotta on Light, Warm Peach (#fed7aa >=10.9:1) on Dark */
a:focus-visible, button:focus-visible, summary:focus-visible, select:focus-visible,
input:focus-visible, textarea:focus-visible,
.search-input-wrap input:focus-visible, .form-group input:focus-visible,
.form-group select:focus-visible, .form-group textarea:focus-visible {
  outline: 3px solid var(--accent-text) !important;
  outline-offset: 3px !important;
}
.band-navy a:focus-visible,
.band-navy button:focus-visible,
.band-navy summary:focus-visible,
.band-navy input:focus-visible,
.band-navy select:focus-visible,
.band-navy textarea:focus-visible,
footer.site-footer a:focus-visible,
footer.site-footer button:focus-visible,
.journey-tab-btn.active:focus-visible,
.chip-btn.active:focus-visible,
.btn-primary:focus-visible,
.btn-cta:focus-visible,
.btn-nav:focus-visible,
.btn-talk-service:focus-visible,
.btn-submit:focus-visible,
.btn-tool-start:focus-visible,
.btn-tool-next:focus-visible,
.btn-tool-restart:focus-visible,
.btn-read-link:focus-visible,
.btn-cta-tools:focus-visible {
  outline: 3px solid var(--accent-on-dark) !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 5px rgba(20, 49, 61, 0.85) !important;
}
.band-navy .spotlight-mini-card a:focus-visible {
  outline: 3px solid var(--accent-text) !important;
  outline-offset: 2px !important;
  box-shadow: none !important;
}

/* Real Verified Tool Preview Thumbnails (CC BY-NC 4.0) */
.img-slot-filled {
  border: 1px solid var(--border) !important;
  border-style: solid !important;
  background: #ffffff !important;
  padding: 0 !important;
  overflow: hidden;
  border-radius: 10px;
  margin: 0 0 14px;
  box-shadow: 0 2px 8px rgba(20, 49, 61, 0.06);
}
.img-slot-filled img.tool-preview-img {
  display: block;
  width: 100%;
  height: 196px;
  object-fit: cover;
  object-position: top center;
  border-bottom: 1px solid var(--border);
}
.img-slot-filled .img-credit-caption {
  padding: 6px 10px;
  font-size: 0.78rem;
  color: var(--muted);
  background: var(--bg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

/* Section Who/What/Next Meta Strip & Data Consent Separation Box */
.section-who-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: 999px;
  margin-top: 8px;
}
.consent-separation-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: 10px;
  padding: 14px 16px;
  margin-top: 16px;
  font-size: 0.86rem;
  color: var(--secondary);
  line-height: 1.6;
}
.consent-separation-box strong {
  color: var(--primary);
}
.t2-navy-head {
  background: linear-gradient(145deg, #14313d 0%, #0f2731 100%);
  color: #ffffff;
  border-radius: 10px;
  padding: 18px 20px;
  margin-bottom: 16px;
}
.t2-navy-head h3 {
  color: #ffffff !important;
  margin: 10px 0 4px !important;
}
.t2-navy-head p {
  color: #e2ecf0 !important;
  margin: 0;
  font-size: 0.92rem;
}


/* ==========================================================================
   PHASE-3 MODERN SERVICE UI LAYER (2026-11-16)
   Approved UI Direction: Modern Service Website (shadcn/ui · beautifului.dev · Clean Dashboard)
   Guardrails:
   - Pure HTML/CSS/Vanilla JS (Zero React, Zero 3rd-party copyrighted code/assets)
   - Brand v2 Palette Only (~60% Warm Light / ~30% Deep Navy / ~10% Terracotta-Orange)
   - WCAG AA Contrast >= 4.5:1 Text, >= 3.0:1 UI Boundaries & Focus
   - Safe Thai Vowel/Tone-Mark Line-Height (>= 1.5) & >= 44px Tap Targets
   - Full Mobile 390px Reflow & Strict prefers-reduced-motion Support
   ========================================================================== */

/* Subtle architectural dot-grid backdrop on hero headers (CSS-only, zero external asset) */
.hero,
.hero-services,
.hub-hero,
.hero-contact,
.about-header {
  position: relative;
  background-image: radial-gradient(rgba(20, 49, 61, 0.085) 1px, transparent 1px);
  background-size: 20px 20px;
  border-radius: 20px;
  border: 1px solid rgba(20, 49, 61, 0.08);
  background-color: rgba(255, 255, 255, 0.72);
  box-shadow: 0 1px 2px rgba(20, 49, 61, 0.04), 0 12px 32px -16px rgba(20, 49, 61, 0.08);
  padding: 36px 24px !important;
  margin-bottom: 32px !important;
}
@media (max-width: 640px) {
  .hero,
  .hero-services,
  .hub-hero,
  .hero-contact,
  .about-header {
    padding: 24px 16px !important;
    border-radius: 16px;
    margin-bottom: 22px !important;
  }
}

/* Crisp shadcn/ui + beautifului Card Elevation & Hairline Anatomy */
.service-card,
.article-card,
.tool-feature-card,
.svc-item-card,
.tool-card,
.form-card,
.faq-box,
.faq-section,
.tools-faq-section,
.hub-controls {
  background: #ffffff !important;
  border: 1px solid #dbd4c7 !important;
  border-radius: 16px !important;
  box-shadow: 0 1px 2px rgba(20, 49, 61, 0.04), 0 10px 26px -12px rgba(20, 49, 61, 0.09) !important;
}
.service-card:hover,
.article-card:hover,
.tool-feature-card:hover,
.svc-item-card:hover,
.tool-card:hover {
  border-color: #bfa999 !important;
  box-shadow: 0 4px 12px rgba(20, 49, 61, 0.07), 0 16px 32px -12px rgba(20, 49, 61, 0.13) !important;
}

/* Thai Typography & Vowel/Tone-Mark Clipping Guard across all Buttons/Chips/Tabs */
.btn-primary,
.btn-secondary,
.btn-cta,
.btn-nav,
.btn-talk-service,
.btn-submit,
.btn-download,
.btn-download-word,
.chip-btn,
.journey-tab-btn,
.goal-pill-btn {
  line-height: 1.5 !important;
  padding-top: 10px !important;
  padding-bottom: 10px !important;
  min-height: 44px !important;
  letter-spacing: 0.005em;
}

/* Recessed Segmented Switcher (shadcn/ui TabsList style) */
.journey-switch-card {
  background: #efeae0 !important;
  border: 1px solid #dad2c3 !important;
  border-radius: 14px !important;
  padding: 6px !important;
  box-shadow: inset 0 1px 2px rgba(20, 49, 61, 0.06) !important;
}
.journey-tab-btn {
  border-radius: 10px !important;
  font-weight: 700 !important;
  color: var(--secondary) !important;
}
.journey-tab-btn.active {
  background: var(--primary) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  box-shadow: 0 2px 8px rgba(15, 39, 49, 0.22) !important;
}

/* Interactive Goal / Situation Selector Dashboard Panel (index.html) */
.goal-selector-panel {
  background: #ffffff;
  border: 1px solid #dbd4c7;
  border-radius: 18px;
  padding: 24px;
  margin: 0 0 36px;
  box-shadow: 0 1px 3px rgba(20, 49, 61, 0.05), 0 12px 28px -14px rgba(20, 49, 61, 0.1);
}
.goal-selector-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 14px;
}
.goal-selector-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary);
  margin: 0;
}
.goal-selector-sub {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0;
}
.goal-pills-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
@media (max-width: 900px) {
  .goal-pills-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .goal-selector-panel { padding: 18px 14px; }
  .goal-pills-row { grid-template-columns: minmax(0, 1fr); }
}
.goal-pill-btn {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  text-align: left;
  padding: 10px 14px !important;
  border-radius: 12px;
  border: 1.5px solid #dbd4c7;
  background: #fbf9f5;
  color: var(--primary);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}
.goal-pill-btn:hover {
  border-color: var(--primary);
  background: #f3ede2;
}
.goal-pill-btn[aria-checked="true"] {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(20, 49, 61, 0.18);
}
.goal-pill-btn[aria-checked="true"]:focus-visible {
  outline: 3px solid var(--accent-on-dark) !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 5px rgba(20, 49, 61, 0.85) !important;
}
.goal-recommendation-card {
  background: var(--surface-subtle);
  border: 1px solid #ddd4c4;
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  padding: 18px 20px;
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 16px;
  align-items: center;
}
@media (max-width: 768px) {
  .goal-recommendation-card { grid-template-columns: minmax(0, 1fr); padding: 16px 14px; }
}
.goal-rec-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--accent-text);
  background: var(--accent-light);
  border: 1px solid #f3d1c4;
  border-radius: 999px;
  padding: 2px 10px;
  margin-bottom: 6px;
}
.goal-rec-heading {
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--primary);
  margin: 0 0 6px;
}
.goal-rec-desc {
  font-size: 0.92rem;
  color: var(--secondary);
  margin: 0;
  line-height: 1.6;
}
.goal-rec-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}
.goal-rec-actions a {
  justify-content: center;
  text-align: center;
  text-decoration: none;
  border-radius: 10px;
  padding-left: 14px;
  padding-right: 14px;
  font-size: 0.9rem;
}

/* Prominent Game & Interactive Lab Entry Bento Strip (Shared across index.html & tools.html) */
.lab-entry-bento {
  margin-top: 48px;
}
.lab-bento-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 20px;
}
@media (max-width: 768px) {
  .lab-bento-grid { grid-template-columns: minmax(0, 1fr); }
}
.lab-bento-card {
  background: var(--navy-card) !important;
  border: 1px solid rgba(226, 236, 240, 0.24) !important;
  border-radius: 16px;
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
}
.lab-bento-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.lab-chip-live {
  display: inline-flex;
  align-items: center;
  font-size: 0.8125rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
}
.lab-chip-pending {
  display: inline-flex;
  align-items: center;
  font-size: 0.8125rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(254, 215, 170, 0.18);
  color: #fed7aa;
  border: 1px solid rgba(254, 215, 170, 0.45);
}

/* Game Showcase Cards inside tools.html#game-prototype */
.game-Lineup-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 16px 0 20px;
}
@media (max-width: 768px) {
  .game-Lineup-grid { grid-template-columns: minmax(0, 1fr); }
}
.game-spec-card {
  background: #fbf9f5;
  border: 1px solid #dbd4c7;
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.game-spec-card h3 {
  font-size: 1.06rem;
  color: var(--primary);
  margin: 0;
}
.game-tradeoff-pill {
  display: inline-flex;
  align-self: flex-start;
  font-size: 0.8125rem;
  font-weight: 700;
  background: #e8f1f5;
  color: #14313d;
  border: 1px solid #c9dce5;
  border-radius: 999px;
  padding: 2px 10px;
}

/* Service Filter Live Counter Pill (services.html) */
.svc-filter-status {
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--secondary);
  margin: -24px auto 28px;
  padding: 6px 14px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 999px;
  width: fit-content;
  max-width: 100%;
}

/* Prevent orphan single-character Thai wraps in headings, cards & pills */
h1, h2, h3, .card-title, .svc-title, .tool-title, .spotlight-title {
  text-wrap: balance;
  word-break: normal !important;
  overflow-wrap: break-word;
}
.goal-pill-btn {
  font-size: 0.86rem;
  padding: 10px 12px !important;
}

/* Phase 15: Modern Interactive Main Site Polish (Typography, Cards, Glass Header, Focus Contrast) */
.d06-nav-bar.d06-glass-surface {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
  border-bottom: 1px solid rgba(148, 163, 184, 0.28);
}

.d06-hero {
  gap: clamp(24px, 4vw, 48px);
}

.d06-card,
.game-card-hub,
.service-card,
.article-card,
.tool-feature-card,
.svc-item-card {
  border-radius: 20px;
  border: 1.5px solid rgba(148, 163, 184, 0.34);
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.05);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.d06-card:hover,
.game-card-hub:hover,
.service-card:hover,
.article-card:hover,
.tool-feature-card:hover,
.svc-item-card:hover {
  transform: translateY(-2px);
  border-color: #2563eb;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.1);
}

.d06-btn-coral,
.btn-cta,
.btn-submit,
.btn-nav {
  transition: transform 0.14s ease, box-shadow 0.14s ease, background-color 0.14s ease;
  min-height: 44px;
}

.d06-btn-coral:active,
.btn-cta:active,
.btn-submit:active {
  transform: scale(0.98);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #ff633e !important;
  outline-offset: 3px !important;
}

.p15-scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #2563eb, #ff633e);
  z-index: 9999;
  pointer-events: none;
  transition: width 0.1s linear;
}

/* Strict Global Reduced-Motion Compliance (Brand v2 & WCAG 2.3.3) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .d06-card:hover,
  .game-card-hub:hover,
  .service-card:hover,
  .article-card:hover,
  .tool-feature-card:hover,
  .svc-item-card:hover,
  .btn-cta:hover,
  .btn-submit:hover {
    transform: none !important;
  }
  .p15-scroll-progress {
    display: none !important;
  }
}
