/* หน้าแรก cvdremission.mshprimary.com (cvd-home.html) · กฎหน้าตา docs/CVD-REMISSION-DESIGN.md (ขาว-แดง Noto Sans Thai โลโก้วงกลม)
   แถบบน + เมนูข้างเป็นของ MSH Organize (shell-navbar.js + cvd-shell.js · styles/cvd-shell.css · ชุดเดียวกับ /dashboard · 17 พ.ย. 2569) */
:root {
  --bg: #ffffff; --fg: #2a1316; --muted: #8a7f81; --line: #ece6e7; --soft: #fff4f5;
  --red: #c8102e; --red-dk: #7a0a1c; --pink: #fde8ea;
  --f-ui: "Noto Sans Thai", system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--msh-navbar-h, 68px) + 12px); }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--f-ui); font-size: 16px; line-height: 1.65; overflow-x: clip; }
h1, h2, h3 { font-family: var(--f-ui); text-wrap: balance; line-height: 1.3; margin: 0; }
p { margin: 0; }
a { color: var(--red); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: #fff; padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; }
.eyebrow { font-size: .72rem; letter-spacing: .06em; color: var(--red); font-weight: 700; }
.logo { border-radius: 50%; flex: none; box-shadow: 0 2px 8px rgba(200, 16, 46, .25); }

/* ---------- ปุ่ม ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px 22px; border-radius: 999px; border: 2px solid var(--red); background: var(--red); color: #fff; font: inherit; font-weight: 700; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--red-dk); border-color: var(--red-dk); }
.btn.ghost { background: #fff; color: var(--red); }
.btn.ghost:hover { background: var(--soft); }

/* แถบบน + เมนูข้างเป็นของ MSH Organize (shell-navbar.js + cvd-shell.js · ชุดเดียวกับ /dashboard · 17 พ.ย. 2569) */
.ic svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- เนื้อหา ---------- */
.main { max-width: 1240px; margin: 0 auto; padding: 0 16px 40px; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 32px 48px; align-items: center; padding: 40px 0 28px; }
.hero-copy { display: grid; gap: 16px; }
.hero h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); color: var(--red-dk); letter-spacing: -.01em; }
.hero h1 .yr { color: var(--red); }
.lead { font-size: 1.06rem; color: #4d3a3d; max-width: 56ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.facts { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 6px 0 0; padding: 14px 0 0; list-style: none; border-top: 1px solid var(--line); }
.facts li { display: grid; line-height: 1.25; }
.facts b { font-size: 1.5rem; color: var(--red); font-variant-numeric: tabular-nums; }
.facts span { color: var(--muted); font-size: .85rem; }

/* ภาพประกอบ · ภาพยังไม่มา = กล่องสีอ่อน + ไอคอน/โลโก้ (cvd-home.js) */
.art { position: relative; margin: 0; overflow: hidden; border-radius: 24px; background: var(--soft); }
.art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.art-hero { aspect-ratio: 4 / 3; box-shadow: 0 18px 40px rgba(200, 16, 46, .12); }
.art-group { aspect-ratio: 1; border-radius: 18px; }
.art-journey { aspect-ratio: 20 / 7; margin-bottom: 18px; }
.art-fallback { position: absolute; inset: 0; display: grid; place-items: center; color: var(--red); background: radial-gradient(circle at 50% 45%, #fff 0, var(--soft) 55%, var(--pink) 100%); }
.art-fallback svg { width: 34%; max-width: 120px; height: auto; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; opacity: .55; }
.art-fallback img { width: 46%; height: auto; border-radius: 50%; box-shadow: 0 8px 26px rgba(200, 16, 46, .22); }

.block { padding: 36px 0 8px; }
.block-head { display: grid; gap: 6px; margin-bottom: 18px; }
.block-head h2 { font-size: clamp(1.35rem, 2.6vw, 1.75rem); }
.block-head p { color: var(--muted); max-width: 72ch; }

/* ปุ่มเมนูในหน้า */
.menu-groups { display: grid; gap: 22px; }
.menu-group h3 { margin-bottom: 10px; color: var(--red); font-size: .8rem; letter-spacing: .06em; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.card { display: grid; grid-template-columns: 50px minmax(0, 1fr) 16px; align-items: center; gap: 14px; min-height: 72px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: #fff; color: var(--fg); text-decoration: none; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.card:hover { border-color: var(--red); box-shadow: 0 8px 22px rgba(200, 16, 46, .1); transform: translateY(-1px); }
.card .ic { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 15px; background: var(--soft); color: var(--red); }
.card .txt { display: grid; gap: 2px; min-width: 0; line-height: 1.35; }
.card b { font-size: 1.02rem; }
/* การ์ดเมนูมีแค่ไอคอน ชื่อ และลูกศร (เจ้าของระบบสั่งเอาคำอธิบายออก 17 พ.ย. 2569 · คำอธิบายยังอยู่ใน cvd-menu.js ให้ช่องค้นหาและเมนูข้าง) */
.card .go { color: #c5b6b8; font-size: 1.5rem; }
@media (prefers-reduced-motion: reduce) { .card { transition: none; } .card:hover { transform: none; } }

/* 4 กลุ่มเสี่ยง · สีประจำกลุ่มชุดเดียวกับหน้าขั้นตอนโครงการ (cvd-guide.css .k-*) */
.groups { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.grp { display: grid; grid-template-rows: auto auto 1fr auto; gap: 8px; padding: 12px 12px 16px; border: 1px solid var(--line); border-radius: 20px; background: #fff; }
.grp h3 { font-size: 1.12rem; margin-top: 4px; }
.grp p { color: #5b4a4d; font-size: .9rem; }
.grp .goal { display: grid; gap: 2px; padding: 8px 12px; border-radius: 12px; border: 1px solid; }
.grp .goal span { font-size: .72rem; font-weight: 700; letter-spacing: .04em; }
.grp .goal b { font-size: 1rem; font-variant-numeric: tabular-nums; }
.k-ht h3, .k-ht .goal { color: #1b5a9e; } .k-ht .goal { background: #eef6ff; border-color: #c5dcf5; } .k-ht .art { background: #eef6ff; } .k-ht .art-fallback { color: #1b5a9e; background: #eef6ff; }
.k-dm h3, .k-dm .goal { color: #8a6100; } .k-dm .goal { background: #fffbea; border-color: #f3e3a6; } .k-dm .art { background: #fffbea; } .k-dm .art-fallback { color: #8a6100; background: #fffbea; }
.k-ob h3, .k-ob .goal { color: #1f6f37; } .k-ob .goal { background: #effaf1; border-color: #c6e8cd; } .k-ob .art { background: #effaf1; } .k-ob .art-fallback { color: #1f6f37; background: #effaf1; }
.k-sm h3, .k-sm .goal { color: var(--red-dk); } .k-sm .goal { background: #fff1f2; border-color: #f3c3ca; } .k-sm .art { background: #fff1f2; } .k-sm .art-fallback { color: var(--red-dk); background: #fff1f2; }

/* ตลอด 11 เดือน */
.timeline { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.timeline::before { content: ""; position: absolute; left: 14px; right: 14px; top: 13px; height: 2px; background: var(--pink); }
.timeline li { position: relative; display: grid; gap: 4px; padding-top: 38px; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 4px; width: 20px; height: 20px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 5px var(--pink); }
.timeline li.opt::before { background: #fff; border: 2px dashed var(--red); box-shadow: none; }
.timeline .when { color: var(--red); font-size: .8rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.timeline b { font-size: 1.05rem; }
.timeline p { color: #5b4a4d; font-size: .88rem; }

/* ตัวชี้วัด */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.kpis li { display: grid; gap: 4px; padding: 16px 18px; border-left: 4px solid var(--red); border-radius: 0 14px 14px 0; background: var(--soft); }
.kpis b { font-size: 1.7rem; color: var(--red); font-variant-numeric: tabular-nums; line-height: 1.2; }
.kpis span { color: #4d3a3d; font-size: .9rem; }
.more { margin-top: 12px; font-weight: 600; }

.foot { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 40px; padding: 22px 16px 30px; border-top: 1px solid var(--line); color: var(--muted); font-size: .84rem; text-align: center; }

/* ---------- จอแคบ ---------- */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; padding-top: 24px; }
  .art-hero { order: -1; }
  .groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .timeline { grid-template-columns: 1fr; gap: 16px; }
  .timeline::before { left: 13px; right: auto; top: 14px; bottom: 14px; width: 2px; height: auto; }
  .timeline li { padding: 0 0 0 40px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .art-journey { aspect-ratio: 16 / 9; }
}
@media (max-width: 560px) {
  .groups { grid-template-columns: 1fr; }
  .grp { grid-template-columns: 96px minmax(0, 1fr); grid-template-rows: auto; align-items: start; column-gap: 14px; }
  .grp .art-group { grid-row: span 3; }
  .grp .goal { grid-column: 1 / -1; }
  .kpis { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
}
