/* ============================================================
   Nuteo (nuteo.info) — ธีม "สติกเกอร์การ์ตูนสดใส"
   เส้นขอบหนา + เงาทึบเหลื่อม + สีสันหวาน ๆ อ่านง่ายทุกจอ
   ============================================================ */

:root {
  --bg: #FFF8EF;
  --surface: #FFFFFF;
  --ink: #2D2A26;
  --muted: #71685C;
  --line: #2D2A26;

  --orange: #FF6B2C;
  --orange-deep: #E8551A;
  --yellow: #FFC531;
  --teal: #0FB5A6;
  --pink: #FF7BAC;
  --purple: #7C6CFF;
  --green: #22B07A;

  --tint-yellow: #FFF3D2;
  --tint-orange: #FFE4D2;
  --tint-teal: #D7F4F0;
  --tint-pink: #FFE3EE;
  --tint-purple: #E7E4FF;

  --shadow: 0 6px 0 var(--line);
  --shadow-sm: 0 3px 0 var(--line);
  --radius: 20px;

  --font: "IBM Plex Sans Thai", "Noto Sans Thai", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ลายจุดพื้นหลังแบบสมุดสเก็ตช์ */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(rgba(45, 42, 38, .07) 1.3px, transparent 1.3px);
  background-size: 26px 26px;
  pointer-events: none;
  z-index: -1;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ---------- ป้าย (badge) ---------- */
.badge {
  display: inline-block;
  padding: 7px 16px;
  border: 2px solid var(--line);
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 600;
  line-height: 1.3;
}
.badge-yellow { background: var(--tint-yellow); }
.badge-orange { background: var(--tint-orange); }
.badge-teal { background: var(--tint-teal); }
.badge-pink { background: var(--tint-pink); }
.badge-purple { background: var(--tint-purple); }

/* ---------- ปุ่ม ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border: 2.5px solid var(--line);
  border-radius: 999px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 0 8px 0 var(--line); }
.btn:active { transform: translate(2px, 2px); box-shadow: 0 2px 0 var(--line); }
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-deep); }
.btn-ghost { background: var(--surface); }
.btn-ghost:hover { background: var(--tint-yellow); }
.btn-invert { background: #fff; color: var(--ink); }
.btn-invert:hover { background: var(--yellow); }
.btn-sm { padding: 9px 20px; font-size: .92rem; box-shadow: var(--shadow-sm); }
.btn-block { width: 100%; }

/* ---------- การ์ด ---------- */
.card {
  background: var(--surface);
  border: 2.5px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}

.icon-chip {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  border: 2.5px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  background: var(--tint-orange);
  color: var(--ink);
}
.icon-chip svg { width: 30px; height: 30px; }
.icon-chip.sm { width: 46px; height: 46px; border-radius: 12px; }
.icon-chip.sm svg { width: 22px; height: 22px; }

/* ---------- แถบนำทาง ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 248, 239, .88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 2.5px solid var(--line);
}
.nav-inner { display: flex; align-items: center; gap: 28px; height: 76px; }

.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 44px;
  height: 44px;
  filter: drop-shadow(0 3px 0 var(--line));
}
.brand-name {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -.02em;
}
.brand-name span { color: var(--orange); }

.nav-links { display: flex; gap: 6px; margin-left: auto; }
.nav-links a {
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .98rem;
  transition: background .15s ease;
}
.nav-links a:hover { background: var(--tint-yellow); }

.nav-side { display: flex; align-items: center; gap: 16px; }

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-weight: 700;
  font-size: .88rem;
}
.lang-switch span { color: var(--muted); font-weight: 400; }
.lang-switch a { color: var(--muted); }
.lang-switch a.active {
  color: #fff;
  background: var(--teal);
  padding: 2px 10px;
  border-radius: 999px;
}

.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
}
.nav-burger span {
  width: 24px;
  height: 3px;
  border-radius: 2px;
  background: var(--ink);
}

/* ---------- Hero ---------- */
.hero { padding: 72px 0 40px; overflow: hidden; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 40px;
  align-items: center;
}

.hero-copy h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -.02em;
  margin: 20px 0 18px;
}
.hl {
  position: relative;
  display: inline-block;
  color: var(--orange);
  z-index: 0;
}
.hl::after {
  content: "";
  position: absolute;
  left: -2px;
  right: -2px;
  bottom: 4px;
  height: 38%;
  background: var(--tint-yellow);
  border-radius: 6px;
  z-index: -1;
  transform: rotate(-1deg);
}

.hero-sub { color: var(--muted); font-size: 1.08rem; max-width: 34rem; margin-bottom: 30px; }

.hero-cta { display: flex; flex-wrap: wrap; gap: 16px; }

.hero-art svg { width: 100%; height: auto; animation: floaty 5s ease-in-out infinite; }
.float-a { animation: floaty 4s ease-in-out infinite; }
.float-b { animation: floaty 4.6s ease-in-out .8s infinite; }

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ---------- โครง section ---------- */
.section { padding: 88px 0 8px; }

.section-head { text-align: center; max-width: 40rem; margin: 0 auto 48px; }
.section-head h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -.02em;
  margin: 16px 0 10px;
}
.section-head p { color: var(--muted); }

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* ---------- การ์ดบริการ / จุดเด่น ---------- */
.service-card { transition: transform .18s ease, box-shadow .18s ease; }
.service-card:hover { transform: translate(-3px, -3px); box-shadow: 0 9px 0 var(--line); }
.service-card .icon-chip { margin-bottom: 20px; }
.service-card:nth-child(3n+2) .icon-chip { background: var(--tint-teal); }
.service-card:nth-child(3n+3) .icon-chip { background: var(--tint-purple); }
.service-card h3, .why-card h3 { font-size: 1.18rem; font-weight: 700; margin-bottom: 8px; }
.service-card p, .why-card p { color: var(--muted); font-size: .97rem; }

.why-card { padding: 24px; }
.why-card .icon-chip { background: var(--tint-yellow); margin-bottom: 16px; }
.why-card:nth-child(4n+2) .icon-chip { background: var(--tint-teal); }
.why-card:nth-child(4n+3) .icon-chip { background: var(--tint-pink); }
.why-card:nth-child(4n+4) .icon-chip { background: var(--tint-orange); }
.why-card h3 { font-size: 1.05rem; }

/* ---------- หน้ารายละเอียดบริการ ---------- */
.svc-hero { padding: 48px 0 8px; }
.breadcrumb {
  font-size: .9rem;
  color: var(--muted);
  margin-bottom: 22px;
}
.breadcrumb a { font-weight: 600; }
.breadcrumb a:hover { color: var(--orange); text-decoration: underline; }
.breadcrumb span { color: var(--ink); font-weight: 600; }

.svc-hero-grid {
  display: grid;
  grid-template-columns: 1.4fr .6fr;
  gap: 32px;
  align-items: center;
}
.svc-hero h1 {
  font-size: clamp(1.9rem, 4.2vw, 3rem);
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -.02em;
  margin: 16px 0 12px;
}
.svc-tagline { font-size: 1.15rem; font-weight: 600; color: var(--orange-deep); margin-bottom: 12px; }
.svc-intro { color: var(--muted); font-size: 1.02rem; max-width: 36rem; margin-bottom: 28px; }

.svc-hero-icon { display: grid; place-items: center; }
.icon-chip.xl {
  width: 150px;
  height: 150px;
  border-radius: 36px;
  background: var(--tint-orange);
  animation: floaty 5s ease-in-out infinite;
}
.icon-chip.xl svg { width: 72px; height: 72px; }

/* ป้าย "ดูรายละเอียด →" บนการ์ดบริการหน้าแรก */
.card-more {
  display: inline-block;
  margin-top: 14px;
  font-weight: 700;
  font-size: .92rem;
  color: var(--orange);
}
.service-card:hover .card-more { text-decoration: underline; }

/* ---------- คำถามที่พบบ่อย (accordion) ---------- */
.faq-wrap { max-width: 46rem; }
.faq-list { display: grid; gap: 16px; }
.faq { padding: 0; overflow: hidden; }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 24px;
  font-weight: 700;
  font-size: 1.02rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 2.5px solid var(--line);
  border-radius: 50%;
  background: var(--tint-yellow);
  font-weight: 700;
  transition: transform .2s ease;
}
.faq[open] summary::after { content: "−"; transform: rotate(180deg); }
.faq[open] summary { border-bottom: 2px dashed rgba(45, 42, 38, .2); }
.faq p { padding: 16px 24px 20px; color: var(--muted); }

/* ---------- ขั้นตอนการทำงาน ---------- */
.process-head { margin-top: 84px; }

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  counter-reset: step;
}
.step { position: relative; padding: 8px 6px 0; }
.step-num {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  background: var(--yellow);
  border: 2.5px solid var(--line);
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 18px;
}
.step:nth-child(2) .step-num { background: var(--tint-teal); }
.step:nth-child(3) .step-num { background: var(--tint-pink); }
.step:nth-child(4) .step-num { background: var(--tint-purple); }
.step h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: .95rem; }

.step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 32px;
  left: 68px;
  right: -22px;
  border-top: 3px dashed rgba(45, 42, 38, .35);
}

/* ---------- แบนเนอร์ชวนคุย ---------- */
.banner {
  position: relative;
  overflow: hidden;
  text-align: center;
  background: linear-gradient(120deg, var(--orange), var(--pink));
  border: 2.5px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 8px 0 var(--line);
  color: #fff;
  padding: 64px 28px;
}
.banner h2 {
  font-size: clamp(1.7rem, 3.6vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -.02em;
  margin-bottom: 12px;
}
.banner p { font-size: 1.06rem; margin-bottom: 30px; opacity: .95; }
.banner-blob { position: absolute; border: 2.5px solid var(--line); border-radius: 50%; }
.banner-blob.b1 { width: 84px; height: 84px; background: var(--yellow); top: -22px; left: 6%; transform: rotate(12deg); }
.banner-blob.b2 { width: 60px; height: 60px; background: var(--teal); bottom: -14px; right: 9%; transform: rotate(-9deg); }

/* ---------- ติดต่อ ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 48px;
  align-items: start;
}
.contact-copy h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -.02em;
  margin: 16px 0 10px;
}
.contact-copy > p { color: var(--muted); margin-bottom: 30px; max-width: 26rem; }

.contact-list { display: grid; gap: 18px; }
.contact-list li { display: flex; align-items: center; gap: 16px; }
.contact-list li .icon-chip { background: var(--tint-teal); }
.contact-list li:nth-child(2) .icon-chip { background: var(--tint-orange); }
.contact-list li:nth-child(3) .icon-chip { background: var(--tint-pink); }
.contact-list li:nth-child(4) .icon-chip { background: var(--tint-purple); }
.contact-list small { display: block; color: var(--muted); font-size: .84rem; }
.contact-list strong { font-size: 1.02rem; }

.contact-form { display: grid; gap: 18px; }
.contact-form label { display: grid; gap: 8px; }
.contact-form label span { font-weight: 600; font-size: .94rem; }

/* กับดักสแปม — ซ่อนออกจากสายตาคน แต่บอทที่กรอกอัตโนมัติมักตกหล่น */
.hp-field {
  position: absolute;
  left: -6000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--surface);
  border: 2.5px solid var(--line);
  border-radius: 14px;
  padding: 12px 16px;
  box-shadow: var(--shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease;
  width: 100%;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  transform: translate(-2px, -2px);
  box-shadow: 0 5px 0 var(--line);
}
.contact-form textarea { resize: vertical; min-height: 110px; }
.form-note { text-align: center; font-weight: 600; font-size: .95rem; }
.form-note.ok { color: var(--green); }
.form-note.err { color: #D64545; }

/* ---------- ท้ายหน้า ---------- */
.footer {
  margin-top: 88px;
  background: var(--ink);
  color: #EFE8DC;
  border-top: 2.5px solid var(--line);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 36px;
  padding: 56px 24px 40px;
}
.footer .brand-name { color: #fff; }
.footer .brand-name span { color: var(--yellow); }
.footer-brand p { color: #B9AE9E; margin-top: 16px; max-width: 16rem; }

/* ช่องสมัครรับข่าวสารในท้ายหน้า */
.footer-sub { display: grid; gap: 8px; margin-top: 18px; max-width: 20rem; }
.footer-sub-head { font-weight: 700; color: var(--yellow); font-size: .95rem; }
.footer-sub-row { display: flex; gap: 8px; }
.footer-sub-row input[type="email"] {
  flex: 1; min-width: 0;
  background: #3A362F; color: #FFF4E6;
  border: 2px solid #55503F; border-radius: 10px;
  padding: 8px 12px; font: inherit; font-size: .92rem;
}
.footer-sub-row input[type="email"]:focus { outline: none; border-color: var(--yellow); }
.footer-sub-row input[type="email"]::placeholder { color: #8D8471; }
.footer-sub-note { color: #B9AE9E; font-size: .8rem; }
.footer-sub .form-note.ok { color: var(--teal); }
.footer-rss { color: #B9AE9E; font-size: .85rem; margin-top: 4px; width: fit-content; }
.footer-rss:hover { color: var(--yellow); text-decoration: underline; }
.footer-col { display: grid; gap: 10px; align-content: start; }
.footer-col h4 {
  font-size: .95rem;
  font-weight: 700;
  color: var(--yellow);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 6px;
}
.footer-col a { color: #EFE8DC; font-size: .95rem; width: fit-content; }
.footer-col a:hover { color: var(--yellow); text-decoration: underline; }
.footer-loc { color: #B9AE9E; font-size: .95rem; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  border-top: 1.5px solid rgba(239, 232, 220, .18);
  padding-top: 22px;
  padding-bottom: 28px;
  font-size: .9rem;
  color: #B9AE9E;
}

/* ---------- อนิเมชันเมื่อเลื่อนถึง ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .55s ease, transform .55s ease;
}
.reveal.in { opacity: 1; transform: none; }

/* ---------- เมนูมือถือ ---------- */
.nav-toggle-input { display: none; }

/* ---------- จอเล่า ---------- */
@media (max-width: 1020px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
  .step:not(:last-child)::after { display: none; }
}

@media (max-width: 880px) {
  .svc-hero-grid { grid-template-columns: 1fr; }
  .svc-hero-icon { justify-content: start; }
  .icon-chip.xl { width: 110px; height: 110px; border-radius: 28px; }
  .icon-chip.xl svg { width: 52px; height: 52px; }
  .nav-burger { display: flex; }
  .nav-links {
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    background: var(--bg);
    border-bottom: 2.5px solid var(--line);
    padding: 14px 24px 20px;
    display: none;
  }
  .nav-toggle-input:checked ~ .page .nav-links { display: flex; }
  .nav-links a { padding: 12px 16px; }
  .nav-inner .btn-sm { display: none; }

  .hero-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 48px; }
  .hero-art { max-width: 30rem; margin: 0 auto; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .grid-3, .grid-4, .steps { grid-template-columns: 1fr; }
  .section { padding: 64px 0 4px; }
  .card { padding: 22px; }
  .footer-grid { grid-template-columns: 1fr; }
  .lang-switch { margin-left: auto; }
}

/* ---------- ลดการเคลื่อนไหว (accessibility) ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-art svg, .float-a, .float-b { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- คลังความรู้ (/blog) ---------- */
.kb-list { display: grid; gap: 14px; margin-top: 22px; max-width: 720px; }
.kb-item { display: grid; grid-template-columns: 1fr auto auto; gap: 4px 14px; align-items: center;
           padding: 16px 20px; text-decoration: none; color: var(--ink); }
.kb-item:hover { border-color: var(--orange); box-shadow: 4px 4px 0 var(--orange); }
.kb-item time { color: var(--muted); font-size: .88rem; }
.kb-go { color: var(--orange); font-weight: 700; }
.kb-back { margin: 18px 0; }
.kb-back a { color: var(--orange); font-weight: 600; text-decoration: none; }
.kb-title { font-size: clamp(1.7rem, 4vw, 2.5rem); margin: .2em 0; }
.kb-date { color: var(--muted); font-size: .95rem; }
.kb-post { max-width: 760px; }

/* เนื้อหาบทความจาก Markdown — ใช้ร่วมหน้าสาธารณะและพรีวิวหลังบ้าน */
.kb-content { line-height: 1.75; font-size: 1.02rem; }
.kb-content h1, .kb-content h2, .kb-content h3, .kb-content h4 { line-height: 1.3; margin: 1.4em 0 .45em; }
.kb-content h1 { font-size: 1.7rem; } .kb-content h2 { font-size: 1.4rem; border-bottom: 2px solid var(--line); padding-bottom: .25em; }
.kb-content h3 { font-size: 1.15rem; } .kb-content h4 { font-size: 1rem; }
.kb-content p { margin: .8em 0; }
.kb-content a { color: var(--orange-deep); font-weight: 600; }
.kb-content ul, .kb-content ol { margin: .8em 0; padding-left: 1.5em; }
.kb-content li { margin: .3em 0; }
.kb-content blockquote { margin: 1em 0; padding: 10px 18px; border-left: 5px solid var(--orange);
                         background: #FFF1DC; border-radius: 0 12px 12px 0; }
.kb-content code { background: var(--tint-yellow, #FFF1DC); border: 1px solid var(--line); border-radius: 6px;
                   padding: .1em .4em; font-size: .9em; }
.kb-content pre { background: #2D2A26; color: #FFF3E0; border-radius: 14px; padding: 16px 18px;
                  overflow-x: auto; margin: 1em 0; }
.kb-content pre code { background: none; border: none; color: inherit; padding: 0; font-size: .9em; }
.kb-content img { max-width: 100%; border-radius: 14px; border: 2px solid var(--line); }
.kb-content hr { border: none; border-top: 3px dashed var(--line); opacity: .35; margin: 2em 0; }
.kb-content table { border-collapse: collapse; margin: 1em 0; width: 100%; }
.kb-content th, .kb-content td { border: 2px solid var(--line); padding: 8px 12px; font-size: .95rem; }
.kb-content th { background: var(--tint-yellow, #FFF1DC); }
.kb-content tr:nth-child(even) td { background: #FFFBF2; }

/* แกลเลอรีรูป + ไฟล์แนบของบทความคลังความรู้ */
.kb-sec { font-size: 1.25rem; margin: 1.6em 0 .6em; }
.kb-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin: .5em 0 1em; }
.kb-gallery figure { padding: 10px; margin: 0; }
.kb-gallery img { width: 100%; border-radius: 12px; aspect-ratio: 4 / 3; object-fit: cover; }
.kb-gallery figcaption { font-size: .9rem; color: var(--muted); padding: 8px 4px 2px; }
.kb-files { list-style: none; padding: 0; margin: .5em 0 1em; display: grid; gap: 10px; max-width: 640px; }
.kb-files li { display: flex; justify-content: space-between; align-items: center; gap: 12px;
               padding: 12px 18px; border-radius: 16px; border-width: 2px; box-shadow: none; }
.kb-files a { color: var(--orange-deep); font-weight: 600; }
.kb-files small { color: var(--muted); }

/* ขนาดรูปในเนื้อหาคลังความรู้ — ![คำบรรยาย|s](url) เล็ก |m กลาง |l เต็มกว้าง */
.kb-content img.img-s, .kb-content img.img-m, .kb-content img.img-l {
  display: block;
  margin: 1.2em auto;
  border: 2px solid var(--line);
  border-radius: 14px;
}
.kb-content img.img-s { width: 35%; min-width: 180px; }
.kb-content img.img-m { width: 65%; min-width: 260px; }
.kb-content img.img-l { width: 100%; }

/* ฟอร์มใส่รหัสผ่านของบทความที่ป้องกันไว้ */
.kb-pass { max-width: 420px; margin: 8vh auto 0; display: grid; gap: 14px; text-align: center; }
.kb-pass-form { display: flex; gap: 10px; }
.kb-pass-form input { flex: 1; font: inherit; padding: 10px 14px; border: 2px solid var(--line); border-radius: 12px; }
.kb-err { background: #FFE9E0; border: 2px solid var(--orange); border-radius: 12px; padding: 8px 12px; font-size: .92rem; }
.kb-pass-meta { color: var(--muted); font-size: .88rem; }

/* หน้าใส่รหัสผ่าน — ดีไซน์ใหม่ (ทับกฎเดิม) + ปุ่มสลับภาษาของหน้า /blog */
.kb-pass { max-width: 440px; margin: 7vh auto 0; padding: 32px 30px; display: grid; gap: 12px;
           text-align: center; justify-items: center; }
.kb-lock { width: 66px; height: 66px; display: grid; place-items: center; font-size: 1.7rem;
           background: var(--tint-orange); border: 2.5px solid var(--line); border-radius: 50%;
           box-shadow: var(--shadow-sm); }
.kb-pass-title { font-size: 1.3rem; margin: 0; }
.kb-pass-meta { color: var(--muted); font-size: .93rem; margin: 0; }
.kb-pass-form { display: flex; gap: 10px; width: 100%; margin-top: 4px; }
.kb-pass-form input { flex: 1; min-width: 0; font: inherit; padding: 11px 14px;
                      border: 2px solid var(--line); border-radius: 12px; }
.kb-pass-hint { color: var(--muted); font-size: .86rem; margin: 0; }
.kb-lang { text-align: right; font-size: .9rem; margin-bottom: 10px; }
.kb-lang a { color: var(--orange-deep); font-weight: 600; }
.kb-lang b { color: var(--teal); }

/* ---------- หน้า 404 ---------- */
.nf { display: grid; min-height: 55vh; place-items: center; }
.nf-box {
  text-align: center;
  background: var(--surface);
  border: 3px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 46px 34px 50px;
  display: grid;
  justify-items: center;
  gap: 12px;
  max-width: 560px;
  margin: 0 auto;
}
.nf-mark { width: 78px; height: 78px; }
.nf-code {
  font-size: clamp(56px, 14vw, 88px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: .05em;
  color: var(--orange);
  text-shadow: 4px 4px 0 var(--tint-orange);
}
.nf-code .nf-zero { color: var(--yellow); text-shadow: 4px 4px 0 var(--tint-yellow); }
.nf-box h1 { font-size: 1.5rem; }
.nf-msg { color: var(--muted); max-width: 26rem; line-height: 1.65; }
.unsub-email { font-size: 1.05rem; } /* อีเมลของลิงก์ยกเลิกรับข่าว — ให้เห็นชัดว่ายกเลิกของใคร */
.unsub-email strong { color: var(--ink); }
.nf-box .btn { margin-top: 8px; }

/* ---------- คลังความรู้: ค้นหา + แท็ก ---------- */
.kb-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin: 22px 0 6px;
}
.kb-search { display: flex; gap: 8px; flex: 1; max-width: 420px; }
.kb-search input[type="search"] {
  flex: 1;
  font: inherit;
  padding: 10px 14px;
  border: 3px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.kb-search input[type="search"]:focus { outline: none; border-color: var(--orange); }
.kb-found { color: var(--muted); margin: 10px 0 0; font-size: .95rem; }
.kb-tags { display: flex; flex-wrap: wrap; gap: 6px; grid-column: 1 / -1; }
.kb-tag {
  font-size: .78rem;
  font-weight: 600;
  padding: 3px 10px;
  background: var(--tint-orange);
  border: 2px solid var(--line);
  border-radius: 999px;
  white-space: nowrap;
}

/* ---------- หลังบ้าน: ฟอร์มแท็ก/ผลงาน + หน้าสถิติ ---------- */
.meta-box {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px 16px;
  padding: 14px 16px;
  margin-bottom: 14px;
}
.meta-tags { display: grid; gap: 6px; flex: 1; min-width: 220px; font-weight: 600; font-size: .9rem; }
.meta-tags input {
  font: inherit;
  font-weight: 400;
  padding: 9px 12px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.meta-work { display: flex; gap: 8px; align-items: center; font-weight: 600; font-size: .9rem; cursor: pointer; }
.meta-work input { width: 18px; height: 18px; accent-color: var(--orange); }

.chart-box { padding: 18px; }
.chart-bars { display: flex; gap: 10px; align-items: end; }
.chart-col { flex: 1; display: grid; gap: 6px; text-align: center; align-items: end; }
.chart-col .chart-n { font-size: .85rem; color: var(--muted); }
.chart-col small { color: var(--muted); font-size: .75rem; }
.chart-track {
  height: 120px;
  display: flex;
  align-items: end;
  background: var(--tint-yellow);
  border: 2px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.chart-bar { width: 100%; background: var(--orange); border-top: 2px solid var(--line); min-height: 2px; }

.toppage-list { padding: 8px 16px; }
.toppage {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 2fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 2px dashed var(--dot, #E9E2D6);
}
.toppage:last-child { border-bottom: none; }
.toppage-path {
  font-family: ui-monospace, monospace;
  font-size: .85rem;
  word-break: break-all;
}
.toppage-track {
  height: 14px;
  background: var(--tint-orange);
  border: 2px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.toppage-bar { display: block; height: 100%; background: var(--orange); border-radius: 999px; min-width: 6px; }
.toppage-n { font-size: .92rem; }

/* ---------- แบ่งหน้ารายการ ---------- */
.pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 28px 0 8px;
}
.pager-info { color: var(--muted); font-weight: 600; font-size: .92rem; }
.admin-pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  padding: 14px 0 4px;
}

/* ---------- mini-CRM: สถานะงาน + โน้ตภายใน ---------- */
.job select {
  font: inherit;
  font-size: .85rem;
  padding: 5px 8px;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}
.detail-status { display: flex; gap: 6px; flex-wrap: wrap; }
.mini-btn.st-active { background: var(--orange); color: #fff; border-color: var(--orange); }
.note-box {
  display: flex;
  gap: 10px;
  align-items: end;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 2px dashed #E9E2D6;
}
.note-box textarea {
  font: inherit;
  width: 100%;
  padding: 9px 12px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: #fff;
  resize: vertical;
}

/* ---------- เวลาอ่าน + สารบัญ + ปุ่มแชร์ (หน้าบทความ) ---------- */
.kb-readtime { color: var(--muted); font-size: .95rem; margin-left: 8px; }
.kb-toc {
  background: var(--tint-orange);
  border: 2.5px solid var(--line);
  border-radius: 16px;
  padding: 16px 22px;
  margin: 18px 0 6px;
}
.kb-toc b { display: block; margin-bottom: 6px; }
.kb-toc ol { margin: 0; padding-left: 22px; display: grid; gap: 4px; }
.kb-toc a { color: var(--ink); text-decoration: none; font-weight: 600; }
.kb-toc a:hover { color: var(--orange-deep); }
.kb-toc .toc-l3 { margin-left: 18px; font-weight: 500; }
/* กระโดดจากสารบัญ — เผื่อหัวเว็บทับ อย่าให้หัวข้อติดขอบบนจอ */
.kb-content h2, .kb-content h3, .kb-content h4 { scroll-margin-top: 84px; }
.kb-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 26px 0 6px;
  padding: 14px 16px;
  background: var(--surface);
  border: 2.5px dashed #FFB27A;
  border-radius: 16px;
}
.kb-share-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.s-btn {
  font: inherit;
  font-weight: 700;
  font-size: .9rem;
  padding: 7px 14px;
  cursor: pointer;
  border: 2.5px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease;
}
.s-btn:hover { transform: translate(-1px, -1px); box-shadow: 0 3px 0 var(--line); }
.s-line:hover { background: #E6F9EC; }
.s-fb:hover { background: #E7F0FE; }
.s-x:hover { background: #F0EDE8; }

/* ป้าย "ฉบับตัวอย่าง" บนหน้าบทความร่างผ่านลิงก์พรีวิว */
.kb-preview {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  background: var(--tint-yellow);
  border: 2.5px dashed var(--line);
  border-radius: 14px;
  padding: 10px 16px;
  margin: 0 0 14px;
}
.kb-preview b { color: var(--orange-deep); }
.kb-preview span { color: var(--muted); font-size: .92rem; }

/* บทความที่เกี่ยวข้อง — กินความกว้างเท่าเนื้อหาอ่าน ไม่เต็มกรอบบทความ */
.kb-related { max-width: 720px; margin: 12px 0 6px; }

/* ผลค้นหาที่ตรงใน "เนื้อหา" — โชว์ช่วงข้อความที่เจอ คร่อมเต็มการ์ด */
.kb-snippet {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.55;
  border-left: 3px solid var(--tint-orange);
  padding-left: 10px;
}
