/* Shared styles for /knowledge/ article pages (same look as furnamic.com). */
:root {
  --ink: #141210;
  --cream: #f6f3ed;
  --paper: #ffffff;
  --gold: #c9a227;
  --gold-dark: #b08d1f;
  --taupe: #b9a896;
  --muted: #6b6560;
  --line: rgba(185, 168, 150, 0.4);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: 'Anuphan', 'Inter', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; display: block; }

/* Header */
header.site {
  position: sticky; top: 0; z-index: 20;
  background: rgba(246, 243, 237, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.bar { max-width: 1280px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.bar img { height: 22px; }
.nav { display: none; gap: 28px; font-size: 15px; }
.nav a { text-decoration: none; color: var(--ink); }
.nav a:hover, .nav a.active { color: var(--gold-dark); }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--gold); color: var(--ink); text-decoration: none;
  font-weight: 500; font-size: 14px; padding: 10px 18px; border-radius: 2px;
  transition: background .2s;
}
.btn:hover { background: var(--gold-dark); }
@media (min-width: 1100px) { .nav { display: flex; } .menu { display: none; } }
/* Mobile / tablet menu (no JS: <details>) */
.bar .btn, .bar .nav { margin-left: auto; }
.bar .btn { white-space: nowrap; }
@media (max-width: 480px) { .bar { padding: 12px 16px; gap: 10px; } .bar img { height: 18px; } .bar .btn { padding: 9px 14px; } }
.menu > summary { list-style: none; cursor: pointer; width: 40px; height: 40px; display: grid; place-content: center; gap: 5px; }
.menu > summary::-webkit-details-marker { display: none; }
.menu, .menu:first-of-type { border: 0; }
.menu > summary { padding: 0; }
.menu > summary::after { content: none; }
.menu > summary span { display: block; width: 22px; height: 1.5px; background: var(--ink); transition: transform .2s, opacity .2s; }
.menu[open] > summary span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.menu[open] > summary span:nth-child(2) { opacity: 0; }
.menu[open] > summary span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
.menu > summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.menu-panel { position: absolute; left: 0; right: 0; top: 100%; background: var(--cream); border-bottom: 1px solid var(--line); display: grid; padding: 8px 24px 16px; box-shadow: 0 12px 24px rgba(20,18,16,.08); }
.menu-panel a { padding: 12px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: 16px; }
.menu-panel a:last-child { border-bottom: 0; }
.menu-panel a.active { color: var(--gold-dark); }
@media (prefers-reduced-motion: reduce) { .menu > summary span { transition: none; } }

/* Hero */
.hero { max-width: 1280px; margin: 0 auto; padding: 48px 24px 32px; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 24px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--gold-dark); }
.eyebrow { display: flex; align-items: center; gap: 12px; color: var(--taupe); font-size: 15px; font-weight: 500; margin-bottom: 16px; }
.eyebrow::before { content: ''; width: 32px; height: 1px; background: var(--gold); }
h1 {
  font-family: 'Noto Serif Thai', 'Cormorant Garamond', serif;
  font-weight: 400; font-size: clamp(30px, 4.6vw, 52px); line-height: 1.3;
  margin: 0 0 20px; max-width: 980px;
}
.meta { display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 14px; color: var(--muted); }
.cover { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.cover img { width: 100%; aspect-ratio: 21/9; object-fit: cover; border-radius: 2px; }

/* Layout */
.layout { max-width: 1280px; margin: 0 auto; padding: 48px 24px 80px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; }
@media (min-width: 1024px) { .layout { grid-template-columns: 240px minmax(0, 1fr); gap: 72px; } }
aside.toc { display: none; }
@media (min-width: 1024px) {
  aside.toc { display: block; position: sticky; top: 96px; align-self: start; font-size: 14px; }
}
.toc h4 { font-size: 13px; color: var(--muted); font-weight: 500; margin: 0 0 12px; }
.toc ol { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 1px solid var(--line); }
.toc li { margin: 0 0 10px; }
.toc a { text-decoration: none; color: var(--muted); line-height: 1.5; display: block; }
.toc a:hover { color: var(--gold-dark); }

article { max-width: 760px; min-width: 0; }
article p { margin: 0 0 20px; color: #2b2723; }
article h2 {
  font-family: 'Noto Serif Thai', serif; font-weight: 400;
  font-size: clamp(24px, 3vw, 32px); line-height: 1.4;
  margin: 56px 0 16px; scroll-margin-top: 96px;
}
article h2 .num { color: var(--gold); font-family: 'Cormorant Garamond', serif; margin-right: 8px; }
.lead { font-size: 19px; color: var(--ink); }

.summary {
  background: var(--paper); border: 1px solid var(--line); border-left: 3px solid var(--gold);
  border-radius: 2px; padding: 24px 28px; margin: 32px 0 8px;
}
.summary strong.title { display: block; font-size: 15px; margin-bottom: 8px; }
.summary ul { margin: 0; padding-left: 20px; }
.summary li { margin: 6px 0; }

.table-wrap { overflow-x: auto; margin: 24px 0 8px; border: 1px solid var(--line); border-radius: 2px; background: var(--paper); }
table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 620px; }
th, td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-weight: 500; color: var(--muted); font-size: 13px; background: #faf8f4; }
tr:last-child td { border-bottom: 0; }
td:first-child { font-weight: 500; }
.stars { color: var(--gold); letter-spacing: 1px; }
.stars .off { color: rgba(185, 168, 150, 0.45); }
.baht { color: var(--gold); font-weight: 500; }
.baht .off { color: rgba(185, 168, 150, 0.45); }
.note { font-size: 13px; color: var(--taupe); margin: 0 0 24px; }

.wood { display: grid; gap: 24px; margin: 24px 0 8px; }
@media (min-width: 640px) { .wood { grid-template-columns: 200px minmax(0, 1fr); } }
.wood img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: 2px; border: 1px solid var(--line); }
.fit {
  display: inline-block; margin-top: 4px; font-size: 14px; color: var(--ink);
  background: rgba(201, 162, 39, 0.1); border: 1px solid rgba(201, 162, 39, 0.35);
  padding: 8px 14px; border-radius: 2px; line-height: 1.6;
}

.tip {
  background: var(--ink); color: var(--cream); border-radius: 2px;
  padding: 28px 32px; margin: 32px 0;
}
.tip strong { color: var(--gold); display: block; margin-bottom: 8px; font-weight: 500; }
.tip p { color: rgba(246, 243, 237, 0.85); margin: 0; }

details { border-bottom: 1px solid var(--line); }
details:first-of-type { border-top: 1px solid var(--line); }
summary { cursor: pointer; list-style: none; padding: 18px 0; font-weight: 500; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; color: var(--gold); font-size: 22px; line-height: 1; transition: transform .25s; }
details[open] summary::after { transform: rotate(45deg); }
details p { color: var(--muted); padding-right: 32px; }

.cta {
  margin: 56px 0 0; background: var(--paper); border: 1px solid var(--line);
  border-radius: 2px; padding: 36px; text-align: center;
}
.cta h3 { font-family: 'Noto Serif Thai', serif; font-weight: 400; font-size: 24px; margin: 0 0 8px; }
.cta p { color: var(--muted); margin: 0 0 20px; }

/* Related */
.related { background: #efebe4; border-top: 1px solid var(--line); }
.related .in { max-width: 1280px; margin: 0 auto; padding: 56px 24px 72px; }
.related h3 { font-family: 'Noto Serif Thai', serif; font-weight: 400; font-size: 26px; margin: 0 0 28px; }
.cards { display: grid; gap: 24px; }
@media (min-width: 768px) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 2px; text-decoration: none; overflow: hidden; transition: border-color .3s; }
.card:hover { border-color: var(--gold); }
.card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.card .b { padding: 18px 20px 22px; }
.card .cat { font-size: 12px; color: var(--taupe); }
.card .t { font-family: 'Noto Serif Thai', serif; font-size: 18px; line-height: 1.5; margin-top: 4px; }

footer.site { background: var(--ink); color: rgba(246, 243, 237, 0.7); font-size: 14px; }
footer.site .in { max-width: 1280px; margin: 0 auto; padding: 32px 24px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
footer.site a { color: rgba(246, 243, 237, 0.85); text-decoration: none; }

/* Mobile sticky LINE bar, same as the main site */
.sticky-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--ink); padding: 10px 16px; display: flex; }
.sticky-cta .btn { flex: 1; justify-content: center; }
@media (min-width: 768px) { .sticky-cta { display: none; } }
@media (max-width: 767px) { body { padding-bottom: 64px; } }

/* Step timeline (process article) */
.steps { list-style: none; margin: 24px 0 8px; padding: 0; counter-reset: step; }
.steps li { position: relative; padding: 0 0 28px 64px; }
.steps li::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: 0; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--gold); color: var(--gold); display: flex; align-items: center; justify-content: center;
  font-family: 'Cormorant Garamond', serif; font-size: 18px; background: var(--cream);
}
.steps li::after { content: ''; position: absolute; left: 22px; top: 48px; bottom: 4px; width: 1px; background: var(--line); }
.steps li:last-child::after { display: none; }
.steps .h { font-weight: 500; }
.steps .d { color: var(--gold-dark); font-size: 14px; margin-left: 8px; }
article ul.plain { padding-left: 20px; margin: 0 0 20px; }
article ul.plain li { margin: 8px 0; }

.cert-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 0 0 32px; }
@media (min-width: 768px) { .cert-grid { grid-template-columns: repeat(4, 1fr); } }
.cert-grid figure { margin: 0; }
.cert-grid img { width: 100%; aspect-ratio: 3 / 4; object-fit: contain; background: #fff; border: 1px solid rgba(20,18,16,.12); border-radius: 8px; display: block; }
.cert-grid figcaption { font-size: 14px; text-align: center; margin-top: 8px; color: var(--muted); }

/* PDPA cookie banner (knowledge.js), same look as the main site's CookieConsent */
.consent { position: fixed; left: 12px; right: 12px; bottom: 76px; z-index: 60; background: var(--ink); color: #F6F3ED; border: 1px solid rgba(185,168,150,.3); border-radius: 2px; padding: 20px; box-shadow: 0 20px 40px rgba(0,0,0,.3); }
@media (min-width: 768px) { .consent { left: auto; right: 24px; bottom: 24px; max-width: 440px; } }
.consent p { font-size: 14px; line-height: 1.7; margin: 0; color: rgba(246,243,237,.85); }
.consent a { color: var(--gold); text-decoration: underline; }
.consent .row { display: flex; gap: 12px; margin-top: 16px; }
.consent button { flex: 1; height: 42px; font: inherit; font-size: 14px; border-radius: 2px; cursor: pointer; background: transparent; color: #F6F3ED; border: 1px solid rgba(185,168,150,.5); }
.consent button.ok { background: var(--gold); color: var(--ink); border-color: var(--gold); font-weight: 500; }
