/* RAM CMS · Premium Editorial v1.14
   Full article content, no folding/truncation. Deliberately does not set
   width, height, aspect-ratio, object-fit or source attributes on images.
   This file loads after v1.8 to correct isolated half-width article cards.
*/
body main section#บทความ {
  --rce-forest: #123b27;
  --rce-ink: #1b3325;
  --rce-muted: #577060;
  --rce-border: #dce9df;
  padding-block: clamp(24px, 2.7vw, 39px) !important;
  background: linear-gradient(180deg, #f1f7f2 0%, #eaf3ed 100%);
}
body main section#บทความ > .container > .section-head {
  gap: 4px;
  padding-bottom: 14px;
  margin-bottom: 0;
  text-align: left;
}
body main section#บทความ > .container > .section-head h2 {
  color: #173a26;
  font-size: clamp(23px, 2.1vw, 30px) !important;
  line-height: 1.32;
  letter-spacing: -.022em;
}
body main section#บทความ > .container > .section-head p {
  color: #597665;
  font-size: 13px;
  line-height: 1.5;
}
/* Compact full-rail section navigation, without oversized empty panels. */
body main section#บทความ .rc-article-toc {
  grid-template-columns: minmax(156px, .2fr) minmax(0, 1fr);
  margin: 0 0 13px;
  border: 1px solid #1f5636;
  border-radius: 12px;
  background: linear-gradient(120deg, #103722, #0a281a);
  box-shadow: 0 7px 21px rgba(13,64,37,.07);
}
body main section#บทความ .rc-article-toc__label {
  gap: 4px;
  padding: 12px 15px;
}
body main section#บทความ .rc-article-toc__label strong { font-size: 15px; }
body main section#บทความ .rc-article-toc__label small { font-size: 10px; }
body main section#บทความ .rc-article-toc ol { gap: 5px; padding: 9px; }
body main section#บทความ .rc-article-toc a {
  min-width: 0;
  min-height: 34px;
  padding: 7px 9px;
  border-radius: 7px;
  color: #ecf6ed;
  font-size: 11.5px;
  line-height: 1.35;
}
body main section#บทความ .rc-article-toc__number {
  color: #c0f79e;
  font-size: 10px;
}
/* Each unpaired card and every illustration occupies the whole content rail.
   Only confirmed adjacent text-only pairs may occupy half a row. */
body main section#บทความ .article-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) !important;
  align-items: start;
  gap: 10px !important;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
}
body main section#บทความ .article-shell > * { min-width: 0; grid-column: 1 / -1; }
body main section#บทความ .article-shell > .article-card {
  box-sizing: border-box;
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 0;
  margin: 0;
  padding: clamp(14px, 1.45vw, 20px) clamp(15px, 1.65vw, 23px);
  border: 1px solid var(--rce-border);
  border-left: 3px solid #74bb87;
  border-radius: 13px;
  background: #fff;
  color: #2a4032;
  box-shadow: 0 4px 14px rgba(16, 64, 39, .045);
  content-visibility: visible !important;
  contain-intrinsic-size: none !important;
  scroll-margin-top: 88px;
}
body main section#บทความ .article-shell > .article-card:first-child {
  border: 1px solid rgba(143,217,161,.25);
  border-left: 3px solid #a8ef8a;
  background: linear-gradient(110deg, #143e2a 0%, #0d2f20 100%);
  color: #e3f0e6;
  box-shadow: 0 9px 26px rgba(10,54,27,.12);
}
body main section#บทความ .article-shell .article-card h2 {
  margin: 0 0 9px;
  padding: 0 0 7px;
  border-bottom: 1px solid #e5eee6;
  color: var(--rce-ink);
  font-size: clamp(17px, 1.5vw, 20px) !important;
  font-weight: 900;
  line-height: 1.39;
}
body main section#บทความ .article-shell .article-card h3 {
  margin: 13px 0 6px;
  color: #245435;
  font-size: clamp(14px, 1.1vw, 16px) !important;
  line-height: 1.42;
}
body main section#บทความ .article-shell .article-card h4 { margin: 10px 0 5px; }
body main section#บทความ .article-shell > .article-card:first-child h2 {
  border-bottom-color: rgba(220,255,215,.16);
  color: #fff;
}
body main section#บทความ .article-shell .article-card :is(p,li,dt,dd,blockquote) {
  max-width: 100%;
  font-size: clamp(13px, 1vw, 14px);
  line-height: 1.61;
  overflow-wrap: break-word;
}
body main section#บทความ .article-shell .article-card p { margin: 0 0 8px; }
body main section#บทความ .article-shell .article-card :is(ul,ol) {
  margin: 4px 0 9px;
  padding-left: 22px;
}
body main section#บทความ .article-shell .article-card li + li { margin-top: 2px; }
body main section#บทความ .article-shell .article-card > :last-child { margin-bottom: 0 !important; }
body main section#บทความ .article-shell .article-card .note-box,
body main section#บทความ .article-shell .article-card blockquote {
  margin: 8px 0;
  padding: 10px 13px;
  border-radius: 8px;
  background: #f2faf4;
}
body main section#บทความ .article-shell .article-card :is(th,td) {
  padding: 8px 10px;
  font-size: 12.5px;
  line-height: 1.46;
}
body main section#บทความ .article-shell .article-card :is(.table-scroll,.compare-wrap) {
  margin-block: 8px;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}
/* Contextual keyword links stay part of a normal paragraph. */
body main section#บทความ .article-shell .article-card p.rc-article-keywords {
  margin-top: 10px;
  padding-top: 8px;
  font-size: 13px;
  line-height: 1.55;
}
/* An editorial conclusion should never appear as an isolated half-width box.
   Balance text into two columns inside its full-width card, not the card itself. */
body main section#บทความ .article-shell > .article-card.rc-article-summary {
  grid-column: 1 / -1 !important;
  columns: 2;
  column-gap: clamp(23px, 3vw, 36px);
  column-rule: 1px solid #e0ece3;
  border-left-color: #249958;
  background: linear-gradient(112deg, #fff, #f5faf6);
  box-shadow: 0 8px 24px rgba(21,81,45,.065);
}
body main section#บทความ .article-shell > .article-card.rc-article-summary > h2 {
  column-span: all;
  margin-bottom: 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid #d8e8dc;
  color: #175c35;
}
body main section#บทความ .article-shell > .article-card.rc-article-summary > :not(h2) {
  break-inside: avoid-column;
}
/* Two short cards share a row only when the PHP renderer guarantees adjacency. */
@media (min-width: 1080px) {
  body main section#บทความ .article-shell {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    column-gap: 12px !important;
    row-gap: 10px !important;
  }
  body main section#บทความ .article-shell > * { grid-column: 1 / -1; }
  body main section#บทความ .article-shell > .article-card.rc-article-pair {
    grid-column: span 1;
    align-self: stretch;
  }
  body main section#บทความ .article-shell > .article-card.rc-article-summary { grid-column: 1 / -1; }
}
@media (max-width: 1079px) {
  body main section#บทความ .rc-article-toc { grid-template-columns: minmax(0, 1fr); }
  body main section#บทความ .rc-article-toc__label {
    border-right: 0;
    border-bottom: 1px solid rgba(186,247,194,.13);
  }
  body main section#บทความ .article-shell { grid-template-columns: minmax(0,1fr) !important; }
  body main section#บทความ .article-shell > .article-card.rc-article-pair { grid-column: 1/-1; }
}
@media (max-width: 760px) {
  body main section#บทความ { padding-block: 25px 30px !important; }
  body main section#บทความ .rc-article-toc { margin-bottom: 9px; }
  body main section#บทความ .rc-article-toc__label { padding: 10px 12px; }
  body main section#บทความ .rc-article-toc ol { gap: 5px; padding: 7px; }
  body main section#บทความ .rc-article-toc a { font-size: 11px; min-height: 36px; }
  body main section#บทความ .article-shell { gap: 9px !important; }
  body main section#บทความ .article-shell > .article-card {
    padding: 13px 14px 14px;
    border-radius: 10px;
  }
  body main section#บทความ .article-shell .article-card h2 { font-size: 17px !important; }
  body main section#บทความ .article-shell .article-card h3 { font-size: 14px !important; }
  body main section#บทความ .article-shell .article-card :is(p,li,dt,dd,blockquote) {
    font-size: 13px;
    line-height: 1.61;
  }
  body main section#บทความ .article-shell > .article-card.rc-article-summary {
    columns: 1;
    column-rule: none;
  }
}
@media (max-width: 360px) {
  body main section#บทความ .article-shell > .article-card { padding-inline: 12px; }
  body main section#บทความ .rc-article-toc ol { grid-template-columns: 1fr; }
}
/* The one standalone /บทความ.html page has a different HTML structure. */
body.rc-standalone-article { line-height: 1.6; }
body.rc-standalone-article > h1 { margin-block: 14px 10px; }
body.rc-standalone-article > :is(h2,h3,h4) { margin-top: 13px; margin-bottom: 6px; }
body.rc-standalone-article > p { margin-top: 0; margin-bottom: 8px; }
body.rc-standalone-article > :is(ul,ol) { padding-block: 9px; }
/* Respect reduced motion without hiding content or changing image dimensions. */
@media (prefers-reduced-motion: reduce) {
  body main section#บทความ .rc-article-toc a { transition: none; }
}
