/* =========================================================
   upskill88.com — Design System v2 (กันยายน 2568)
   ธีม: Indigo/Violet · การ์ดโค้งมน · เงานุ่ม · Responsive
   ========================================================= */

:root {
  --font: 'Noto Sans Thai', 'Segoe UI', 'Leelawadee UI', 'Sarabun', Tahoma, sans-serif;
  --c-primary: #4f46e5;
  --c-primary-2: #7c3aed;
  --c-primary-dark: #3730a3;
  --c-primary-tint: #eef2ff;
  --c-bg: #f6f7fb;
  --c-card: #ffffff;
  --c-text: #0f172a;
  --c-muted: #64748b;
  --c-line: #e2e8f0;
  --c-green: #059669;
  --c-green-tint: #ecfdf5;
  --c-red: #e11d48;
  --c-red-tint: #fff1f2;
  --c-amber: #b45309;
  --c-amber-tint: #fffbeb;
  --grad: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  --grad-green: linear-gradient(135deg, #059669, #10b981);
  --grad-red: linear-gradient(135deg, #e11d48, #f43f5e);
  --grad-hero: radial-gradient(900px 420px at 12% -10%, rgba(124, 58, 237, .55), transparent 60%),
                radial-gradient(700px 380px at 95% 0%, rgba(59, 130, 246, .45), transparent 55%),
                linear-gradient(160deg, #1e1b4b 0%, #312e81 100%);
  --radius: 16px;
  --radius-sm: 11px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow-md: 0 6px 18px -6px rgba(15, 23, 42, .12);
  --shadow-lg: 0 18px 40px -12px rgba(49, 46, 129, .22);
  --ring: 0 0 0 3px rgba(79, 70, 229, .18);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}
::selection { background: #c7d2fe; }
a { color: var(--c-primary); }
img { max-width: 100%; }
code { background: var(--c-primary-tint); color: #3730a3; padding: 2px 7px; border-radius: 6px; font-size: .88em; }

/* ---------- แถบนำทาง ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--c-line);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px; padding: 10px 22px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.12rem; color: var(--c-text); text-decoration: none; }
.brand .logo {
  width: 36px; height: 36px; border-radius: 11px;
  background: var(--grad); color: #fff; font-size: 1.15rem;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
}
.nav-links { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nav-links a {
  color: #334155; text-decoration: none; font-size: .95rem; font-weight: 500;
  padding: 7px 13px; border-radius: 9px; transition: .15s;
}
.nav-links a:hover { color: var(--c-primary); background: var(--c-primary-tint); }
.muted { color: #94a3b8; font-size: .92rem; }
.nav-user {
  display: inline-flex; align-items: center; gap: 8px;
  background: #f1f5f9; border-radius: 99px; padding: 4px 14px 4px 5px;
  color: #334155; font-size: .92rem; font-weight: 600;
}
.nav-user .avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--grad); color: #fff; font-size: .85rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.menu-btn {
  display: none; background: none; border: 1px solid var(--c-line);
  border-radius: 9px; font-size: 1.2rem; padding: 4px 12px; cursor: pointer; color: var(--c-text);
}

/* ---------- โครงหน้า ---------- */
.wrap { max-width: 1060px; margin: 26px auto 46px; padding: 0 18px; }
.footer {
  background: #1e1b4b; color: #c7d2fe; margin-top: 40px;
  padding: 34px 22px 22px;
}
.footer-inner { max-width: 1060px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 28px; justify-content: space-between; align-items: flex-start; }
.footer .f-brand { font-weight: 800; font-size: 1.05rem; color: #fff; display: flex; gap: 8px; align-items: center; }
.footer p { font-size: .88rem; max-width: 340px; }
.footer-links { display: flex; flex-direction: column; gap: 4px; }
.footer-links a { color: #c7d2fe; text-decoration: none; font-size: .9rem; }
.footer-links a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(199, 210, 254, .18); margin-top: 22px; padding-top: 14px; font-size: .82rem; color: #a5b4fc; text-align: center; }

/* ---------- หัวเรื่องหน้า ---------- */
h1.page-title { font-size: 1.6rem; font-weight: 800; letter-spacing: -.01em; }
p.sub { color: var(--c-muted); margin: 4px 0 20px; font-size: .98rem; }
h2.sec {
  font-size: 1.18rem; font-weight: 800; margin: 34px 0 12px;
  display: flex; align-items: center; gap: 9px;
}
h2.sec::before { content: ""; width: 5px; height: 22px; border-radius: 4px; background: var(--grad); flex: none; }
.top-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.breadcrumb { font-size: .9rem; color: var(--c-muted); margin-bottom: 12px; }
.breadcrumb a { color: var(--c-primary); text-decoration: none; font-weight: 500; }
.breadcrumb a:hover { text-decoration: underline; }

/* ---------- Hero หน้าแรก ---------- */
.hero {
  background: var(--grad-hero); color: #fff; padding: 64px 22px 70px;
  position: relative; overflow: hidden;
  margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); /* ทะลุออกนอก container เต็มจอ */
  border-radius: 0 0 28px 28px;
}
.hero-inner { max-width: 1060px; margin: 0 auto; position: relative; z-index: 1; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 99px; padding: 5px 16px; font-size: .85rem; margin-bottom: 18px;
}
.hero h1 { font-size: clamp(1.8rem, 4.5vw, 2.7rem); font-weight: 900; line-height: 1.35; letter-spacing: -.02em; max-width: 680px; }
.hero .hero-sub { color: #dbeafe; max-width: 580px; margin: 14px 0 26px; font-size: 1.04rem; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-hero {
  background: #fff; color: var(--c-primary-dark); font-weight: 700;
  padding: 12px 26px; border-radius: 12px; text-decoration: none; box-shadow: var(--shadow-lg);
  transition: .18s; display: inline-block;
}
.btn-hero:hover { transform: translateY(-2px); }
.btn-hero-ghost {
  background: rgba(255, 255, 255, .1); color: #fff; font-weight: 600;
  border: 1px solid rgba(255, 255, 255, .45); padding: 12px 26px; border-radius: 12px;
  text-decoration: none; transition: .18s; display: inline-block;
}
.btn-hero-ghost:hover { background: rgba(255, 255, 255, .2); }
.hero-stats { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 30px; }
.hero-stat {
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18);
  backdrop-filter: blur(6px); border-radius: 14px; padding: 10px 20px; text-align: center; min-width: 118px;
}
.hero-stat b { display: block; font-size: 1.35rem; }
.hero-stat span { font-size: .8rem; color: #c7d2fe; }

/* ---------- ฟีเจอร์เด่น ---------- */
.feature-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin: -34px auto 10px; max-width: 1060px; padding: 0 18px; position: relative; z-index: 2; }
.feature {
  background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--radius);
  padding: 18px 18px 16px; box-shadow: var(--shadow-md);
}
.feature .f-ico {
  width: 42px; height: 42px; border-radius: 12px; font-size: 1.25rem;
  display: flex; align-items: center; justify-content: center; margin-bottom: 10px;
  background: var(--c-primary-tint);
}
.feature b { display: block; font-size: .98rem; }
.feature span { font-size: .85rem; color: var(--c-muted); line-height: 1.65; display: block; }

/* ---------- การ์ด & ตาราง ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 18px; }
.card {
  background: var(--c-card);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  transition: .2s;
}
.grid .card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: #c7d2fe; }
.card h3 { font-size: 1.08rem; margin-bottom: 6px; font-weight: 700; }
.card h3 a { color: var(--c-text); text-decoration: none; }
.card h3 a:hover { color: var(--c-primary); }
.card p { color: var(--c-muted); font-size: .92rem; }
.card .meta { margin-top: 12px; font-size: .88rem; color: #475569; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }

/* ปกคอร์ส */
.cover {
  height: 108px; border-radius: 12px; margin: -6px -6px 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 46px; position: relative; overflow: hidden;
}
.cover::after { content: ""; position: absolute; inset: 0; background: radial-gradient(300px 120px at 85% -20%, rgba(255, 255, 255, .35), transparent 60%); }
.g1 { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.g2 { background: linear-gradient(135deg, #0ea5e9, #6366f6); }
.g3 { background: linear-gradient(135deg, #059669, #34d399); }
.g4 { background: linear-gradient(135deg, #f59e0b, #f97316); }
.g5 { background: linear-gradient(135deg, #ec4899, #f43f5e); }
.g6 { background: linear-gradient(135deg, #14b8a6, #0ea5e9); }

.chip { display: inline-flex; align-items: center; gap: 4px; border-radius: 99px; padding: 2px 12px; font-size: .8rem; font-weight: 700; }
.chip-free { background: var(--c-green-tint); color: var(--c-green); }
.chip-price { background: var(--c-amber-tint); color: var(--c-amber); }
.pill { display: inline-block; background: var(--c-primary-tint); color: var(--c-primary-dark); border-radius: 99px; padding: 3px 13px; font-size: .82rem; font-weight: 600; }

.progress { background: #e2e8f0; border-radius: 99px; height: 9px; overflow: hidden; margin: 10px 0 4px; }
.progress > div { background: var(--grad-green); height: 100%; border-radius: 99px; transition: width .4s; }

table.tbl {
  width: 100%; border-collapse: separate; border-spacing: 0;
  background: var(--c-card); border: 1px solid var(--c-line);
  border-radius: var(--radius); overflow: hidden; font-size: .92rem;
  box-shadow: var(--shadow-sm);
}
.tbl th { background: #f8fafc; text-align: left; padding: 11px 14px; white-space: nowrap; color: #475569; font-size: .84rem; border-bottom: 1px solid var(--c-line); }
.tbl td { padding: 10px 14px; border-top: 1px solid #f1f5f9; vertical-align: top; }
.tbl tr:hover td { background: #f8fafc; }
.done { color: var(--c-green); font-weight: 700; }

/* ---------- ปุ่ม ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: var(--grad); color: #fff; border: none; border-radius: var(--radius-sm);
  padding: 10px 20px; font-size: .95rem; font-weight: 600; font-family: inherit;
  cursor: pointer; text-decoration: none; box-shadow: var(--shadow-md); transition: .18s;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.06); }
.btn:active { transform: translateY(0); }
.btn-green { background: var(--grad-green); }
.btn-red { background: var(--grad-red); }
.btn-outline { background: #fff; color: var(--c-primary); border: 1.5px solid #c7d2fe; box-shadow: none; }
.btn-outline:hover { background: var(--c-primary-tint); border-color: var(--c-primary); }
.btn-ghost { background: #f1f5f9; color: #334155; box-shadow: none; }
.btn-sm { padding: 5px 12px; font-size: .83rem; border-radius: 8px; }
.btn-block { display: flex; width: 100%; margin-top: 16px; }

/* ---------- ฟอร์ม ---------- */
.form-card {
  background: var(--c-card); border: 1px solid var(--c-line);
  border-radius: var(--radius); padding: 26px 30px;
  max-width: 470px; margin: 0 auto; box-shadow: var(--shadow-lg);
}
.form-card.wide { max-width: 100%; }
label { display: block; font-size: .88rem; font-weight: 700; margin: 14px 0 5px; color: #334155; }
input[type=text], input[type=email], input[type=password], textarea, select {
  width: 100%; padding: 10px 14px; border: 1.5px solid var(--c-line);
  border-radius: var(--radius-sm); font-family: inherit; font-size: .95rem;
  background: #fff; color: var(--c-text); transition: .15s;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--c-primary); box-shadow: var(--ring); }
input[type=radio], input[type=checkbox] { accent-color: var(--c-primary); }
textarea { min-height: 200px; line-height: 1.75; }
input[type=file] { font-size: .88rem; }
.error { background: var(--c-red-tint); color: #be123c; border: 1px solid #fecdd3; border-radius: var(--radius-sm); padding: 11px 15px; margin-bottom: 12px; font-size: .92rem; }
.ok { background: var(--c-green-tint); color: #047857; border: 1px solid #a7f3d0; border-radius: var(--radius-sm); padding: 11px 15px; margin-bottom: 12px; font-size: .92rem; }
.note { font-size: .85rem; color: var(--c-muted); margin-top: 10px; }

/* หน้า login/register แบบสองช่อง */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 0; max-width: 940px; margin: 0 auto; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-lg); }
.split-brand { background: var(--grad-hero); color: #fff; padding: 44px 38px; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.split-brand h2 { font-size: 1.5rem; font-weight: 800; line-height: 1.4; }
.split-brand ul { list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: .95rem; color: #dbeafe; }
.split-brand li::before { content: "✓ "; color: #6ee7b7; font-weight: 700; }
.split-main { background: var(--c-card); padding: 36px 34px; }
.split-main .form-card { box-shadow: none; border: none; padding: 0; max-width: none; }
.split-main .btn-block { margin-bottom: 0; }

/* ---------- สถิติ ---------- */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat {
  background: var(--c-card); border: 1px solid var(--c-line);
  border-radius: var(--radius); padding: 16px 18px; text-align: center; box-shadow: var(--shadow-sm);
}
.stat .num { font-size: 1.45rem; font-weight: 800; color: var(--c-primary-dark); }
.stat .lbl { font-size: .84rem; color: var(--c-muted); }
.stat-ico {
  width: 44px; height: 44px; margin: 0 auto 8px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; font-size: 1.3rem;
  background: var(--c-primary-tint);
}
.stat-ico.green { background: var(--c-green-tint); }
.stat-ico.amber { background: var(--c-amber-tint); }
.stat-ico.red { background: var(--c-red-tint); }

/* กราฟแท่งชั่วโมง */
.bar-row { display: flex; align-items: center; gap: 8px; margin: 4px 0; font-size: .84rem; }
.bar-row .h { width: 52px; color: var(--c-muted); font-variant-numeric: tabular-nums; }
.bar-row .b { background: var(--grad); height: 15px; border-radius: 4px; min-width: 3px; }

/* ---------- บทเรียน ---------- */
.video-box {
  width: 100%; aspect-ratio: 16 / 9; background: #0f172a;
  border-radius: var(--radius); overflow: hidden; margin-bottom: 18px;
  box-shadow: var(--shadow-lg);
}
.video-box iframe { width: 100%; height: 100%; border: 0; display: block; }
.lesson-content {
  background: var(--c-card); border: 1px solid var(--c-line);
  border-radius: var(--radius); padding: 30px 34px; font-size: 1.05rem;
  box-shadow: var(--shadow-sm);
}
.lesson-content h1, .lesson-content h2, .lesson-content h3, .lesson-content h4 { margin: 22px 0 8px; color: var(--c-primary-dark); display: flex; align-items: center; gap: 9px; }
.lesson-content h2::before, .lesson-content h3::before { content: ""; width: 4px; height: 20px; border-radius: 3px; background: var(--grad); flex: none; }
.lesson-content h2:first-child, .lesson-content h3:first-child { margin-top: 0; }
.lesson-content p { margin: 10px 0; }
.lesson-content ul, .lesson-content ol { margin: 10px 0 10px 26px; }
.lesson-content li { margin: 5px 0; }
.lesson-content li::marker { color: var(--c-primary); font-weight: 700; }
.lesson-content blockquote { border-left: 4px solid var(--c-primary); background: var(--c-primary-tint); border-radius: 0 10px 10px 0; padding: 10px 18px; margin: 12px 0; color: #3730a3; }
.lesson-content a { font-weight: 600; }
.lesson-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 20px; }
.lesson-done-bar { text-align: center; margin-top: 26px; background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }

/* ---------- ข้อสอบ ---------- */
.quiz-opt {
  display: flex; align-items: center; gap: 11px; border: 1.5px solid var(--c-line);
  border-radius: 12px; padding: 11px 15px; margin: 7px 0; cursor: pointer;
  font-weight: 400; transition: .15s; background: #fff;
}
.quiz-opt:hover { border-color: #a5b4fc; background: #fafaff; }
.quiz-opt:has(input:checked) { border-color: var(--c-primary); background: var(--c-primary-tint); box-shadow: var(--ring); font-weight: 600; }
.quiz-opt input { width: 17px; height: 17px; flex: none; }
.score-circle {
  width: 118px; height: 118px; border-radius: 50%; margin: 8px auto 12px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 8px solid var(--c-green); background: var(--c-green-tint); color: var(--c-green);
}
.score-circle.fail { border-color: #f59e0b; background: var(--c-amber-tint); color: var(--c-amber); }
.score-circle b { font-size: 1.7rem; line-height: 1.1; }
.score-circle span { font-size: .78rem; }

/* ---------- ใบเกียรติบัตร ---------- */
.cert-page { background: var(--c-card); border: 1px solid var(--c-line); border-radius: 8px; padding: 10px; margin-top: 8px; overflow-x: auto; }
.cert-inner {
  width: 1000px; max-width: 100%; border: 6px double var(--c-primary-dark);
  border-radius: 4px; padding: 46px 58px; text-align: center; margin: 0 auto;
  background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
}
.cert-head { font-size: 3rem; font-weight: 800; color: var(--c-primary-dark); letter-spacing: .12em; }
.cert-sub { font-size: .95rem; color: #94a3b8; letter-spacing: .35em; margin-top: 2px; }
.cert-line { width: 150px; height: 3px; background: linear-gradient(90deg, transparent, #d1a24a, transparent); margin: 16px auto 22px; }
.cert-text { font-size: 1.02rem; color: #374151; margin: 10px 0; }
.cert-name { font-size: 2.4rem; font-weight: 800; color: #111827; margin: 8px 0; }
.cert-course { font-size: 1.35rem; font-weight: 700; color: var(--c-primary-dark); margin: 8px 0; }
.cert-foot { display: flex; justify-content: space-between; margin-top: 46px; font-size: .92rem; color: #4b5563; text-align: center; }
.cert-sign { margin-bottom: 4px; }
.cert-no { color: #94a3b8; font-size: .82rem; margin-top: 6px; }
@media print {
  body { background: #fff; }
  .nav, .footer, .btn, .hero-stats { display: none !important; }
  .wrap { margin: 0; padding: 0; max-width: none; }
  .cert-page { border: none; border-radius: 0; padding: 0; }
  @page { size: A4 landscape; margin: 8mm; }
}

/* ---------- Wiki ---------- */
.wiki-layout { display: grid; grid-template-columns: 250px 1fr; gap: 22px; align-items: start; }
.wiki-side { position: sticky; top: 82px; }
.wiki-side .wiki-side-title, .wiki-cat { font-weight: 800; font-size: .95rem; margin: 14px 0 6px; color: var(--c-primary-dark); }
.wiki-side-list, .wiki-list { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.wiki-side-list a, .wiki-list a {
  display: block; text-decoration: none; color: #334155; font-size: .9rem;
  padding: 7px 12px; border-radius: 9px; transition: .13s;
}
.wiki-side-list a:hover, .wiki-list a:hover { background: var(--c-primary-tint); color: var(--c-primary); }
.wiki-side-list a.on { background: var(--c-primary-tint); color: var(--c-primary-dark); font-weight: 700; }
.wiki-content {
  background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--radius);
  padding: 30px 36px; box-shadow: var(--shadow-sm); font-size: 1.02rem; line-height: 1.95;
}
.wiki-content h1 { font-size: 1.55rem; margin: 0 0 14px; color: var(--c-primary-dark); }
.wiki-content h2 { font-size: 1.2rem; margin: 26px 0 8px; color: var(--c-primary-dark); padding-bottom: 6px; border-bottom: 1px solid var(--c-line); }
.wiki-content h3 { font-size: 1.05rem; margin: 18px 0 6px; }
.wiki-content p { margin: 9px 0; }
.wiki-content ul, .wiki-content ol { margin: 9px 0 9px 24px; }
.wiki-content li { margin: 4px 0; }
.wiki-content li::marker { color: var(--c-primary); font-weight: 700; }
.wiki-content code { background: var(--c-primary-tint); color: #3730a3; padding: 1px 7px; border-radius: 6px; font-size: .88em; }
.wiki-content pre { background: #0f172a; color: #e2e8f0; border-radius: 12px; padding: 16px 18px; overflow-x: auto; margin: 12px 0; }
.wiki-content pre code { background: none; color: inherit; padding: 0; }
.wiki-content blockquote { border-left: 4px solid var(--c-primary); background: var(--c-primary-tint); border-radius: 0 10px 10px 0; padding: 10px 18px; margin: 12px 0; color: #3730a3; }
.wiki-content hr { border: none; border-top: 1px solid var(--c-line); margin: 22px 0; }
.wiki-crumb { font-size: .9rem; color: var(--c-muted); margin-bottom: 14px; }
.wiki-crumb a { color: var(--c-primary); text-decoration: none; }
.wiki-cat { font-size: 1.05rem; }
.wiki-empty, .wiki-all-empty { color: var(--c-muted); padding: 16px; text-align: center; }
.wiki-notfound { text-align: center; padding: 60px 20px; }
.wiki-nf-icon { font-size: 3.2rem; margin-bottom: 10px; }
.wiki-nf-title { font-size: 1.3rem; font-weight: 800; margin-bottom: 8px; }
.wiki-nf-actions { display: flex; gap: 10px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.wiki-cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.wiki-cats .card h3 a { color: var(--c-primary-dark); }

/* ---------- ปุ่มคัดลอก (เอเจนต์) ---------- */
.copy-btn { flex: none; }

/* ---------- มือถือ ---------- */
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .split-brand { display: none; }
  .wiki-layout { grid-template-columns: 1fr; }
  .wiki-side { position: static; }
}
@media (max-width: 860px) {
  .menu-btn { display: inline-block; }
  .nav-links {
    display: none; width: 100%; flex-direction: column; align-items: stretch;
    background: #fff; border-top: 1px solid var(--c-line); padding: 10px 0 14px; gap: 2px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 11px 16px; }
  .hero { padding: 44px 18px 54px; }
  .lesson-content { padding: 22px 20px; }
  .wiki-content { padding: 22px 20px; }
}
