/* ============================================================
   MAXVESTOR — Design System v3 (iOS Premium)
   UI/หัวเรื่อง: SF Pro (Apple system) → Anuphan · แบรนด์: Playfair Display
   ปรับ: type scale ใหญ่ขึ้นตามมาตรฐานอ่านง่าย · กรอบ/เงา/มุมโค้งพรีเมียม
   ============================================================ */

:root {
  --ink: #0e1620;
  --navy: #0a1826;
  --navy-2: #102438;
  --navy-3: #16304a;
  --gold: #b98a2f;
  --gold-2: #d4af5a;
  --gold-3: #e9cf8f;
  --gold-grad: linear-gradient(120deg, #e9cf8f 0%, #d4af5a 38%, #b98a2f 100%);
  --gold-pale: #f5ecd8;
  --paper: #faf8f3;
  --paper-2: #f3eee3;
  --line: #e6dfcf;
  --line-2: #d8cfb8;
  --text: #2f3540;
  --muted: #6b727e;
  --green: #1e6f5c;
  --red: #a63d40;
  /* เงาแบบ iOS — นุ่ม กระจาย หลายชั้น */
  --shadow-sm: 0 1px 2px rgba(14,22,32,.04), 0 3px 10px rgba(14,22,32,.045);
  --shadow-md: 0 2px 6px rgba(14,22,32,.05), 0 12px 30px rgba(14,22,32,.09);
  --shadow-lg: 0 8px 20px rgba(14,22,32,.08), 0 34px 66px rgba(14,22,32,.15);
  --ring: 0 0 0 1px rgba(14,22,32,.05);
  --radius: 16px;
  --radius-sm: 12px;
  --radius-lg: 22px;
  /* ฟอนต์ระบบแบบ iOS — Apple ได้ SF Pro, อื่น ๆ ได้ Anuphan (ไทยคมชัดสม่ำเสมอ) */
  --font-body: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', 'Anuphan', sans-serif;
  --font-head: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', 'Anuphan', sans-serif;
  --font-brand: 'Playfair Display', 'Noto Serif Thai', serif;
  --maxw: 1160px;
  --tracking-tight: -.021em;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.7;
  letter-spacing: -.003em;
  color: var(--text);
  background-color: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--gold-2); color: var(--ink); }

img, svg { max-width: 100%; }
img { border-radius: var(--radius-sm); }
a { color: var(--navy); text-decoration: none; transition: color .18s ease; }
a:hover { color: var(--gold); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.container--narrow { max-width: 760px; }

/* ---------- Typography (iOS scale, ใหญ่ขึ้นเพื่ออ่านง่าย) ---------- */
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--ink); line-height: 1.22; font-weight: 700; letter-spacing: var(--tracking-tight); }
h1 { font-size: clamp(2.3rem, 5.2vw, 4.05rem); line-height: 1.1; letter-spacing: -.028em; }
h2 { font-size: clamp(1.65rem, 3vw, 2.35rem); letter-spacing: -.022em; }
h3 { font-size: 1.3rem; letter-spacing: -.015em; }

.kicker {
  font-family: var(--font-body);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.kicker::before {
  content: "";
  width: 34px; height: 1px;
  background: var(--gold-grad);
  flex: none;
}

.lead { font-size: 1.24rem; color: var(--muted); line-height: 1.75; letter-spacing: -.006em; }

.rule { border: 0; height: 1px; background: var(--line); }
.rule--gold { background: linear-gradient(90deg, var(--gold) 0 64px, var(--line) 64px); height: 2px; }

/* ---------- Header ---------- */
.site-header {
  background: rgba(250,248,243,.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 90;
  transition: box-shadow .25s ease;
}
.site-header::before {
  content: "";
  display: block;
  height: 3px;
  background: var(--gold-grad);
}
.site-header.scrolled { box-shadow: 0 10px 30px rgba(14,22,32,.10); }

.header-top {
  background: var(--navy);
  color: #8fa0b0;
  font-size: .76rem;
  letter-spacing: .02em;
}
.header-top .container {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 8px; padding-bottom: 8px; gap: 16px;
}
.header-top span b { color: var(--gold-2); font-weight: 600; }
@media (max-width: 720px) { .header-top span:first-child { display: none; } .header-top .container { justify-content: center; } }

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 18px; padding-bottom: 18px; gap: 28px;
}

.brand {
  font-family: var(--font-brand);
  font-size: 1.6rem; font-weight: 700; letter-spacing: .06em;
  color: var(--ink);
  display: inline-block;
  line-height: 1.15;
}
.brand::before {
  content: "";
  display: inline-block;
  width: 12px; height: 12px;
  background: var(--gold-grad);
  transform: rotate(45deg);
  box-shadow: 0 0 0 4px rgba(185,138,47,.16);
  margin-right: 15px;
  vertical-align: 2px;
}
.brand em { font-style: normal; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand small {
  display: block; font-family: var(--font-body); font-weight: 600;
  font-size: .58rem; letter-spacing: .42em; color: var(--muted);
  margin-top: 2px; margin-left: 27px;
}

.main-nav { display: flex; gap: 28px; align-items: center; }
.main-nav a {
  font-size: 1rem; font-weight: 500; color: var(--ink);
  padding: 6px 0; position: relative; letter-spacing: -.01em;
}
.main-nav a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 0; bottom: -2px;
  width: 100%; height: 2px; background: var(--gold-grad);
  transform: scaleX(0); transform-origin: left;
  transition: transform .22s ease;
}
.main-nav a:not(.nav-cta):hover::after,
.main-nav a.active:not(.nav-cta)::after { transform: scaleX(1); }
.main-nav a:hover, .main-nav a.active { color: var(--gold); }
.main-nav a.nav-cta {
  background: var(--navy); color: #fff; padding: 11px 24px;
  border-radius: 999px; font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: all .2s ease;
}
.main-nav a.nav-cta:hover { background: var(--gold); color: var(--ink); transform: translateY(-1px); box-shadow: var(--shadow-md); }

.main-nav a.nav-search {
  width: 40px; height: 40px; border: 1px solid var(--line-2); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.05rem; padding: 0; color: var(--ink);
}
.main-nav a.nav-search:hover { border-color: var(--gold); color: var(--gold); }
.main-nav a.nav-search::after { display: none; }
.main-nav a.nav-search .nsl { display: none; }
@media (max-width: 940px) { .main-nav a.nav-search .nsl { display: inline; margin-left: 8px; } }
@media (max-width: 940px) {
  .main-nav a.nav-search {
    width: auto; height: auto; border: none; border-radius: 0;
    display: block; padding: 13px 0; border-bottom: 1px solid var(--line);
    font-size: .95rem;
  }
}

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line-2);
  border-radius: 8px; padding: 9px 14px; cursor: pointer;
  font-size: 1.05rem; color: var(--ink);
}

@media (max-width: 940px) {
  .nav-toggle { display: block; }
  .main-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 10px 28px 22px; box-shadow: var(--shadow-lg);
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 13px 0; border-bottom: 1px solid var(--line); }
  .main-nav a::after { display: none; }
  .main-nav a.nav-cta { margin-top: 14px; text-align: center; }
}

/* ---------- Hero (หน้าแรก) ---------- */
.hero {
  background:
    radial-gradient(1100px 520px at 82% -10%, rgba(185,138,47,.22), transparent 55%),
    radial-gradient(900px 420px at -8% 112%, rgba(185,138,47,.10), transparent 55%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 55%, #0d2033 100%);
  color: #e8edf2;
  position: relative;
  overflow: hidden;
}
.hero-art {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; opacity: .9;
}
.hero .container { position: relative; z-index: 2; }
.hero-grid {
  display: grid; grid-template-columns: 1.12fr .88fr; gap: 64px;
  align-items: center; padding: 96px 0 100px;
}
.hero .kicker { color: var(--gold-2); }
.hero .kicker::before { background: var(--gold-2); }
.hero h1 { color: #fff; text-shadow: 0 2px 30px rgba(0,0,0,.35); }
.hero h1 em {
  font-style: normal;
  background: var(--gold-grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lead { color: #aebbc7; margin: 26px 0 38px; max-width: 33rem; }

.hero-panel {
  background: linear-gradient(165deg, rgba(255,255,255,.085), rgba(255,255,255,.03));
  border: 1px solid rgba(233,207,143,.22);
  border-radius: var(--radius-lg);
  padding: 34px 36px 28px;
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 30px 70px rgba(0,0,0,.38), inset 0 1px 0 rgba(255,255,255,.08);
  position: relative;
}
.hero-panel::before {
  content: "";
  position: absolute; top: 0; left: 28px; right: 28px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(233,207,143,.7), transparent);
}
.hero-panel h3 { color: #fff; font-size: 1.05rem; margin-bottom: 4px; }
.hero-panel > p { color: #8fa0b0; font-size: .86rem; margin-bottom: 14px; }
.hero-spark { margin: 4px 0 10px; display: block; }
.hero-panel ul { list-style: none; }
.hero-panel li { border-top: 1px solid rgba(255,255,255,.08); }
.hero-panel li a {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 13px 2px; color: #dde4ea; font-size: .95rem;
}
.hero-panel li a:hover { color: var(--gold-3); padding-left: 6px; transition: all .2s ease; }
.hero-panel li a::after { content: "→"; color: var(--gold-2); font-weight: 600; }

.hero-stats { display: flex; gap: 44px; margin-top: 46px; flex-wrap: wrap; }
.hero-stats div { position: relative; padding-left: 18px; }
.hero-stats div::before {
  content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 2px;
  background: var(--gold-grad);
}
.hero-stats b {
  display: block; font-family: var(--font-brand); font-size: 1.9rem;
  color: #fff; line-height: 1.2; font-variant-numeric: tabular-nums;
}
.hero-stats b small { font-family: var(--font-head); font-size: 1.05rem; color: var(--gold-3); margin-left: 3px; }
.hero-stats span { font-size: .82rem; color: #8fa0b0; }

@media (max-width: 940px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; padding: 60px 0 64px; }
  .hero-stats { gap: 28px; }
}

/* ---------- ปุ่ม (iOS — โค้งมน กดง่าย) ---------- */
.btn {
  display: inline-block; font-family: var(--font-body); font-weight: 600;
  font-size: 1.01rem; padding: 15px 32px; border-radius: 12px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .2s cubic-bezier(.2,.7,.3,1), box-shadow .2s ease, background .2s ease, color .2s ease;
  letter-spacing: -.005em;
}
.btn:active { transform: scale(.97); }
.btn--gold {
  background: var(--gold-grad); color: #231a08;
  box-shadow: 0 6px 18px rgba(185,138,47,.35);
}
.btn--gold:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(185,138,47,.45); color: #000; }
.btn--ghost { border-color: rgba(233,207,143,.4); color: #f0e6cf; background: rgba(255,255,255,.03); }
.btn--ghost:hover { border-color: var(--gold-2); color: var(--gold-3); background: rgba(233,207,143,.08); }
.btn--navy { background: var(--navy); color: #fff; box-shadow: var(--shadow-sm); }
.btn--navy:hover { background: var(--navy-3); transform: translateY(-2px); box-shadow: var(--shadow-md); color: #fff; }
.btn--line { border-color: var(--line-2); color: var(--ink); background: #fff; }
.btn--line:hover { border-color: var(--gold); color: var(--gold); }
.btn + .btn { margin-left: 14px; }
@media (max-width: 640px) {
  .hero .btn { display: block; text-align: center; margin: 0 0 14px; }
  .hero .btn + .btn { margin-left: 0; }
}

/* ---------- Sections ---------- */
.section { padding: 96px 0; position: relative; }
@media (max-width: 640px) { .section { padding: 62px 0; } }
.section--alt {
  background: linear-gradient(180deg, var(--paper-2), #efe8d8);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section--dark {
  background:
    radial-gradient(900px 400px at 90% 0%, rgba(185,138,47,.14), transparent 55%),
    linear-gradient(160deg, var(--navy), var(--navy-2));
  color: #b9c4cf;
}
.section--dark h2, .section--dark h3 { color: #fff; }
.section--dark .kicker { color: var(--gold-2); }

.section-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 48px; gap: 28px; flex-wrap: wrap;
}
.section-head p { color: var(--muted); max-width: 42rem; margin-top: 10px; }
.section--dark .section-head p { color: #8fa0b0; }
.section-head .more {
  font-weight: 700; font-size: .92rem; white-space: nowrap;
  border-bottom: 2px solid var(--gold-2); padding-bottom: 3px;
}
.section-head .more::after { content: " →"; color: var(--gold); }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 28px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 940px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 30px;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--gold-grad);
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s ease;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-6px); border-color: var(--line-2); }
.card:hover::before { transform: scaleX(1); }
.card h3 { margin: 16px 0 10px; }
.card h3 a { color: var(--ink); }
.card h3 a:hover { color: var(--gold); }
.card p { font-size: .98rem; color: var(--muted); line-height: 1.65; }

.card-tag {
  display: inline-block; font-size: .7rem; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold); border: 1px solid rgba(185,138,47,.35);
  background: var(--gold-pale); border-radius: 999px; padding: 5px 14px;
}

.card-ic {
  width: 52px; height: 52px; margin-bottom: 4px;
  border-radius: 12px;
  background: linear-gradient(150deg, var(--navy), var(--navy-3));
  display: flex; align-items: center; justify-content: center;
  color: var(--gold-2);
  box-shadow: inset 0 0 0 1px rgba(233,207,143,.25), 0 8px 18px rgba(10,24,38,.22);
}
.card-ic svg { width: 26px; height: 26px; stroke: currentColor; fill: none; stroke-width: 1.6; }

.card--tool .tool-ic {
  width: 52px; height: 52px; border-radius: 12px;
  background: linear-gradient(150deg, var(--navy), var(--navy-3));
  color: var(--gold-2);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-size: 1.35rem; font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(233,207,143,.25), 0 8px 18px rgba(10,24,38,.22);
}
.card--tool .tool-ic svg {
  width: 26px; height: 26px; stroke: currentColor; fill: none;
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.card--tool .go { font-size: .88rem; font-weight: 700; color: var(--gold); margin-top: 14px; }
.card--tool .go::after { content: " →"; transition: margin .2s ease; }
.card--tool:hover .go::after { margin-left: 5px; }

.post-card { display: flex; flex-direction: column; }
.post-card .meta {
  font-size: .8rem; color: var(--muted); margin-top: auto; padding-top: 18px;
  border-top: 1px dashed var(--line);
}
.post-card .meta b { color: var(--gold); font-weight: 700; }

/* ---------- แถบตัวเลข (band) ---------- */
.band {
  background: var(--navy);
  border-top: 1px solid rgba(233,207,143,.25);
  border-bottom: 1px solid rgba(233,207,143,.25);
  color: #8fa0b0;
}
.band .container {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 24px; padding-top: 34px; padding-bottom: 34px;
}
.band div { text-align: center; position: relative; }
.band div + div::before {
  content: ""; position: absolute; left: -12px; top: 10%; bottom: 10%; width: 1px;
  background: linear-gradient(180deg, transparent, rgba(233,207,143,.35), transparent);
}
.band b {
  display: block; font-family: var(--font-brand); font-size: 1.75rem; color: #fff;
  font-variant-numeric: tabular-nums;
}
.band b em { font-style: normal; color: var(--gold-2); }
.band span { font-size: .8rem; }
@media (max-width: 800px) {
  .band .container { grid-template-columns: repeat(2, 1fr); }
  .band div:nth-child(3)::before { display: none; }
}

/* ---------- Goal cards (เริ่มจากเป้าหมาย) ---------- */
.goal { display: flex; flex-direction: column; }
.goal .g-num {
  font-family: var(--font-brand); font-size: .82rem; color: var(--gold);
  letter-spacing: .3em; margin-bottom: 10px;
}
.goal h3 { margin-top: 0; }
.goal-links { margin-top: auto; padding-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.goal-links a {
  font-size: .88rem; font-weight: 600; display: flex; align-items: center; gap: 8px;
}
.goal-links a::before {
  content: ""; width: 6px; height: 6px; flex: none;
  background: var(--gold-grad); transform: rotate(45deg);
}
.goal-links a span { color: var(--muted); font-weight: 400; }

/* ---------- Trust ---------- */
.trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 44px; }
.trust article {
  border-top: 2px solid transparent;
  border-image: linear-gradient(90deg, var(--gold-2), transparent 70%) 1;
  border-top-style: solid;
  padding-top: 26px;
}
.trust b { font-family: var(--font-head); font-size: 1.12rem; display: block; margin-bottom: 10px; color: #fff; }
.trust p { font-size: .92rem; color: #8fa0b0; }
.trust .t-num {
  font-family: var(--font-brand); font-size: .85rem; color: var(--gold-2);
  letter-spacing: .3em; display: block; margin-bottom: 12px;
}
@media (max-width: 820px) { .trust { grid-template-columns: 1fr; gap: 30px; } }

/* ---------- Newsletter ---------- */
.newsletter {
  background:
    radial-gradient(700px 300px at 100% 0%, rgba(185,138,47,.18), transparent 60%),
    linear-gradient(155deg, var(--navy), var(--navy-2));
  border: 1px solid rgba(233,207,143,.25);
  border-radius: 18px;
  padding: 56px;
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 44px; align-items: center;
  box-shadow: var(--shadow-lg);
  color: #b9c4cf;
}
.newsletter h2 { color: #fff; }
.newsletter .kicker { color: var(--gold-2); }
.newsletter .lead { color: #8fa0b0 !important; }
.newsletter form { display: flex; gap: 12px; }
.newsletter input[type=email] {
  flex: 1; padding: 14px 18px; border: 1px solid rgba(233,207,143,.3);
  border-radius: 6px; font-family: var(--font-body); font-size: .95rem;
  background: rgba(255,255,255,.06); color: #fff;
}
.newsletter input[type=email]::placeholder { color: #74838f; }
.newsletter input[type=email]:focus { outline: none; border-color: var(--gold-2); background: rgba(255,255,255,.1); }
.newsletter small { color: #74838f; display: block; margin-top: 12px; font-size: .78rem; }
@media (max-width: 820px) { .newsletter { grid-template-columns: 1fr; padding: 34px 28px; } .newsletter form { flex-direction: column; } }

/* ---------- Breadcrumb ---------- */
.crumbs { font-size: .82rem; color: var(--muted); padding: 20px 0 0; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--gold); }
.crumbs span::before { content: "›"; margin: 0 9px; color: var(--line-2); }

/* ---------- Page hero (หน้าหมวด/เครื่องมือ) ---------- */
.page-hero {
  padding: 52px 0 56px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.page-hero::after {
  content: "";
  position: absolute; left: 0; bottom: -1px;
  width: 96px; height: 3px;
  background: var(--gold-grad);
}
.page-hero .lead { margin-top: 16px; max-width: 46rem; }

/* ---------- Article ---------- */
.article-wrap { display: grid; grid-template-columns: minmax(0,1fr) 310px; gap: 60px; padding: 52px 0 84px; }
@media (max-width: 1000px) { .article-wrap { grid-template-columns: 1fr; } }

.article-head { padding: 48px 0 10px; }
.article-head h1 { max-width: 48rem; }
.article-byline {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  margin-top: 26px; font-size: .85rem; color: var(--muted);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 14px 0;
}
.article-byline .avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--gold-grad); color: var(--navy);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-brand); font-weight: 700; font-size: 1.1rem;
  box-shadow: 0 0 0 3px var(--gold-pale);
}
.article-byline b { color: var(--ink); font-weight: 700; }

/* เนื้อหาบทความ — ขนาดใหญ่ขึ้นตามมาตรฐานการอ่าน (~20px) */
.article-body { font-size: 1.135rem; line-height: 1.82; color: #3a4048; }
.article-body h2 {
  margin: 54px 0 20px; padding-top: 16px;
  position: relative; font-size: clamp(1.5rem, 2.6vw, 1.95rem);
}
.article-body h2::before {
  content: ""; position: absolute; top: 0; left: 0;
  width: 48px; height: 3px; border-radius: 3px; background: var(--gold-grad);
}
.article-body h2:first-child { margin-top: 0; }
.article-body h3 { margin: 34px 0 12px; font-size: 1.28rem; }
.article-body p { margin-bottom: 20px; }
.article-body ul, .article-body ol { margin: 0 0 20px 26px; }
.article-body li { margin-bottom: 11px; padding-left: 4px; }
.article-body li::marker { color: var(--gold); font-weight: 700; }
.article-body strong { color: var(--ink); font-weight: 600; }
.article-body a { border-bottom: 1px solid var(--gold-2); }
.article-body img {
  border-radius: var(--radius); box-shadow: var(--shadow-md), var(--ring);
  margin: 30px 0; width: 100%;
}

/* กล่องข้อความ */
.note, .warn, .tip {
  border-radius: var(--radius-sm); padding: 24px 28px; margin: 30px 0; font-size: 1.04rem; line-height: 1.7;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  box-shadow: var(--shadow-sm);
}
.warn { border-left-color: var(--red); }
.tip  { border-left-color: var(--green); }
.note b:first-child, .warn b:first-child, .tip b:first-child {
  display: block; font-family: var(--font-head); margin-bottom: 6px; color: var(--ink); font-size: 1.02rem;
}

/* ตาราง */
.tbl-wrap {
  overflow-x: auto; margin: 30px 0;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm), var(--ring);
}
table.tbl { width: 100%; border-collapse: collapse; font-size: .99rem; background: #fff; }
.tbl th {
  background: linear-gradient(160deg, var(--navy), var(--navy-2)); color: #fff; text-align: left;
  padding: 16px 20px; font-weight: 600; white-space: nowrap; letter-spacing: -.01em;
  border-bottom: 2px solid var(--gold-2);
}
.tbl td { padding: 15px 20px; border-top: 1px solid var(--line); vertical-align: top; line-height: 1.6; }
.tbl tr:nth-child(even) td { background: var(--paper); }
.tbl tr:hover td { background: var(--gold-pale); transition: background .15s ease; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .hl td { background: var(--gold-pale) !important; font-weight: 600; }

/* CTA affiliate */
.offer {
  background: linear-gradient(150deg, #fffdf8, var(--gold-pale));
  border: 1px solid rgba(185,138,47,.4);
  border-radius: var(--radius);
  padding: 28px 32px; margin: 32px 0;
  display: flex; justify-content: space-between; align-items: center; gap: 26px; flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
}
.offer::before {
  content: ""; position: absolute; top: 0; left: 0; bottom: 0; width: 4px;
  background: var(--gold-grad);
}
.offer b { font-family: var(--font-head); font-size: 1.16rem; display: block; color: var(--ink); letter-spacing: -.015em; }
.offer p { font-size: .96rem; color: var(--muted); margin: 5px 0 0; line-height: 1.6; }
.offer .btn { white-space: nowrap; }

.disclosure {
  font-size: .8rem; color: var(--muted); background: var(--paper-2);
  border: 1px dashed var(--line-2); border-radius: 8px; padding: 13px 20px; margin: 22px 0 8px;
}

/* Sidebar */
.sidebar > div {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; margin-bottom: 28px; box-shadow: var(--shadow-sm);
  position: relative; overflow: hidden;
}
.sidebar > div::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--gold-grad);
}
.sidebar h4 {
  font-size: .74rem; letter-spacing: .26em; text-transform: uppercase;
  color: var(--gold); font-family: var(--font-body); margin-bottom: 16px; font-weight: 700;
}
.sidebar ul { list-style: none; }
.sidebar li { border-top: 1px solid var(--line); }
.sidebar li:first-child { border-top: 0; }
.sidebar li a { display: block; padding: 12px 0; font-size: .92rem; color: var(--ink); font-weight: 500; }
.sidebar li a:hover { color: var(--gold); padding-left: 5px; transition: all .18s ease; }

/* TOC */
.toc {
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 24px 30px; margin: 30px 0;
  border-left: 4px solid var(--gold);
}
.toc b { font-family: var(--font-head); display: block; margin-bottom: 10px; font-size: 1.05rem; letter-spacing: -.01em; }
.toc ol { margin: 0 0 0 22px; font-size: 1rem; line-height: 1.9; }
.toc li::marker { color: var(--gold); font-weight: 700; }
.toc a { color: var(--text); }
.toc a:hover { color: var(--gold); }

/* กรอบพรีเมียมชั้นเดียว (ring) บนบล็อกยกระดับ */
.calc, .newsletter, .mx-viz, .sidebar > div, .offer, .note, .warn, .tip, .card, .hero-panel { box-shadow: var(--shadow-sm), var(--ring); }
.card:hover { box-shadow: var(--shadow-md), var(--ring); }
.calc { box-shadow: var(--shadow-md), var(--ring); }

/* ---------- เครื่องคำนวณ ---------- */
.calc {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 44px; margin: 38px 0;
  position: relative; overflow: hidden;
}
.calc::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--gold-grad);
}
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 30px; }
@media (max-width: 720px) { .calc-grid { grid-template-columns: 1fr; } .calc { padding: 28px 22px; } }

.field label { display: block; font-size: .92rem; font-weight: 600; color: var(--ink); margin-bottom: 9px; }
.field label small { color: var(--muted); font-weight: 400; }
.field input, .field select {
  width: 100%; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: 11px;
  font-family: var(--font-body); font-size: 1.05rem; background: var(--paper);
  font-variant-numeric: tabular-nums;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.field input:focus, .field select:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(212,175,90,.18);
}
.field .unit { font-size: .78rem; color: var(--muted); margin-top: 6px; display: block; }

.calc-actions { margin-top: 30px; display: flex; gap: 14px; flex-wrap: wrap; }

.result { margin-top: 34px; border-top: 2px solid var(--gold-2); padding-top: 28px; display: none; }
.result.show { display: block; animation: rise .5s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.result-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 720px) { .result-cards { grid-template-columns: 1fr; } }
.result-cards > div {
  background: linear-gradient(165deg, var(--paper), #fff);
  border: 1px solid var(--line); border-radius: 12px;
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  border-top: 3px solid var(--gold-2);
}
.result-cards span { font-size: .8rem; color: var(--muted); display: block; margin-bottom: 2px; }
.result-cards b {
  font-family: var(--font-brand); font-size: 1.55rem; color: var(--navy);
  font-variant-numeric: tabular-nums; line-height: 1.3;
}
.result-cards .pos { border-top-color: var(--green); }
.result-cards .pos b { color: var(--green); }
.result-cards .neg { border-top-color: var(--red); }
.result-cards .neg b { color: var(--red); }
.result-note { font-size: .8rem; color: var(--muted); margin-top: 18px; }

/* ---------- รายการบทความหน้าหมวด ---------- */
.post-list { list-style: none; }
.post-list li { border-bottom: 1px solid var(--line); }
.post-list a { display: block; padding: 26px 14px; margin: 0 -14px; border-radius: 10px; transition: background .2s ease; }
.post-list a:hover { background: #fff; box-shadow: var(--shadow-sm); }
.post-list h3 { transition: color .15s; }
.post-list a:hover h3 { color: var(--gold); }
.post-list p { font-size: .93rem; color: var(--muted); margin-top: 7px; }
.post-list .meta { font-size: .78rem; color: var(--muted); margin-top: 10px; }
.post-list .meta b { color: var(--gold); font-weight: 700; }

/* ---------- Footer ---------- */
.site-footer {
  background: linear-gradient(180deg, var(--navy), #071220);
  color: #8fa0b0; font-size: .9rem; margin-top: 72px;
  border-top: 3px solid;
  border-image: var(--gold-grad) 1;
}
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 48px;
  padding: 64px 0 44px;
}
@media (max-width: 880px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 580px) { .footer-grid { grid-template-columns: 1fr; } }

.site-footer .brand { color: #fff; }
.site-footer .brand small { color: #74838f; }
.site-footer h5 {
  color: var(--gold-2); font-family: var(--font-body); font-size: .74rem;
  letter-spacing: .26em; text-transform: uppercase; margin-bottom: 18px; font-weight: 700;
}
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 11px; }
.site-footer a { color: #8fa0b0; }
.site-footer a:hover { color: var(--gold-3); }
.footer-note {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 24px 0 34px; font-size: .76rem; line-height: 1.8; color: #5d6b78;
}

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
.reveal:nth-child(2) { transition-delay: .08s; }
.reveal:nth-child(3) { transition-delay: .16s; }
.reveal:nth-child(4) { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- แถบความคืบหน้าการอ่าน ---------- */
.mx-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: var(--gold-grad); z-index: 200;
  transition: width .1s linear;
}

/* ---------- แถวปุ่มแชร์ ---------- */
.share-row {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 0; border-bottom: 1px solid var(--line);
  font-size: .82rem; color: var(--muted);
}
.share-row span { margin-right: 4px; }
.share-row a, .share-row button {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line-2); background: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--navy); transition: all .18s ease; padding: 0;
}
.share-row a:hover, .share-row button:hover {
  border-color: var(--gold); color: var(--gold); transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.share-row svg { width: 17px; height: 17px; fill: currentColor; }
.share-row button svg { fill: none; }

/* ---------- Toast ---------- */
.mx-toast {
  position: fixed; bottom: 28px; left: 50%; transform: translate(-50%, 16px);
  background: var(--navy); color: #fff; font-size: .9rem; font-weight: 600;
  padding: 12px 26px; border-radius: 30px; box-shadow: var(--shadow-lg);
  border: 1px solid rgba(233,207,143,.4);
  opacity: 0; pointer-events: none; transition: all .25s ease; z-index: 300;
}
.mx-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- ปุ่มกลับขึ้นบน ---------- */
.to-top {
  position: fixed; right: 24px; bottom: 24px; width: 46px; height: 46px;
  border-radius: 50%; border: 1px solid rgba(233,207,143,.4);
  background: var(--navy); color: var(--gold-2); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md); z-index: 150;
  opacity: 0; pointer-events: none; transform: translateY(10px);
  transition: all .25s ease;
}
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }
.to-top:hover { background: var(--gold); color: var(--ink); }
.to-top svg { width: 20px; height: 20px; }

/* ---------- MX Charts ---------- */
.mx-viz {
  background: linear-gradient(165deg, var(--paper), #fff);
  border: 1px solid var(--line); border-radius: 12px;
  padding: 24px 26px; margin-top: 22px;
  box-shadow: var(--shadow-sm);
}
.mx-viz h4 {
  font-family: var(--font-body); font-size: .74rem; font-weight: 700;
  letter-spacing: .24em; text-transform: uppercase; color: var(--gold);
  margin-bottom: 16px;
}
.mx-donut-wrap { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.mx-donut { width: 150px; height: 150px; flex: none; }
.mx-donut circle { transition: stroke-dasharray .6s ease; }
.mx-dt { font-family: var(--font-brand); font-size: 19px; font-weight: 700; fill: var(--ink); }
.mx-db { font-size: 10.5px; fill: var(--muted); }
.mx-legend { display: flex; flex-direction: column; gap: 10px; min-width: 200px; flex: 1; }
.mx-legend > div { display: flex; align-items: center; gap: 10px; font-size: .88rem; }
.mx-legend i { width: 11px; height: 11px; border-radius: 3px; flex: none; }
.mx-legend b { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--ink); }
.mx-legend--row { flex-direction: row; flex-wrap: wrap; gap: 8px 26px; margin-top: 14px; }
.mx-legend--row > div { flex: none; }
.mx-legend--row b { margin-left: 8px; }
.mx-line { width: 100%; height: auto; display: block; }
.mx-axis { display: flex; justify-content: space-between; font-size: .76rem; color: var(--muted); margin-top: 6px; }

.mx-bars { display: flex; flex-direction: column; gap: 14px; }
.mx-bar { display: grid; grid-template-columns: 150px 1fr auto; gap: 14px; align-items: center; font-size: .88rem; }
@media (max-width: 620px) { .mx-bar { grid-template-columns: 1fr; gap: 4px; } }
.mx-bar-label { color: var(--text); }
.mx-bar.hl .mx-bar-label { font-weight: 700; color: var(--ink); }
.mx-bar-track { display: block; height: 14px; border-radius: 7px; background: var(--paper-2); overflow: hidden; }
.mx-bar-fill { display: block; height: 100%; border-radius: 7px; transition: width .7s ease; }
.mx-bar.hl .mx-bar-fill { background: var(--gold-grad) !important; }
.mx-bar b { font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }

/* ---------- วิดเจ็ตออมในบ้าน hero ---------- */
.hero-widget label { display: flex; justify-content: space-between; font-size: .85rem; color: #aebbc7; margin: 14px 0 8px; }
.hero-widget label b { color: var(--gold-3); font-variant-numeric: tabular-nums; }
.hero-widget input[type=range] {
  width: 100%; appearance: none; -webkit-appearance: none; height: 4px; border-radius: 2px;
  background: linear-gradient(90deg, var(--gold-2) var(--fill,30%), rgba(255,255,255,.15) var(--fill,30%));
  outline: none;
}
.hero-widget input[type=range]::-webkit-slider-thumb {
  appearance: none; -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%;
  background: var(--gold-grad); border: 2px solid #fff; cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,.4);
}
.hero-widget .hw-result {
  margin: 16px 0 4px; padding: 14px 18px; border-radius: 10px;
  background: rgba(233,207,143,.09); border: 1px solid rgba(233,207,143,.25);
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
}
.hero-widget .hw-result span { font-size: .8rem; color: #8fa0b0; }
.hero-widget .hw-result b {
  font-family: var(--font-brand); font-size: 1.6rem; color: var(--gold-3);
  font-variant-numeric: tabular-nums;
}
.hero-widget small { display: block; font-size: .72rem; color: #74838f; margin-top: 8px; }

/* ---------- Utilities ---------- */
.mt-0 { margin-top: 0; } .mb-24 { margin-bottom: 24px; }
.center { text-align: center; }
.gold { color: var(--gold); }
