/* สไตล์ร่วมของหน้ากลุ่มงาน / กลุ่มสาระ / คลังความรู้ */
:root {
  --ink: #1d3a31; --muted: #5d776d; --bg: #f4fbf7; --brand: #2e9c74; --brand-dark: #1f6f53; --mint: #e3f5ec; --mint-2: #c9ecdb; --line: #dcefe5;
  --pink: #ff4f8b; --orange: #ff8a3d; --yellow: #ffc83d; --green: #22c993; --sky: #2fb4ff; --violet: #7b5cff;
  --radius: 22px; --shadow: 0 2px 4px rgba(29,27,58,.04), 0 14px 34px rgba(29,27,58,.08);
}
* { box-sizing: border-box; }
body { margin: 0; font: 17px/1.7 "Sarabun", system-ui, sans-serif; color: var(--ink); background: var(--bg); }
h1, h2, h3, .nav a, .btn, .brand b, .kicker, .pill { font-family: "Prompt", "Sarabun", sans-serif; font-weight: 500; }
h1, h2, h3 { line-height: 1.3; margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
section { padding-block: 48px; }

.top { position: sticky; top: 0; z-index: 20; background: rgba(244,251,247,.88); backdrop-filter: blur(12px); }
.top .wrap { display: flex; align-items: center; gap: 14px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; min-width: 0; }
.brand img { width: 48px; height: 48px; border-radius: 14px; background: #fff; box-shadow: var(--shadow); padding: 4px; object-fit: contain; }
.brand b { display: block; font-size: 19px; line-height: 1.2; background: linear-gradient(90deg, var(--brand-dark), var(--brand)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand small { display: block; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { display: flex; gap: 4px; }
.nav a { padding: 8px 14px; border-radius: 999px; font-size: 15px; }
.nav a:hover { background: #fff; }
.nav a.on { background: var(--brand); color: #fff; }
.nav .login { background: linear-gradient(90deg, #4fbf93, var(--brand)); color: #fff; }
.nav .who { background: #fff; box-shadow: var(--shadow); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu { display: none; border: 0; background: #fff; width: 44px; height: 44px; border-radius: 14px; box-shadow: var(--shadow); font-size: 18px; }

.page-head { position: relative; overflow: hidden; padding: 44px 0 36px; }
.page-head::before { content: ""; position: absolute; width: 380px; height: 380px; border-radius: 50%; background: #bfe9d5; filter: blur(70px); opacity: .45; top: -160px; left: -80px; z-index: -1; }
.page-head::after { content: ""; position: absolute; width: 340px; height: 340px; border-radius: 50%; background: #9edcc2; filter: blur(70px); opacity: .25; top: -60px; right: -40px; z-index: -1; }
.crumb { font-size: 15px; color: var(--muted); margin-bottom: 10px; }
.crumb a { color: var(--brand); }
.page-head h1 { font-size: clamp(28px, 4.2vw, 46px); font-weight: 600; }
.page-head p { color: var(--muted); font-size: 18px; max-width: 760px; margin: 10px 0 0; }
.jump { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: 999px; background: #fff; box-shadow: var(--shadow); font-size: 15px; }
.pill i { color: var(--brand); }

.head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.kicker { display: inline-block; font-size: 14px; padding: 4px 12px; border-radius: 999px; margin-bottom: 8px; }
.k-pink, .k-green, .k-violet, .k-orange, .k-sky { background: var(--mint-2); color: var(--brand-dark); }
.head h2 { font-size: clamp(24px, 3.2vw, 34px); }
.head p { color: var(--muted); margin: 6px 0 0; }

/* overview cards */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; display: flex; flex-direction: column; gap: 10px; border-top: 6px solid var(--c); transition: transform .2s; }
.card:hover { transform: translateY(-4px); }
.card .ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; color: #fff; background: var(--c); font-size: 22px; }
.card h3 { font-size: 17px; line-height: 1.4; }
.letter { display: inline-block; align-self: flex-start; font: 500 13px "Prompt"; color: var(--c, var(--brand)); background: var(--mint); padding: 2px 10px; border-radius: 999px; }
.page-head .letter { margin-top: 12px; --c: var(--brand-dark); background: var(--mint-2); }
.card p { margin: 0; font-size: 15px; color: var(--muted); line-height: 1.55; flex: 1; }
.card .foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; color: var(--muted); padding-top: 10px; border-top: 1px dashed var(--line); }
.card .faces { display: flex; }
.card .faces img { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; margin-left: -8px; object-fit: cover; object-position: center top; background: #eee; }
.card .faces img:first-child { margin-left: 0; }
.card .go { color: var(--c); font-family: "Prompt"; }
.band { background: #fff; border-radius: 40px; margin-inline: 16px; }
.band .card { background: var(--bg); box-shadow: none; }
.subj-strands { display: flex; flex-wrap: wrap; gap: 6px; }
.subj-strands span { font-size: 13px; background: #fff; border-radius: 999px; padding: 2px 10px; color: var(--muted); }

/* detail */
.detail { display: grid; grid-template-columns: 1fr 340px; gap: 28px; align-items: start; }
.box { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px; margin-bottom: 24px; }
.box h2 { font-size: 22px; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.box h2 i { color: var(--c); }
.duties { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: d; }
.duties li { counter-increment: d; display: flex; gap: 14px; align-items: flex-start; }
.duties li::before { content: counter(d); flex: none; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--c); color: #fff; font: 500 15px "Prompt"; }
.strand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.strand-grid div { background: var(--bg); border-radius: 16px; padding: 14px 16px; border-left: 5px solid var(--c); }
.strand-grid small { display: block; color: var(--muted); font: 500 13px "Prompt"; }
.people { display: grid; gap: 10px; }
.person { display: flex; align-items: center; gap: 12px; }
.person img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; object-position: center top; background: #eee; flex: none; }
.person b { display: block; line-height: 1.35; }
.person small { color: var(--muted); }
.lead-badge { display: inline-block; background: var(--pink); color: #fff; font: 500 12px "Prompt"; padding: 1px 9px; border-radius: 999px; margin-bottom: 2px; }
.news-list, .doc-list { display: grid; gap: 12px; }
.ni { display: flex; gap: 14px; align-items: center; }
.ni img, .ni .ph { width: 92px; height: 66px; border-radius: 12px; object-fit: contain; background: #e9f6ef; flex: none; display: grid; place-items: center; color: var(--violet); }
.ni b { font-weight: 600; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ni small { color: var(--muted); }
.doc { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 16px; background: var(--bg); }
.doc .ft { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: var(--c); }
.doc b { font-weight: 600; line-height: 1.4; }
.doc small { display: block; color: var(--muted); }
.empty { color: var(--muted); background: var(--bg); border-radius: 16px; padding: 18px; text-align: center; }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 12px 22px; border-radius: 16px; color: #fff; background: linear-gradient(90deg, #4fbf93, var(--brand)); }
.ext { display: grid; gap: 10px; }
.ext a { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--bg); font-weight: 500; }
.ext a i { color: var(--c); }
.note { font-size: 14px; color: var(--muted); margin-top: 24px; }
.edit-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; background: var(--mint); border: 1px dashed var(--brand); border-radius: 18px; padding: 14px 18px; margin-bottom: 24px; color: var(--brand-dark); font-weight: 500; }
.intro { font-size: 17px; }
.box-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.box-head h2 { margin: 0; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.tab { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 14px; font: 500 14px "Prompt"; cursor: pointer; color: var(--ink); --c: var(--brand); }
.tab i { color: var(--c); }
.tab span { background: var(--mint); border-radius: 999px; padding: 0 8px; margin-left: 4px; font-size: 12px; }
.tab.on { background: var(--c); border-color: var(--c); color: #fff; }
.tab.on i { color: #fff; }
.tab.on span { background: rgba(255,255,255,.25); }
.posts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.post { display: flex; gap: 14px; align-items: center; padding: 12px; border-radius: 16px; background: var(--bg); border: 2px solid transparent; transition: border-color .2s; }
.post:hover { border-color: var(--c); }
.post[hidden] { display: none; }
.post .pc { width: 72px; height: 72px; border-radius: 14px; flex: none; display: grid; place-items: center; background: var(--c); color: #fff; font-size: 26px; overflow: hidden; }
.post .pc img { width: 100%; height: 100%; object-fit: cover; }
.post .pt { min-width: 0; }
.post b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.4; font-weight: 600; }
.post small { display: block; color: var(--muted); font-size: 13px; }
.post .pcat { color: var(--c); font-family: "Prompt"; }
.post em { color: #b45309; font-style: normal; }
.quick-add { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); font-size: 14px; color: var(--muted); }
.quick-add a { padding: 4px 10px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--ink); }
.quick-add a i { color: var(--c); }
@media (max-width: 700px) { .posts { grid-template-columns: 1fr; } }
.focus { margin: 0; padding-left: 20px; display: grid; gap: 8px; }

footer { background: #1f4a3c; color: #cfe8dc; margin-top: 40px; border-radius: 40px 40px 0 0; }
.rainbow { height: 6px; background: linear-gradient(90deg, #a8e0c9, var(--brand), #a8e0c9); border-radius: 40px 40px 0 0; }
footer .wrap { padding: 28px 0; text-align: center; font-size: 15px; }
footer a { color: #fff; }

@media (max-width: 1000px) {
  .nav { display: none; } .menu { display: block; }
  body.nav-open .nav { display: flex; flex-direction: column; position: absolute; top: 76px; left: 16px; right: 16px; background: #fff; padding: 12px; border-radius: 20px; box-shadow: 0 20px 40px rgba(29,27,58,.15); }
  .grid { grid-template-columns: 1fr 1fr; }
  .detail { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .brand small { display: none; }
  .grid { grid-template-columns: 1fr; }
  .band { margin-inline: 0; border-radius: 28px; }
  .box { padding: 20px; }
}
.more-link { font: 500 15px "Prompt"; color: var(--brand-dark); }
.more-link:hover { color: var(--brand); }
.edit-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.lib-box { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; margin-bottom: 24px; }
.lib-link { display: flex; align-items: center; gap: 14px; padding: 16px 18px; margin-bottom: 10px; border-radius: 20px; color: #fff; background: linear-gradient(135deg, #3fa982, #2e9c74); box-shadow: var(--shadow); }
.lib-link > i:first-child { font-size: 26px; }
.lib-link span { flex: 1; }
.lib-link b { display: block; font-family: "Prompt"; font-weight: 500; }
.lib-link small { opacity: .9; font-size: 13px; }
.lib-cats { display: grid; gap: 6px; }
.lib-cats a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; background: var(--bg); font-weight: 500; }
.lib-cats a i { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--c); color: #fff; font-size: 14px; flex: none; }
.lib-cats a span { flex: 1; }
.lib-cats a b { font: 500 13px "Prompt"; color: var(--muted); background: #fff; border-radius: 999px; padding: 0 9px; }
.lib-cats a:hover { background: var(--mint); }
.early-card { display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px; border-left: 8px solid var(--c); background-image: radial-gradient(circle at 100% 0, #ffe3ec 0, transparent 40%); }
.early-card .ic { width: 72px; height: 72px; border-radius: 22px; display: grid; place-items: center; color: #fff; background: var(--c); font-size: 32px; }
.early-card h3 { font-size: 24px; margin-bottom: 6px; }
.early-card p { margin: 0 0 10px; color: var(--muted); }
.early-act { display: grid; gap: 8px; justify-items: stretch; min-width: 220px; }
.early-count { font: 500 14px "Prompt"; color: var(--muted); text-align: center; }
.btn-light { background: var(--mint) !important; color: var(--brand-dark) !important; }
@media (max-width: 800px) { .early-card { grid-template-columns: 1fr; } .early-act { min-width: 0; } }
