/* Cozy Baby blog — shares the palette and type of the main site (index.html). */
:root {
  --bg: #FDFAF3;
  --panel: #F3F0E4;
  --panel-green: #EEF2E1;
  --line: #E7E0CE;
  --ink: #3E3A31;
  --ink-soft: #5D5A4E;
  --ink-mute: #7A7666;
  --green: #A9BB7C;
  --green-dk: #6F8243;
  --green-deep: #4A5730;
  --forest: #3A4622;
  --clay: #C99679;
  --clay-dk: #B07E5D;
  --line-green: #06C755;
  --warn-bg: #FBF0E8;
  --warn-line: #E8C9B4;
  --radius: 18px;
  --head: 'Anuphan', 'Noto Sans Thai', sans-serif;
  --body: 'Noto Sans Thai', sans-serif;
  --accent: 'Mitr', 'Noto Sans Thai', sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.85; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-dk); }
a:hover { color: var(--clay-dk); }
::selection { background: var(--green); color: #fff; }
:focus-visible { outline: 2px solid var(--green-dk); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--forest); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 12px; }

/* Header */
.site-head { position: sticky; top: 0; z-index: 50; background: rgba(253, 250, 243, 0.94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 68px; }
.logo img { height: 42px; width: auto; }
.nav { display: flex; gap: clamp(16px, 2.4vw, 30px); font-size: 15px; }
.nav a { color: var(--ink-mute); text-decoration: none; padding-bottom: 3px; border-bottom: 1px solid transparent; }
.nav a:hover { color: var(--green-dk); }
.nav a[aria-current="page"] { color: var(--green-dk); border-bottom-color: var(--green); }
.btn-line { display: inline-flex; align-items: center; gap: 8px; background: var(--line-green); color: #fff; text-decoration: none; font-family: var(--accent); font-size: 14.5px; padding: 10px 18px; border-radius: 999px; white-space: nowrap; }
.btn-line:hover { color: #fff; filter: brightness(1.06); }
.ico-line { width: 20px; height: 20px; flex-shrink: 0; }
.btn-lg { font-size: 16px; padding: 14px 24px; }
.mnav { display: none; position: relative; }
.mnav summary { list-style: none; cursor: pointer; width: 46px; height: 46px; border: 1px solid #E0D8C4; border-radius: 14px; display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 0 12px; }
.mnav summary::-webkit-details-marker { display: none; }
.mnav summary span { display: block; height: 1.6px; background: var(--green-deep); border-radius: 2px; }
.mnav-panel { position: absolute; right: 0; top: 56px; width: min(84vw, 320px); background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 18px 40px rgba(62, 74, 41, 0.16); padding: 10px 18px 18px; display: flex; flex-direction: column; }
.mnav-panel a:not(.btn-line) { font-family: var(--head); font-size: 19px; color: var(--green-deep); text-decoration: none; padding: 12px 2px; border-bottom: 1px solid #F0EADB; }
.mnav-panel .btn-line { justify-content: center; margin-top: 14px; }
@media (max-width: 940px) {
  .nav, .head-row > .btn-line { display: none; }
  .mnav { display: block; }
}

/* Footer */
.site-foot { background: var(--forest); color: #E9EEDA; margin-top: clamp(56px, 8vw, 96px); padding-top: clamp(44px, 6vw, 64px); }
.foot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 32px; padding-bottom: 36px; }
.foot-grid a, .foot-grid span { display: block; color: #E9EEDA; text-decoration: none; font-size: 15px; line-height: 2; }
.foot-grid a:hover { color: #fff; text-decoration: underline; }
.foot-grid p { font-size: 14.5px; opacity: 0.8; margin: 14px 0 0; max-width: 300px; }
.foot-logo { height: 44px; width: auto; }
.foot-h { font-size: 12px; letter-spacing: 0.16em; opacity: 0.6; margin-bottom: 10px; }
.foot-base { border-top: 1px solid rgba(233, 238, 218, 0.2); padding: 18px; text-align: center; font-size: 12.5px; opacity: 0.6; }

/* Shared bits */
.kicker { display: inline-block; font-family: var(--accent); font-size: 14px; letter-spacing: 0.04em; color: var(--green-dk); text-decoration: none; margin: 0 0 10px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13.5px; color: var(--ink-mute); padding: 22px 0 0; }
.crumbs a { color: var(--ink-mute); text-decoration: none; }
.crumbs a:hover { color: var(--green-dk); }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: clamp(18px, 2.4vw, 28px); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); }
.card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--ink); transition: transform 0.25s ease, box-shadow 0.25s ease; }
.card:hover { color: var(--ink); transform: translateY(-3px); box-shadow: 0 16px 34px rgba(62, 74, 41, 0.12); }
@media (prefers-reduced-motion: reduce) { .card, .card:hover { transition: none; transform: none; } }
.card-img { display: block; aspect-ratio: 3 / 2; background: var(--panel); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 20px; flex: 1; }
.card-cat { font-family: var(--accent); font-size: 13px; color: var(--green-dk); }
.card-title { font-family: var(--head); font-weight: 600; font-size: 19px; line-height: 1.5; color: var(--ink); }
.card-text { font-size: 15px; line-height: 1.75; color: var(--ink-soft); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { margin-top: auto; padding-top: 6px; font-size: 13px; color: var(--ink-mute); }
.card-lg .card-title { font-size: clamp(20px, 2.2vw, 24px); }

/* Blog index */
.blog-hero { background: var(--panel-green); border-bottom: 1px solid #DCE3C8; padding: clamp(40px, 6vw, 76px) 0 clamp(32px, 4vw, 48px); }
.blog-hero h1 { font-family: var(--head); font-weight: 600; font-size: clamp(28px, 4.4vw, 46px); line-height: 1.35; color: var(--green-deep); margin: 0 0 16px; max-width: 900px; }
.blog-hero .lead { font-size: clamp(16px, 1.6vw, 18px); color: var(--ink-soft); max-width: 720px; margin: 0 0 26px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chips a { display: inline-flex; align-items: center; gap: 8px; border: 1px solid #CBD5AE; background: var(--bg); color: var(--green-deep); text-decoration: none; padding: 9px 16px; border-radius: 999px; font-size: 15px; min-height: 44px; }
.chips a:hover { background: var(--green-dk); border-color: var(--green-dk); color: #fff; }
.chips span { font-size: 12.5px; opacity: 0.7; }
.blog-sec { padding-top: clamp(40px, 5vw, 64px); }
.sec-head { margin-bottom: 22px; }
.sec-head h2 { font-family: var(--head); font-weight: 600; font-size: clamp(22px, 2.8vw, 30px); color: var(--green-deep); margin: 0 0 6px; }
.sec-head p { margin: 0; color: var(--ink-soft); font-size: 15.5px; }
@media (max-width: 700px) { .br-d { display: none; } }

/* Article */
.post-head { max-width: 820px; padding: clamp(18px, 3vw, 30px) 0 clamp(20px, 3vw, 28px); }
.post-head h1 { font-family: var(--head); font-weight: 600; font-size: clamp(27px, 4vw, 42px); line-height: 1.38; color: var(--green-deep); margin: 0 0 14px; }
.dek { font-size: clamp(16.5px, 1.7vw, 19px); color: var(--ink-soft); margin: 0 0 18px; line-height: 1.8; }
.byline { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: var(--ink-mute); }
.hero { margin: 0 0 clamp(28px, 4vw, 44px); border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.hero img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
@media (min-width: 1000px) { .hero img { aspect-ratio: 21 / 9; } }
/* Product covers already sit on the panel colour; show them whole instead of cropping. */
.hero.contain img { object-fit: contain; }
.hero figcaption { font-size: 12px; color: var(--ink-mute); text-align: right; padding: 6px 14px; background: var(--bg); }
.post-grid { display: grid; grid-template-columns: 260px minmax(0, 760px); gap: clamp(32px, 5vw, 72px); justify-content: center; }
.toc { position: sticky; top: 92px; align-self: start; font-size: 14.5px; }
.toc summary { font-family: var(--accent); font-size: 14px; color: var(--green-dk); cursor: pointer; margin-bottom: 8px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.toc li a { display: block; padding: 6px 0 6px 14px; color: var(--ink-soft); text-decoration: none; line-height: 1.6; }
.toc li a:hover { color: var(--green-dk); }
@media (max-width: 1000px) {
  .post-grid { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; background: var(--panel); border-radius: 14px; padding: 14px 18px; }
  .toc details:not([open]) summary { margin-bottom: 0; }
}

/* Prose */
.prose { min-width: 0; }
.prose > * { margin-top: 0; }
.prose p { margin: 0 0 1.15em; }
.prose h2 { font-family: var(--head); font-weight: 600; font-size: clamp(23px, 2.6vw, 29px); line-height: 1.45; color: var(--green-deep); margin: 2.1em 0 0.7em; }
.prose h3 { font-family: var(--head); font-weight: 600; font-size: clamp(19px, 2vw, 22px); line-height: 1.5; color: var(--ink); margin: 1.7em 0 0.55em; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1.2em; }
.prose li { margin-bottom: 0.45em; }
.prose li::marker { color: var(--green-dk); }
.prose strong { font-weight: 600; color: var(--ink); }
.prose a { text-decoration: underline; text-decoration-color: rgba(111, 130, 67, 0.4); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: currentColor; }
.prose blockquote { margin: 1.5em 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--clay); color: var(--ink-soft); }
.prose figure { margin: 1.8em 0; }
.prose figure img { border-radius: 14px; background: var(--panel); }
.prose figure.narrow img { max-width: min(440px, 100%); margin: 0 auto; }
.prose figcaption { font-size: 14px; color: var(--ink-mute); margin-top: 10px; text-align: center; line-height: 1.7; }
.prose figcaption .credit { display: block; font-size: 12px; opacity: 0.85; margin-top: 2px; }
.prose figcaption .credit a { color: inherit; }
.prose sup { font-size: 0.72em; line-height: 0; }
.prose sup a { text-decoration: none; padding: 0 1px; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }

/* Boxes */
.summary { background: var(--panel-green); border: 1px solid #DCE3C8; border-radius: var(--radius); padding: 20px 24px 8px; margin: 0 0 2em; }
.summary-h { font-family: var(--accent); font-size: 15px; color: var(--green-dk); margin-bottom: 8px; }
.summary ul { padding-left: 1.2em; }
.callout { background: var(--panel); border-radius: 14px; padding: 18px 22px 4px; margin: 1.6em 0; border-left: 4px solid var(--green); }
.callout.warn { background: var(--warn-bg); border-left-color: var(--clay); }
.callout-h { font-family: var(--accent); font-size: 15px; color: var(--green-deep); margin-bottom: 6px; }
.callout.warn .callout-h { color: var(--clay-dk); }
.checklist { list-style: none; padding-left: 0 !important; }
.checklist li { position: relative; padding-left: 34px; }
.checklist li::before { content: ''; position: absolute; left: 2px; top: 0.42em; width: 20px; height: 20px; border-radius: 6px; border: 1.6px solid var(--green-dk); background: #fff; }
.checklist li::after { content: ''; position: absolute; left: 9px; top: 0.62em; width: 6px; height: 10px; border: solid var(--green-dk); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.steps { list-style: none; counter-reset: step; padding-left: 0 !important; }
.steps > li { counter-increment: step; position: relative; padding-left: 52px; margin-bottom: 1.1em; }
.steps > li::before { content: counter(step); position: absolute; left: 0; top: 0.1em; width: 36px; height: 36px; border-radius: 999px; background: var(--green-dk); color: #fff; font-family: var(--accent); font-size: 16px; display: flex; align-items: center; justify-content: center; }
.compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; margin: 1.6em 0; }
.compare > div { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px 6px; }
.compare h3 { margin-top: 0 !important; font-size: 19px !important; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 1.6em 0; border: 1px solid var(--line); border-radius: 14px; background: #fff; -webkit-overflow-scrolling: touch; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.65; }
.prose table:has(tr > :nth-child(3)) { min-width: 560px; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid #F0EADB; }
.prose thead th { background: var(--panel); font-family: var(--head); font-weight: 600; color: var(--green-deep); white-space: nowrap; }
.prose tbody tr:last-child td { border-bottom: 0; }
.prose td.num, .prose th.num { text-align: right; font-variant-numeric: tabular-nums; }
.prose caption { caption-side: bottom; font-size: 13.5px; color: var(--ink-mute); padding: 10px 16px; text-align: left; }

/* FAQ */
.faq { margin: 1em 0 1.6em; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; font-family: var(--head); font-weight: 600; font-size: 17.5px; color: var(--ink); padding: 16px 36px 16px 0; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 6px; top: 12px; font-size: 24px; color: var(--green-dk); font-weight: 400; }
.faq details[open] summary::after { content: '–'; }
.faq details > *:not(summary) { margin: 0 0 16px; color: var(--ink-soft); }

/* CTA, sources, related */
.cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 28px; background: var(--panel-green); border: 1px solid #DCE3C8; border-radius: var(--radius); padding: 24px clamp(20px, 3vw, 32px); margin: 2.6em 0; }
.cta > div { flex: 1 1 320px; }
.cta-h { font-family: var(--head); font-weight: 600; font-size: 20px; color: var(--green-deep); margin-bottom: 4px; }
.cta p { margin: 0 !important; font-size: 15.5px; color: var(--ink-soft); }
.sources { margin-top: 2.4em; padding-top: 1.4em; border-top: 1px solid var(--line); font-size: 14.5px; line-height: 1.75; color: var(--ink-soft); }
.sources h2 { font-size: 19px !important; margin: 0 0 0.8em !important; color: var(--ink) !important; }
.sources ol { padding-left: 1.5em; }
.sources li { margin-bottom: 0.7em; overflow-wrap: anywhere; }
.related { margin-top: clamp(48px, 6vw, 72px); }
.related h2 { font-family: var(--head); font-weight: 600; font-size: clamp(22px, 2.6vw, 28px); color: var(--green-deep); margin: 0 0 20px; }
