/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--page-bg);
  line-height: 1.5;
  overflow-x: hidden;
}
img, svg, video, iframe { max-width: 100%; }
img { height: auto; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--navy); }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--navy); margin: 0; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; box-shadow: var(--focus); border-radius: 4px; }
.icon { flex-shrink: 0; stroke-width: 1.8; vertical-align: middle; }
.icon--bold { stroke-width: 2; }
.icon--thin { stroke-width: 1.5; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--navy); color: #fff; padding: 10px 16px; border-radius: var(--radius); }
.skip-link:focus { top: 12px; color: #fff; }
.hp-field { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }

.container { max-width: var(--container); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.muted { color: var(--text-muted); }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }

/* ===== Buttons & controls ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--control-h); padding: 0 18px; border-radius: var(--radius);
  border: 1px solid transparent; background: var(--surface); color: var(--text);
  font-size: 15px; font-weight: 500; cursor: pointer; text-align: center; line-height: 1.2;
}
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--primary); color: #fff; font-family: var(--font-head); }
.btn--primary:hover { background: var(--navy); color: #fff; }
.btn--navy { background: var(--navy); color: #fff; }
.btn--navy:hover { background: var(--primary); color: #fff; }
.btn--green { background: var(--green); color: #fff; }
.btn--green:hover { background: var(--green-dark); color: #fff; }
.btn--outline { border-color: var(--border-input); background: var(--surface); color: var(--text); }
.btn--outline:hover { border-color: var(--primary); color: var(--primary); }
.btn--pill { border-radius: var(--radius-pill); }
.btn--lg { min-height: 52px; padding: 0 28px; font-size: 16px; font-family: var(--font-head); }
.btn--sm { min-height: 40px; padding: 0 14px; font-size: 14px; border-radius: var(--radius-sm); }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.icon-btn {
  width: var(--control-h); height: var(--control-h); display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-input); border-radius: var(--radius); background: var(--surface); color: var(--navy); cursor: pointer; padding: 0;
}
.icon-btn--round { border-radius: 22px; color: var(--text-sub); }
.icon-btn:hover { border-color: var(--primary); color: var(--primary); }

.input, .select, .textarea {
  min-height: var(--control-h); padding: 0 12px; border: 1px solid var(--border-input); border-radius: var(--radius);
  background: var(--surface); font-size: 15px; width: 100%;
}
.textarea { padding: 10px 12px; resize: vertical; min-height: 110px; }
.select { width: auto; padding-right: 32px; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--primary); box-shadow: var(--focus); }
.search-box {
  display: flex; align-items: center; gap: 8px; min-height: var(--control-h); width: 260px; max-width: 100%;
  padding: 0 14px; background: var(--surface); border: 1px solid var(--border-input); border-radius: var(--radius); color: var(--text-muted);
}
.search-box:focus-within { border-color: var(--primary); box-shadow: var(--focus); }
.search-box input { border: 0; outline: none; font-size: 14px; width: 100%; background: transparent; min-height: 40px; color: var(--text); }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--text-sub); }
.field-inline { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text-sub); }
.field-error { color: var(--danger); font-size: 13px; }

.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  display: inline-flex; align-items: center; min-height: var(--control-h); padding: 0 18px; border-radius: 22px;
  font-size: 15px; background: var(--surface); color: var(--text-sub); border: 1px solid var(--border-input);
}
.pill:hover { border-color: var(--navy); color: var(--navy); }
.pill.is-active, .pill[aria-current="page"] { background: var(--navy); color: #fff; border-color: var(--navy); font-weight: 600; }

/* ===== Header ===== */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); position: relative; z-index: 20; }
.site-header__bar { min-height: 80px; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--navy); }
.brand:hover { color: var(--navy); }
.brand__logo { width: 52px; height: 52px; flex-shrink: 0; object-fit: contain; }
.brand__text { display: flex; flex-direction: column; line-height: 1.2; }
.brand__name { font-family: var(--font-head); font-weight: 600; font-size: 20px; }
.brand__en { font-size: 13px; color: var(--text-muted); }
.brand__p4p-mobile { display: none; font-family: var(--font-head); font-size: 12px; color: var(--primary); font-weight: 600; }
.header-divider { width: 1px; height: 40px; background: var(--border-input); }
.header-p4p { display: flex; align-items: center; gap: 10px; }
.header-p4p__mark { font-family: var(--font-head); font-weight: 700; font-size: 34px; color: var(--primary); letter-spacing: -0.5px; }
.header-p4p__desc { font-size: 12px; line-height: 1.4; color: var(--text-sub); }
.main-nav { display: flex; margin-left: auto; font-family: var(--font-head); font-size: 16px; }
.main-nav a { padding: 26px 12px 24px; color: var(--text); border-bottom: 3px solid transparent; white-space: nowrap; }
.main-nav a:hover { color: var(--primary); }
.main-nav a[aria-current="page"] { color: var(--primary); font-weight: 600; border-bottom-color: var(--primary); }
.header-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.header-login { height: var(--control-h); padding: 0 20px; font-size: 15px; }
.menu-toggle { display: none; }

.header-search { border-top: 1px solid var(--border); background: var(--surface); padding: 12px 0; }
.header-search form { display: flex; gap: 8px; }
.header-search .search-box { flex: 1; width: auto; }

.mobile-nav {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 30; background: var(--surface);
  border-bottom: 1px solid var(--border); padding: 8px var(--gutter) 16px; display: flex; flex-direction: column;
  font-family: var(--font-head); font-size: 16px; box-shadow: 0 12px 24px rgba(15, 42, 95, 0.08);
}
.mobile-nav[hidden] { display: none; }
.mobile-nav a { min-height: 48px; display: flex; align-items: center; color: var(--text); border-bottom: 1px solid var(--border-soft); }
.mobile-nav a[aria-current="page"] { color: var(--primary); font-weight: 600; }
.mobile-nav .btn { margin-top: 8px; height: 48px; border-bottom: 0; color: #fff; justify-content: center; }

@media (max-width: 1480px) { .header-p4p__desc { display: none; } }
@media (max-width: 1080px) {
  .header-divider, .header-p4p, .main-nav { display: none; }
  .menu-toggle { display: inline-flex; }
}
@media (max-width: 640px) {
  .site-header__bar { min-height: 64px; gap: 10px; }
  .brand { gap: 10px; }
  .brand__logo { width: 40px; height: 40px; }
  .brand__name { font-size: 16px; }
  .brand__en { display: none; }
  .brand__p4p-mobile { display: block; }
  .header-actions { gap: 8px; }
  .header-login { display: none; }
  .icon-btn--search { border: 0; }
}

/* ===== Hero / slider ===== */
.hero { background: var(--hero-bg); border-bottom: 1px solid var(--hero-line); }
.hero__inner { padding-top: 48px; padding-bottom: 48px; }
.slider { position: relative; }
.slide { display: flex; flex-wrap: wrap; gap: 40px; align-items: center; }
.slide[hidden] { display: none; }
.slide__text { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.slide__tagline { font-family: var(--font-head); font-size: 22px; color: var(--green); font-weight: 500; }
.slide__title { font-weight: 700; font-size: 54px; line-height: 1.15; color: var(--navy); }
.slide__subtitle { font-size: 19px; line-height: 1.6; color: var(--text-body); max-width: 560px; }
.slide__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.slide__actions .btn--outline-pill { background: var(--surface); color: var(--navy); border: 1px solid var(--border-strong); border-radius: 26px; }
.slide__media {
  flex: 1 1 480px; min-width: 0; height: 340px; border-radius: var(--radius-xl); background: var(--hero-art);
  position: relative; overflow: hidden; display: flex; align-items: flex-end; justify-content: center;
}
.slide__media img { width: 100%; height: 100%; object-fit: cover; }
.slide__media-note { position: absolute; top: 16px; left: 16px; padding: 6px 12px; background: rgba(255,255,255,.9); border-radius: var(--radius-sm); font-size: 13px; color: var(--text-sub); }
.slider__dots { display: flex; gap: 8px; margin-top: 24px; }
.slider__dot { width: 16px; height: 8px; border-radius: 4px; background: var(--dot-off); border: 0; padding: 0; cursor: pointer; position: relative; transition: width .2s; }
.slider__dot::after { content: ""; position: absolute; inset: -18px -4px; } /* พื้นที่กดอย่างน้อย 44px */
.slider__dot[aria-current="true"] { width: 28px; background: var(--primary); }
@media (max-width: 640px) {
  .hero__inner { padding-top: 28px; padding-bottom: 28px; }
  .slide { gap: 12px; }
  .slide__text { gap: 12px; flex-basis: 100%; }
  .slide__tagline { font-size: 16px; }
  .slide__title { font-size: 32px; line-height: 1.25; }
  .slide__subtitle { font-size: 15px; line-height: 1.65; }
  .slide__media { height: 180px; border-radius: var(--radius-lg); flex-basis: 100%; order: 2; }
  .slide__actions { order: 3; }
  .slide__actions .btn--lg { width: 100%; min-height: 48px; }
  .slide__actions .btn--outline-pill { display: none; }
  .slider__dots { margin-top: 4px; }
}
@media (prefers-reduced-motion: reduce) { .slider__dot { transition: none; } }

/* ===== Layout ===== */
.layout { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; padding-top: 32px; padding-bottom: 48px; }
.layout--inner { padding-top: 28px; }
.layout__main { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.layout__aside { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.layout__aside--narrow { flex-basis: 260px; }
.layout__aside--320 { flex-basis: 320px; }
.layout--gap32 { gap: 32px; }
.stack { display: flex; flex-direction: column; gap: 24px; padding-top: 28px; padding-bottom: 48px; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; display: flex; flex-direction: column; gap: 20px; }
.card--compact { padding: 20px; gap: 4px; }
.card--navy { background: var(--navy); border-color: var(--navy); color: #fff; gap: 12px; }
.card--navy h2 { color: #fff; }
.card--navy p { color: var(--on-navy); font-size: 15px; line-height: 1.6; }
.card__head { display: flex; align-items: center; gap: 12px; }
.card__head-icon { width: 40px; height: 40px; border-radius: var(--radius); background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.card__head-icon--green { background: var(--green-soft); color: var(--tile-green-fg); }
.card__title { font-size: 24px; font-weight: 600; }
.card__title--sm { font-size: 20px; }
.card__title--xs { font-size: 18px; }
.card__more { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 500; }
.card__more--sm { font-size: 14px; }

/* ===== Page hero (หน้าใน) ===== */
.page-hero { background: var(--hero-bg); border-bottom: 1px solid var(--hero-line); }
.page-hero--green { background: var(--green-soft); border-bottom-color: #CDE9DC; }
.page-hero--purple { background: var(--tile-purple-bg); border-bottom-color: #DDD5F5; }
.page-hero--pink { background: var(--tile-pink-bg); border-bottom-color: #F5D3DE; }
.page-hero__inner { padding-top: 32px; padding-bottom: 32px; display: flex; flex-direction: column; gap: 8px; }
.page-hero h1 { font-size: 36px; font-weight: 700; }
.page-hero p { font-size: 16px; color: var(--text-sub); }
.breadcrumb { font-size: 14px; color: var(--text-muted); display: flex; flex-wrap: wrap; gap: 8px; }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; color: var(--text-muted); }
.page-hero--green .breadcrumb, .page-hero--purple .breadcrumb, .page-hero--pink .breadcrumb { color: var(--text-sub); }
@media (max-width: 640px) {
  .page-hero__inner { padding-top: 24px; padding-bottom: 24px; }
  .page-hero h1 { font-size: 28px; }
}

/* ===== Post cards ===== */
.post-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.post-grid--3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
@media (max-width: 360px) { .post-grid--3 { grid-template-columns: 1fr; } }
.post-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; display: flex; flex-direction: column; color: var(--text); }
.post-card:hover { border-color: var(--border-strong); color: var(--text); box-shadow: 0 6px 18px rgba(15,42,95,.06); }
.post-card:hover .post-card__title { color: var(--primary); }
.post-card__media { height: 160px; position: relative; display: flex; align-items: center; justify-content: center; gap: 12px; }
.post-grid--3 .post-card__media { height: 150px; }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; }
.post-card__label { font-family: var(--font-head); font-weight: 700; font-size: 34px; color: #fff; background: var(--primary); padding: 4px 18px; border-radius: var(--radius-md); }
.badge-new { position: absolute; top: 10px; right: 10px; background: var(--badge-new); color: #fff; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: var(--radius-xs); }
.badge-staff { position: absolute; bottom: 10px; left: 10px; display: inline-flex; gap: 4px; align-items: center; background: rgba(15,42,95,.88); color: #fff; font-size: 12px; padding: 3px 8px; border-radius: var(--radius-xs); }
.post-card__body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex-grow: 1; }
.post-card__meta { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted); }
.post-card__cat { color: var(--green); font-weight: 600; }
.post-card__title { font-size: 17px; font-weight: 600; line-height: 1.45; color: var(--text-strong); }
.post-card__excerpt { font-size: 14px; line-height: 1.6; color: var(--text-muted); }
.post-card__more { margin-top: auto; padding-top: 8px; font-size: 14px; font-weight: 600; color: var(--primary); }

/* สีพื้น placeholder ตามหมวด (เมื่อไม่มีภาพปก) */
.tone-ann { background: var(--tile-sky-bg); color: var(--tile-sky-fg); }
.tone-news { background: var(--tile-slate-bg); color: var(--tile-slate-fg); }
.tone-performance { background: var(--tile-purple-bg); color: var(--tile-purple-fg); }
.tone-activity { background: var(--tile-orange-bg); color: var(--tile-orange-fg); }
.tone-docs { background: var(--tile-mint-bg); color: var(--tile-mint-fg); }

/* ข่าวเด่น */
.featured { display: flex; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; color: var(--text); }
.featured:hover { color: var(--text); border-color: var(--border-strong); }
.featured__media { flex: 1 1 420px; min-height: 260px; display: flex; align-items: center; justify-content: center; gap: 16px; position: relative; }
.featured__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.featured__media .post-card__label { font-size: 44px; padding: 4px 22px; border-radius: var(--radius-card); }
.featured__flag { position: absolute; top: 16px; left: 16px; background: var(--badge-new); color: #fff; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: var(--radius-xs); z-index: 1; }
.featured__body { flex: 1 1 420px; padding: 32px; display: flex; flex-direction: column; gap: 12px; justify-content: center; }
.featured__meta { font-size: 14px; color: var(--green); font-weight: 600; }
.featured__title { font-size: 28px; line-height: 1.35; font-weight: 600; }
.featured__excerpt { font-size: 16px; line-height: 1.7; color: var(--text-sub); }
.featured__more { font-weight: 600; color: var(--primary); }
@media (max-width: 640px) {
  .featured__media { min-height: 180px; flex-basis: 100%; }
  .featured__media .post-card__label { font-size: 32px; }
  .featured__body { padding: 20px; flex-basis: 100%; }
  .featured__title { font-size: 22px; }
  .featured__media > .icon { width: 64px; height: 64px; }
}

.toolbar { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.toolbar__filters { display: flex; gap: 12px; margin-left: auto; flex-wrap: wrap; align-items: center; }
.toolbar__filters .search-box { width: 260px; }
@media (max-width: 640px) {
  .toolbar__filters { margin-left: 0; width: 100%; }
  .toolbar__filters .search-box { width: 100%; }
}

/* Pagination */
.pagination { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.pagination a, .pagination span {
  min-width: 44px; height: 44px; padding: 0 8px; border-radius: var(--radius); border: 1px solid var(--border-input);
  background: var(--surface); display: flex; align-items: center; justify-content: center; color: var(--text-sub);
}
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination [aria-current="page"] { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }
.pagination .is-disabled { opacity: .45; }

/* ===== Home: quick links / docs / quote ===== */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tile { min-height: 104px; border-radius: var(--radius-md); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 10px; text-align: center; font-size: 13px; font-weight: 500; }
.tile:hover { filter: brightness(.97); text-decoration: underline; }
.tile--blue { background: var(--tile-blue-bg); color: var(--tile-blue-fg); }
.tile--green { background: var(--tile-green-bg); color: var(--tile-green-fg); }
.tile--purple { background: var(--tile-purple-bg); color: var(--tile-purple-fg); }
.tile--orange { background: var(--tile-orange-bg); color: var(--tile-orange-fg); }
.tile--teal { background: var(--tile-teal-bg); color: var(--tile-teal-fg); }
.tile--pink { background: var(--tile-pink-bg); color: var(--tile-pink-fg); }
.tile__short { display: none; }
@media (max-width: 640px) {
  .tiles { gap: 10px; }
  .tile { min-height: 92px; font-size: 12px; padding: 6px; gap: 6px; }
  .tile .icon { width: 26px; height: 26px; }
  .tile__full { display: none; }
  .tile__short { display: inline; }
}

.file-list { display: flex; flex-direction: column; }
.file-row { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border-soft); color: var(--text); }
.file-row:last-child { border-bottom: 0; }
.file-row:hover { color: var(--primary); }
.file-row__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.file-row__title { font-size: 15px; font-weight: 500; }
.file-row__meta { font-size: 13px; color: var(--text-muted); }

.file-badge {
  width: 36px; height: 44px; border-radius: var(--radius-xs); color: #fff; font-size: 10px; font-weight: 700;
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 6px; flex-shrink: 0; text-transform: uppercase; letter-spacing: .2px;
}
.file-badge--lg { width: 44px; height: 52px; border-radius: var(--radius-sm); padding-bottom: 8px; }
.file-badge--pdf { background: var(--pdf); }
.file-badge--doc { background: var(--primary); }
.file-badge--xls { background: var(--green); }
.file-badge--ppt { background: #B54708; }
.file-badge--img { background: var(--tile-purple-fg); }
.file-badge--other { background: var(--text-sub); }

.quote-banner { background: var(--navy); border-radius: var(--radius-lg); padding: 28px 32px; display: flex; flex-wrap: wrap; gap: 24px; align-items: center; color: #fff; }
.quote-banner__icon { width: 64px; height: 64px; border-radius: var(--radius-lg); background: var(--green); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: #fff; }
.quote-banner__text { flex: 1 1 360px; font-family: var(--font-head); font-size: 24px; line-height: 1.5; font-weight: 500; }
.quote-banner .btn { background: #fff; color: var(--navy); border-radius: 24px; height: 48px; font-family: var(--font-head); }
.quote-banner .btn:hover { background: var(--primary-soft); }
@media (max-width: 640px) {
  .quote-banner { padding: 20px; }
  .quote-banner__icon { display: none; }
  .quote-banner__text { font-size: 18px; line-height: 1.55; flex-basis: 100%; }
}

/* หน้าแรกบนมือถือ: เรียง hero → เมนูสำคัญ → ข่าว → เอกสาร → quote (ตามแบบ MobileHome) */
.home-layout { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; padding-top: 32px; padding-bottom: 48px; }
@media (max-width: 1023px) {
  .home-layout { display: flex; flex-direction: column; align-items: stretch; padding-top: 20px; }
  .home-layout > .layout__main, .home-layout > .layout__aside { display: contents; }
  .home-quick { order: 1; }
  .home-news { order: 2; }
  .home-docs { order: 3; }
  .home-quote { order: 4; }
}
@media (max-width: 640px) {
  .home-news .post-grid { grid-template-columns: 1fr; gap: 12px; }
  /* ข่าวลำดับ 2+ เป็นแถวย่อ (ตามแบบ MobileHome) */
  .home-news .post-card:not(:first-child) { flex-direction: row; padding: 12px; gap: 12px; }
  .home-news .post-card:not(:first-child) .post-card__media { width: 88px; height: 68px; flex-shrink: 0; border-radius: var(--radius-sm); overflow: hidden; }
  .home-news .post-card:not(:first-child) .post-card__media .icon { width: 28px; height: 28px; }
  .home-news .post-card:not(:first-child) .post-card__label,
  .home-news .post-card:not(:first-child) .badge-new,
  .home-news .post-card:not(:first-child) .post-card__excerpt,
  .home-news .post-card:not(:first-child) .post-card__more { display: none; }
  .home-news .post-card:not(:first-child) .post-card__body { padding: 0; gap: 4px; }
  .home-news .post-card:not(:first-child) .post-card__meta { order: 2; }
  .home-news .post-card:not(:first-child) .post-card__title { font-family: var(--font-body); font-size: 15px; font-weight: 500; line-height: 1.4; }
  .home-news .post-card:first-child .post-card__excerpt, .home-news .post-card:first-child .post-card__more { display: none; }
  .home-news .card__title { font-size: 18px; }
  .home-news .card__head-icon { display: none; }
  .home-quick, .home-docs { padding: 16px; }
  .home-quick .card__title--sm, .home-docs .card__title--sm { font-size: 18px; }
}

/* ===== Article (รายละเอียดข่าว) ===== */
.article { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 36px; display: flex; flex-direction: column; gap: 20px; }
.article__cat { align-self: flex-start; padding: 4px 12px; border-radius: var(--radius-xs); background: var(--primary-soft); color: var(--primary); font-size: 13px; font-weight: 600; }
.article__title { font-size: 34px; line-height: 1.35; font-weight: 700; }
.article__meta { display: flex; flex-wrap: wrap; gap: 20px; font-size: 14px; color: var(--text-muted); padding-bottom: 20px; border-bottom: 1px solid var(--border-soft); }
.article__meta span { display: inline-flex; align-items: center; gap: 6px; }
.article__cover { border-radius: var(--radius-md); overflow: hidden; aspect-ratio: 1200 / 630; background: var(--tile-sky-bg); }
.article__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prose { font-size: 17px; line-height: 1.85; color: var(--text-body); display: flex; flex-direction: column; gap: 16px; overflow-wrap: anywhere; }
.prose > * { margin: 0; }
.prose h2 { margin-top: 8px; font-size: 22px; font-weight: 600; line-height: 1.5; }
.prose h3 { margin-top: 4px; font-size: 19px; font-weight: 600; }
.prose ul, .prose ol { padding-left: 24px; display: flex; flex-direction: column; gap: 6px; }
.prose blockquote { padding: 16px 20px; background: var(--note-bg); border-radius: var(--radius); color: var(--green-dark); }
.prose img { border-radius: var(--radius); }
.prose figure { margin: 0; }
.prose figcaption { font-size: 14px; color: var(--text-muted); margin-top: 6px; text-align: center; }
.prose iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: var(--radius); }
.prose .table-wrap, .table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 480px; }
.prose th { background: var(--surface-muted); text-align: left; font-weight: 600; }
.prose th, .prose td { padding: 12px 16px; border-top: 1px solid var(--border); }
.prose thead th { border-top: 0; }
.attachments { display: flex; flex-direction: column; gap: 10px; }
.attachments h2 { font-size: 18px; font-weight: 600; }
.attachment { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-md); flex-wrap: wrap; }
.attachment__text { display: flex; flex-direction: column; flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; }
.attachment__name { font-weight: 500; }
.share { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding-top: 16px; border-top: 1px solid var(--border-soft); }
.share__label { font-size: 14px; color: var(--text-muted); }
.share .btn { min-height: 40px; }
.related-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border-soft); color: var(--text); }
.related-item:last-child { border-bottom: 0; }
.related-item:hover { color: var(--primary); }
.related-item__thumb { width: 72px; height: 56px; border-radius: var(--radius-sm); flex-shrink: 0; overflow: hidden; }
.related-item__thumb img { width: 100%; height: 100%; object-fit: cover; }
.related-item__text { display: flex; flex-direction: column; gap: 4px; }
.related-item__title { font-size: 15px; font-weight: 500; line-height: 1.4; }
.related-item__date { font-size: 13px; color: var(--text-muted); }
.card--navy .btn { align-self: flex-start; background: #fff; color: var(--navy); border-radius: 22px; font-weight: 600; }
@media (max-width: 640px) {
  .article { padding: 20px 16px; gap: 16px; }
  .article__title { font-size: 26px; }
  .prose { font-size: 16px; line-height: 1.8; }
}

/* ===== Documents ===== */
.cat-nav { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.cat-nav h2 { margin: 4px 8px 10px; font-size: 17px; font-weight: 600; }
.cat-nav a { display: flex; justify-content: space-between; align-items: center; min-height: 44px; padding: 0 12px; border-radius: var(--radius); font-size: 15px; color: var(--text-body); }
.cat-nav a:hover { background: var(--surface-muted); color: var(--navy); }
.cat-nav a[aria-current="page"] { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.cat-nav__count { font-size: 13px; opacity: .8; }
.doc-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 16px 4px; border-top: 1px solid var(--border-soft); }
.doc-row__text { flex: 1 1 300px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.doc-row__title { font-size: 16px; font-weight: 500; color: var(--text-strong); overflow-wrap: anywhere; }
.doc-row__meta { font-size: 13px; color: var(--text-muted); }
.doc-row__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.doc-row .btn { font-size: 14px; padding: 0 14px; }
.lock-note { display: inline-flex; align-items: center; gap: 4px; color: var(--st-review-fg); }
@media (max-width: 640px) {
  .layout__aside--narrow { flex-basis: 100%; }
  .cat-nav { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; padding: 8px; gap: 6px; }
  .cat-nav h2 { display: none; }
  .cat-nav a { white-space: nowrap; gap: 8px; flex-shrink: 0; border: 1px solid var(--border-input); }
  .doc-row__actions { width: 100%; }
  .doc-row__actions .btn { flex: 1; }
}

/* ===== Tables / indicators ===== */
.data-table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 720px; }
.data-table thead tr { background: var(--surface-muted); text-align: left; color: var(--text-sub); }
.data-table th { padding: 14px 16px; font-weight: 600; }
.data-table td { padding: 14px 16px; border-top: 1px solid var(--border); color: var(--text-sub); }
.data-table .code { color: var(--text-muted); font-family: var(--font-head); width: 80px; }
.data-table .name { color: var(--text-strong); font-weight: 500; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--radius-xs); font-size: 13px; font-weight: 600; white-space: nowrap; }
.status--published { background: var(--st-published-bg); color: var(--st-published-fg); }
.status--review, .status--pending { background: var(--st-review-bg); color: var(--st-review-fg); }
.status--draft { background: var(--st-draft-bg); color: var(--st-draft-fg); }
.status--scheduled { background: var(--st-scheduled-bg); color: var(--st-scheduled-fg); }
.note { font-size: 13px; color: var(--text-muted); line-height: 1.6; }
.calc-result { background: var(--navy); color: #fff; border-radius: var(--radius-md); padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.calc-result__label { font-size: 14px; color: var(--on-navy); }
.calc-result__value { font-family: var(--font-head); font-size: 30px; font-weight: 600; overflow-wrap: anywhere; }
.link-list { display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.filters-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filters-row form { margin-left: auto; }
@media (max-width: 640px) {
  .filters-row form { margin-left: 0; width: 100%; }
  .filters-row .select { width: 100%; }
}

/* ===== FAQ ===== */
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); overflow: hidden; }
.faq-item__q {
  width: 100%; min-height: 64px; padding: 16px 20px; display: flex; align-items: center; gap: 16px;
  background: transparent; border: 0; text-align: left; cursor: pointer;
}
.faq-item__mark { width: 32px; height: 32px; border-radius: var(--radius-sm); background: var(--primary-soft); color: var(--primary); font-family: var(--font-head); font-weight: 600; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.faq-item__text { flex-grow: 1; font-family: var(--font-head); font-size: 17px; font-weight: 500; color: var(--navy); }
.faq-item__sign { font-size: 22px; color: var(--text-muted); width: 20px; text-align: center; }
.faq-item__sign::before { content: "+"; }
.faq-item__q[aria-expanded="true"] .faq-item__sign::before { content: "−"; }
.faq-item__a { padding: 0 20px 20px 68px; font-size: 16px; line-height: 1.75; color: var(--text-sub); }
.faq-item__a[hidden] { display: none; }
.faq-item__a > * + * { margin-top: 10px; }
.contact-box { padding-top: 14px; border-top: 1px solid var(--border-soft); font-size: 14px; line-height: 1.8; color: var(--text-sub); }
.alert { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--radius-md); font-size: 14px; line-height: 1.6; }
.alert--success, .alert--info { background: var(--note-bg); color: var(--green-dark); }
.alert--warn { background: var(--st-review-bg); color: var(--st-review-fg); }
.alert--error { background: #FDECEA; color: var(--danger); }
.alert .icon { margin-top: 2px; }
@media (max-width: 640px) {
  .faq-item__q { padding: 14px 16px; gap: 12px; }
  .faq-item__text { font-size: 16px; }
  .faq-item__a { padding: 0 16px 16px 60px; font-size: 15px; }
}

/* ===== Search results ===== */
.result-section h2 { font-size: 20px; font-weight: 600; margin-bottom: 4px; }
.empty-state { text-align: center; padding: 40px 16px; color: var(--text-muted); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.empty-state .icon { color: var(--border-strong); }

/* ===== Footer ===== */
.site-footer { background: var(--navy); color: var(--on-navy); }
.site-footer a { color: var(--on-navy); }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer__top { padding-top: 40px; padding-bottom: 24px; display: flex; flex-wrap: wrap; gap: 40px; }
.site-footer__org { flex: 2 1 320px; display: flex; flex-direction: column; gap: 12px; }
.site-footer__brand { display: flex; align-items: center; gap: 12px; }
.site-footer__brand img, .site-footer__brand svg { width: 44px; height: 44px; }
.site-footer__name { font-family: var(--font-head); font-weight: 600; font-size: 18px; color: #fff; }
.site-footer__unit { font-size: 13px; }
.site-footer__addr { font-size: 14px; line-height: 1.7; }
.site-footer__col { flex: 1 1 180px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.site-footer__heading { font-family: var(--font-head); font-weight: 600; color: #fff; font-size: 16px; }
.site-footer__bottom { padding-top: 16px; padding-bottom: 24px; border-top: 1px solid var(--navy-line); font-size: 13px; color: var(--on-navy-muted); }
@media (max-width: 640px) {
  .site-footer__top { padding-top: 24px; gap: 24px; }
}

/* ===== Login ===== */
.login { min-height: 100vh; display: flex; flex-wrap: wrap; background: var(--page-bg); }
.login__intro { flex: 1 1 480px; background: var(--navy); color: #fff; padding: 48px; display: flex; flex-direction: column; gap: 32px; justify-content: space-between; }
.login__intro .brand { color: #fff; }
.login__intro .brand__en { color: var(--on-navy-link); }
.login__lead { display: flex; flex-direction: column; gap: 16px; max-width: 520px; }
.login__mark { font-family: var(--font-head); font-weight: 700; font-size: 64px; line-height: 1; }
.login__lead h1 { color: #fff; font-size: 32px; line-height: 1.35; font-weight: 600; }
.login__lead p { font-size: 17px; line-height: 1.7; color: var(--on-navy); }
.login__copy { font-size: 13px; color: var(--on-navy-muted); }
.login__panel { flex: 1 1 480px; padding: 48px 24px; display: flex; align-items: center; justify-content: center; }
.login__card { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 40px 36px; display: flex; flex-direction: column; gap: 20px; }
.login__card h2 { font-size: 28px; font-weight: 600; }
.login__card .lead { font-size: 15px; color: var(--text-muted); margin-top: 6px; }
.login__btn { min-height: 56px; border-radius: var(--radius-md); font-size: 16px; gap: 12px; font-family: var(--font-head); width: 100%; }
.login__btn--alt { background: var(--surface); border: 1px solid var(--border-strong); color: var(--navy); }
.login__links { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; font-size: 14px; }
.dev-login { border: 1px dashed var(--border-strong); border-radius: var(--radius-md); padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.dev-login__title { font-size: 13px; font-weight: 600; color: var(--st-review-fg); }
.dev-login button { justify-content: space-between; }
@media (max-width: 640px) {
  .login__intro { padding: 24px 16px; gap: 16px; flex-basis: 100%; }
  .login__mark { font-size: 44px; }
  .login__lead h1 { font-size: 22px; }
  .login__lead p, .login__copy { display: none; }
  .login__panel { padding: 24px 16px; flex-basis: 100%; }
  .login__card { padding: 24px 20px; }
}

/* ===== Error ===== */
.error-page { text-align: center; padding: 72px 16px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.error-page__code { font-family: var(--font-head); font-size: 88px; font-weight: 700; color: var(--primary); line-height: 1; }
.error-page h1 { font-size: 28px; }
.error-page p { color: var(--text-muted); max-width: 520px; }
.error-page__actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ===== Misc ===== */
.stack-form { display: flex; flex-direction: column; gap: 14px; }
.login__btn--md { min-height: 48px; font-size: 16px; }
.search-box--wide { width: 520px; }
.prose figure.figure--medium { max-width: 66%; margin-left: auto; margin-right: auto; }
.prose figure.figure--small { max-width: 40%; margin-left: auto; margin-right: auto; }
@media (max-width: 640px) { .prose figure.figure--medium, .prose figure.figure--small { max-width: 100%; } }
.prose picture { display: block; }
.preview-bar { background: var(--st-review-bg); color: var(--st-review-fg); border-bottom: 1px solid #F3D9A6; }
.preview-bar__inner { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; font-size: 14px; }
.preview-bar a { font-weight: 600; }
