:root {
  --bg: #0B1F3A;
  --surface: #13305A;
  --ink: #F6EEE2;
  --ink-muted: #9FB3CC;
  --line: #24446E;
  --accent-text: #DCB669;
  --on-coral: #0B1F3A;
  --head: #FFFFFF;
  --chrome: #081830;
  --coral: #FE7061;
  --gold: #DCB669;
  --navy: #13305A;
  --navy-surface: #1B3F70;
  --navy-line: #2A4C78;
  --navy-soft: #C9D6E6;
  --navy-edge: #7FA6D6;
  --display: 'Playfair Display', 'Noto Serif Thai', Georgia, serif;
  --sans: 'IBM Plex Sans Thai', 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.55; -webkit-text-size-adjust: 100%; }
img { max-width: 100%; height: auto; }
a { color: var(--ink); }
a:hover { color: var(--accent-text); }
:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--coral); color: var(--on-coral); padding: 10px 16px; font-weight: 600; z-index: 10; }
.skip:focus { left: 8px; top: 8px; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.center { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 18px; }
.section { padding: 56px 0; }
.section.tight { padding: 8px 0 64px; }
.stack { display: flex; flex-direction: column; gap: 28px; }
.row { display: flex; flex-wrap: wrap; gap: 24px; }

.display { font-family: var(--display); font-weight: 800; line-height: 1.06; margin: 0; font-size: clamp(36px, 5.2vw, 60px); text-wrap: balance; }
.h2 { font-family: var(--display); font-weight: 800; font-size: clamp(30px, 3.6vw, 40px); line-height: 1.1; margin: 0; }
.h3 { font-family: var(--display); font-weight: 700; font-size: 26px; line-height: 1.2; margin: 0; }
.h4 { font-size: 20px; font-weight: 600; margin: 0; }
.eyebrow { font-size: 14px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; margin: 0; }
.coral { color: var(--accent-text); }
.gold { color: var(--gold); }
.muted { color: var(--ink-muted); }
.lede { font-size: 19px; margin: 0; color: var(--ink-muted); max-width: 640px; }
.navy .lede, .soft { color: var(--navy-soft); }
p { margin: 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 26px; border-radius: 999px; border: 0; background: var(--coral); color: var(--on-coral); font: 600 17px var(--sans); text-decoration: none; cursor: pointer; }
.btn:hover { background: #ff8578; color: var(--on-coral); }
.btn-small { min-height: 44px; padding: 9px 22px; font-size: 16px; }
.btn-line { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 11px 26px; border-radius: 999px; border: 1.5px solid var(--ink); background: transparent; color: var(--ink); font: 600 17px var(--sans); text-decoration: none; cursor: pointer; }
.btn-line:hover { background: var(--ink); color: #F6EEE2; }

/* Header */
.site-header .bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 32px; padding-top: 16px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-height: 44px; }
.brand img { width: 44px; height: 44px; border-radius: 8px; display: block; }
.brand span, .brand-text { font-family: var(--display); font-weight: 800; font-size: 22px; color: var(--ink); }
.main-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 26px; flex-grow: 1; justify-content: flex-end; }
.main-nav a:not(.btn) { text-decoration: none; font-weight: 500; font-size: 16px; padding: 10px 0; }
.main-nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--coral); }
.topic-bar { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.topics { display: flex; flex-wrap: wrap; align-items: center; gap: 0 28px; font-size: 15px; font-weight: 500; }
.topics a { text-decoration: none; padding: 12px 0; }
.topics .archive { margin-left: auto; font-weight: 600; text-decoration: underline; }

/* Navy sections */
.navy { background: var(--navy); color: #F6EEE2; }
.navy a:not(.btn) { color: #F6EEE2; }
.navy a:not(.btn):hover { color: var(--gold); }
.band { padding: 80px 0; }
.band .display { font-size: clamp(32px, 4.4vw, 48px); max-width: 760px; }

/* Hero */
.hero-grid { display: flex; flex-wrap: wrap; gap: 48px 56px; align-items: center; padding-top: 64px; padding-bottom: 64px; }
.hero-copy { flex: 1 1 440px; display: flex; flex-direction: column; gap: 22px; }
.hero-art { flex: 1 1 420px; min-width: 280px; }
.hero-art svg { display: block; width: 100%; height: auto; font-family: var(--sans); }
.hero-art .issue { padding-top: 14px; font-size: 15px; color: var(--navy-soft); }
.hero-art .issue a { font-weight: 600; }
.stats { border-top: 1px solid var(--navy-line); }
.stats .wrap { display: flex; flex-wrap: wrap; gap: 12px 48px; align-items: baseline; padding-top: 22px; padding-bottom: 22px; }
.stats .eyebrow { color: var(--navy-soft); font-size: 13px; }
.stats strong { font-family: var(--display); font-size: 24px; font-variant-numeric: tabular-nums; }
.stats span span { color: var(--navy-soft); font-size: 15px; }

/* Subscribe */
.subscribe { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; width: 100%; max-width: 520px; }
.subscribe iframe { width: 100%; height: 60px; border: 0; background: transparent; }
.subscribe .note, .note { font-size: 15px; color: var(--navy-soft); }
.center .subscribe { align-items: center; }

/* Cards */
.card { background: var(--surface); border-radius: 28px; box-shadow: var(--shadow); padding: 32px; display: flex; flex-direction: column; gap: 12px; }
.card.navy { background: var(--navy); }
.card .push { margin-top: auto; padding-top: 12px; }
.grow { flex: 1 1 190px; }
.grow-wide { flex: 1 1 300px; }
.num { font-family: var(--display); font-weight: 800; font-size: 28px; color: var(--accent-text); line-height: 1; }
.price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.price strong { font-family: var(--display); font-weight: 800; font-size: 44px; line-height: 1; }
.card.navy .price strong { color: var(--coral); }
.price span { font-size: 15px; color: var(--ink-muted); }
.card.navy .price span, .card.navy li, .card.navy p { color: var(--navy-soft); }
.card ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 16px; color: var(--ink-muted); }
.card p { font-size: 16px; color: var(--ink-muted); }
.card p.h3 { font-size: 26px; color: var(--ink); }
.card p.eyebrow { font-size: 14px; }
.card p.eyebrow.coral { color: var(--accent-text); }
.card.navy p.eyebrow.gold { color: var(--gold); }
.rule { width: 56px; height: 5px; border-radius: 999px; background: var(--gold); }

/* Featured strip */
.featured { display: flex; flex-wrap: wrap; flex-direction: row; align-items: center; gap: 20px 32px; padding: 28px 32px; }
.featured .text { flex: 1 1 420px; display: flex; flex-direction: column; gap: 6px; }
.featured .controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.round { width: 44px; height: 44px; border-radius: 999px; border: 1.5px solid var(--ink); background: transparent; color: var(--ink); cursor: pointer; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.round:hover { background: var(--ink); color: #F6EEE2; }
.count { font-size: 15px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }

/* News list */
.split { display: flex; flex-wrap: wrap; gap: 40px 56px; align-items: flex-start; }
.split .main { flex: 1.4 1 480px; min-width: 0; }
.split .side { flex: 1 1 340px; }
.list-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 18px; }
.news-list { border-bottom: 1px solid var(--line); }
.news { display: flex; flex-wrap: wrap; gap: 4px 20px; align-items: baseline; padding: 18px 0; border-top: 1px solid var(--line); text-decoration: none; }
.news .when { font-size: 15px; color: var(--ink-muted); width: 104px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.news .what { flex: 1 1 300px; font-size: 19px; font-weight: 500; }
.news .tag { font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-text); }
.news:hover .what { text-decoration: underline; }
.empty { padding: 18px 0; color: var(--ink-muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 24px; }
.chip { font: 500 15px var(--sans); padding: 9px 16px; min-height: 40px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--navy); color: #F6EEE2; border-color: var(--navy); }
.feature img { border-radius: 16px; display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--navy-surface); }
.feature .meta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; font-size: 15px; }
.feature .h3 { color: #F6EEE2; }
.feature a.h3link { text-decoration: none; }

/* Forms */
.form { display: flex; flex-direction: column; gap: 14px; }
.form .pair { display: flex; flex-wrap: wrap; gap: 14px; }
.field { flex: 1 1 200px; display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 15px; font-weight: 500; }
.field input, .field textarea { min-height: 48px; padding: 10px 14px; border-radius: 12px; border: 1.5px solid var(--ink-muted); background: var(--bg); color: var(--ink); font: 400 16px var(--sans); width: 100%; }
.field textarea { resize: vertical; min-height: 110px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { font-size: 16px; font-weight: 500; min-height: 24px; }
.form-status.error { color: var(--accent-text); }

/* Page intro */
.intro { padding: 56px 0 8px; }
.intro .stack { gap: 14px; }

/* Article */
.article { padding: 56px 0 24px; }
.article .wrap { display: flex; flex-direction: column; gap: 16px; }
.byline { font-size: 15px; color: var(--ink-muted); padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.prose { font-size: 18px; line-height: 1.7; overflow-wrap: break-word; }
.prose > * + * { margin-top: 18px; }
.prose p { margin: 0; }
.prose h1, .prose h2, .prose h3 { font-family: var(--display); line-height: 1.2; margin: 36px 0 0; }
.prose h2 { font-size: 30px; }
.prose h3 { font-size: 23px; }
.prose img { border-radius: 16px; display: block; margin: 0 auto; }
.prose a { color: var(--accent-text); }
.prose blockquote { margin: 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--gold); color: var(--ink-muted); }
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; display: block; overflow-x: auto; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.prose hr { border: 0; border-top: 1px solid var(--line); }
.prose iframe { max-width: 100%; }

/* Footer */
.site-footer { padding: 48px 0 40px; font-size: 15px; }
.site-footer .cols { display: flex; flex-wrap: wrap; gap: 32px 64px; }
.site-footer .about { flex: 2 1 280px; display: flex; flex-direction: column; gap: 8px; color: var(--ink-muted); }
.site-footer .about .brand-text { font-size: 20px; }
.site-footer .cols > div:not(.about) { flex: 1 1 140px; display: flex; flex-direction: column; }
.site-footer a { padding: 8px 0; }
.col-h { font-weight: 600; padding-bottom: 4px; }

/* Research page */
.buy-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; padding-top: 8px; }
.card a.more { font-weight: 600; font-size: 16px; }
.card.navy a.more { color: var(--gold); }
.intro .eyebrow a { color: inherit; }
.sample { padding: 16px; gap: 12px; margin: 0; }
.sample img { border-radius: 14px; display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border: 1px solid var(--line); }
.sample figcaption { font-size: 15px; color: var(--ink-muted); }
.table-card { padding: 8px 24px; overflow-x: auto; }
.compare { width: 100%; border-collapse: collapse; font-size: 16px; min-width: 520px; }
.compare th, .compare td { text-align: left; padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare thead th { font-family: var(--display); font-size: 20px; }
.compare tbody th { font-weight: 500; color: var(--ink-muted); }
.compare tr:last-child th, .compare tr:last-child td { border-bottom: 0; }
.card p.num { font-family: var(--display); font-weight: 800; font-size: 44px; color: var(--accent-text); line-height: 1; }
.faq-list { gap: 0; }
.faq-list .h2 { padding-bottom: 12px; }
.faq { border-bottom: 1px solid var(--line); padding: 4px 0; max-width: 820px; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 18px; padding: 14px 0; min-height: 44px; }
.faq p { padding: 0 0 16px; color: var(--ink-muted); }

@media (max-width: 720px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .main-nav { justify-content: flex-start; gap: 0 18px; }
  .topics { flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; gap: 0 22px; }
  .topics .archive { margin-left: 0; }
  .hero-grid { padding-top: 40px; padding-bottom: 40px; }
  .card { padding: 24px; border-radius: 22px; }
  .featured { padding: 22px; }
  .table-card { padding: 4px 12px; }
  .compare { min-width: 0; font-size: 14px; }
  .compare th, .compare td { padding: 12px 6px; }
  .compare thead th { font-size: 17px; }
  .news .when { width: auto; }
  .band { padding: 56px 0; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Own subscribe form (POST /api/subscribe) */
.subform { display: flex; flex-wrap: wrap; gap: 10px; width: 100%; max-width: 520px; }
.subform input[type=email] { flex: 1 1 240px; min-width: 0; font: inherit; font-size: 17px; padding: 13px 16px; border: 1.5px solid #2A4C78; border-radius: 8px; background: #fff; color: var(--navy, #012D5B); }
.subform input[type=email]:focus { outline: 3px solid rgba(220,182,105,.6); outline-offset: 1px; }
.subform .btn { flex: 0 0 auto; }
.subform .btn[disabled] { opacity: .6; cursor: wait; }
.subform .msg { flex-basis: 100%; margin: 2px 0 0; font-size: 15px; min-height: 1em; }
.navy .subform .msg { color: #fff; }
.subform .msg.bad { color: #FE7061; font-weight: 600; }
.navy .subform .msg.bad { color: #FE7061; }
.center .subform { justify-content: center; margin: 0 auto; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Lead magnet page */
.lm { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: start; }
.lm .preview img { width: 100%; height: auto; border-radius: 10px; box-shadow: 0 12px 34px rgba(1,45,91,.18); display: block; }
.lm ul.ticks { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.lm ul.ticks li { padding-left: 28px; position: relative; }
.lm ul.ticks li:before { content: '✓'; position: absolute; left: 0; color: #FE7061; font-weight: 700; }
.lm .formcard { margin-top: 26px; background: #13305A; border-radius: 12px; padding: 22px; box-shadow: 0 2px 10px rgba(1,45,91,.08); }
.lm .formcard .msg { color: #fff; }
.lm .formcard .msg.bad { color: #FE7061; }
.lm .formcard input[type=email] { border-color: #2A4C78; }
.lm .formcard .small { font-size: 14px; color: #fff; margin: 10px 0 0; }
.lm .done { display: none; margin-top: 26px; background: #13305A; color: #fff; border-radius: 12px; padding: 22px; }
.lm .done.show { display: block; }
.lm .done h3 { color: #DCB669; margin: 0 0 8px; }
.lm .done .btn { margin-top: 12px; }
@media (max-width: 820px) { .lm { grid-template-columns: 1fr; gap: 28px; } .lm .preview { order: 2; } }

/* hero map: proportional circles, fade in + count-up */
.hero-art .mk { opacity: 0; animation: hm-in .7s ease-out forwards; animation-delay: var(--d); }
@keyframes hm-in { to { opacity: 1; } }
.hero-art .mk .bub { transform-box: fill-box; transform-origin: center; animation: hm-grow .9s cubic-bezier(.2,.7,.2,1) backwards; animation-delay: var(--d); }
@keyframes hm-grow { from { transform: scale(.3); } to { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .hero-art .mk { opacity: 1; animation: none; } .hero-art .mk .bub { animation: none; } }

/* Sample-pages carousel (branch-is-the-product) */
.carousel-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.car-nav { display: flex; align-items: center; gap: 8px; }
.car-count { font: 600 13px/1 'IBM Plex Mono', ui-monospace, monospace; letter-spacing: .08em; color: var(--ink-muted); margin-right: 6px; }
.car-btn { width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: inherit; font-size: 20px; cursor: pointer; box-shadow: var(--shadow); }
.car-btn:disabled { opacity: .35; cursor: default; box-shadow: none; }
.car-track { display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding: 6px 2px 18px; scrollbar-width: none; overscroll-behavior-x: contain; }
.car-track::-webkit-scrollbar { display: none; }
.car-track:focus-visible { outline: 2px solid var(--ink-muted); outline-offset: 4px; border-radius: 12px; }
.car-track > .sample { flex: 0 0 82%; scroll-snap-align: start; }
.car-dots { display: flex; justify-content: center; gap: 8px; }
.car-dots button { width: 9px; height: 9px; padding: 0; border-radius: 999px; border: 0; background: var(--line); cursor: pointer; transition: width .2s; }
.car-dots button[aria-current] { width: 26px; background: var(--ink-muted); }
@media (max-width: 720px) { .car-track { gap: 12px; } .car-track > .sample { flex-basis: 90%; padding: 10px; } .car-btn { width: 38px; height: 38px; } }
@media (prefers-reduced-motion: reduce) { .car-track { scroll-behavior: auto; } .car-dots button { transition: none; } }

/* Palette A (dark) — 2 Dec 2026 */
.site-header, .topic-bar, .site-footer { background: var(--chrome); }
.site-header { border-bottom: 1px solid var(--line); }
.display, .h2, .h3, h1, h2, h3 { color: var(--head); }

/* Article pages (/p/<slug>) keep the cream reading theme: <body class="light"> */
body.light {
  --bg: #F6EEE2; --surface: #FAF3E8; --ink: #012D5B; --ink-muted: #4A5F7D; --line: #D9CBB4; --accent-text: #B83A2B;
  --on-coral: #012D5B; --head: #012D5B; --chrome: transparent;
  --navy: #012D5B; --navy-surface: #0B3A6E; --navy-line: #1F4C80; --navy-soft: #B7C4D6;
  --shadow: 0 10px 28px rgba(1, 45, 91, 0.10);
}
body.light .site-header { border-bottom: 0; }
body.light .navy .display, body.light .navy .h2, body.light .navy .h3, body.light .navy h1, body.light .navy h2, body.light .navy h3 { color: #FAF3E8; }
body.light .subform input[type=email] { border-color: #c9d3e0; }
body.light .subform .msg.bad { color: #B83A2B; }
