/* BrainHealthReview: design-system/brain-health-review/MASTER.md → mục CHỐT CUỐI. Sửa file này thì tăng const V trong build.js. */
:root {
  --ink: #13232b; --muted: #51606a; --bg: #f8f6f1; --bg2: #f1ede4; --card: #ffffff; --line: #e3ded3;
  --brand: #0e3a45; --brand-2: #155463; --mint: #8fd3c7; --mint-soft: #e3f3f0;
  --cta: #b45309; --cta-h: #92400e; --on-cta: #ffffff;
  --good: #15803d; --good-soft: #ecf7ef; --bad: #b91c1c; --bad-soft: #fcefee;
  --r: 14px; --r-sm: 10px;
  --sh: 0 1px 2px rgb(0 0 0 / .05), 0 8px 24px -12px rgb(0 0 0 / .14);
  --sh-h: 0 2px 4px rgb(0 0 0 / .06), 0 18px 36px -16px rgb(14 58 69 / .28);
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --wrap: 1180px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --ink: #e8eef0; --muted: #a7b4ba; --bg: #0b1220; --bg2: #0f1829; --card: #111b2c; --line: #22304a;
  --brand: #8fd3c7; --brand-2: #b5e4dc; --mint-soft: #13283a;
  --cta: #f59e0b; --cta-h: #fbbf24; --on-cta: #111111;
  --good: #4ade80; --good-soft: #10261d; --bad: #f87171; --bad-soft: #2a1618;
  --sh: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px -12px rgb(0 0 0 / .6); --sh-h: 0 18px 36px -16px rgb(0 0 0 / .7);
  color-scheme: dark;
} }
:root[data-theme="dark"] {
  --ink: #e8eef0; --muted: #a7b4ba; --bg: #0b1220; --bg2: #0f1829; --card: #111b2c; --line: #22304a;
  --brand: #8fd3c7; --brand-2: #b5e4dc; --mint-soft: #13283a;
  --cta: #f59e0b; --cta-h: #fbbf24; --on-cta: #111111;
  --good: #4ade80; --good-soft: #10261d; --bad: #f87171; --bad-soft: #2a1618;
  --sh: 0 1px 2px rgb(0 0 0 / .3), 0 8px 24px -12px rgb(0 0 0 / .6); --sh-h: 0 18px 36px -16px rgb(0 0 0 / .7);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 18px/1.7 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--brand-2); }
:focus-visible { outline: 3px solid var(--mint); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.18; color: var(--ink); letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.1rem); margin: .2em 0 .35em; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.1vw, 2rem); margin: 2.2em 0 .6em; }
h3 { font-size: 1.28rem; margin: 1.8em 0 .4em; }
p { margin: 0 0 1.1em; }
.ic { flex: none; vertical-align: -0.2em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--brand); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 99; }
.skip:focus { left: 16px; }
.small { font-size: .92rem; color: var(--muted); }

/* header */
.hd { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.hd-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 600 1.2rem/1 var(--serif); white-space: nowrap; }
.brand em { font-style: italic; color: var(--brand); }
.logo .l1 { fill: var(--brand); } .logo .l2 { fill: var(--mint); } .logo .l3 { fill: var(--bg); }
:root[data-theme="dark"] .logo .l1 { fill: #13283a; }
.hd nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.hd nav a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .98rem; padding: 10px 12px; border-radius: 999px; min-height: 44px; display: inline-flex; align-items: center; transition: background .2s, color .2s; }
.hd nav a:hover { background: var(--mint-soft); color: var(--brand); }
.hd nav a[aria-current="page"] { background: var(--mint-soft); color: var(--brand); }
.theme { width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); display: inline-grid; place-items: center; cursor: pointer; margin-left: 6px; }
.theme svg { fill: currentColor; }
@media (max-width: 760px) {
  .hd-in { flex-wrap: wrap; padding-top: 8px; padding-bottom: 6px; gap: 4px; }
  .hd nav { width: 100%; justify-content: space-between; gap: 0; }
  .hd nav a { padding: 8px 7px; font-size: .9rem; }
  .theme { width: 40px; height: 40px; margin-left: 0; flex: none; }
  .hd nav { flex-wrap: nowrap; }
}

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 12px 22px; border-radius: var(--r-sm); font: 600 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: background .2s, transform .2s, box-shadow .2s; text-align: center; }
.btn.cta { background: var(--cta); color: var(--on-cta); box-shadow: 0 6px 18px -8px rgb(180 83 9 / .7); }
.btn.cta:hover { background: var(--cta-h); color: var(--on-cta); transform: translateY(-1px); }
.btn.ghost { background: rgb(255 255 255 / .1); color: #fff; border-color: rgb(255 255 255 / .55); }
.btn.ghost:hover { background: rgb(255 255 255 / .2); color: #fff; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.4em 0 0; }

/* hero */
.hero { position: relative; isolation: isolate; color: #fff; min-height: min(78vh, 640px); display: flex; align-items: flex-end; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgb(8 26 33 / .88) 0%, rgb(8 26 33 / .66) 45%, rgb(8 26 33 / .15) 100%), linear-gradient(0deg, rgb(8 26 33 / .55), transparent 45%); }
.hero-in { padding-top: 96px; padding-bottom: 72px; max-width: var(--wrap); width: 100%; }
.hero h1 { color: #fff; max-width: 15ch; font-size: clamp(2.3rem, 1.5rem + 3.4vw, 3.9rem); }
.hero .lead { color: #e7f0ef; max-width: 36rem; font-size: 1.2rem; }
.kicker { display: inline-flex; align-items: center; gap: 8px; font: 600 .82rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--brand); margin: 0 0 .8em; }
.kicker.light { color: var(--mint); }
.lead { font-size: 1.15rem; color: var(--muted); }
@media (max-width: 760px) { .hero { min-height: 560px; } .hero::after { background: linear-gradient(0deg, rgb(8 26 33 / .92) 10%, rgb(8 26 33 / .55) 70%, rgb(8 26 33 / .35)); } .hero-in { padding-bottom: 48px; } }

/* sections */
.section { margin: 72px 0; }
.sec-title { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.sec-title h2 { margin: 0 0 24px; }
.topics { margin-top: -56px; position: relative; z-index: 2; }
.topic-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.topic { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; text-decoration: none; color: var(--ink); box-shadow: var(--sh); transition: transform .25s, box-shadow .25s; }
.topic:hover { transform: translateY(-3px); box-shadow: var(--sh-h); color: var(--ink); }
.topic-img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.topic-body { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px 20px; flex: 1; position: relative; }
.topic-ic { position: absolute; top: -26px; left: 18px; width: 48px; height: 48px; border-radius: 12px; background: var(--brand); color: var(--mint); display: grid; place-items: center; box-shadow: var(--sh); }
:root[data-theme="dark"] .topic-ic { background: #13283a; }
.topic strong { font: 600 1.3rem/1.2 var(--serif); margin-top: 18px; }
.topic span { font-size: .95rem; color: var(--muted); line-height: 1.5; }
.topic .more, .card .more { margin-top: auto; padding-top: 8px; color: var(--brand); font-weight: 600; font-size: .95rem; display: inline-flex; gap: 6px; align-items: center; }
@media (max-width: 1024px) { .topic-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .topic-grid { grid-template-columns: 1fr; } .topics { margin-top: -32px; } }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { display: flex; flex-direction: column; gap: 8px; padding: 22px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--ink); box-shadow: var(--sh); transition: transform .25s, box-shadow .25s, border-color .25s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--sh-h); border-color: color-mix(in srgb, var(--brand) 30%, var(--line)); color: var(--ink); }
.card strong { font: 600 1.22rem/1.25 var(--serif); }
.card > span:not(.tag):not(.more):not(.card-ic):not(.card-img) { color: var(--muted); font-size: .96rem; line-height: 1.55; }
.card-ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--mint-soft); color: var(--brand); }
.card-img { width: 96px; height: 96px; border-radius: 12px; background: #fff; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); }
.card-img img { width: 100%; height: 100%; object-fit: contain; }
.tag { align-self: flex-start; font: 600 .74rem/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--brand); background: var(--mint-soft); padding: 6px 9px; border-radius: 999px; }
@media (max-width: 1024px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .cards { grid-template-columns: 1fr; } }

.how { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: calc(var(--r) + 6px); padding: 28px; box-shadow: var(--sh); }
.how-img img { border-radius: var(--r); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.how h2 { margin-top: 0; }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 0 0 1.2em; display: grid; gap: 14px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 40px 1fr; column-gap: 14px; }
.steps li::before { content: counter(s); grid-row: span 2; width: 40px; height: 40px; border-radius: 999px; background: var(--mint-soft); color: var(--brand); font: 700 1rem/40px var(--sans); text-align: center; }
.steps strong { font-weight: 700; }
.steps span { color: var(--muted); font-size: .98rem; line-height: 1.55; }
@media (max-width: 900px) { .how { grid-template-columns: 1fr; gap: 24px; padding: 20px; } }

/* section page */
.crumb { font-size: .92rem; color: var(--muted); margin: 26px 0 0; }
.crumb a { color: var(--muted); }
.sec-head { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; margin: 18px 0 8px; }
.sec-img { border-radius: calc(var(--r) + 4px); aspect-ratio: 16 / 10; object-fit: cover; width: 100%; box-shadow: var(--sh); }
@media (max-width: 900px) { .sec-head { grid-template-columns: 1fr; gap: 20px; } }

/* article */
.doc { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 56px; align-items: start; margin-top: 10px; }
@media (max-width: 1100px) { .doc { grid-template-columns: 1fr; } .rail { display: none; } }
.prose { max-width: 46rem; min-width: 0; }
.prose.narrow { margin: 0 auto 72px; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin: .35em 0; }
.prose li::marker { color: var(--brand); }
.meta { color: var(--muted); font-size: .95rem; padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.tbl { overflow-x: auto; margin: 0 0 1.4em; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card); }
table { border-collapse: collapse; width: 100%; font-size: .97rem; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--bg2); font-weight: 700; font-size: .9rem; }
tr:last-child td { border-bottom: 0; }
.callout { background: var(--mint-soft); border-left: 4px solid var(--brand); padding: 16px 20px; border-radius: 0 var(--r-sm) var(--r-sm) 0; margin: 0 0 1.4em; }
.callout.warn { background: var(--bad-soft); border-left-color: var(--bad); }
.toc { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 14px 18px; margin: 0 0 1.4em; }
.toc summary { font-weight: 700; cursor: pointer; min-height: 32px; }
@media (min-width: 1101px) { .toc { display: none; } }
.rail { position: sticky; top: 92px; }
.rail-inner { display: grid; gap: 18px; }
.rail-h { font: 700 .78rem/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.rail-toc ol { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.rail-toc a { display: block; padding: 6px 0 6px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; font-size: .93rem; line-height: 1.4; }
.rail-toc a:hover, .rail-toc a[aria-current="true"] { color: var(--brand); border-left-color: var(--brand); }
.rail-cta { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--sh); }
.rail-cta .rail-h { color: var(--ink); font: 600 1.15rem/1.2 var(--serif); letter-spacing: 0; text-transform: none; }
.rail-cta p { font-size: .93rem; color: var(--muted); }
.rail-cta .btn { width: 100%; }

/* review: verdict box */
.verdict { display: grid; grid-template-columns: 220px 1fr; gap: 26px; background: var(--card); border: 1px solid var(--line); border-radius: calc(var(--r) + 4px); padding: 26px; box-shadow: var(--sh); margin: 0 0 2em; }
.vb-img { margin: 0; align-self: start; }
.vb-img img { border-radius: var(--r-sm); background: #fff; width: 100%; aspect-ratio: 1; object-fit: contain; }
.vb-img figcaption { font-size: .78rem; color: var(--muted); margin-top: 6px; }
.vb-ph { aspect-ratio: 1; border-radius: var(--r-sm); background: var(--mint-soft); color: var(--brand); display: grid; place-items: center; }
.vb-k { font: 700 .78rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--cta); margin: 0 0 6px; }
.verdict h2 { margin: 0 0 8px; font-size: 1.55rem; }
.vb-line { font-size: 1.05rem; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; margin: 0 0 18px; }
.facts div { background: var(--card); padding: 10px 14px; }
.facts dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.facts dd { margin: 2px 0 0; font-weight: 600; font-size: .98rem; line-height: 1.4; }
.pc { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pc-col { border-radius: var(--r-sm); padding: 16px 18px; }
.pc-col.good { background: var(--good-soft); } .pc-col.bad { background: var(--bad-soft); }
.pc-h { display: flex; align-items: center; gap: 8px; font-weight: 700; margin: 0 0 6px; }
.good .pc-h { color: var(--good); } .bad .pc-h { color: var(--bad); }
.pc ul { margin: 0; padding-left: 1.1em; font-size: .97rem; }
@media (max-width: 720px) { .verdict { grid-template-columns: 1fr; padding: 18px; } .vb-img { max-width: 180px; } .vb-ph { display: none; } .pc { grid-template-columns: 1fr; } .facts { grid-template-columns: 1fr 1fr; } }

.buy-box { display: flex; align-items: center; justify-content: space-between; gap: 20px; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--cta); border-radius: var(--r-sm); padding: 18px 20px; margin: 0 0 1.6em; box-shadow: var(--sh); }
.buy-box p { margin: 4px 0 0; font-size: .93rem; color: var(--muted); }
.buy-k { font: 700 .74rem/1 var(--sans) !important; letter-spacing: .1em; text-transform: uppercase; color: var(--cta) !important; margin: 0 0 4px !important; }
.buy-box strong { font: 600 1.2rem/1.2 var(--serif); }
.buy-box .btn { flex: none; }
@media (max-width: 640px) { .buy-box { flex-direction: column; align-items: stretch; } }

.sticky-buy { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px -12px rgb(0 0 0 / .25); transform: translateY(110%); transition: transform .3s; font-size: .95rem; }
.sticky-buy.show { transform: none; }
.sticky-buy .btn { min-height: 46px; padding: 10px 16px; }
@media (min-width: 1101px) { .sticky-buy { display: none; } }

.yt { margin: 0 0 1.6em; }
.yt-link { position: relative; display: block; border-radius: var(--r); overflow: hidden; max-width: 560px; }
.yt-link img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.yt-play { position: absolute; inset: 0; margin: auto; width: 72px; height: 72px; border-radius: 999px; background: rgb(0 0 0 / .65); color: #fff; display: grid; place-items: center; }
.yt figcaption { font-size: .88rem; color: var(--muted); margin-top: 6px; }

.sources { font-size: .93rem; padding-left: 1.4em; }
.sources li { margin: .4em 0; overflow-wrap: anywhere; }
.disclaimer { font-size: .9rem; color: var(--muted); background: var(--bg2); border-radius: var(--r-sm); padding: 14px 18px; margin: 2em 0 1.4em; }
.author { border-top: 1px solid var(--line); padding-top: 20px; margin-top: 10px; font-size: .96rem; color: var(--muted); }
.author-h { font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.related { margin: 64px 0 80px; }
.related h2 { margin-top: 0; }
.home-prose { max-width: 46rem; }

/* footer */
.ft { background: #0b1a20; color: #c6d3d6; margin-top: 40px; padding: 56px 0 32px; font-size: .95rem; }
:root[data-theme="dark"] .ft { background: #070d17; }
.ft-in { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 36px; }
.ft .brand { color: #fff; } .ft .brand em { color: var(--mint); }
.ft .logo .l1 { fill: #13283a; } .ft .logo .l3 { fill: #f8f6f1; }
.ft a { color: #dfe9eb; } .ft a:hover { color: var(--mint); }
.ft-h { font-weight: 700; color: #fff; margin-bottom: 8px; }
.ft ul { list-style: none; padding: 0; margin: 0; }
.ft li { margin: 6px 0; }
.ft-note { grid-column: 1 / -1; border-top: 1px solid #1f3640; padding-top: 18px; font-size: .86rem; color: #9fb1b5; }
.ft-note p { margin: 0 0 4px; }
.ft-copy { grid-column: 1 / -1; font-size: .84rem; color: #8aa0a5; margin: 0; }
@media (max-width: 760px) { .ft-in { grid-template-columns: 1fr; gap: 24px; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
@media print { .hd, .ft, .rail, .sticky-buy, .buy-box, .theme { display: none !important; } }
