/* =========================================================
   สสอ.ศรีเมืองใหม่ — Stylesheet หลัก
   ========================================================= */
:root {
  --brand: #00a651;
  --brand-dark: #0a6b3b;
  --brand-deep: #064528;
  --brand-soft: #e6f6ed;
  --accent: #f4b400;
  --ink: #1d2b24;
  --muted: #5d6d65;
  --line: #dfe7e2;
  --bg: #f5f8f6;
  --card: #ffffff;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(6, 69, 40, .07);
  --fs-base: 1rem;
}

html { font-size: var(--fs-base); }
html.fs-lg { --fs-base: 1.125rem; }
html.fs-xl { --fs-base: 1.25rem; }

body {
  font-family: 'Sarabun', system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
}
h1, h2, h3, h4, h5, .navbar-brand, .btn, .nav-link, .section-title {
  font-family: 'Prompt', 'Sarabun', sans-serif;
}
a { color: var(--brand-dark); }
a:hover { color: var(--brand); }
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 2000;
  background: var(--accent); color: #000; padding: .5rem 1rem; font-weight: 600;
}
.skip-link:focus { left: 1rem; top: .5rem; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- Top bar ---------- */
.topbar { background: var(--brand-deep); color: #d6efe1; font-size: .875rem; }
.topbar a { color: #fff; text-decoration: none; }
.a11y-tools .btn {
  --bs-btn-padding-y: .1rem; --bs-btn-padding-x: .55rem;
  color: #fff; border-color: rgba(255,255,255,.35); font-family: 'Sarabun', sans-serif;
}
.a11y-tools .btn:hover, .a11y-tools .btn.active { background: #fff; color: var(--brand-deep); }

/* ---------- Header ---------- */
.site-header { background: #fff; border-bottom: 4px solid var(--brand); }
.brand-logo { width: 64px; height: 64px; flex-shrink: 0; }
.brand-th { font-size: 1.25rem; font-weight: 600; color: var(--brand-deep); line-height: 1.3; }
.brand-en { font-size: .8rem; color: var(--muted); letter-spacing: .02em; }
.brand-sub { font-size: .8rem; color: var(--brand-dark); }
.header-search .form-control { border-radius: 999px 0 0 999px; }
.header-search .btn { border-radius: 0 999px 999px 0; }

.main-nav { background: var(--brand); }
.main-nav .nav-link { color: #fff; font-weight: 500; padding: .8rem 1rem !important; }
.main-nav .nav-link:hover, .main-nav .nav-link.active { background: var(--brand-dark); color: #fff; }
.main-nav .navbar-toggler { border-color: rgba(255,255,255,.6); }
.main-nav .navbar-toggler-icon { filter: invert(1); }
.main-nav .dropdown-menu { border: 0; box-shadow: var(--shadow); border-top: 3px solid var(--accent); }

/* ---------- Hero ---------- */
.hero .carousel-item { min-height: 340px; }
.hero-slide {
  min-height: 340px; display: flex; align-items: center; color: #fff;
  background: linear-gradient(120deg, var(--brand-deep), var(--brand) 70%);
  background-size: cover; background-position: center; position: relative;
}
.hero-slide.has-image::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(6,69,40,.88), rgba(6,69,40,.35));
}
.hero-slide .container { position: relative; }
.hero-slide h2 { font-size: clamp(1.6rem, 4vw, 2.6rem); font-weight: 600; }
.hero-slide p { font-size: 1.15rem; opacity: .95; max-width: 640px; }
.hero-pattern {
  position: absolute; right: 4%; top: 50%; transform: translateY(-50%);
  width: 260px; height: 260px; opacity: .12;
}

/* แบนเนอร์แบบ “แสดงเฉพาะภาพ” — ย่อ/ขยายพอดีความกว้าง เห็นทั้งใบ (ไม่ครอบ) */
.hero-image { display: flex; justify-content: center; align-items: center; background: var(--brand-deep); padding-bottom: 42px; } /* เว้นที่ให้แถบบริการด่วนที่ซ้อนขึ้นมา ไม่บังภาพ */
.hero-image img { display: block; width: 100%; height: auto; max-height: 72vh; object-fit: contain; }
a.hero-image:focus-visible { outline: 3px solid #ffd54a; outline-offset: -3px; }
.hero .carousel-item:has(.hero-image) { min-height: 0; }

/* ---------- Quick links ---------- */
.quick-links { margin-top: -42px; position: relative; z-index: 5; }
.quick-link {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem;
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1.1rem .5rem; text-align: center; text-decoration: none; color: var(--ink);
  height: 100%; transition: transform .15s, box-shadow .15s;
  font-family: 'Prompt', sans-serif; font-size: .95rem;
}
.quick-link i { font-size: 1.9rem; color: var(--brand); }
.quick-link:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(6,69,40,.13); color: var(--brand-dark); }

/* ---------- Sections ---------- */
.section { padding: 3rem 0; }
.section-title {
  font-size: 1.5rem; font-weight: 600; color: var(--brand-deep);
  display: flex; align-items: center; gap: .6rem; margin: 0;
}
.section-title::before {
  content: ""; width: 6px; height: 1.4em; background: var(--brand); border-radius: 3px;
}
.section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.25rem; gap: 1rem; flex-wrap: wrap; }

/* ---------- Cards ---------- */
.news-card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; height: 100%; display: flex; flex-direction: column;
  transition: transform .15s, box-shadow .15s;
}
.news-card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(6,69,40,.13); }
.news-card .thumb { aspect-ratio: 16/9; background: var(--brand-soft); overflow: hidden; display: block; }
.news-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  color: var(--brand); font-size: 2.5rem;
  background: repeating-linear-gradient(45deg, var(--brand-soft), var(--brand-soft) 12px, #f0faf4 12px, #f0faf4 24px);
}
.news-card .body { padding: 1rem 1.15rem 1.2rem; display: flex; flex-direction: column; flex: 1; }
.news-card h3 { font-size: 1.08rem; font-weight: 600; line-height: 1.5; margin: .35rem 0 .5rem; }
.news-card h3 a { color: var(--ink); text-decoration: none; }
.news-card h3 a:hover { color: var(--brand-dark); }
.news-card .meta { font-size: .85rem; color: var(--muted); margin-top: auto; }
.news-card.featured h3 { font-size: 1.35rem; }
@media (min-width: 768px) {
  .news-card.featured { flex-direction: row; }
  .news-card.featured .thumb { aspect-ratio: auto; flex: 0 0 50%; min-height: 260px; }
}
.badge-cat { background: var(--brand-soft); color: var(--brand-dark); font-weight: 500; font-family: 'Prompt', sans-serif; }

.announce-box { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: .5rem 1.25rem; }
.announce-item { display: flex; gap: .9rem; padding: .9rem 0; border-bottom: 1px dashed var(--line); text-decoration: none; color: var(--ink); }
.announce-item:last-child { border-bottom: 0; }
.announce-item:hover .t { color: var(--brand-dark); }
.date-chip {
  flex-shrink: 0; width: 58px; text-align: center; border-radius: 10px;
  background: var(--brand); color: #fff; padding: .35rem 0; line-height: 1.15; font-family: 'Prompt', sans-serif;
}
.date-chip .d { font-size: 1.3rem; font-weight: 600; display: block; }
.date-chip .m { font-size: .75rem; }

/* ---------- ผู้บริหารองค์กร ---------- */
.exec-box {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  border: 1px solid var(--line); overflow: hidden;
}
.exec-title {
  margin: 0; padding: .85rem 1rem; text-align: center; font-size: 1.15rem; font-weight: 600;
  color: var(--brand-deep); border-bottom: 3px solid var(--brand); background: linear-gradient(#fff, var(--brand-soft));
}
.exec-list { padding: 1.25rem 1rem .5rem; }
.exec-item { margin: 0 0 1.25rem; text-align: center; }
.exec-photo {
  width: 150px; aspect-ratio: 4 / 5; margin: 0 auto .65rem; border-radius: 10px; overflow: hidden;
  background: var(--brand-soft); box-shadow: 0 4px 14px rgba(6, 69, 40, .14); border: 3px solid #fff;
}
.exec-item.is-head .exec-photo { width: 180px; }
.exec-photo img, .exec-photo svg { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.exec-name { display: block; font-family: 'Prompt', sans-serif; font-weight: 600; font-size: 1.05rem; color: var(--ink); line-height: 1.4; }
.exec-pos { display: block; color: var(--muted); font-size: .95rem; line-height: 1.5; }
/* หน้าเกี่ยวกับเรา: เรียงแนวนอนบนจอกว้าง */
.exec-box.exec-wide .exec-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 2.5rem; }
.exec-box.exec-wide .exec-item { flex: 0 0 200px; }
html.high-contrast .exec-box, html.high-contrast .exec-title { background: #000; color: #ff0; border-color: #ff0; }
html.high-contrast .exec-name, html.high-contrast .exec-pos { color: #fff; }

/* ---------- Stats ---------- */
.stats-strip { background: linear-gradient(120deg, var(--brand-deep), var(--brand-dark)); color: #fff; }
.stat .num { font-family: 'Prompt', sans-serif; font-size: 2.2rem; font-weight: 600; color: #fff; }
.stat .lbl { color: #cfeedd; }

/* ---------- Units ---------- */
.unit-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.25rem; height: 100%; border-top: 4px solid var(--brand); }
.unit-card h3 { font-size: 1.1rem; font-weight: 600; color: var(--brand-deep); }
.unit-card ul { list-style: none; padding: 0; margin: 0 0 1rem; font-size: .95rem; }
.unit-card li { display: flex; gap: .5rem; padding: .2rem 0; color: var(--muted); }
.unit-card li i { color: var(--brand); }

/* ---------- Page header ---------- */
.page-hero { background: linear-gradient(120deg, var(--brand-deep), var(--brand)); color: #fff; padding: 2.25rem 0; }
.page-hero h1 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 600; margin: 0; }
.page-hero .breadcrumb { margin: .5rem 0 0; --bs-breadcrumb-divider-color: #cfeedd; }
.page-hero .breadcrumb a { color: #fff; }
.page-hero .breadcrumb-item.active { color: #cfeedd; }

.content-box { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(1.25rem, 3vw, 2.25rem); }
.article-body { font-size: 1.08rem; }
.article-body img { max-width: 100%; height: auto; border-radius: 8px; }
.article-body h2, .article-body h3 { color: var(--brand-deep); margin-top: 1.5rem; font-weight: 600; }
.article-body h2 { font-size: 1.3rem; }
.article-body h3 { font-size: 1.12rem; }
/* เนื้อหาจาก editor: รูปจัดซ้าย/ขวา, วิดีโอ YouTube ยืดตามจอ, ตาราง */
.article-body img[style*="float:left"], .article-body img[style*="float: left"] { margin: .25rem 1.25rem .75rem 0; }
.article-body img[style*="float:right"], .article-body img[style*="float: right"] { margin: .25rem 0 .75rem 1.25rem; }
.article-body iframe { display: block; width: 100%; max-width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; border-radius: 8px; margin: 1rem 0; }
.article-body table { width: 100%; margin: 1rem 0; border-collapse: collapse; font-size: .97rem; }
.article-body th, .article-body td { border: 1px solid var(--line); padding: .45rem .6rem; vertical-align: top; }
.article-body th { background: var(--brand-soft); color: var(--brand-deep); }
.article-body blockquote { border-left: 4px solid var(--brand); background: #f6f8f7; padding: .75rem 1rem; border-radius: 0 8px 8px 0; }
.page-body::after { content: ''; display: block; clear: both; }
@media (max-width: 575.98px) { .article-body img[style*="float"] { float: none !important; width: 100% !important; margin: .75rem 0; } .article-body table { display: block; overflow-x: auto; } }
@media print { .site-header, .main-nav, .topbar, .site-footer, .footer-bottom, .page-hero nav, .cookie-banner, .btn { display: none !important; } .page-hero { background: none !important; color: #000 !important; padding: 0 !important; } .content-box { box-shadow: none !important; } }
.cat-tabs .nav-link { border-radius: 999px; color: var(--brand-dark); background: #fff; margin: 0 .35rem .5rem 0; border: 1px solid var(--line); }
.cat-tabs .nav-link.active { background: var(--brand); color: #fff; border-color: var(--brand); }

.btn-brand { --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-color: #fff;
  --bs-btn-hover-bg: var(--brand-dark); --bs-btn-hover-border-color: var(--brand-dark); --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: var(--brand-deep); }
.btn-outline-brand { --bs-btn-color: var(--brand-dark); --bs-btn-border-color: var(--brand);
  --bs-btn-hover-bg: var(--brand); --bs-btn-hover-border-color: var(--brand); --bs-btn-hover-color: #fff; }
.pagination { --bs-pagination-active-bg: var(--brand); --bs-pagination-active-border-color: var(--brand); --bs-pagination-color: var(--brand-dark); }

.coming-soon { text-align: center; padding: 4rem 1rem; }
.coming-soon i { font-size: 3.5rem; color: var(--brand); }

/* ---------- เอกสารดาวน์โหลด ---------- */
.doc-cats .list-group-item { border: 0; border-radius: 8px !important; color: var(--ink); padding: .55rem .75rem; }
.doc-cats .list-group-item .badge { background: var(--brand-soft); color: var(--brand-dark); }
.doc-cats .list-group-item.active { background: var(--brand); color: #fff; }
.doc-cats .list-group-item.active .badge { background: rgba(255,255,255,.25); color: #fff; }
@media (max-width: 991.98px) {
  .doc-cats { flex-direction: row; overflow-x: auto; gap: .4rem; padding-bottom: .25rem; scrollbar-width: thin; }
  .doc-cats .list-group-item { flex: 0 0 auto; width: auto; white-space: nowrap; border: 1px solid var(--line); border-radius: 999px !important; gap: .4rem; }
  .doc-cats-box h2 { display: none; }
}
.doc-row { display: flex; align-items: flex-start; gap: .9rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); }
.doc-row:last-child { border-bottom: 0; }
.doc-row:hover { background: #fafcfb; }
.doc-icon { font-size: 2rem; line-height: 1; flex-shrink: 0; margin-top: .1rem; }
.doc-title { font-weight: 600; color: var(--ink); text-decoration: none; font-size: 1.02rem; line-height: 1.5; }
.doc-title:hover { color: var(--brand-dark); text-decoration: underline; }
.doc-meta { display: flex; flex-wrap: wrap; gap: .25rem .9rem; font-size: .82rem; color: var(--muted); margin-top: .3rem; align-items: center; }
.min-w-0 { min-width: 0; }
html.high-contrast .doc-row:hover { background: #111; }
html.high-contrast .doc-title { color: #ff0; }
html.high-contrast .doc-cats .list-group-item { background: #000; color: #fff; }
html.high-contrast .doc-cats .list-group-item.active { background: #ff0; color: #000; }

/* ---------- ITA / OIT ---------- */
.ita-index { display: flex; flex-wrap: wrap; gap: .4rem; }
.ita-index a {
  font-family: 'Prompt', sans-serif; font-size: .85rem; text-decoration: none; min-width: 2.9rem; text-align: center;
  padding: .2rem .5rem; border-radius: 8px; background: var(--brand-soft); color: var(--brand-dark);
}
.ita-index a:hover { background: var(--brand); color: #fff; }
.ita-item { display: flex; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); scroll-margin-top: 1rem; }
.ita-item:last-child { border-bottom: 0; }
.ita-item:target { background: #fffbe6; box-shadow: inset 4px 0 0 var(--accent); }
.ita-code {
  flex-shrink: 0; width: 3.2rem; height: 2rem; border-radius: 8px; background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center; font-family: 'Prompt', sans-serif; font-weight: 600;
}
.ita-title { font-size: 1.02rem; font-weight: 600; line-height: 1.55; margin: .15rem 0 .4rem; color: var(--ink); font-family: 'Sarabun', sans-serif; }
.ita-links { list-style: none; padding: 0; margin: 0; display: grid; gap: .25rem; }
.ita-links a { text-decoration: none; }
.ita-links a:hover { text-decoration: underline; }
html.high-contrast .ita-index a, html.high-contrast .ita-code { background: #ff0; color: #000; }
html.high-contrast .ita-title { color: #fff; }
html.high-contrast .ita-item:target { background: #222; }

/* ---------- เกี่ยวกับเรา / โครงสร้างองค์กร ---------- */
.about-nav { display: flex; flex-wrap: wrap; gap: .5rem; }
.about-nav a {
  padding: .4rem 1rem; border-radius: 999px; background: #fff; border: 1px solid var(--line);
  color: var(--brand-dark); text-decoration: none; font-family: 'Prompt', sans-serif; font-size: .95rem;
}
.about-nav a:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
.about-sec { scroll-margin-top: 1rem; }
@media (min-width: 992px) { .about-aside { position: sticky; top: 1rem; } }
.org-head, .org-sub { display: flex; justify-content: center; flex-wrap: wrap; gap: 1rem; position: relative; }
.org-sub { margin-top: 1.25rem; padding-top: 1.25rem; }
.org-sub::before { content: ""; position: absolute; top: 0; left: 50%; height: 1.25rem; border-left: 2px solid var(--brand); }
.org-node {
  display: inline-flex; flex-direction: column; align-items: center; text-align: center; padding: .6rem 1.1rem;
  border-radius: 10px; background: var(--brand-soft); border: 1px solid #b9e3cb; min-width: 220px;
}
.org-node strong { font-family: 'Prompt', sans-serif; font-weight: 500; color: var(--brand-deep); font-size: .95rem; }
.org-node span { font-size: .9rem; color: var(--muted); }
.org-node-head { background: var(--brand); border-color: var(--brand); }
.org-node-head strong, .org-node-head span { color: #fff; }
.wg-card { border: 1px solid var(--line); border-top: 4px solid var(--brand); border-radius: 10px; padding: 1rem; background: #fff; }
.wg-name { font-size: 1.02rem; font-weight: 600; color: var(--brand-deep); margin-bottom: .6rem; line-height: 1.45; }
.wg-head { display: flex; align-items: center; gap: .65rem; margin-bottom: .6rem; }
.wg-head img { width: 48px; height: 60px; object-fit: cover; object-position: top; border-radius: 6px; }
.wg-duties { padding-left: 1.1rem; margin: 0; font-size: .92rem; color: var(--muted); }
.wg-duties li { margin-bottom: .15rem; }
/* ---------- ฝ่าย/กลุ่มงาน ---------- */
.wg-card .wg-name a { color: inherit; text-decoration: none; }
.wg-card .wg-name a:hover { color: var(--brand); text-decoration: underline; }
.wg-tile { display: flex; flex-direction: column; height: 100%; border: 1px solid var(--line); border-top: 4px solid var(--brand);
  border-radius: 10px; padding: 1.1rem; background: #fff; color: var(--ink); text-decoration: none; transition: box-shadow .15s, transform .15s; }
.wg-tile:hover, .wg-tile:focus-visible { box-shadow: var(--shadow); transform: translateY(-2px); color: var(--ink); }
.wg-tile .wg-duties { margin-bottom: .75rem; }
.wg-stats { display: flex; flex-wrap: wrap; gap: .35rem .9rem; font-size: .85rem; color: var(--muted); margin-top: auto; padding-top: .6rem; border-top: 1px dashed var(--line); }
.wg-more { font-family: 'Prompt', sans-serif; font-size: .9rem; color: var(--brand); margin-top: .6rem; }
.text-brand { color: var(--brand); }
.wg-noimg { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; background: var(--brand-soft); color: var(--brand); font-size: 2.6rem; }
.wg-noimg-sm { width: 48px; height: 60px; border-radius: 6px; font-size: 1.5rem; flex-shrink: 0; }
.wg-tabs { display: flex; flex-wrap: wrap; gap: .4rem; }
.wg-tabs a { font-family: 'Prompt', sans-serif; font-size: .9rem; padding: .35rem .85rem; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--brand-deep); text-decoration: none; }
.wg-tabs a:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
.wg-duty-list { padding-left: 1.3rem; margin: 0; }
.wg-duty-list li { padding: .2rem 0; }
.wg-person { display: flex; align-items: flex-start; gap: .9rem; height: 100%; border: 1px solid var(--line); border-radius: 10px; padding: .75rem; background: #fff; }
.wg-photo { width: 84px; aspect-ratio: 4 / 5; flex-shrink: 0; border-radius: 8px; overflow: hidden; background: var(--brand-soft); }
.wg-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.wg-person-body { min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.wg-person-name { font-weight: 600; color: var(--brand-deep); line-height: 1.35; }
.wg-person-pos { font-size: .88rem; color: var(--muted); }
.wg-person-role { font-size: .88rem; margin-top: .2rem; }
.wg-person-role i { color: var(--brand); }
.wg-person-lead { border-color: var(--brand); background: linear-gradient(90deg, var(--brand-soft), #fff 60%); padding: 1rem; }
.wg-person-lead .wg-photo { width: 120px; }
.wg-person-lead .wg-person-name { font-size: 1.15rem; }
.wg-lead-badge { align-self: flex-start; font-family: 'Prompt', sans-serif; font-size: .78rem; background: var(--brand); color: #fff; border-radius: 999px; padding: .1rem .65rem; margin-bottom: .2rem; }
.wg-links { list-style: none; padding: 0; margin: 0; }
.wg-links li + li { border-top: 1px dashed var(--line); }
.wg-links a { display: block; padding: .5rem 0; color: var(--ink); text-decoration: none; }
.wg-links a:hover .fw-medium, .wg-links a:hover { color: var(--brand); }
html.high-contrast .wg-tile, html.high-contrast .wg-person, html.high-contrast .wg-tabs a { background: #000; color: #fff; border-color: #ff0; }
html.high-contrast .wg-person-name, html.high-contrast .wg-links a { color: #ff0; }
html.high-contrast .wg-person-pos, html.high-contrast .wg-stats { color: #fff; }
/* ---------- โครงสร้างบุคลากร (แผนผังลำดับชั้น) ---------- */
.pc-units { display: flex; flex-wrap: wrap; gap: .45rem; }
.pc-units a { font-family: 'Prompt', sans-serif; font-size: .9rem; padding: .4rem .9rem; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--brand-deep); text-decoration: none; white-space: nowrap; }
.pc-units a .badge { background: var(--brand-soft); color: var(--brand-dark); font-weight: 500; }
.pc-units a:hover { border-color: var(--brand); }
.pc-units a.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.pc-units a.active .badge { background: rgba(255,255,255,.25); color: #fff; }
@media (max-width: 767.98px) { .pc-units { flex-wrap: nowrap; overflow-x: auto; padding-bottom: .3rem; scrollbar-width: thin; } }
.pc-chart { --org-line: #9cc9ad; padding: .5rem 0 1rem; }
.pc-tier { display: flex; flex-wrap: wrap; justify-content: center; position: relative; }
.pc-tier.has-parent { padding-top: 1.5rem; }
.pc-tier.has-parent::before { content: ''; position: absolute; top: 0; left: 50%; height: 1.5rem; border-left: 2px solid var(--org-line); }
.pc-node { position: relative; padding: 0 .45rem 1rem; }
.pc-tier.has-parent > .pc-node { padding-top: 1.1rem; }
.pc-tier.has-parent > .pc-node::before, .pc-tier.has-parent > .pc-node::after { content: ''; position: absolute; top: 0; width: 50%; border-top: 2px solid var(--org-line); }
.pc-tier.has-parent > .pc-node::before { left: 0; }
.pc-tier.has-parent > .pc-node::after { right: 0; height: 1.1rem; border-left: 2px solid var(--org-line); }
.pc-tier.has-parent > .pc-node:first-child::before, .pc-tier.has-parent > .pc-node:last-child::after { border-top: 0; }
.pc-tier.has-parent > .pc-node:first-child::before { display: none; }
.pc-card { width: 160px; height: 100%; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: .75rem .6rem; text-align: center; display: flex; flex-direction: column; align-items: center; gap: .15rem; }
.pc-photo { width: 96px; aspect-ratio: 4 / 5; border-radius: 8px; overflow: hidden; background: var(--brand-soft); margin-bottom: .35rem; }
.pc-photo img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.pc-card .wg-noimg { font-size: 2.2rem; }
.pc-duty { font-family: 'Prompt', sans-serif; font-size: .75rem; background: var(--brand-soft); color: var(--brand-dark); border-radius: 999px; padding: .05rem .55rem; line-height: 1.5; }
.pc-name { font-weight: 600; color: var(--brand-deep); line-height: 1.35; font-size: .95rem; }
.pc-pos { font-size: .8rem; color: var(--muted); line-height: 1.35; }
.pc-tel { font-size: .8rem; margin-top: .1rem; }
.pc-card-lead { width: 210px; border: 2px solid var(--brand); box-shadow: var(--shadow); }
.pc-card-lead .pc-photo { width: 120px; }
.pc-card-lead .pc-duty { background: var(--brand); color: #fff; }
.pc-card-lead .pc-name { font-size: 1.05rem; }
@media (max-width: 575.98px) {
  .pc-card { width: 145px; } .pc-card-lead { width: 190px; } .pc-node { padding-left: .25rem; padding-right: .25rem; }
  /* จอแคบการ์ดขึ้นหลายแถว — ใช้เฉพาะเส้นตั้งเชื่อมระหว่างระดับ */
  .pc-tier.has-parent > .pc-node::before, .pc-tier.has-parent > .pc-node::after { display: none; }
  .pc-tier.has-parent > .pc-node { padding-top: 0; }
  .pc-tier.has-parent { padding-top: 1.25rem; } .pc-tier.has-parent::before { height: 1.25rem; }
}
html.high-contrast .pc-card, html.high-contrast .pc-units a { background: #000; color: #fff; border-color: #ff0; }
html.high-contrast .pc-name { color: #ff0; } html.high-contrast .pc-pos, html.high-contrast .pc-duty { color: #fff; background: #000; }
html.high-contrast .pc-chart { --org-line: #ff0; }
/* ---------- แผนผังโครงสร้างภารกิจ สสอ. (สำนักงาน → ภารกิจ → กลุ่มงาน) ---------- */
.ms-chart { --ms-line: #8fbfa0; container: ms / inline-size; }
.ms-box { border: 1px solid #b9cfc2; border-radius: 8px; padding: .65rem 1rem; text-align: center; background: #f3f6f4; }
.ms-box-top { max-width: 640px; margin: 0 auto; background: var(--brand); border-color: var(--brand); color: #fff; }
.ms-box-top .ms-sub, .ms-box-top .ms-sub span, .ms-box-top .ms-person { color: #e7f7ee; }
.ms-box-mission { background: var(--brand-soft); border-color: #9cc9ad; }
.ms-title { font-family: 'Prompt', sans-serif; font-weight: 600; font-size: 1.02rem; line-height: 1.4; }
.ms-box-mission .ms-title { color: var(--brand-deep); }
.ms-sub { font-size: .92rem; line-height: 1.45; }
.ms-sub span { color: var(--muted); font-size: .85rem; }
.ms-person { font-size: .88rem; margin-top: .2rem; font-weight: 500; }
.ms-group { height: 100%; border: 1px solid var(--line); border-top: 4px solid var(--brand); border-radius: 8px; background: #fff; padding: .7rem .8rem; text-align: left; }
.ms-group-head { display: block; font-family: 'Prompt', sans-serif; font-weight: 600; font-size: .95rem; color: var(--brand-deep); text-decoration: none; line-height: 1.4; margin-bottom: .4rem; }
.ms-group-head:hover { color: var(--brand); text-decoration: underline; }
.ms-group-lead { font-size: .82rem; color: var(--brand-dark); margin-bottom: .35rem; }
.ms-pos { list-style: none; padding: .4rem .55rem; margin: 0 0 .5rem; font-size: .84rem; background: #f6f8f7; border-radius: 6px; color: #3b4a42; }
.ms-pos li::before { content: '– '; color: var(--muted); }
.ms-duties { padding-left: 1.25rem; margin: 0; font-size: .86rem; }
.ms-duties li { padding: .08rem 0; }
.ms-others { margin-top: 1.5rem; }
.ms-notes { margin-top: 1.25rem; padding: .6rem .9rem; border: 1px dashed #6aa7d8; border-radius: 8px; font-size: .84rem; color: #3b4a42; background: #f7fbff; }
.ms-notes strong { display: block; text-decoration: underline; margin-bottom: .15rem; }
/* เส้นเชื่อม (จอกว้าง) */
.ms-row { position: relative; padding-top: 1.3rem; }
.ms-row::before { content: ''; position: absolute; top: 0; left: 50%; height: 1.3rem; border-left: 2px solid var(--ms-line); }
.ms-row > .ms-col { position: relative; }
.ms-row > .ms-col + .ms-col { margin-top: .75rem; }
@container ms (min-width: 640px) {
  .ms-row-missions { display: flex; }
  .ms-row-missions > .ms-col { flex: 1 1 0; min-width: 0; padding: 1rem .6rem 0; }
  .ms-row-missions > .ms-col + .ms-col { margin-top: 0; }
  .ms-row-missions > .ms-col::before, .ms-row-missions > .ms-col::after { content: ''; position: absolute; top: 0; width: 50%; border-top: 2px solid var(--ms-line); }
  .ms-row-missions > .ms-col::before { left: 0; }
  .ms-row-missions > .ms-col::after { right: 0; height: 1rem; border-left: 2px solid var(--ms-line); }
  .ms-row-missions > .ms-col:first-child::before { display: none; }
  .ms-row-missions > .ms-col:last-child::after { border-top: 0; }
}
@container ms (min-width: 1000px) {
  .ms-row-groups { display: flex; }
  .ms-row-groups > .ms-col { flex: 1 1 0; min-width: 0; padding: 1rem .35rem 0; }
  .ms-row-groups > .ms-col + .ms-col { margin-top: 0; }
  .ms-row-groups > .ms-col::before, .ms-row-groups > .ms-col::after { content: ''; position: absolute; top: 0; width: 50%; border-top: 2px solid var(--ms-line); }
  .ms-row-groups > .ms-col::before { left: 0; }
  .ms-row-groups > .ms-col::after { right: 0; height: 1rem; border-left: 2px solid var(--ms-line); }
  .ms-row-groups > .ms-col:first-child::before { display: none; }
  .ms-row-groups > .ms-col:last-child::after { border-top: 0; }
}
@container ms (max-width: 639.98px) { .ms-row-missions > .ms-col + .ms-col { margin-top: 1.5rem; } }
.wg-mission-head { font-family: 'Prompt', sans-serif; font-size: 1.05rem; font-weight: 600; color: var(--brand-deep); margin: 0 0 .75rem; padding-left: .6rem; border-left: 4px solid var(--brand); }
.wg-mission-head small { font-weight: 400; color: var(--muted); font-size: .85rem; }
html.high-contrast .ms-box, html.high-contrast .ms-group, html.high-contrast .ms-pos, html.high-contrast .ms-notes { background: #000; color: #fff; border-color: #ff0; }
html.high-contrast .ms-title, html.high-contrast .ms-group-head { color: #ff0; }
html.high-contrast .ms-chart { --ms-line: #ff0; }
/* ---------- วาระการประชุมประจำเดือน ---------- */
.mt-next { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.25rem; border-radius: var(--radius); background: #fff; border: 2px solid var(--brand); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; }
.mt-next:hover { color: var(--ink); background: var(--brand-soft); }
.mt-date { flex-shrink: 0; width: 64px; text-align: center; background: var(--brand); color: #fff; border-radius: 10px; padding: .35rem 0; font-family: 'Prompt', sans-serif; font-size: .85rem; line-height: 1.2; }
.mt-date span { display: block; font-size: 1.6rem; font-weight: 600; }
.mt-date-sm { width: 52px; background: var(--brand-soft); color: var(--brand-dark); }
.mt-date-sm span { font-size: 1.25rem; }
.mt-row { display: flex; align-items: center; gap: .9rem; padding: .8rem 1rem; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); }
.mt-row:last-child { border-bottom: 0; }
.mt-row:hover { background: #f6f8f7; color: var(--ink); }
.mt-meta { padding: .1rem 0; } .mt-meta i { color: var(--brand); margin-right: .25rem; }
.mt-section + .mt-section { margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed var(--line); }
.mt-section-head { font-family: 'Prompt', sans-serif; font-size: 1.02rem; font-weight: 600; color: var(--brand-deep); margin-bottom: .5rem; }
.mt-section-head span { display: inline-block; background: var(--brand); color: #fff; border-radius: 6px; padding: .05rem .5rem; margin-right: .35rem; font-size: .88rem; }
.mt-items { list-style: none; padding: 0; margin: 0; }
.mt-items li { display: flex; gap: .7rem; padding: .55rem .25rem; }
.mt-items li + li { border-top: 1px solid #eef1ef; }
.mt-item-no { flex-shrink: 0; min-width: 2.4rem; font-weight: 600; color: var(--brand-dark); }
.mt-files { display: flex; flex-wrap: wrap; gap: .35rem .9rem; margin-top: .35rem; font-size: .9rem; }
.mt-files a { text-decoration: none; } .mt-files a:hover { text-decoration: underline; }
@media print { .mt-actions, .mt-files a .text-muted { display: none !important; } .mt-section { break-inside: avoid; } }
html.high-contrast .mt-next, html.high-contrast .mt-row { background: #000; color: #fff; border-color: #ff0; }
html.high-contrast .mt-section-head, html.high-contrast .mt-item-no { color: #ff0; }
html.high-contrast .about-nav a, html.high-contrast .wg-card, html.high-contrast .org-node { background: #000; color: #fff; border-color: #ff0; }
html.high-contrast .org-node strong, html.high-contrast .wg-name { color: #ff0; }
html.high-contrast .wg-duties, html.high-contrast .org-node span { color: #fff; }

/* ---------- แกลเลอรี ---------- */
.album-card .thumb { position: relative; }
.album-count {
  position: absolute; right: .6rem; bottom: .6rem; background: rgba(0,0,0,.65); color: #fff;
  font-size: .8rem; padding: .15rem .55rem; border-radius: 999px;
}
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .5rem; }
@media (max-width: 575.98px) { .photo-grid { grid-template-columns: repeat(3, 1fr); gap: 3px; } }
.photo-tile { display: block; aspect-ratio: 1; overflow: hidden; border-radius: 8px; background: var(--brand-soft); }
@media (max-width: 575.98px) { .photo-tile { border-radius: 0; } }
.photo-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.photo-tile:hover img { transform: scale(1.04); }
.lightbox { position: fixed; inset: 0; z-index: 2000; background: rgba(0,0,0,.97); display: flex; align-items: center; justify-content: center; }
.lightbox[hidden] { display: none; }
.lb-figure { margin: 0; max-width: 92vw; max-height: 88vh; text-align: center; }
.lb-figure img { max-width: 92vw; max-height: 80vh; object-fit: contain; border-radius: 4px; }
.lb-figure figcaption { color: #ddd; margin-top: .6rem; font-size: .95rem; }
.lb-btn {
  position: absolute; border: 0; background: rgba(255,255,255,.12); color: #fff; width: 48px; height: 48px;
  border-radius: 50%; font-size: 1.4rem; display: flex; align-items: center; justify-content: center;
}
.lb-btn:hover, .lb-btn:focus-visible { background: rgba(255,255,255,.28); }
.lb-close { top: 1rem; right: 1rem; }
.lb-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 1rem; top: 50%; transform: translateY(-50%); }
@media (max-width: 575.98px) { .lb-prev, .lb-next { display: none; } }

/* ---------- ระบบงาน ---------- */
.dropdown-menu-systems { max-height: 70vh; overflow-y: auto; min-width: 280px; }
.dropdown-menu .dropdown-header { font-family: 'Prompt', sans-serif; font-size: .8rem; color: var(--brand-dark); font-weight: 600; }
.sys-card {
  display: flex; align-items: center; gap: .9rem; padding: 1rem 1.1rem; height: 100%; text-decoration: none; color: var(--ink);
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border-left: 4px solid var(--brand);
  transition: transform .15s, box-shadow .15s;
}
.sys-card:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(6,69,40,.13); color: var(--ink); }
.sys-icon { flex-shrink: 0; width: 44px; height: 44px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; }
.sys-title { display: block; font-family: 'Prompt', sans-serif; font-weight: 500; line-height: 1.4; }
.sys-desc { display: block; font-size: .88rem; color: var(--muted); }
.sys-host { display: block; font-size: .78rem; color: var(--muted); opacity: .8; }
/* 11 เมนูหลักให้อยู่แถวเดียวที่จอ 1024px ขึ้นไป */
@media (min-width: 1200px) { .main-nav .nav-link { padding: .8rem .62rem !important; font-size: .97rem; } }
@media (min-width: 992px) and (max-width: 1199.98px) { .main-nav .nav-link { padding: .8rem .32rem !important; font-size: .86rem; } }
/* แถบเมนูใช้ความกว้างเต็มจอ จัดกลาง — 12 เมนูหลักอยู่แถวเดียวที่ 1024px ขึ้นไป */
@media (min-width: 992px) { .main-nav > .container { max-width: none; } .main-nav .navbar-collapse { justify-content: center; } }
/* เมนูยาวเกินแถว: ขึ้นแถวใหม่ทั้งเมนู แทนการตัดคำกลางชื่อ (จัดการเมนูได้ที่หลังบ้าน) */
@media (min-width: 992px) { .main-nav .navbar-nav { flex-wrap: wrap; } .main-nav .nav-link { white-space: nowrap; } }
html.high-contrast .sys-card { background: #000; color: #fff; border: 2px solid #ff0; }
html.high-contrast .sys-title { color: #ff0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--brand-deep); color: #cfe3d8; font-size: .95rem; }
.site-footer h2 { font-size: 1.05rem; color: #fff; font-weight: 600; margin-bottom: 1rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer ul { list-style: none; padding: 0; }
.site-footer li { padding: .2rem 0; }
.footer-bottom { background: #04331d; font-size: .85rem; }
.visitor-box { background: rgba(255,255,255,.07); border-radius: 10px; padding: .75rem 1rem; }
.visitor-box .n { font-family: 'Prompt', sans-serif; color: #fff; font-weight: 600; }

/* ---------- Cookie banner (PDPA) ---------- */
.cookie-banner {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 1080; max-width: 760px; margin: 0 auto;
  background: #fff; border-radius: var(--radius); box-shadow: 0 10px 40px rgba(0,0,0,.2);
  padding: 1rem 1.25rem; display: none; border-left: 6px solid var(--brand);
}
.cookie-banner.show { display: block; }

/* ---------- High contrast mode ---------- */
html.high-contrast body { background: #000; color: #fff; }
html.high-contrast .site-header, html.high-contrast .news-card, html.high-contrast .content-box,
html.high-contrast .announce-box, html.high-contrast .unit-card, html.high-contrast .quick-link,
html.high-contrast .cookie-banner { background: #000; color: #fff; border: 2px solid #ff0; box-shadow: none; }
html.high-contrast a, html.high-contrast .news-card h3 a, html.high-contrast .brand-th,
html.high-contrast .section-title, html.high-contrast .unit-card h3, html.high-contrast .quick-link i { color: #ff0 !important; }
html.high-contrast .main-nav, html.high-contrast .topbar, html.high-contrast .page-hero,
html.high-contrast .hero-slide, html.high-contrast .stats-strip, html.high-contrast .site-footer,
html.high-contrast .footer-bottom { background: #000 !important; border-bottom: 2px solid #ff0; }
html.high-contrast .meta, html.high-contrast .text-muted, html.high-contrast .brand-en,
html.high-contrast .unit-card li, html.high-contrast .lbl { color: #fff !important; }
html.high-contrast .badge-cat, html.high-contrast .date-chip { background: #ff0; color: #000; }
html.high-contrast .thumb-placeholder { background: #111; color: #ff0; }

@media (max-width: 991.98px) {
  .brand-logo { width: 52px; height: 52px; }
  .brand-th { font-size: 1.05rem; }
  .quick-links { margin-top: 1.5rem; }
  .hero-pattern { display: none; }
  .hero-image { padding-bottom: 0; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- ข่าวประชาสัมพันธ์ ONE PAGE ---------- */
.op-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: linear-gradient(120deg, var(--brand-deep), var(--brand-dark)); color: #fff;
  border-radius: var(--radius); padding: .85rem 1.25rem; margin-bottom: 1rem;
}
.op-bar h2 { margin: 0; font-size: clamp(1.02rem, 2.4vw, 1.5rem); font-weight: 600; color: #fff; }
.op-bar h2 i { color: var(--accent); margin-right: .35rem; }
.op-bar a { color: #fff; text-decoration: none; white-space: nowrap; font-family: 'Prompt', sans-serif; font-size: .95rem; }
.op-bar a:hover { text-decoration: underline; }
.op-strip-wrap { position: relative; }
.op-strip {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * 1rem) / 4); gap: 1rem;
  overflow-x: auto; scroll-snap-type: x mandatory; padding: .25rem .1rem 1rem; scrollbar-width: thin;
}
@media (max-width: 991.98px) { .op-strip { grid-auto-columns: calc((100% - 1rem) / 2.3); } }
@media (max-width: 575.98px) { .op-strip { grid-auto-columns: 72%; } }
.op-strip > .op-card { scroll-snap-align: start; }
.op-nav {
  position: absolute; top: 40%; z-index: 2; width: 42px; height: 42px; border-radius: 50%; border: 0;
  background: #fff; color: var(--brand-dark); box-shadow: 0 4px 14px rgba(0,0,0,.18); font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center;
}
.op-prev { left: -14px; } .op-next { right: -14px; }
@media (max-width: 767.98px) { .op-nav { display: none; } }
.op-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; border: 1px solid var(--line); }
.op-thumb { display: block; aspect-ratio: 3 / 4; overflow: hidden; background: var(--brand-soft); }
.op-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .25s; }
.op-card:hover .op-thumb img { transform: scale(1.03); }
.op-body { padding: .75rem 1rem .9rem; }
.op-unit { display: block; font-family: 'Prompt', sans-serif; font-weight: 600; font-size: 1.1rem; color: var(--ink); text-decoration: none; }
.op-unit:hover { color: var(--brand-dark); }
.op-title { font-size: .92rem; color: var(--muted); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.op-date { font-size: .8rem; color: var(--muted); margin-top: .25rem; }
.op-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.op-full { display: block; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.op-full img { width: 100%; height: auto; display: block; }
html.high-contrast .op-bar { background: #000; border: 2px solid #ff0; }
html.high-contrast .op-card { background: #000; border: 2px solid #ff0; }
html.high-contrast .op-unit { color: #ff0; }
html.high-contrast .op-title, html.high-contrast .op-date { color: #fff; }

/* ---------- ปฏิทินกิจกรรม ---------- */
.cal-side-title { font-size: 1rem; font-weight: 600; color: var(--brand-deep); margin: 0 0 .75rem; display: flex; gap: .4rem; align-items: center; }
.cal-stat { background: var(--bg); border-radius: 10px; padding: .55rem .25rem; }
.cal-stat .n { font-family: 'Prompt', sans-serif; font-size: 1.5rem; font-weight: 600; color: var(--brand-deep); line-height: 1.2; }
.cal-stat .l { font-size: .75rem; color: var(--muted); }
.cal-legend { list-style: none; padding: 0; margin: 0; }
.cal-cat { display: flex; align-items: flex-start; gap: .55rem; width: 100%; text-align: left; background: none; border: 0; padding: .3rem .25rem; border-radius: 6px; color: var(--ink); font-size: .95rem; line-height: 1.4; }
.cal-cat:hover { background: var(--bg); }
.cal-cat .dot { flex-shrink: 0; width: 13px; height: 13px; border-radius: 50%; margin-top: .3rem; }
.cal-cat.off { opacity: .4; text-decoration: line-through; }
.cal-upcoming { list-style: none; padding: 0; margin: 0; }
.cal-upcoming li + li { border-top: 1px dashed var(--line); }
.cal-up-link { display: flex; gap: .65rem; padding: .55rem 0; text-decoration: none; color: var(--ink); }
.cal-up-link:hover .t { color: var(--brand-dark); }
.cal-up-date { flex-shrink: 0; width: 46px; text-align: center; border-left: 4px solid; background: var(--bg); border-radius: 6px; padding: .2rem 0; font-family: 'Prompt', sans-serif; line-height: 1.15; }
.cal-up-date .d { display: block; font-weight: 600; font-size: 1.1rem; }
.cal-up-date .m { font-size: .72rem; color: var(--muted); }
.cal-up-link .t { display: block; font-size: .92rem; line-height: 1.4; }
.cal-up-link .s { display: block; font-size: .78rem; color: var(--muted); }
.cal-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: .75rem; }
.cal-title { font-size: clamp(1.1rem, 2.4vw, 1.45rem); font-weight: 600; margin: 0 auto; color: var(--brand-deep); text-align: center; min-width: 10rem; }
.btn-cal { --bs-btn-bg: var(--brand-deep); --bs-btn-color: #fff; --bs-btn-border-color: var(--brand-deep);
  --bs-btn-hover-bg: var(--brand-dark); --bs-btn-hover-color: #fff; --bs-btn-active-bg: var(--brand); --bs-btn-active-color: #fff;
  --bs-btn-active-border-color: var(--brand); font-family: 'Prompt', sans-serif; font-size: .9rem; }
.btn-cal.active { background: var(--brand); border-color: var(--brand); }
@media (max-width: 575.98px) { .cal-title { order: -1; width: 100%; } .cal-toolbar .ms-auto { margin-left: 0 !important; } }
.cal-wrap { --fc-border-color: var(--line); --fc-today-bg-color: #fff8db; --fc-page-bg-color: #fff; --fc-neutral-bg-color: var(--bg);
  --fc-list-event-hover-bg-color: var(--brand-soft); font-size: .92rem; }
.cal-wrap .fc-col-header-cell-cushion { font-family: 'Prompt', sans-serif; font-weight: 500; color: var(--ink); text-decoration: none; padding: .4rem 0; }
.cal-wrap .fc-daygrid-day-number { font-family: 'Prompt', sans-serif; color: #2f7de1; text-decoration: none; font-size: 1.05rem; padding: .3rem .5rem; }
.cal-wrap .fc-day-other .fc-daygrid-day-number { color: #a9b8c9; }
.cal-wrap .fc-daygrid-day-frame { min-height: 96px; }
.cal-wrap .fc-event { cursor: pointer; }
.cal-wrap .fc-daygrid-block-event { border-radius: 4px; padding: 1px 4px; }
.cal-wrap .fc-daygrid-block-event .fc-event-time { font-weight: 700; }
.cal-wrap .fc-daygrid-dot-event .fc-event-title { font-weight: 500; color: var(--ink); }
.cal-wrap .fc-daygrid-dot-event .fc-event-time { color: #2f7de1; font-weight: 400; }
.cal-wrap .fc-event:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.cal-wrap .fc-list-day-cushion { background: var(--brand-soft) !important; font-family: 'Prompt', sans-serif; }
.cal-wrap .fc-list-day-text, .cal-wrap .fc-list-day-side-text { color: var(--brand-deep); text-decoration: none; }
.cal-wrap .fc-more-link { color: var(--brand-dark); font-weight: 500; }
.ev-dl { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1rem; }
.ev-dl dt { font-weight: 500; color: var(--muted); }
.ev-dl dd { margin: 0; }
.ev-dl [hidden] { display: none; }
html.high-contrast .cal-wrap { --fc-page-bg-color: #000; --fc-neutral-bg-color: #111; --fc-border-color: #ff0; --fc-today-bg-color: #333; }
html.high-contrast .cal-wrap .fc-daygrid-day-number, html.high-contrast .cal-wrap .fc-col-header-cell-cushion,
html.high-contrast .cal-wrap .fc-daygrid-dot-event .fc-event-title { color: #ff0; }
html.high-contrast .cal-stat, html.high-contrast .cal-up-date { background: #111; }
html.high-contrast .cal-cat, html.high-contrast .cal-up-link { color: #fff; }
