/* ==========================================================================
   UDTSCC — site layer on top of the iLanding template (main.css)
   Loaded by header.php so every public page shares the same look.
   ========================================================================== */

:root {
  --brand: #16324f;          /* navy — headings, footer */
  --brand-dark: #0f2740;
  --accent: #0a5fb4;         /* links / buttons (AA on white) */
  --accent-hover: #084d93;
  --accent-soft: #e8f1fb;
  --surface-soft: #f5f8fc;
  --line: #e3e9f1;
  --muted: #5b6b7d;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .07);
  --shadow-md: 0 6px 18px rgba(16, 24, 40, .08);

  /* template tokens */
  --default-color: #1f2a37;
  --heading-color: var(--brand);
  --accent-color: var(--accent);
  --nav-color: #1f2a37;
  --nav-hover-color: var(--accent);
  --nav-dropdown-color: #1f2a37;
  --nav-dropdown-hover-color: var(--accent);
}

body {
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a:hover { color: var(--accent-hover); }

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent), transparent 55%);
  outline-offset: 2px;
}

img { max-width: 100%; }

.light-background { --background-color: var(--surface-soft); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  [data-aos] { opacity: 1 !important; transform: none !important; }
}

.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 10000;
  background: var(--brand); color: #fff; padding: 8px 14px; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 8px; color: #fff; }

/* ------------------------------------------------------------------ topbar */
.site-topbar {
  background: var(--brand);
  color: rgba(255, 255, 255, .85);
  font-size: 14px;
  padding: 6px 0;
}
.site-topbar a { color: rgba(255, 255, 255, .92); }
.site-topbar a:hover { color: #fff; text-decoration: underline; }
.site-topbar .bi { margin-right: 6px; opacity: .8; }
.topbar-social a {
  width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: rgba(255, 255, 255, .1);
}
.topbar-social a:hover { background: rgba(255, 255, 255, .2); text-decoration: none; }
.topbar-social .bi { margin: 0; opacity: 1; }

/* ------------------------------------------------------------------ header */
.header.site-header {
  --background-color: #fff;
  background: #fff;
  padding: 0;
  border-bottom: 1px solid var(--line);
  z-index: 997;
}
.scrolled .header.site-header { box-shadow: 0 4px 16px rgba(16, 24, 40, .08); }
.site-header > .container { min-height: 72px; gap: 16px; }

.site-brand { gap: 12px; padding: 8px 0; min-width: 0; }
.site-brand-logo { width: 48px; height: 48px; object-fit: contain; flex-shrink: 0; }
.header .logo img.site-brand-logo { max-height: 48px; margin: 0; }
.site-brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.site-brand .sitename {
  font-family: var(--heading-font);
  font-size: 20px; font-weight: 600; color: var(--brand);
}
.site-brand-sub { font-size: 12.5px; color: var(--muted); letter-spacing: .02em; }

@media (min-width: 1200px) {
  .site-header .navmenu > ul > li > a,
  .site-header .navmenu > ul > li > a:focus {
    padding: 24px 11px;
    font-size: 15.5px;
    font-weight: 400;
    position: relative;
  }
  .site-header .navmenu > ul > li:last-child > a { padding-right: 0; }
  .site-header .navmenu > ul > li > a.active { color: var(--accent); font-weight: 500; }
  .site-header .navmenu > ul > li > a.active::after {
    content: ""; position: absolute; left: 11px; right: 11px; bottom: 14px;
    height: 2px; border-radius: 2px; background: var(--accent);
  }
  .site-header .navmenu > ul > li:last-child > a.active::after { right: 0; }

  /* highlighted item: ข่าวประชาสัมพันธ์ */
  .site-header .navmenu .nav-highlight > a,
  .site-header .navmenu .nav-highlight > a:focus {
    padding: 8px 14px;
    margin: 0 4px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 500;
  }
  .site-header .navmenu .nav-highlight > a:hover { background: var(--accent); color: #fff; }
  .site-header .navmenu .nav-highlight > a.active { background: var(--accent); color: #fff; }
  .site-header .navmenu .nav-highlight > a.active::after { display: none; }
  .site-header .navmenu .nav-highlight > a i { font-size: 14px; margin: 0 6px 0 0; }

  .site-header .navmenu .dropdown ul {
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    left: 0;
    padding: 8px 0;
  }
  .site-header .navmenu .dropdown ul li { min-width: 240px; }
  .site-header .navmenu .dropdown ul a { padding: 9px 18px; font-size: 15px; }
  .site-header .navmenu .dropdown ul a:hover { background: var(--surface-soft); }
  /* keyboard users: open dropdown on focus */
  .site-header .navmenu .dropdown:focus-within > ul { opacity: 1; top: 100%; visibility: visible; }
}

@media (max-width: 1199px) {
  .site-header > .container { min-height: 64px; }
  .site-brand .sitename { font-size: 17px; }
  .site-brand-logo, .header .logo img.site-brand-logo { width: 40px; height: 40px; }
  .site-header .mobile-nav-toggle { margin-right: 0; font-size: 30px; color: var(--brand); padding: 6px; }
  .mobile-nav-active .site-header .mobile-nav-toggle { color: #fff; }
  .site-header .navmenu ul { inset: 64px 16px 16px 16px; border-radius: var(--radius); }
  .site-header .navmenu a, .site-header .navmenu a:focus { white-space: normal; font-size: 16.5px; padding: 12px 20px; }
  .site-header .navmenu .nav-highlight > a { color: var(--accent); background: var(--accent-soft); }
  .site-header .navmenu .nav-highlight > a i {
    background: none; width: auto; height: auto; margin: 0 8px 0 0; font-size: 16px; order: -1;
  }
  .site-header .navmenu .nav-highlight > a { justify-content: flex-start; }
  .site-header .navmenu .dropdown ul { margin: 4px 16px 8px; border-radius: var(--radius-sm); }
}

@media (max-width: 400px) {
  .site-brand .sitename { font-size: 15.5px; }
}

/* ------------------------------------------------------------ page title */
.page-title {
  padding: 40px 0 32px;
  text-align: left;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
}
.page-title h1 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.2rem); font-weight: 600; margin-bottom: 6px; }
.page-title .breadcrumbs ol { justify-content: flex-start; font-size: 15px; color: var(--muted); }
.page-title .breadcrumbs a { color: var(--muted); }
.page-title .breadcrumbs a:hover { color: var(--accent); }
.page-title .breadcrumbs .current {
  color: var(--default-color);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.page-title .breadcrumbs ol li { min-width: 0; }
.page-title-lead { color: var(--muted); margin: 4px 0 0; }

/* The template's hero expected a floating fixed header; the header is now sticky. */
.hero { padding-top: 60px; }

section, .section { padding: 56px 0; scroll-margin-top: 84px; }
@media (max-width: 767px) { section, .section { padding: 40px 0; } }

.section-title { padding-bottom: 32px; }
.section-title h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); font-weight: 600; }

/* ------------------------------------------------------------ shared UI */
.section-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 12px 24px; margin-bottom: 24px;
}
.section-head h2 { font-size: clamp(1.4rem, 1.15rem + 1vw, 1.85rem); font-weight: 600; margin: 0; }
.section-head p { margin: 4px 0 0; color: var(--muted); }
.eyebrow {
  display: inline-block; font-size: 14px; font-weight: 500; color: var(--accent);
  letter-spacing: .02em; margin-bottom: 6px;
}

.btn-brand {
  --bs-btn-color: #fff; --bs-btn-bg: var(--accent); --bs-btn-border-color: var(--accent);
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--accent-hover); --bs-btn-hover-border-color: var(--accent-hover);
  --bs-btn-active-bg: var(--accent-hover); --bs-btn-active-color: #fff;
  --bs-btn-focus-shadow-rgb: 10, 95, 180;
  border-radius: 999px; padding: .6rem 1.35rem; font-weight: 500;
}
.btn-outline-brand {
  --bs-btn-color: var(--accent); --bs-btn-border-color: color-mix(in srgb, var(--accent), transparent 60%);
  --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--accent); --bs-btn-hover-border-color: var(--accent);
  --bs-btn-active-bg: var(--accent-hover); --bs-btn-active-color: #fff;
  --bs-btn-focus-shadow-rgb: 10, 95, 180;
  border-radius: 999px; padding: .6rem 1.35rem; font-weight: 500; background: #fff;
}

.badge-soft {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--accent-soft); color: var(--accent);
  font-size: 13px; font-weight: 500; padding: 3px 10px; border-radius: 999px;
}
.meta { color: var(--muted); font-size: 14px; }
.meta .bi { margin-right: 4px; }

.empty-state {
  text-align: center; padding: 48px 16px; color: var(--muted);
  background: #fff; border: 1px dashed var(--line); border-radius: var(--radius);
}
.empty-state .bi { font-size: 40px; color: #9aa9ba; display: block; margin-bottom: 8px; }

.pagination { --bs-pagination-color: var(--accent); --bs-pagination-active-bg: var(--accent); --bs-pagination-active-border-color: var(--accent); gap: 4px; }
.pagination .page-link { border-radius: var(--radius-sm) !important; min-width: 40px; text-align: center; }

.search-bar { display: flex; gap: 8px; max-width: 560px; }
.search-bar .form-control { border-radius: 999px; padding: .6rem 1.1rem; }
.search-bar .btn { border-radius: 999px; white-space: nowrap; }

/* ------------------------------------------------------------ news cards */
.news-card {
  display: flex; flex-direction: column; height: 100%;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; color: inherit; box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s, border-color .2s;
}
.news-card:hover { color: inherit; box-shadow: var(--shadow-md); border-color: #cfdbe8; transform: translateY(-2px); }
.news-card-media { aspect-ratio: 16 / 10; background: var(--surface-soft); overflow: hidden; }
.news-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-card-media.is-empty { display: flex; align-items: center; justify-content: center; color: #9aa9ba; font-size: 40px; }
.news-card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.news-card-title {
  font-size: 17px; font-weight: 500; line-height: 1.5; margin: 0; color: var(--brand);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  overflow-wrap: anywhere;
}
.news-card:hover .news-card-title { color: var(--accent); }
.news-card-excerpt {
  font-size: 15px; color: var(--muted); margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  overflow-wrap: anywhere;
}
.news-card .meta { margin-top: auto; }

/* ------------------------------------------------------------ article */
.article {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(20px, 3vw, 40px); box-shadow: var(--shadow-sm);
}
.article h2.article-title { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.8rem); font-weight: 600; line-height: 1.45; overflow-wrap: anywhere; }
.article .content-body { font-size: 17px; line-height: 1.85; overflow-wrap: anywhere; }
.article .content-body img { max-width: 100%; height: auto; border-radius: var(--radius-sm); margin: .75rem 0; }
.article .content-body table { display: block; max-width: 100%; overflow-x: auto; }
.article-cover { border-radius: var(--radius-sm); margin-bottom: 20px; width: 100%; height: auto; }
.article-nav { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 20px; margin-top: 28px; }
.article-nav a { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.article-nav a:hover { color: var(--accent); }

/* ------------------------------------------------------------ journals */
.journal-card {
  display: flex; flex-direction: column; height: 100%;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm); transition: box-shadow .2s, border-color .2s;
}
.journal-card:hover { box-shadow: var(--shadow-md); border-color: #cfdbe8; }
.journal-cover { aspect-ratio: 3 / 4; background: var(--surface-soft); display: block; overflow: hidden; }
.journal-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.journal-card:hover .journal-cover img { transform: scale(1.02); }
.journal-cover.is-empty { display: flex; align-items: center; justify-content: center; font-size: 48px; color: #9aa9ba; }
.journal-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.journal-title { font-size: 16.5px; font-weight: 500; line-height: 1.5; color: var(--brand); margin: 0; overflow-wrap: anywhere; }
.journal-desc { font-size: 14.5px; color: var(--muted); margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.journal-actions { margin-top: auto; padding-top: 8px; }
.journal-actions .btn { width: 100%; }

/* ------------------------------------------------------------ PDF viewer */
.viewer-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 16px;
}
.viewer-frame {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm);
  height: calc(100vh - 220px); min-height: 520px;
}
.viewer-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.viewer-loading {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; background: var(--surface-soft); color: var(--muted); z-index: 1;
}
.viewer-loading.is-hidden { display: none; }
@media (max-width: 767px) {
  .viewer-frame { height: calc(100vh - 170px); min-height: 440px; border-radius: var(--radius-sm); }
}
.viewer-help { font-size: 14.5px; color: var(--muted); margin-top: 12px; }

/* ------------------------------------------------------------ home */
.home-hero { padding: 48px 0 40px; background: linear-gradient(180deg, var(--surface-soft), #fff); }
.home-hero h1 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.6rem); font-weight: 600; line-height: 1.35; color: var(--brand); margin-bottom: 14px; }
.home-hero .lead { font-size: 17.5px; color: #3c4b5c; line-height: 1.8; margin-bottom: 24px; }
.home-hero .hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-slider { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); background: #fff; border: 1px solid var(--line); }
.hero-slider .carousel-item { aspect-ratio: 4 / 3; background: #eef2f7; }
.hero-slider .carousel-item img { width: 100%; height: 100%; object-fit: contain; }
.hero-slider .carousel-indicators [data-bs-target] { background-color: var(--brand); width: 22px; }
.hero-slider .carousel-control-prev, .hero-slider .carousel-control-next { width: 12%; }
.hero-slider .carousel-control-prev-icon, .hero-slider .carousel-control-next-icon {
  background-color: rgba(22, 50, 79, .55); border-radius: 50%; background-size: 55%; width: 40px; height: 40px;
}

/* Homepage: one elevated panel per block, lightweight items inside */
:root { --home-section-y: 36px; --panel-radius: 16px; --panel-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 10px 28px rgba(16, 24, 40, .07); }
@media (max-width: 767px) { :root { --home-section-y: 28px; } }
.home-section { padding: var(--home-section-y) 0; }
.home-section .section-head { margin-bottom: 16px; }
.home-panel, .public-panel {
  background: #fff; border: 1px solid rgba(16, 24, 40, .05); border-radius: var(--panel-radius);
  box-shadow: var(--panel-shadow); padding: clamp(16px, 1rem + 1vw, 28px);
}
.section-head .h-sub { font-size: clamp(1.15rem, 1rem + .6vw, 1.4rem); }

.quick-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
@media (min-width: 992px) { .quick-links { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.quick-link {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px;
  padding: 12px 6px; border-radius: 12px; min-height: 44px;
  color: var(--brand); font-weight: 500; font-size: 15px; line-height: 1.35;
  transition: background-color .2s, color .2s;
}
.quick-link:hover, .quick-link:focus-visible { background: var(--surface-soft); color: var(--accent); }
.quick-link .bi {
  font-size: 22px; width: 48px; height: 48px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent); transition: background-color .2s, color .2s;
}
.quick-link:hover .bi { background: var(--accent); color: #fff; }
@media (max-width: 575px) { .quick-link { font-size: 14px; } }

.rate-item { display: flex; gap: 14px; align-items: center; height: 100%; }
.rate-icon {
  flex-shrink: 0; width: 52px; height: 52px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent); font-size: 22px;
}
.rate-title { font-size: 15px; font-weight: 400; color: var(--muted); margin: 0 0 2px; line-height: 1.4; }
.rate-value { font-size: 18px; font-weight: 600; color: var(--brand); margin: 0; line-height: 1.35; }
@media (min-width: 992px) {
  .rate-list > div + div .rate-item { border-left: 1px solid var(--line); padding-left: 16px; }
}

/* Homepage news: moderately more compact than the news list page */
.home-news .news-card-media { aspect-ratio: 16 / 9; }
.home-news .news-card-body { padding: 12px 14px 14px; gap: 6px; }
.home-news .news-card-title { font-size: 16px; -webkit-line-clamp: 2; }
.home-news .news-card-excerpt { font-size: 14.5px; -webkit-line-clamp: 1; }
.home-news .news-card .meta { font-size: 13.5px; }

/* Homepage journals: small covers, more per row (journals page keeps its own sizes) */
@media (min-width: 768px)  { .home-journals .row > [class*="col-"] { flex: 0 0 auto; width: 25%; } }
@media (min-width: 1200px) { .home-journals .row > [class*="col-"] { width: 16.6667%; } }
.home-journals .journal-body { padding: 10px 12px 12px; gap: 4px; }
.home-journals .journal-title {
  font-size: 14.5px; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.home-journals .journal-desc { display: none; }
.home-journals .journal-card .meta { font-size: 13px; }
.home-journals .journal-actions .btn { font-size: 13.5px; padding: .3rem .5rem; }

.about-block .about-images { position: relative; }
.about-block .about-images img { border-radius: var(--radius); width: 100%; height: auto; }
.about-badge {
  position: absolute; left: 16px; bottom: 16px; background: #fff; border-radius: var(--radius);
  padding: 12px 16px; box-shadow: var(--shadow-md); max-width: calc(100% - 32px);
}
.about-badge strong { display: block; font-size: 20px; color: var(--brand); }
.about-badge span { font-size: 14px; color: var(--muted); }
.vision-quote {
  border-left: 4px solid var(--accent); padding: 4px 0 4px 16px; margin: 12px 0 20px;
  font-size: 18px; line-height: 1.75; color: var(--brand);
}
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.check-list li { display: flex; gap: 10px; }
.check-list .bi { color: var(--accent); margin-top: 3px; }

.panel {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow-sm); height: 100%;
}
.panel h3 { font-size: 19px; font-weight: 600; margin: 0; }
.gcal-embed-wrap iframe { width: 100%; height: 360px; border: 0; border-radius: var(--radius-sm); display: block; }
@media (max-width: 575px) { .gcal-embed-wrap iframe { height: 300px; } }
.app-mockup { max-height: 280px; width: auto; margin: 0 auto; display: block; }

/* ------------------------------------------------------------ footer */
.footer.site-footer {
  --default-color: rgba(255, 255, 255, .82);
  --heading-color: #fff;
  background: var(--brand-dark);
  color: rgba(255, 255, 255, .82);
  font-size: 15px;
  margin-top: 0;
}
.site-footer .footer-top { padding-top: 48px; padding-bottom: 16px; }
.site-footer .footer-about .logo { margin-bottom: 16px; }
.site-footer .footer-about .logo img { max-height: 44px; margin: 0; }
.site-footer .footer-about .logo span { color: #fff; font-size: 20px; font-weight: 600; letter-spacing: 0; }
.site-footer .footer-contact li { display: flex; gap: 10px; margin-bottom: 8px; line-height: 1.6; }
.site-footer .footer-contact .bi { color: #8fb8e6; margin-top: 3px; }
.site-footer a { color: rgba(255, 255, 255, .88); }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer h4 { color: #fff; font-size: 16px; font-weight: 600; }
.site-footer .footer-links ul li { padding: 5px 0; }
.site-footer .footer-links ul a { color: rgba(255, 255, 255, .78); line-height: 1.5; }
.site-footer .footer-links ul a:hover { color: #fff; }
.site-footer .footer-links-grid { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; }
.site-footer .footer-links-grid li:first-child { padding-top: 5px; }
.site-footer .social-links a { border-color: rgba(255, 255, 255, .3); color: #fff; }
.site-footer .social-links a:hover { background: rgba(255, 255, 255, .12); border-color: #fff; text-decoration: none; }
.site-footer .footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); padding: 18px 0; font-size: 14px; color: rgba(255, 255, 255, .7); }

.scroll-top { background-color: var(--accent); }

/* ------------------------------------------------------------ small utilities */
.filter-select { max-width: 180px; border-radius: 999px; }
.viewer-heading { min-width: 0; }
.viewer-heading h1 { overflow-wrap: anywhere; }
.viewer-page .breadcrumb-item.active { max-width: 60vw; }
.btn-group-pill > .btn { border-radius: 0; }
.btn-group-pill > .btn:first-child { border-top-left-radius: 999px; border-bottom-left-radius: 999px; }
.btn-group-pill > .btn:last-child { border-top-right-radius: 999px; border-bottom-right-radius: 999px; }
.viewer-frame-inline { height: 72vh; min-height: 420px; }
.latest-list li { padding: 10px 0; border-bottom: 1px solid var(--line); line-height: 1.5; }
.latest-list li:first-child { padding-top: 0; }
.latest-list a { color: var(--brand); font-weight: 500; overflow-wrap: anywhere; }
.latest-list a:hover { color: var(--accent); }
.map-ratio { --bs-aspect-ratio: 42.85%; border-radius: var(--radius); overflow: hidden; }
@media (max-width: 767px) { .map-ratio { --bs-aspect-ratio: 80%; } }
.rate-note { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* ------------------------------------------------------------ motion (progressive enhancement)
   ONE reveal system for every public page; all motion values live in :root below.
   html.js-motion is set in <head>; without JS nothing is ever hidden.
   1) Candidates (lists below) play a CSS load animation from the first paint - no flash,
      and it always ends visible even if assets/js/site.js never runs.
   2) site.js turns candidates that start below the fold into .reveal (hidden) and shows
      them once, via one IntersectionObserver, when scrolled into view.
   Legacy pages mark blocks with [data-reveal] (children of [data-reveal="stagger"] stagger).
   Never nested: nothing inside another block, a form, a tab pane, a modal or a carousel. */
:root {
  --reveal-duration: 600ms;                       /* /download baseline (its AOS duration) */
  --reveal-distance: 16px;                        /* /index style: small lift */
  --reveal-ease: cubic-bezier(.25, .1, .25, 1);   /* soft start, gentle ease-out */
  --reveal-stagger: 60ms;                         /* /index step per card/item, max 5 steps */
}
@keyframes reveal-in { from { opacity: 0; transform: translateY(var(--reveal-distance)); } }
html.js-motion main * { --reveal-i: 0; }
html.js-motion main :nth-child(2) { --reveal-i: 1; }
html.js-motion main :nth-child(3) { --reveal-i: 2; }
html.js-motion main :nth-child(4) { --reveal-i: 3; }
html.js-motion main :nth-child(5) { --reveal-i: 4; }
html.js-motion main :nth-child(n+6) { --reveal-i: 5; }
/* blocks: revealed as a whole */
html.js-motion :where(
  .page-title .container, main .section-head, main .about-block .row > div,
  main .panel, main .article, main .empty-state, main .viewer-toolbar,
  main .doc-aside, main .public-panel-head
):where(:not(form *, .modal *, .carousel *, .tab-pane *, [data-reveal] *, .panel *, .article *)) {
  animation: reveal-in var(--reveal-duration) var(--reveal-ease) backwards;
}
/* repeated items + legacy [data-reveal] blocks: staggered by sibling position
   (grid column wrappers are animated, so card hover transforms stay intact) */
html.js-motion :where(
  .home-hero .row > div, main .quick-link, main .rate-list > div,
  main .row > div:has(> .news-card), main .row > div:has(> .journal-card),
  main .doc-list > li, main .doc-figures > *,
  main [data-reveal]:not([data-reveal="stagger"]), main [data-reveal="stagger"] > *
):where(:not(form *, .modal *, .carousel *, .tab-pane *, .panel *, .article *, [data-reveal]:not([data-reveal="stagger"]) *)) {
  animation: reveal-in var(--reveal-duration) var(--reveal-ease) calc(var(--reveal-i) * var(--reveal-stagger)) backwards;
}
/* below the fold (set by site.js): hidden until scrolled into view, then shown once */
html.js-motion .reveal {
  animation: none; opacity: 0; transform: translateY(var(--reveal-distance));
  transition: opacity var(--reveal-duration) var(--reveal-ease), transform var(--reveal-duration) var(--reveal-ease);
  transition-delay: var(--reveal-delay, 0ms);
}
html.js-motion .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html.js-motion .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  html.js-motion main * { animation: none !important; }
}
@media print {
  html.js-motion .reveal { opacity: 1 !important; transform: none !important; }
  html.js-motion main * { animation: none !important; }
}

/* ------------------------------------------------------------ public document pages (rules / download / fincoop)
   One layout + one component set. Panels share the .home-panel look (see "home" above).
   Grid areas: desktop = side column (nav + help) | main; mobile = nav chips, main, help
   (--viewer: main first, then the recent list). */
.doc-page { background: var(--surface-soft); }
.doc-layout {
  display: grid; gap: 20px; align-items: start;
  grid-template-columns: minmax(0, 1fr); grid-template-areas: "nav" "main" "help";
}
.doc-layout--viewer { grid-template-areas: "main" "nav" "help"; }
.doc-layout > .doc-nav { grid-area: nav; }
.doc-layout > .doc-main { grid-area: main; min-width: 0; }
.doc-layout > .doc-help { grid-area: help; }
@media (min-width: 992px) {
  .doc-layout, .doc-layout--viewer {
    grid-template-columns: 300px minmax(0, 1fr); grid-template-rows: auto 1fr;
    grid-template-areas: "nav main" "help main"; gap: 24px 28px;
  }
}

.public-panel-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px;
  margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--line);
}
.public-panel-head .eyebrow { margin-bottom: 2px; }
.public-panel-title { font-size: clamp(1.2rem, 1.05rem + .6vw, 1.5rem); font-weight: 600; line-height: 1.4; margin: 0; overflow-wrap: anywhere; }

/* category / period navigation */
.doc-nav-title { font-size: 16px; font-weight: 600; margin: 0 0 10px; }
.doc-nav-list { display: flex; flex-direction: column; gap: 2px; }
.doc-nav-link {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 12px;
  border-radius: 10px; color: var(--default-color); line-height: 1.45;
  transition: background-color .2s, color .2s;
}
.doc-nav-link .bi { color: var(--muted); flex-shrink: 0; transition: color .2s; }
.doc-nav-link:hover { background: var(--surface-soft); color: var(--accent); }
.doc-nav-link:hover .bi { color: var(--accent); }
.doc-nav-link.active { background: var(--accent-soft); color: var(--accent); font-weight: 500; }
.doc-nav-link.active .bi { color: var(--accent); }
@media (max-width: 991.98px) {
  /* below lg the category list becomes one row of scrollable chips above the documents */
  .doc-nav--chips { background: none; border: 0; box-shadow: none; padding: 0; }
  .doc-nav--chips .doc-nav-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .doc-nav--chips .doc-nav-list {
    flex-direction: row; gap: 8px; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
    margin-inline: calc(var(--bs-gutter-x, 1.5rem) * -.5); padding: 2px calc(var(--bs-gutter-x, 1.5rem) * .5);
  }
  .doc-nav--chips .doc-nav-list::-webkit-scrollbar { display: none; }
  .doc-nav--chips .doc-nav-link {
    flex: 0 0 auto; white-space: nowrap; border-radius: 999px; padding: 8px 16px;
    background: #fff; border: 1px solid var(--line);
  }
  .doc-nav--chips .doc-nav-link.active { background: var(--accent); border-color: var(--accent); color: #fff; }
  .doc-nav--chips .doc-nav-link.active .bi { color: #fff; }
}

/* document rows: the whole row is the link; .doc-action is its visual button */
.doc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.doc-item {
  display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 10px 12px 10px 10px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--brand); transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.doc-item:hover, .doc-item:focus-visible {
  color: var(--brand); background: #fbfdff; box-shadow: var(--shadow-sm);
  border-color: color-mix(in srgb, var(--accent), transparent 65%);
}
.doc-icon {
  flex: 0 0 44px; height: 44px; border-radius: 10px; font-size: 21px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent);
}
.doc-icon.is-pdf   { background: #fdeceb; color: #c0392b; }
.doc-icon.is-word  { background: #e8f0fe; color: #1a56c4; }
.doc-icon.is-excel, .doc-icon.is-drive { background: #e6f4ea; color: #1e7b3c; }
.doc-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.doc-title { font-weight: 500; line-height: 1.5; overflow-wrap: anywhere; }
.doc-meta { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.doc-action {
  flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 6px 16px; border-radius: 999px; font-size: 14.5px; font-weight: 500;
  color: var(--accent); background: #fff; border: 1px solid color-mix(in srgb, var(--accent), transparent 60%);
  transition: background-color .2s, color .2s, border-color .2s;
}
.doc-item:hover .doc-action, .doc-item:focus-visible .doc-action { background: var(--accent); border-color: var(--accent); color: #fff; }
@media (max-width: 575.98px) {
  .doc-item { gap: 12px; }
  .doc-action { width: 44px; height: 44px; padding: 0; }
  .doc-action span { display: none; }
}

/* download search */
.doc-search { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; scroll-margin-top: 90px; }
.doc-search .input-group { flex: 1 1 320px; min-width: 0; border-radius: 999px; }
.doc-search .input-group-text { background: #fff; color: var(--muted); border-radius: 999px 0 0 999px; padding-left: 16px; }
.doc-search .form-control { min-height: 48px; border-left: 0; }
.doc-search .form-control:focus { box-shadow: none; border-color: var(--bs-border-color); }
.doc-search .input-group:focus-within { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent), transparent 80%); }
.doc-search .btn-brand { border-radius: 0 999px 999px 0; padding-inline: 1.5rem; }
.doc-search-clear { display: inline-flex; align-items: center; gap: 6px; min-height: 48px; }

/* help card */
/* icon sits beside the heading only, so the contact lines get the full card width */
.doc-help { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 2px 12px; align-items: center; }
.doc-help > div { display: contents; }
.doc-help p { grid-column: 1 / -1; }
.doc-help-icon {
  flex: 0 0 44px; height: 44px; border-radius: 50%; font-size: 20px;
  display: inline-flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent);
}
.doc-help h2 { font-size: 16px; font-weight: 600; margin: 0; line-height: 1.45; text-wrap: balance; }
.doc-help p { margin: 0; font-size: 14.5px; color: var(--muted); line-height: 1.6; }
.doc-help h2 + p { margin-top: 10px; }
.doc-help p .bi { margin-right: 4px; }

/* fincoop: period picker + statement images */
.doc-period { display: flex; gap: 8px; }
.doc-period .form-select { min-height: 44px; border-radius: 999px; padding-left: 16px; min-width: 104px; }
.doc-figures { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.doc-figures + .doc-meta { margin-top: 24px; }
.doc-figure { margin: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.doc-figure-media { display: block; padding: 12px; background: var(--surface-soft); flex: 1 1 auto; }
.doc-figure-media img { display: block; width: 100%; height: auto; max-height: 560px; object-fit: contain; margin: 0 auto; background: #fff; box-shadow: var(--shadow-sm); }
.doc-figure figcaption {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px;
  padding: 8px 8px 8px 14px; border-top: 1px solid var(--line); font-weight: 500; color: var(--brand);
}
.doc-figure figcaption a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 10px; font-size: 14.5px; }
