/* ===== Articles pages (listing + post). Built on style.css tokens ===== */
body.artPage { background: var(--bg-color); color: #1f2a26; }

/* --- top bar --- */
.artNav { position: sticky; top: 0; z-index: 60; background: rgba(252,252,251,0.92); backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid rgba(16,94,66,0.08); }
.artNavInner { max-width: 1180px; margin: 0 auto; padding: 0.6rem 2rem; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.artNav .logo img { height: 46px; width: auto; filter: brightness(0); display: block; }
.artNavLinks { display: flex; align-items: center; gap: 1.6rem; font-size: 0.875rem; font-weight: 500; color: var(--primary); }
.artNavLinks a { position: relative; padding: 0.25rem 0; }
.artNavLinks a.current::after { content: ''; position: absolute; left: 0; right: 0; bottom: -0.2rem; height: 2px; background: var(--primary); border-radius: 2px; }
.artNavLinks .btn { padding: 0.5rem 1.25rem; font-size: 0.875rem; }
.artNavRight { display: flex; align-items: center; gap: 1.25rem; }
.artNav .langSwitch { box-shadow: none; border: 1px solid rgba(16,94,66,0.12); }

/* --- hero band --- */
.artHero { position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(rgba(255,255,255,0.06) 1.5px, transparent 1.5px), linear-gradient(135deg, #0d3b2a 0%, var(--primary) 55%, #0b4a33 100%);
  background-size: 24px 24px, 100% 100%; }
.artHero::after { content: ''; position: absolute; right: -8%; top: -40%; width: 55%; height: 180%;
  background: radial-gradient(circle, rgba(110,231,183,0.18) 0%, transparent 60%); pointer-events: none; }
.artHeroInner { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; padding: 3.25rem 2rem 3rem; }
.artEyebrow { display: inline-flex; align-items: center; gap: 0.6rem; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: #6ee7b7; }
.artEyebrow::before { content: ''; width: 24px; height: 1px; background: currentColor; }
.artHero h1 { color: #fff; font-family: var(--font-serif); font-weight: 500; font-size: clamp(2.2rem, 4.2vw, 3.2rem); line-height: 1.1; letter-spacing: -0.01em; margin: 0.6rem 0 0.75rem; }
html[lang="th"] .artHero h1 { font-family: var(--font-sans); font-weight: 600; line-height: 1.3; letter-spacing: 0; }
.artHero p { color: rgba(255,255,255,0.72); max-width: 60ch; font-size: 1rem; line-height: 1.65; }

/* --- toolbar: filters + search --- */
.artToolbar { max-width: 1180px; margin: 0 auto; padding: 1.75rem 2rem 0.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.artFilters { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.artFilter { font-family: var(--font-sans); font-size: 0.82rem; font-weight: 500; color: var(--primary); background: #fff; border: 1px solid rgba(16,94,66,0.14);
  padding: 0.45rem 0.95rem; border-radius: 999px; cursor: pointer; transition: all 0.2s ease; }
.artFilter:hover { border-color: rgba(16,94,66,0.4); }
.artFilter.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.artSearchWrap { position: relative; flex: 0 1 260px; }
.artSearchWrap svg { position: absolute; left: 0.8rem; top: 50%; transform: translateY(-50%); color: #8aa79f; }
.artSearch { width: 100%; font: inherit; font-size: 0.875rem; color: var(--primary); padding: 0.55rem 0.9rem 0.55rem 2.3rem; border-radius: 999px;
  border: 1px solid rgba(16,94,66,0.14); background: #fff; outline: none; transition: border-color 0.2s; }
.artSearch:focus { border-color: var(--secondary); }

/* --- grid + cards --- */
.artGrid { max-width: 1180px; margin: 0 auto; padding: 1.25rem 2rem 4rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem 1.75rem; }
.artCard { display: flex; flex-direction: column; color: inherit; border-radius: 1rem; transition: transform 0.3s ease; }
a.artCard:hover { transform: translateY(-4px); }
a.artCard:hover .artCover { box-shadow: 0 18px 36px rgba(16,94,66,0.18); }
a.artCard:hover .artTitle { color: var(--secondary); }
.artCardBody { padding: 1rem 0.15rem 0; display: flex; flex-direction: column; gap: 0.55rem; }
.artMeta { display: flex; align-items: center; flex-wrap: wrap; gap: 0.6rem; font-size: 0.78rem; color: #7d8f89; font-variant-numeric: lining-nums; }
.artChip { display: inline-block; font-size: 0.72rem; font-weight: 600; color: var(--primary); background: rgba(16,94,66,0.07); padding: 0.2rem 0.6rem; border-radius: 6px; }
.artSoon { font-weight: 600; color: #a16207; background: #fef3c7; padding: 0.2rem 0.55rem; border-radius: 6px; font-size: 0.72rem; }
.artTitle { font-family: var(--font-sans); font-weight: 600; font-size: 1.12rem; line-height: 1.4; letter-spacing: 0; color: #17352a; transition: color 0.2s; }
.artExcerpt { font-size: 0.9rem; line-height: 1.6; color: #5f6f69; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.artCardSoon { opacity: 0.78; }
.artCardSoon .artCover { filter: saturate(0.6); }
.artEmpty { grid-column: 1 / -1; text-align: center; color: #7d8f89; padding: 3rem 0; }

/* featured card spans the whole row */
.artCardFeatured { grid-column: 1 / -1; display: grid; grid-template-columns: 1.15fr 1fr; gap: 2.25rem; align-items: center; }
.artCardFeatured .artCardBody { padding: 0; gap: 0.8rem; }
.artCardFeatured .artTitle { font-size: clamp(1.4rem, 2.2vw, 1.85rem); line-height: 1.3; }
.artCardFeatured .artExcerpt { font-size: 1rem; -webkit-line-clamp: 4; }
.artReadMore { margin-top: 0.4rem; font-weight: 600; font-size: 0.9rem; color: var(--secondary); }

/* --- generated cover art --- */
.artCover { position: relative; aspect-ratio: 16 / 10; border-radius: 1rem; overflow: hidden; background: #edf3ef; transition: box-shadow 0.3s ease;
  box-shadow: 0 6px 18px rgba(16,94,66,0.08); display: block; }
.artCoverPanel { position: absolute; inset: 0 auto 0 0; width: 56%; padding: 1.1rem 1.25rem; display: flex; flex-direction: column; justify-content: space-between;
  background: radial-gradient(rgba(255,255,255,0.07) 1.2px, transparent 1.2px), linear-gradient(150deg, #0d3b2a 0%, var(--primary) 100%);
  background-size: 18px 18px, 100% 100%; clip-path: polygon(0 0, 100% 0, 78% 100%, 0 100%); }
.artCoverBrand { font-size: 0.58rem; font-weight: 600; letter-spacing: 0.22em; color: #6ee7b7; }
.artCoverLabel { font-family: var(--font-serif); font-weight: 500; color: #fff; font-size: clamp(1rem, 1.6vw, 1.3rem); line-height: 1.2; max-width: 85%; padding-bottom: 0.2rem; }
.artCoverArt { position: absolute; inset: 0 0 0 46%; display: flex; align-items: center; justify-content: center; color: var(--primary); }
.artCoverArt::before { content: ''; position: absolute; width: 62%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(110,231,183,0.35), rgba(110,231,183,0) 70%); }
.artCoverArt svg { position: relative; opacity: 0.9; }
.artCoverBig .artCoverLabel { font-size: clamp(1.4rem, 2.6vw, 2rem); }
.artCoverBig .artCoverBrand { font-size: 0.68rem; }

/* ===== single post ===== */
.artPostWrap { max-width: 1180px; margin: 0 auto; padding: 2rem 2rem 1rem; }
.artCrumbs { font-size: 0.8rem; color: #7d8f89; display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.artCrumbs a:hover { color: var(--primary); }
.artPostHead { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: center; margin: 1.25rem 0 2.5rem; }
.artPostHead h1 { font-family: var(--font-sans); font-weight: 600; letter-spacing: -0.005em; color: #17352a; font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.3; margin: 0.75rem 0 0.75rem; }
.artPostHead .artMeta { font-size: 0.85rem; }

.artLayout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 3.5rem; align-items: start; }
.artToc { position: sticky; top: 5.5rem; border: 1px solid rgba(16,94,66,0.14); border-left: 3px solid var(--primary); border-radius: 0.75rem; background: #fff; padding: 1rem 1.1rem; }
.artTocToggle { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; background: none; border: 0; cursor: pointer;
  font: inherit; font-size: 0.85rem; font-weight: 600; color: var(--primary); padding: 0; text-align: left; }
.artTocToggle .artTocIcon { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid currentColor; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.artTocToggle .artTocIcon::before { content: ''; width: 9px; height: 1.5px; background: currentColor; }
.artTocToggle .artTocIcon::after { content: ''; position: absolute; width: 1.5px; height: 9px; background: currentColor; opacity: 0; }
.artTocToggle .artTocIcon { position: relative; }
.artToc.collapsed .artTocIcon::after { opacity: 1; }
.artTocList { list-style: none; margin: 0.85rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.15rem; }
.artToc.collapsed .artTocList { display: none; }
.artTocList a { display: block; font-size: 0.84rem; line-height: 1.45; color: #4b5d57; padding: 0.35rem 0.5rem; border-radius: 6px; transition: all 0.15s; }
.artTocList li.sub a { padding-left: 1.4rem; font-size: 0.8rem; color: #6b7c76; }
.artTocList a:hover { background: rgba(16,94,66,0.06); color: var(--primary); }
.artTocList a.current { background: rgba(16,94,66,0.08); color: var(--primary); font-weight: 600; }

/* article typography */
.artBody { max-width: 720px; font-size: 1.04rem; line-height: 1.85; color: #2b3a35; font-variant-numeric: lining-nums; }
.artBody > * + * { margin-top: 1.1rem; }
.artBody .lead { font-size: 1.15rem; line-height: 1.8; color: #1f2a26; }
.artBody h2 { font-family: var(--font-sans); font-weight: 600; font-size: 1.5rem; line-height: 1.35; letter-spacing: -0.005em; color: #17352a; margin-top: 2.6rem; scroll-margin-top: 6rem; }
.artBody h3 { font-family: var(--font-sans); font-weight: 600; font-size: 1.15rem; line-height: 1.4; letter-spacing: 0; color: #17352a; margin-top: 1.8rem; scroll-margin-top: 6rem; }
.artBody ul, .artBody ol { padding-left: 1.3rem; }
.artBody li + li { margin-top: 0.45rem; }
.artBody li::marker { color: var(--secondary); font-weight: 600; }
.artBody strong { color: #17352a; font-weight: 600; }
.artBody .note { background: #f0f7f3; border: 1px solid rgba(16,94,66,0.14); border-left: 3px solid var(--secondary); border-radius: 0.6rem; padding: 1rem 1.15rem; font-size: 0.97rem; line-height: 1.7; }
.artBody .note > strong:first-child { display: block; margin-bottom: 0.2rem; color: var(--primary); }

.artDisclaimer { max-width: 720px; margin-top: 2.5rem; font-size: 0.8rem; line-height: 1.6; color: #7d8f89; border-top: 1px solid rgba(16,94,66,0.1); padding-top: 1rem; }

/* CTA */
.artCta { max-width: 720px; margin-top: 2rem; border-radius: 1rem; padding: 1.6rem 1.75rem; color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  background: radial-gradient(rgba(255,255,255,0.06) 1.5px, transparent 1.5px), linear-gradient(135deg, #0d3b2a, var(--primary)); background-size: 20px 20px, 100% 100%; }
.artCta h3 { color: #fff; font-family: var(--font-sans); font-weight: 600; font-size: 1.15rem; line-height: 1.35; letter-spacing: 0; margin: 0 0 0.25rem; }
.artCta p { color: rgba(255,255,255,0.72); font-size: 0.9rem; line-height: 1.55; }
.artCta .btn { background: #fff; color: var(--primary); white-space: nowrap; padding: 0.7rem 1.4rem; font-weight: 600; font-size: 0.9rem; flex-shrink: 0; }
.artCta .btn:hover { background: #ecfdf5; }

.artRelatedWrap { max-width: 1180px; margin: 0 auto; padding: 3.5rem 2rem 4rem; }
.artRelatedWrap h2 { font-family: var(--font-serif); font-weight: 500; font-size: 1.9rem; letter-spacing: -0.01em; line-height: 1.2; margin-bottom: 1.5rem; }
html[lang="th"] .artRelatedWrap h2 { font-family: var(--font-sans); font-weight: 600; }
.artRelatedWrap .artGrid { padding: 0; }
.artNotFound { text-align: center; padding: 5rem 1rem; }
.artNotFound h1 { font-size: 2rem; margin-bottom: 1rem; }

/* ===== tablet ===== */
@media (max-width: 1024px) {
  .artGrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .artLayout { grid-template-columns: 220px minmax(0, 1fr); gap: 2.25rem; }
}
@media (max-width: 900px) {
  .artLayout { grid-template-columns: 1fr; gap: 1.5rem; }
  .artToc { position: static; }
  .artPostHead { grid-template-columns: 1fr; gap: 1.5rem; }
  .artPostHead .artCover { order: -1; }
  .artCardFeatured { grid-template-columns: 1fr; gap: 0; }
  .artCardFeatured .artCardBody { padding-top: 1rem; }
}

/* ===== mobile ===== */
@media (max-width: 768px) {
  .artNavInner { padding: 0.55rem 1rem; }
  .artNav .logo img { height: 38px; }
  .artNavLinks { display: none; }
  .artNavRight { gap: 0.75rem; }
  .artNavBack { display: inline-flex !important; }
  .artHeroInner { padding: 2.25rem 1.25rem 2rem; }
  .artHero p { font-size: 0.92rem; }
  .artToolbar { padding: 1.1rem 1.25rem 0.25rem; flex-direction: column; align-items: stretch; gap: 0.75rem; }
  .artFilters { flex-wrap: nowrap; overflow-x: auto; margin: 0 -1.25rem; padding: 0 1.25rem 0.25rem; scrollbar-width: none; }
  .artFilters::-webkit-scrollbar { display: none; }
  .artFilter { white-space: nowrap; flex-shrink: 0; }
  .artSearchWrap { flex: 1 1 auto; }
  .artSearch { font-size: 16px; }
  .artGrid { grid-template-columns: 1fr; padding: 1rem 1.25rem 3rem; gap: 1.75rem; }
  .artTitle { font-size: 1.05rem; }
  .artCardFeatured .artTitle { font-size: 1.3rem; }
  .artCardFeatured .artExcerpt { font-size: 0.92rem; }
  .artPostWrap { padding: 1.25rem 1.25rem 0.5rem; }
  .artPostHead { margin: 1rem 0 1.5rem; }
  .artPostHead h1 { font-size: 1.55rem; }
  .artBody { font-size: 1rem; line-height: 1.8; }
  .artBody .lead { font-size: 1.06rem; }
  .artBody h2 { font-size: 1.3rem; margin-top: 2.1rem; }
  .artBody h3 { font-size: 1.08rem; }
  .artCta { flex-direction: column; align-items: flex-start; padding: 1.35rem 1.25rem; gap: 1rem; }
  .artCta .btn { width: 100%; text-align: center; justify-content: center; }
  .artRelatedWrap { padding: 2.5rem 1.25rem 3rem; }
  .artRelatedWrap h2 { font-size: 1.5rem; }
}
.artNavBack { display: none; align-items: center; gap: 0.35rem; font-size: 0.82rem; font-weight: 500; color: var(--primary); }
.artSearchWrap { display: block; min-width: 0; }
@media (max-width: 768px) { .artSearchWrap { flex: none; width: 100%; } }
@media (max-width: 768px) {
  .artToolbar { display: block; }
  .artFilters { width: auto; max-width: none; min-width: 0; margin-bottom: 0.75rem; }
}

/* Cover photo on the right (replaces the line icon) */
.artCoverPhoto { inset: 0 0 0 38% !important; }
.artCoverPhoto::before { display: none; }
.artCoverPhoto img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s ease; }
.artCoverPhoto::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(13,59,42,0.35) 0%, rgba(13,59,42,0) 35%), linear-gradient(0deg, rgba(13,59,42,0.12), rgba(13,59,42,0)); }
.artCoverPanel { z-index: 2; box-shadow: 8px 0 24px rgba(0,0,0,0.12); }
a.artCard:hover .artCoverPhoto img { transform: scale(1.04); }
/* livelier covers */
.artCardSoon { opacity: 1; }
.artCardSoon .artCover { filter: none; }
.artCoverPhoto::after { background: linear-gradient(90deg, rgba(13,59,42,0.22) 0%, rgba(13,59,42,0) 28%); }
/* bigger logo in the articles top bar */
.artNav .logo img { height: 58px; }
@media (max-width: 768px) { .artNav .logo img { height: 46px; } }

/* ===== In-article visuals ===== */
.artFig { margin: 1.75rem 0 0.5rem; }
.artFig img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 1rem; display: block; box-shadow: 0 14px 34px rgba(16,94,66,0.14); }
.artFig figcaption { font-size: 0.82rem; color: #7d8f89; margin-top: 0.6rem; text-align: center; }

.artIconGrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.85rem; margin-top: 1.1rem; }
.artIconCard { display: flex; gap: 0.85rem; align-items: flex-start; background: #fff; border: 1px solid rgba(16,94,66,0.12); border-radius: 0.9rem; padding: 1rem 1.05rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease; }
.artIconCard:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(16,94,66,0.1); border-color: rgba(16,94,66,0.25); }
.artIconBadge { flex-shrink: 0; width: 42px; height: 42px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
  color: #fff; background: linear-gradient(140deg, var(--secondary), var(--primary)); box-shadow: 0 6px 14px rgba(5,150,105,0.25); }
.artIconCard h4 { font-family: var(--font-sans); font-size: 0.98rem; font-weight: 600; letter-spacing: 0; line-height: 1.35; color: #17352a; margin: 0 0 0.2rem; }
.artIconCard p { font-size: 0.87rem; line-height: 1.55; color: #5f6f69; margin: 0; }

.artCompare { margin-top: 1.1rem; border: 1px solid rgba(16,94,66,0.14); border-radius: 0.9rem; overflow: hidden; background: #fff; font-size: 0.92rem; line-height: 1.5; }
.artCompareRow { display: grid; grid-template-columns: 1.05fr 1.2fr 1.2fr; }
.artCompareRow > span { padding: 0.8rem 1rem; border-top: 1px solid rgba(16,94,66,0.08); }
.artCompareRow > span + span { border-left: 1px solid rgba(16,94,66,0.08); }
.artCompareHead > span { border-top: 0; background: #f0f7f3; font-weight: 600; color: var(--primary); font-size: 0.85rem; }
.artCompareHead > span:nth-child(2) { background: var(--primary); color: #fff; }
.artCompareRow > span:first-child { display: flex; align-items: center; gap: 0.5rem; font-weight: 600; color: #17352a; }
.artCompareRow > span:first-child svg { color: var(--secondary); flex-shrink: 0; }
.artCompareRow:not(.artCompareHead) > span:nth-child(2) { background: rgba(16,94,66,0.035); color: #17352a; }
.artCompareRow > span:nth-child(3) { color: #5f6f69; }

.artFlow { margin-top: 1.25rem; background: #fff; border: 1px solid rgba(16,94,66,0.12); border-radius: 0.9rem; padding: 1rem 1.1rem 1.15rem; }
.artFlowLabel { display: block; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: #7d8f89; margin-bottom: 0.8rem; }
html[lang="th"] .artFlowLabel { letter-spacing: 0.02em; font-size: 0.8rem; }
.artFlow ol { list-style: none; padding: 0; margin: 0; display: flex; align-items: stretch; }
.artFlow li { flex: 1 1 0; position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.5rem; font-size: 0.88rem; line-height: 1.4; font-weight: 500; color: #17352a; margin: 0 !important; padding: 0 0.5rem; }
.artFlow li:not(:last-child)::after { content: ''; position: absolute; top: 22px; left: calc(50% + 30px); right: calc(-50% + 30px); height: 2px;
  background: repeating-linear-gradient(90deg, var(--secondary) 0 6px, transparent 6px 11px); }
.artFlowIcon { width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--primary);
  background: #e7f3ec; border: 1px solid rgba(16,94,66,0.15); position: relative; z-index: 1; }
.artFlow li:last-child .artFlowIcon { background: var(--primary); color: #fff; }

.artBody .artNoteIcon { display: flex; gap: 0.85rem; align-items: flex-start; }
.artNoteBadge { flex-shrink: 0; width: 36px; height: 36px; border-radius: 10px; background: #fff; color: var(--secondary); display: inline-flex; align-items: center; justify-content: center; border: 1px solid rgba(5,150,105,0.25); }
.artBody .artNoteIcon strong { display: block; margin-bottom: 0.2rem; color: var(--primary); }
.artBody .artNoteIcon b { font-weight: 600; color: #17352a; }

.artBody .artSteps { list-style: none; padding: 0; margin-top: 1.1rem; counter-reset: s; display: flex; flex-direction: column; gap: 0.6rem; }
.artSteps li { counter-increment: s; display: flex; align-items: center; gap: 0.9rem; background: #fff; border: 1px solid rgba(16,94,66,0.12); border-radius: 0.8rem; padding: 0.75rem 1rem; margin: 0 !important; position: relative; }
.artSteps li::before { content: counter(s); position: absolute; left: -0.55rem; top: -0.55rem; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--primary); color: #fff;
  font-size: 0.72rem; font-weight: 600; display: flex; align-items: center; justify-content: center; font-variant-numeric: lining-nums; }
.artStepIcon { flex-shrink: 0; width: 38px; height: 38px; border-radius: 10px; background: #e7f3ec; color: var(--primary); display: inline-flex; align-items: center; justify-content: center; }
.artSteps li > div { font-size: 0.97rem; line-height: 1.55; }

@media (max-width: 768px) {
  .artIconGrid { grid-template-columns: 1fr; gap: 0.6rem; }
  .artIconCard { padding: 0.85rem 0.9rem; }
  .artIconBadge { width: 38px; height: 38px; }
  .artCompare { font-size: 0.82rem; }
  .artCompareRow { grid-template-columns: 0.95fr 1.15fr 1.15fr; }
  .artCompareRow > span { padding: 0.65rem 0.6rem; }
  .artCompareRow > span:first-child svg { display: none; }
  .artFlow li { font-size: 0.78rem; padding: 0 0.25rem; }
  .artFlowIcon { width: 40px; height: 40px; }
  .artFlow li:not(:last-child)::after { top: 20px; left: calc(50% + 26px); right: calc(-50% + 26px); }
  .artSteps li > div { font-size: 0.92rem; }
  .artFig img { border-radius: 0.75rem; }
}

/* TOC: stay on screen while scrolling (overflow-x:hidden on html/body breaks sticky) */
html:has(body.artPage), body.artPage { overflow-x: clip; }
@media (min-width: 901px) {
  .artLayout { align-items: start; }
  .artToc { position: sticky; top: 6rem; max-height: calc(100vh - 7.5rem); overflow-y: auto; }
}
/* stronger "currently reading" highlight */
.artTocList a { position: relative; border-left: 3px solid transparent; border-radius: 0 6px 6px 0; }
.artTocList a.current { background: var(--primary); color: #fff; font-weight: 600; border-left-color: #6ee7b7; box-shadow: 0 4px 12px rgba(16,94,66,0.18); }
.artTocList li.sub a.current { color: #fff; }
.artTocList a.read { color: #9fb3ab; }
.artTocList li.sub a.read { color: #9fb3ab; }

/* ===== Graphic set B (used by the foreigners guide) ===== */
/* colour tiles */
.artTiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.7rem; margin-top: 1.1rem; }
.artTile { border-radius: 1rem; padding: 1.1rem 1rem 1.15rem; color: #fff; display: flex; flex-direction: column; gap: 0.35rem;
  background: radial-gradient(rgba(255,255,255,0.07) 1.2px, transparent 1.2px), linear-gradient(160deg, #0d3b2a, var(--primary)); background-size: 16px 16px, 100% 100%; }
.artTile:nth-child(2) { background-color: transparent; background-image: radial-gradient(rgba(255,255,255,0.07) 1.2px, transparent 1.2px), linear-gradient(160deg, #0f5a3f, #059669); }
.artTile:nth-child(3) { background: #e3f1e9; color: #17352a; }
.artTile:nth-child(4) { background: #f3efe3; color: #17352a; }
.artTileIcon { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.14); margin-bottom: 0.35rem; }
.artTile:nth-child(3) .artTileIcon, .artTile:nth-child(4) .artTileIcon { background: #fff; color: var(--primary); }
.artTile h4 { font-family: var(--font-sans); font-size: 0.95rem; font-weight: 600; letter-spacing: 0; line-height: 1.3; color: inherit; margin: 0; }
.artTile p { font-size: 0.8rem; line-height: 1.5; margin: 0; opacity: 0.85; }

/* VS cards */
.artVs { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.2rem; }
.artVsCard { border-radius: 1rem; padding: 1.15rem 1.2rem; background: #fff; border: 1px solid rgba(16,94,66,0.14); }
.artVsMain { background: #f0f7f3; border: 2px solid var(--primary); }
.artVsHead { display: flex; align-items: center; gap: 0.6rem; padding-bottom: 0.75rem; margin-bottom: 0.75rem; border-bottom: 1px dashed rgba(16,94,66,0.2); }
.artVsHead span { width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: #eef2f0; color: #5f6f69; }
.artVsMain .artVsHead span { background: var(--primary); color: #fff; }
.artVsHead h4 { font-family: var(--font-sans); font-size: 1rem; font-weight: 600; letter-spacing: 0; line-height: 1.3; margin: 0; color: #17352a; }
.artVsCard dl { margin: 0; display: grid; gap: 0.6rem; }
.artVsCard dt { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: #8aa79f; }
html[lang="th"] .artVsCard dt { letter-spacing: 0; text-transform: none; font-size: 0.8rem; }
.artVsCard dd { margin: 0.1rem 0 0; font-size: 0.92rem; line-height: 1.5; color: #17352a; }
.artVsCard:not(.artVsMain) dd { color: #5f6f69; }
.artVsBadge { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 44px; height: 44px; border-radius: 50%; background: #fff; border: 2px solid var(--primary);
  color: var(--primary); font-family: var(--font-serif); font-style: italic; font-weight: 600; font-size: 0.95rem; display: flex; align-items: center; justify-content: center; z-index: 1; box-shadow: 0 6px 16px rgba(16,94,66,0.15); }

/* vertical timeline */
.artBody .artTimeline { list-style: none; padding: 0; margin-top: 1.2rem; position: relative; }
.artTimeline::before { content: ''; position: absolute; left: 19px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--secondary), rgba(5,150,105,0.15)); }
.artTimeline li { position: relative; display: flex; gap: 1rem; padding-bottom: 1.1rem; margin: 0 !important; }
.artTimeline li:last-child { padding-bottom: 0; }
.artTlDot { flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%; background: #fff; border: 2px solid var(--secondary); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; position: relative; z-index: 1; }
.artTimeline li:last-child .artTlDot { background: var(--primary); border-color: var(--primary); color: #fff; }
.artTimeline h4 { font-family: var(--font-sans); font-size: 1rem; font-weight: 600; letter-spacing: 0; line-height: 1.35; color: #17352a; margin: 0.45rem 0 0.15rem; }
.artTimeline p { font-size: 0.9rem; line-height: 1.55; color: #5f6f69; margin: 0; }

/* checklist card */
.artChecklist { margin-top: 1.1rem; border-radius: 1rem; background: #fff; border: 1px solid rgba(16,94,66,0.14); overflow: hidden; }
.artChecklist h4 { font-family: var(--font-sans); font-size: 0.82rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: #fff; background: var(--primary); margin: 0; padding: 0.7rem 1.1rem; line-height: 1.3; }
html[lang="th"] .artChecklist h4 { letter-spacing: 0; text-transform: none; font-size: 0.9rem; }
.artChecklist ul { list-style: none; padding: 0.4rem 1.1rem; margin: 0; }
.artChecklist li { display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.7rem 0; margin: 0 !important; border-top: 1px dashed rgba(16,94,66,0.15); font-size: 0.95rem; line-height: 1.55; }
.artChecklist li:first-child { border-top: 0; }
.artChecklist li > span { flex-shrink: 0; width: 22px; height: 22px; border-radius: 6px; margin-top: 0.15rem; background: #e3f1e9; color: var(--primary); display: inline-flex; align-items: center; justify-content: center; }

/* tips box */
.artTipsBox { margin-top: 1.1rem; border-radius: 1rem; padding: 1.2rem 1.3rem 1.3rem; color: #fff;
  background: radial-gradient(rgba(255,255,255,0.06) 1.5px, transparent 1.5px), linear-gradient(135deg, #0d3b2a, var(--primary)); background-size: 20px 20px, 100% 100%; }
.artTipsHead { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.6rem; }
.artTipsHead span { width: 34px; height: 34px; border-radius: 50%; background: #fbbf24; color: #3b2a05; display: inline-flex; align-items: center; justify-content: center; }
.artTipsHead h4 { font-family: var(--font-sans); font-size: 1rem; font-weight: 600; letter-spacing: 0; color: #fff; margin: 0; }
.artBody .artTipsBox ul { list-style: none; padding: 0; margin: 0; }
.artTipsBox li { position: relative; padding-left: 1.4rem; font-size: 0.93rem; line-height: 1.6; color: rgba(255,255,255,0.85); margin: 0.5rem 0 0 !important; }
.artTipsBox li::before { content: '→'; position: absolute; left: 0; color: #6ee7b7; }
.artTipsBox strong { color: #fff; }

@media (max-width: 900px) { .artTiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 768px) {
  .artVs { grid-template-columns: 1fr; gap: 1.6rem; }
  .artVsBadge { width: 38px; height: 38px; font-size: 0.85rem; }
  .artTile { padding: 0.95rem 0.85rem; }
  .artTile p { font-size: 0.78rem; }
}

/* ===== Graphic set C (checklist article) ===== */
.artProgress { position: sticky; top: 5.2rem; z-index: 5; margin-top: 1.5rem; background: rgba(252,252,251,0.95); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(16,94,66,0.14); border-radius: 0.9rem; padding: 0.8rem 1rem; box-shadow: 0 8px 22px rgba(16,94,66,0.08); }
.artProgressTop { display: flex; align-items: center; gap: 0.75rem; }
.artProgressLabel { font-weight: 600; font-size: 0.9rem; color: var(--primary); flex: 1; }
.artProgressCount { font-size: 0.9rem; color: #5f6f69; font-variant-numeric: lining-nums tabular-nums; }
.artProgressCount b { color: var(--primary); font-size: 1.05rem; }
.artProgressReset { font: inherit; font-size: 0.78rem; color: #7d8f89; background: none; border: 1px solid rgba(16,94,66,0.15); border-radius: 999px; padding: 0.2rem 0.7rem; cursor: pointer; }
.artProgressReset:hover { color: var(--primary); border-color: var(--primary); }
.artProgressBar { margin-top: 0.6rem; height: 8px; border-radius: 999px; background: #e5eee9; overflow: hidden; }
.artProgressBar span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--secondary), #34d399); transition: width 0.35s ease; }
.artProgress.complete .artProgressLabel::after { content: ' ✓'; color: var(--secondary); }

.artPhase { margin-top: 1rem; border-radius: 1rem; overflow: hidden; border: 1px solid rgba(16,94,66,0.14); background: #fff; }
.artPhase header { display: flex; align-items: center; gap: 0.85rem; padding: 0.95rem 1.1rem; background: linear-gradient(90deg, #f0f7f3, #fff); border-bottom: 1px solid rgba(16,94,66,0.1); position: relative; }
.artPhaseNum { font-family: var(--font-serif); font-style: italic; font-size: 2.2rem; line-height: 1; color: rgba(16,94,66,0.18); position: absolute; right: 1.1rem; }
.artPhaseIcon { width: 40px; height: 40px; border-radius: 12px; background: var(--primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.artPhase h4 { font-family: var(--font-sans); font-size: 1.02rem; font-weight: 600; letter-spacing: 0; color: #17352a; margin: 0; line-height: 1.3; }
.artPhase header p { font-size: 0.82rem; color: #7d8f89; margin: 0.1rem 0 0; }
.artBody .artCheckList { list-style: none; padding: 0.3rem 0.5rem 0.5rem; margin: 0; }
.artCheckList li { margin: 0 !important; }
.artCheckList label { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.65rem 0.6rem; border-radius: 0.6rem; cursor: pointer; transition: background 0.15s; font-size: 0.96rem; line-height: 1.55; }
.artCheckList label:hover { background: #f5faf7; }
.artCheckBox { position: absolute; opacity: 0; width: 1px; height: 1px; }
.artTick { flex-shrink: 0; width: 22px; height: 22px; margin-top: 0.12rem; border-radius: 6px; border: 2px solid rgba(16,94,66,0.35); color: transparent; display: inline-flex; align-items: center; justify-content: center; transition: all 0.2s ease; }
.artCheckBox:checked + .artTick { background: var(--secondary); border-color: var(--secondary); color: #fff; transform: scale(1.05); }
.artCheckBox:focus-visible + .artTick { outline: 2px solid var(--secondary); outline-offset: 2px; }
.artCheckBox:checked ~ .artCheckText { color: #9fb3ab; text-decoration: line-through; text-decoration-color: rgba(16,94,66,0.35); }
.artCheckBox:checked ~ .artCheckText strong { color: #9fb3ab; }

.artTabs { margin-top: 1rem; border-radius: 1rem; background: #0f3f2d; padding: 0.4rem; }
.artTabBar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.3rem; }
.artTab { font: inherit; font-size: 0.85rem; font-weight: 500; color: rgba(255,255,255,0.7); background: transparent; border: 0; border-radius: 0.7rem; padding: 0.6rem 0.4rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 0.4rem; transition: all 0.2s; }
.artTab:hover { color: #fff; background: rgba(255,255,255,0.06); }
.artTab.active { background: #fff; color: var(--primary); font-weight: 600; }
.artTabPanel { background: #fff; border-radius: 0.75rem; margin-top: 0.4rem; padding: 0.9rem 1.1rem; }
.artBody .artTabPanel ul { list-style: none; padding: 0; margin: 0; }
.artTabPanel li { position: relative; padding: 0.5rem 0 0.5rem 1.6rem; margin: 0 !important; font-size: 0.95rem; line-height: 1.55; border-top: 1px dashed rgba(16,94,66,0.14); }
.artTabPanel li:first-child { border-top: 0; }
.artTabPanel li::before { content: ''; position: absolute; left: 0.2rem; top: 0.95rem; width: 8px; height: 8px; border-radius: 50%; background: var(--secondary); box-shadow: 0 0 0 4px rgba(5,150,105,0.12); }

.artDoDont { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; margin-top: 1rem; }
.artDD { border-radius: 1rem; padding: 1rem 1.1rem; }
.artDo { background: #ecf7f1; border: 1px solid rgba(5,150,105,0.25); }
.artDont { background: #fdf2f1; border: 1px solid rgba(180,35,24,0.18); }
.artDD h4 { display: flex; align-items: center; gap: 0.5rem; font-family: var(--font-sans); font-size: 0.95rem; font-weight: 600; letter-spacing: 0; margin: 0 0 0.5rem; line-height: 1.3; }
.artDD h4 span { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; }
.artDo h4 { color: var(--primary); } .artDo h4 span { background: var(--secondary); }
.artDont h4 { color: #8a1c13; } .artDont h4 span { background: #d14b3f; }
.artBody .artDD ul { padding-left: 1.1rem; margin: 0; }
.artDD li { font-size: 0.92rem; line-height: 1.55; margin-top: 0.35rem !important; }
.artDo li::marker { color: var(--secondary); } .artDont li::marker { color: #d14b3f; }

@media (max-width: 768px) {
  .artProgress { top: 4.4rem; }
  .artTabBar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .artDoDont { grid-template-columns: 1fr; }
  .artPhaseNum { font-size: 1.8rem; }
}
/* tiles: one consistent palette */
.artTile, .artTile:nth-child(2), .artTile:nth-child(3), .artTile:nth-child(4) {
  background: #fff; background-image: none; color: #17352a; border: 1px solid rgba(16,94,66,0.14); border-top: 3px solid var(--primary);
  box-shadow: 0 4px 14px rgba(16,94,66,0.06); transition: transform 0.25s ease, box-shadow 0.25s ease; }
.artTile:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(16,94,66,0.12); }
.artTileIcon, .artTile:nth-child(3) .artTileIcon, .artTile:nth-child(4) .artTileIcon { background: var(--primary); color: #fff; }
.artTile p { color: #5f6f69; opacity: 1; }
