/* Lá Chắn Sinh Tồn — hệ thống giao diện
   Nền kem • xanh rêu • thẻ trắng • chữ xanh đậm • cam = lưu ý • đỏ = nguy hiểm/khẩn cấp */

:root {
  --bg: #f5f1e6;
  --bg-2: #ece6d4;
  --surface: #ffffff;
  --surface-2: #faf8f1;
  --ink: #1b3829;
  --ink-2: #4a5d50;
  --ink-3: #6b7a6f;
  --line: #ddd5c1;
  --line-2: #c9c0a8;
  --moss-50: #f0f4ea;
  --moss-100: #e2eada;
  --moss-200: #c9d8bb;
  --moss-500: #6f8f5c;
  --brand: #2f5a3f;
  --brand-bg: #2f5a3f;
  --brand-bg-hover: #264b34;
  --brand-ink: #ffffff;
  --link: #2a5a3b;
  --warn: #8f4300;
  --warn-bg: #fff2df;
  --warn-line: #eeb26b;
  --warn-solid: #c96a0a;
  --danger: #9e1b14;
  --danger-bg: #fdecea;
  --danger-line: #eea29c;
  --danger-solid: #c2241b;
  --danger-solid-hover: #a51d16;
  --ok: #276a3e;
  --ok-bg: #e5f2e7;
  --ok-line: #9fcfaa;
  --info-bg: #eaf1f6;
  --info-line: #a9c4d8;
  --info: #24506e;
  --focus: #1757c2;
  --shadow: 0 1px 2px rgba(27, 56, 41, .06), 0 4px 14px rgba(27, 56, 41, .06);
  --shadow-lg: 0 2px 4px rgba(27, 56, 41, .08), 0 12px 32px rgba(27, 56, 41, .12);
  --logo-shield: #2f5a3f;
  --logo-leaf: #f3ecd8;
  --radius: 14px;
  --radius-sm: 10px;
  --tap: 48px;
  --tabbar-h: 66px;
  --topbar-h: 60px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --font: "Times New Roman", Times, "Noto Serif", "Liberation Serif", Georgia, serif;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0f1512;
  --bg-2: #141c17;
  --surface: #18211c;
  --surface-2: #1d2722;
  --ink: #e6eee4;
  --ink-2: #b0c0b3;
  --ink-3: #8c9c90;
  --line: #2c3a31;
  --line-2: #3a4a40;
  --moss-50: #18231c;
  --moss-100: #1f2e24;
  --moss-200: #2b4033;
  --moss-500: #87ad74;
  --brand: #9fd0aa;
  --brand-bg: #3b7450;
  --brand-bg-hover: #448259;
  --brand-ink: #ffffff;
  --link: #a6d6b1;
  --warn: #ffc27a;
  --warn-bg: #2f2210;
  --warn-line: #7a5420;
  --warn-solid: #d97a12;
  --danger: #ffa198;
  --danger-bg: #351513;
  --danger-line: #7d2a24;
  --danger-solid: #cf2c22;
  --danger-solid-hover: #e0392e;
  --ok: #92d6a5;
  --ok-bg: #14301e;
  --ok-line: #2f6b42;
  --info-bg: #142430;
  --info-line: #2c4d66;
  --info: #a8cde8;
  --focus: #7fb2ff;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-lg: 0 8px 28px rgba(0, 0, 0, .45);
  --logo-shield: #8fc19b;
  --logo-leaf: #18211c;
  color-scheme: dark;
}

html[data-font="0"] { font-size: 17px; }
html, html[data-font="1"] { font-size: 19px; }
html[data-font="2"] { font-size: 21.5px; }
html[data-font="3"] { font-size: 24px; }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--topbar-h) + 12px); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

svg { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

a { color: var(--link); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }

h1, h2, h3, h4 { line-height: 1.22; margin: 0 0 .5em; color: var(--ink); text-wrap: balance; }
h1 { font-size: 1.75rem; letter-spacing: -.01em; }
h2 { font-size: 1.36rem; }
h3 { font-size: 1.14rem; }
h4 { font-size: 1rem; }
p { margin: 0 0 .8em; }
ul, ol { padding-left: 1.3em; margin: 0 0 .9em; }
li { margin: .25em 0; }
small, .small { font-size: .86rem; }
.muted { color: var(--ink-2); }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
button, input, select, textarea { font: inherit; color: inherit; }

.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--brand-bg); color: var(--brand-ink); padding: 10px 16px; border-radius: 10px; }
.skip:focus { top: 8px; }

/* ---------- Khung ---------- */
.shell { min-height: 100vh; min-height: 100dvh; }

.topbar {
  position: sticky; top: 0; z-index: 30;
  height: var(--topbar-h);
  padding: 0 max(12px, var(--safe-r)) 0 max(12px, var(--safe-l));
  display: flex; align-items: center; gap: 10px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
@supports not (background: color-mix(in srgb, red 50%, blue)) { .topbar { background: var(--bg); } }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-width: 0; flex: 1; min-height: var(--tap); }
.brand-logo { width: 38px; height: 38px; stroke: none; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font-weight: 700; font-size: 1.12rem; line-height: 1.1; white-space: nowrap; }
.brand-tag { font-size: .74rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.topbar-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: var(--tap); min-height: var(--tap); padding: 0 10px;
  border: 1px solid transparent; background: transparent; color: var(--ink);
  border-radius: 12px; cursor: pointer; text-decoration: none; font-size: .86rem;
}
.icon-btn:hover { background: var(--moss-100); }
.icon-btn-label { display: none; }
.call-chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0 14px; border-radius: 999px;
  background: var(--danger-solid); color: #fff; text-decoration: none; font-weight: 700; font-size: 1.02rem;
  box-shadow: 0 2px 8px rgba(194, 36, 27, .3);
}
.call-chip:hover { background: var(--danger-solid-hover); }
.call-chip svg { width: 1.05em; height: 1.05em; }

.sidenav { display: none; }

main { outline: none; padding: 16px max(16px, var(--safe-r)) calc(var(--tabbar-h) + var(--safe-b) + 28px) max(16px, var(--safe-l)); }
.view { max-width: 46rem; margin: 0 auto; }
.footer { max-width: 46rem; margin: 40px auto 0; padding-top: 18px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: .84rem; }
.footer-author { font-weight: 700; color: var(--ink); }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 4px max(4px, var(--safe-l)) calc(4px + var(--safe-b)) max(4px, var(--safe-r));
  background: var(--surface); border-top: 1px solid var(--line);
  box-shadow: 0 -4px 16px rgba(27, 56, 41, .06);
}
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 56px; padding: 4px 2px; border-radius: 12px;
  color: var(--ink-2); text-decoration: none; font-size: 12.5px; line-height: 1.15; text-align: center;
}
.tab svg { width: 24px; height: 24px; }
.tab[aria-current="page"] { color: var(--brand); background: var(--moss-100); font-weight: 700; }
.tab-emergency { color: var(--danger); }
.tab-emergency[aria-current="page"] { color: #fff; background: var(--danger-solid); }

.brand-name { overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 560px) {
  .icon-btn-label { display: inline; }
}
/* Điện thoại: nhãn chữ nằm dưới biểu tượng, như thanh điều hướng đáy */
@media (max-width: 559px) {
  .topbar { gap: 4px; }
  .icon-btn { flex-direction: column; gap: 1px; min-width: 46px; padding: 2px 4px; font-size: 10.5px; line-height: 1.1; }
  .icon-btn-label { display: block; white-space: nowrap; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }
  .icon-btn svg { width: 21px; height: 21px; }
  .brand-tag { display: none; }
  .brand-name { font-size: 1.02rem; white-space: normal; line-height: 1.12; }
  .brand-logo { width: 34px; height: 34px; }
  .call-chip { padding: 0 12px; }
}
@media (max-width: 359px) {
  .brand-text { display: none; }
}

@media (min-width: 1024px) {
  .shell { display: grid; grid-template-columns: 268px minmax(0, 1fr); grid-template-rows: var(--topbar-h) 1fr; }
  .topbar { grid-column: 1 / -1; }
  .sidenav {
    display: flex; flex-direction: column; gap: 4px;
    position: sticky; top: var(--topbar-h); align-self: start;
    height: calc(100vh - var(--topbar-h)); overflow-y: auto;
    padding: 18px 14px; border-right: 1px solid var(--line); background: var(--surface-2);
  }
  .nav-item {
    display: flex; align-items: center; gap: 12px; min-height: 50px; padding: 0 14px;
    border-radius: 12px; color: var(--ink); text-decoration: none; font-size: 1.02rem;
  }
  .nav-item:hover { background: var(--moss-100); }
  .nav-item[aria-current="page"] { background: var(--moss-100); color: var(--brand); font-weight: 700; box-shadow: inset 3px 0 0 var(--brand); }
  .nav-emergency { background: var(--danger-solid); color: #fff; font-weight: 700; margin-bottom: 8px; }
  .nav-emergency:hover { background: var(--danger-solid-hover); }
  .nav-emergency[aria-current="page"] { background: var(--danger-solid-hover); color: #fff; box-shadow: inset 0 0 0 3px rgba(255,255,255,.35); }
  .nav-sub { font-size: .92rem; min-height: 44px; color: var(--ink-2); }
  .sidenav-sep { height: 1px; background: var(--line); margin: 10px 6px; }
  .sidenav-status { margin-top: auto; padding: 10px 6px 0; font-size: .82rem; color: var(--ink-2); }
  .tabbar { display: none; }
  main { padding: 28px 32px 40px; }
}

/* ---------- Bố cục trang có mục lục ---------- */
.page-toc { display: none; }
@media (min-width: 1360px) {
  .view.wide { max-width: 64rem; }
  .page.has-toc { display: grid; grid-template-columns: minmax(0, 46rem) 15rem; gap: 40px; }
  .page-toc { display: block; position: sticky; top: calc(var(--topbar-h) + 20px); align-self: start; font-size: .88rem; }
  .page-toc h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
  .page-toc ol { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
  .page-toc a { display: block; padding: 6px 12px; color: var(--ink-2); text-decoration: none; margin-left: -2px; border-left: 2px solid transparent; }
  .page-toc a:hover { color: var(--ink); border-left-color: var(--moss-500); }
}

/* ---------- Thành phần chung ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow); margin-bottom: 16px;
}
.card > :last-child { margin-bottom: 0; }
.card-title { display: flex; align-items: center; gap: 10px; font-size: 1.12rem; margin: 0 0 .6em; }
.card-title svg { color: var(--moss-500); }

.section { margin: 30px 0 14px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-head h2 { margin: 0; }
.eyebrow { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 700; margin-bottom: .3em; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 8px 18px; border-radius: 12px;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  font-size: 1rem; font-weight: 700; text-decoration: none; cursor: pointer; text-align: center; line-height: 1.2;
}
.btn:hover { background: var(--moss-50); border-color: var(--moss-500); }
.btn-primary { background: var(--brand-bg); color: var(--brand-ink); border-color: var(--brand-bg); }
.btn-primary:hover { background: var(--brand-bg-hover); border-color: var(--brand-bg-hover); }
.btn-danger { background: var(--danger-solid); color: #fff; border-color: var(--danger-solid); }
.btn-danger:hover { background: var(--danger-solid-hover); border-color: var(--danger-solid-hover); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--link); }
.btn-ghost:hover { background: var(--moss-100); border-color: transparent; }
.btn-outline-danger { border-color: var(--danger-line); color: var(--danger); background: var(--surface); }
.btn-outline-danger:hover { background: var(--danger-bg); border-color: var(--danger); }
.btn-block { display: flex; width: 100%; }
.btn-sm { min-height: 40px; padding: 6px 12px; font-size: .9rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }

.back-link {
  display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 10px 0 4px; margin: -6px 0 6px -4px;
  color: var(--ink-2); text-decoration: none; border-radius: 10px; font-size: .95rem;
}
.back-link:hover { background: var(--moss-100); color: var(--ink); }

.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px;
  font-size: .78rem; font-weight: 700; line-height: 1.5; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink-2); white-space: nowrap;
}
.badge svg { width: 1em; height: 1em; }
.badge-ok { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); }
.badge-warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.badge-danger { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-line); }
.badge-practice { background: var(--info-bg); color: var(--info); border-color: var(--info-line); }

.callout { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--radius-sm); border: 1px solid; margin: 14px 0; }
.callout > svg { margin-top: .15em; }
.callout > div > :last-child { margin-bottom: 0; }
.callout-warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--ink); }
.callout-warn > svg { color: var(--warn-solid); }
.callout-danger { background: var(--danger-bg); border-color: var(--danger-line); }
.callout-danger > svg { color: var(--danger-solid); }
.callout-info { background: var(--info-bg); border-color: var(--info-line); }
.callout-info > svg { color: var(--info); }
.callout-ok { background: var(--ok-bg); border-color: var(--ok-line); }
.callout-ok > svg { color: var(--ok); }

.progress { height: 10px; border-radius: 999px; background: var(--moss-100); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--moss-500); border-radius: inherit; transition: width .3s; }

/* ---------- Trang chính ---------- */
.hero-emergency {
  display: flex; align-items: center; gap: 16px; width: 100%;
  padding: 20px 22px; min-height: 92px; border-radius: 18px; margin-bottom: 16px;
  background: var(--danger-solid); color: #fff; text-decoration: none; box-shadow: 0 6px 22px rgba(194, 36, 27, .28);
}
.hero-emergency:hover { background: var(--danger-solid-hover); }
.hero-emergency .he-icon { width: 54px; height: 54px; border-radius: 50%; background: rgba(255,255,255,.16); display: grid; place-items: center; }
.hero-emergency .he-icon svg { width: 30px; height: 30px; }
.hero-emergency strong { display: block; font-size: 1.5rem; line-height: 1.15; }
.hero-emergency span.he-sub { display: block; font-size: .92rem; opacity: .92; }
.hero-emergency .he-go { margin-left: auto; width: 28px; height: 28px; }

.search-box { position: relative; margin: 0 0 8px; }
.search-box svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.search-box input {
  width: 100%; min-height: 56px; padding: 10px 48px 10px 50px; border-radius: 14px;
  border: 1.5px solid var(--line-2); background: var(--surface); font-size: 1.02rem; box-shadow: var(--shadow);
}
.search-box input::placeholder { color: var(--ink-3); }
.search-box input:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent); }
.search-clear { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }
.search-clear svg { position: static; transform: none; }

.hz-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 640px) { .hz-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.hz-tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  min-height: 104px; padding: 14px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; box-shadow: var(--shadow);
}
.hz-tile:hover { border-color: var(--moss-500); background: var(--moss-50); }
.hz-tile .hz-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--moss-100); color: var(--brand); }
.hz-tile .hz-ico svg { width: 26px; height: 26px; }
.hz-tile strong { font-size: 1.04rem; line-height: 1.2; }
.hz-tile small { color: var(--ink-2); line-height: 1.3; }
.hz-tile.is-knowledge .hz-ico { background: var(--info-bg); color: var(--info); }
.hz-tile.more { justify-content: center; align-items: center; text-align: center; color: var(--link); font-weight: 700; }

.list-links { list-style: none; padding: 0; margin: 0; }
.list-links li { margin: 0; }
.row-link {
  display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 10px 14px;
  border-radius: 12px; color: var(--ink); text-decoration: none;
}
.row-link:hover { background: var(--moss-50); }
.row-link + .row-link, .list-links li + li .row-link { border-top: 1px solid var(--line); }
.row-link .rl-ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--moss-100); color: var(--brand); flex: none; }
.row-link .rl-body { flex: 1; min-width: 0; }
.row-link .rl-body strong { display: block; line-height: 1.25; }
.row-link .rl-body small { display: block; color: var(--ink-2); line-height: 1.35; }
.row-link > svg:last-child { color: var(--ink-3); }

.task { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.task:first-of-type { border-top: 0; }
.task-body { flex: 1; min-width: 0; }
.task-body strong { display: block; line-height: 1.3; }
.task-body small { color: var(--ink-2); }

.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 640px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { display: block; padding: 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.stat:hover { border-color: var(--moss-500); }
.stat b { display: block; font-size: 1.5rem; line-height: 1.1; }
.stat span { display: block; font-size: .86rem; color: var(--ink-2); margin: 2px 0 8px; }

.status-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--ink-2); font-size: .88rem; }

/* ---------- Khẩn cấp ---------- */
.call-panel {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 16px 18px; border-radius: 16px;
  background: var(--danger-bg); border: 1px solid var(--danger-line); margin-bottom: 18px;
}
.call-panel p { margin: 0; flex: 1 1 220px; }
.call-big {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 58px; padding: 0 26px; border-radius: 14px; background: var(--danger-solid); color: #fff;
  font-size: 1.3rem; font-weight: 700; text-decoration: none; box-shadow: 0 4px 14px rgba(194, 36, 27, .3);
}
.call-big:hover { background: var(--danger-solid-hover); }
.call-big svg { width: 26px; height: 26px; }
.numbers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: 100%; }
.num-chip { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 58px; padding: 6px; border-radius: 12px; background: var(--surface); border: 1px solid var(--danger-line); color: var(--ink); text-decoration: none; text-align: center; line-height: 1.15; }
.num-chip b { font-size: 1.2rem; color: var(--danger); }
.num-chip small { font-size: .78rem; color: var(--ink-2); }

.group-title { display: flex; align-items: center; gap: 10px; margin: 26px 0 10px; font-size: 1.05rem; color: var(--ink-2); }
.group-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Thẻ tình huống */
.hz-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 8px; }
.hz-head .hz-ico { width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; background: var(--danger-bg); color: var(--danger-solid); flex: none; }
.hz-head .hz-ico svg { width: 32px; height: 32px; }
.hz-head.is-knowledge .hz-ico { background: var(--info-bg); color: var(--info); }
.hz-head h1 { margin: 2px 0 4px; }
.hz-when { color: var(--ink-2); margin: 0; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; padding: 5px; border-radius: 14px; background: var(--bg-2); margin: 16px 0 12px; }
.seg button {
  min-width: 0; min-height: var(--tap); padding: 6px 10px; border-radius: 10px; border: 0; background: transparent; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; color: var(--ink-2); line-height: 1.2; text-align: center;
}
@media (max-width: 520px) {
  .seg button { flex-direction: column; gap: 2px; padding: 6px 4px; font-size: .86rem; min-height: 58px; }
}
.seg button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

.do-now { border: 2px solid var(--brand); border-radius: 18px; padding: 18px 18px 8px; background: var(--surface); margin: 14px 0; box-shadow: var(--shadow); }
.do-now > h2 { display: flex; align-items: center; gap: 10px; font-size: 1.2rem; margin-bottom: 12px; }
.steps { list-style: none; padding: 0; margin: 0 0 10px; counter-reset: st; }
.steps > li { counter-increment: st; position: relative; padding: 2px 0 14px 54px; margin: 0; font-size: 1.08rem; }
.steps > li::before {
  content: counter(st); position: absolute; left: 0; top: 0; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; background: var(--brand-bg); color: var(--brand-ink); font-weight: 700; font-size: 1.1rem;
}
.steps > li > strong { display: block; font-size: 1.12rem; line-height: 1.3; }
.steps > li > span { display: block; color: var(--ink-2); font-size: .98rem; margin-top: 2px; }
.steps.small > li > strong { font-size: 1.04rem; }
.steps.small > li { font-size: 1rem; padding-left: 46px; }
.steps.small > li::before { width: 32px; height: 32px; font-size: .95rem; }

.avoid { border-radius: 16px; padding: 16px 18px 8px; background: var(--danger-bg); border: 1px solid var(--danger-line); margin: 14px 0; }
.avoid h2 { display: flex; align-items: center; gap: 10px; font-size: 1.12rem; color: var(--danger); margin-bottom: 8px; }
.xlist { list-style: none; padding: 0; margin: 0 0 8px; }
.xlist li { position: relative; padding-left: 32px; margin: 0 0 10px; }
.xlist li::before {
  content: "✕"; position: absolute; left: 0; top: .05em; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font-size: 13px; font-weight: 700; color: #fff; background: var(--danger-solid); font-family: system-ui, sans-serif;
}
.clist { list-style: none; padding: 0; margin: 0 0 8px; }
.clist li { position: relative; padding-left: 32px; margin: 0 0 10px; }
.clist li::before {
  content: "✓"; position: absolute; left: 0; top: .05em; width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font-size: 13px; font-weight: 700; color: #fff; background: var(--moss-500); font-family: system-ui, sans-serif;
}

.action-bar { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 16px 0; }
@media (min-width: 560px) { .action-bar { grid-template-columns: 1fr 1fr; } }

details.phase { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin: 10px 0; box-shadow: var(--shadow); }
details.phase > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 10px 16px; font-weight: 700; font-size: 1.05rem;
}
details.phase > summary::-webkit-details-marker { display: none; }
details.phase > summary::after { content: ""; margin-left: auto; width: 10px; height: 10px; border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: rotate(45deg); transition: transform .2s; }
details.phase[open] > summary::after { transform: rotate(-135deg); }
details.phase > summary .ph-dot { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--moss-100); color: var(--brand); }
details.phase > .ph-body { padding: 0 18px 12px; }
details.phase > .ph-body > ul { padding-left: 1.2em; }

.meta-box { margin-top: 22px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px dashed var(--line-2); font-size: .88rem; color: var(--ink-2); }
.meta-box p { margin: 0 0 .4em; }
.meta-box ul { margin: .2em 0 .4em; padding-left: 1.1em; }
.src-tag { font-weight: 700; color: var(--ink); }

/* Sơ cứu theo tuổi */
.age-note { font-size: .9rem; color: var(--ink-2); }

/* Nhịp ép tim */
.metronome { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); margin: 14px 0; }
.beat { width: 54px; height: 54px; border-radius: 50%; background: var(--moss-100); display: grid; place-items: center; color: var(--danger-solid); flex: none; }
.beat svg { width: 30px; height: 30px; }
.beat.on { animation: beat var(--beat, .545s) infinite; }
@keyframes beat { 0% { transform: scale(1.18); background: var(--danger-bg); } 40% { transform: scale(1); } 100% { transform: scale(1); } }
.metronome .mt-text { flex: 1 1 200px; }

/* Đèn & còi */
.light-layer { position: fixed; inset: 0; z-index: 200; background: #fff; display: flex; align-items: flex-end; justify-content: center; padding: 24px 24px calc(24px + var(--safe-b)); }
.light-layer.off { background: #000; }
.light-layer .btn { background: #222; color: #fff; border-color: #444; }

/* ---------- Học ---------- */
.chapter { display: block; padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); margin-bottom: 12px; box-shadow: var(--shadow); }
.chapter-head { display: flex; gap: 14px; align-items: flex-start; }
.chapter-no { width: 46px; height: 46px; border-radius: 14px; background: var(--moss-100); color: var(--brand); display: grid; place-items: center; font-weight: 700; font-size: 1.2rem; flex: none; }
.chapter-no.done { background: var(--moss-500); color: #fff; }
.chapter h3 { margin: 0 0 2px; }
.chapter .progress { margin: 10px 0 4px; }
.lesson-list { list-style: none; padding: 0; margin: 10px 0 0; }
.lesson-list a { display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 6px 10px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.lesson-list a:hover { background: var(--moss-50); }
.lesson-list .ls-state { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; flex: none; }
.lesson-list .ls-state.done { background: var(--moss-500); border-color: var(--moss-500); color: #fff; }
.lesson-list .ls-state svg { width: 16px; height: 16px; stroke-width: 3; }
.lesson-list a > span:nth-child(2) { flex: 1; }

.lesson-goal { padding: 14px 16px; border-left: 4px solid var(--moss-500); background: var(--moss-50); border-radius: 0 12px 12px 0; margin: 14px 0; }
.lesson h2 { margin-top: 1.6em; display: flex; align-items: center; gap: 10px; }
.lesson h2 svg { color: var(--moss-500); }
.figure { margin: 16px 0; padding: 14px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.figure svg.ill { width: 100%; height: auto; display: block; stroke: none; stroke-width: 0; }
.figure figcaption { font-size: .86rem; color: var(--ink-2); margin-top: 8px; text-align: center; }

.homework { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius); background: var(--warn-bg); border: 1px solid var(--warn-line); }

.quiz { margin-top: 10px; }
.q { padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); margin-bottom: 14px; box-shadow: var(--shadow); }
.q-text { font-weight: 700; margin-bottom: 10px; }
.q-n { color: var(--ink-3); font-weight: 400; margin-right: 6px; }
.opt {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: var(--tap); padding: 10px 14px; margin: 0 0 8px;
  border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--surface-2); text-align: left; cursor: pointer; line-height: 1.35;
}
.opt:hover:not([disabled]) { border-color: var(--moss-500); background: var(--moss-50); }
.opt .opt-k { width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; flex: none; font-weight: 700; font-size: .85rem; }
.opt[disabled] { cursor: default; }
.opt.correct { border-color: var(--ok); background: var(--ok-bg); }
.opt.correct .opt-k { background: var(--ok); border-color: var(--ok); color: #fff; }
.opt.wrong { border-color: var(--danger); background: var(--danger-bg); }
.opt.wrong .opt-k { background: var(--danger-solid); border-color: var(--danger-solid); color: #fff; }
.explain { padding: 10px 14px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); font-size: .95rem; }
.explain b { display: block; }

/* ---------- Chuẩn bị ---------- */
.tool-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 640px) { .tool-grid { grid-template-columns: 1fr 1fr; } }
.tool { display: flex; gap: 14px; padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; box-shadow: var(--shadow); }
.tool:hover { border-color: var(--moss-500); background: var(--moss-50); }
.tool .tl-ico { width: 48px; height: 48px; border-radius: 14px; background: var(--moss-100); color: var(--brand); display: grid; place-items: center; flex: none; }
.tool .tl-ico svg { width: 26px; height: 26px; }
.tool strong { display: block; font-size: 1.06rem; }
.tool small { display: block; color: var(--ink-2); line-height: 1.35; margin-top: 2px; }
.tool .tl-meta { margin-top: 8px; }

.form-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 560px) { .form-grid.two { grid-template-columns: 1fr 1fr; } }
.field label, .field .label { display: block; font-weight: 700; margin-bottom: 4px; }
.field .hint { display: block; font-size: .84rem; color: var(--ink-2); margin-top: 4px; line-height: 1.35; }
.input, .field input, .field textarea, .field select {
  width: 100%; min-height: var(--tap); padding: 10px 12px; border-radius: 12px;
  border: 1.5px solid var(--line-2); background: var(--surface); color: var(--ink); font-size: 1rem;
}
.field textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
.field input:focus, .field textarea:focus, .field select:focus, .input:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 22%, transparent); }
.field.has-error input { border-color: var(--danger-solid); background: var(--danger-bg); }
.field-error { display: flex; gap: 6px; align-items: center; color: var(--danger); font-size: .88rem; margin-top: 4px; font-weight: 700; }
.field-error svg { width: 1em; height: 1em; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-btn {
  min-height: 44px; padding: 6px 16px; border-radius: 999px; border: 1.5px solid var(--line-2); background: var(--surface); cursor: pointer; font-weight: 700; color: var(--ink-2);
}
.chip-btn[aria-pressed="true"] { background: var(--brand-bg); border-color: var(--brand-bg); color: var(--brand-ink); }
.input-unit { position: relative; }
.input-unit input { padding-right: 64px; }
.input-unit .unit { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-size: .9rem; pointer-events: none; }

.result { padding: 18px; border-radius: 16px; background: var(--moss-50); border: 1.5px solid var(--moss-200); }
.result-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
@media (min-width: 560px) { .result-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.result-grid div { padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.result-grid b { display: block; font-size: 1.4rem; line-height: 1.15; }
.result-grid span { font-size: .82rem; color: var(--ink-2); }
.result-grid .is-missing b { color: var(--danger); }
.result-grid .is-ok b { color: var(--ok); }
.formula { font-size: .92rem; color: var(--ink-2); margin: 0 0 10px; }
.jugs { display: flex; flex-wrap: wrap; gap: 4px; margin: 10px 0; }
.jug { width: 18px; height: 26px; border-radius: 4px 4px 3px 3px; border: 1.5px solid var(--moss-500); position: relative; overflow: hidden; background: var(--surface); }
.jug i { position: absolute; left: 0; right: 0; bottom: 0; background: #5b9bd5; }

.kit-summary { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 14px; }
.kit-group { margin: 20px 0 6px; font-size: 1.02rem; color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.kit-item { border: 1px solid var(--line); background: var(--surface); border-radius: 12px; margin-bottom: 8px; }
.kit-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 6px; min-height: 58px; }
.kit-check { position: relative; display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; min-height: var(--tap); cursor: pointer; padding: 4px 6px; border-radius: 10px; }
.kit-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.kit-check .box { width: 30px; height: 30px; border-radius: 8px; border: 2px solid var(--line-2); display: grid; place-items: center; flex: none; background: var(--surface); }
.kit-check .box svg { width: 18px; height: 18px; stroke-width: 3; opacity: 0; }
.kit-check input:checked + .box { background: var(--moss-500); border-color: var(--moss-500); color: #fff; }
.kit-check input:checked + .box svg { opacity: 1; }
.kit-check input:focus-visible + .box { outline: 3px solid var(--focus); outline-offset: 2px; }
.kit-name { flex: 1; min-width: 0; line-height: 1.3; }
.kit-name small { display: block; color: var(--ink-2); }
.kit-more { min-width: 44px; }
.kit-detail { padding: 4px 14px 14px; border-top: 1px dashed var(--line); }
.kit-detail .form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 520px) { .kit-detail .form-grid { grid-template-columns: 1fr 1fr; } }
.kit-detail .field label { font-size: .84rem; }
.kit-detail input { min-height: 44px; font-size: .95rem; padding: 8px 10px; }

.member { padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); margin-bottom: 10px; }
.member-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.member-head strong { flex: 1; }
.check-inline { display: flex; align-items: center; gap: 10px; min-height: var(--tap); cursor: pointer; }
.check-inline input { width: 22px; height: 22px; accent-color: var(--moss-500); }
.save-state { font-size: .86rem; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; }

/* Diễn tập */
.practice-banner { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: var(--info-bg); border: 1.5px dashed var(--info-line); color: var(--info); font-weight: 700; margin-bottom: 14px; }
.scene { padding: 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.scene-step { font-size: .84rem; color: var(--ink-3); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.scene-text { font-size: 1.1rem; margin: 6px 0 14px; }
.verdict { padding: 12px 14px; border-radius: 12px; margin: 10px 0; border: 1px solid; }
.verdict.safe { background: var(--ok-bg); border-color: var(--ok-line); }
.verdict.risky { background: var(--warn-bg); border-color: var(--warn-line); }
.verdict.danger { background: var(--danger-bg); border-color: var(--danger-line); }
.verdict b { display: block; }

/* Tìm kiếm */
.result-group { margin-top: 18px; }
mark { background: color-mix(in srgb, var(--warn-solid) 28%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.empty { text-align: center; padding: 28px 16px; color: var(--ink-2); }
.empty svg { width: 46px; height: 46px; color: var(--ink-3); }

/* Nguồn */
.src-list { list-style: none; padding: 0; }
.src-list li { padding: 12px 0; border-top: 1px solid var(--line); margin: 0; }
.src-list .sid { display: inline-block; min-width: 3.2em; font-weight: 700; }
.src-list a { word-break: break-word; }

/* Thông báo */
.banner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 16px; border-radius: 14px; margin: 0 auto 16px; max-width: 46rem; border: 1px solid; }
.banner p { margin: 0; flex: 1 1 220px; }
.banner-info { background: var(--info-bg); border-color: var(--info-line); }
.banner-warn { background: var(--warn-bg); border-color: var(--warn-line); }
.banner-ok { background: var(--ok-bg); border-color: var(--ok-line); }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + var(--safe-b) + 14px); transform: translate(-50%, 20px);
  z-index: 120; max-width: min(92vw, 30rem); padding: 12px 18px; border-radius: 14px;
  background: var(--ink); color: var(--bg); box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 1024px) { .toast { bottom: 24px; } }

.noscript { padding: 20px; background: #fdecea; color: #9e1b14; font-size: 20px; text-align: center; }

.kbd { font-family: ui-monospace, Consolas, monospace; font-size: .85em; padding: 1px 6px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--surface-2); }

/* Trang in kế hoạch */
.print-sheet { background: #fff; color: #111; padding: 8px 0; }
.print-sheet h1 { color: #111; }
.print-sheet table { width: 100%; border-collapse: collapse; margin: 8px 0 16px; font-size: .95rem; }
.print-sheet th, .print-sheet td { border: 1px solid #999; padding: 6px 8px; text-align: left; vertical-align: top; }
.print-sheet th { background: #eee; width: 34%; }
.print-sheet .ps-head { display: flex; align-items: center; gap: 12px; border-bottom: 2px solid #111; padding-bottom: 8px; margin-bottom: 12px; }
.print-sheet .ps-head svg { width: 44px; height: 44px; stroke: none; --logo-shield: #2f5a3f; --logo-leaf: #f3ecd8; }
.print-sheet .ps-numbers { display: flex; gap: 16px; flex-wrap: wrap; font-weight: 700; border: 2px solid #111; padding: 8px 12px; border-radius: 8px; }

@media print {
  @page { margin: 14mm; }
  html { font-size: 12pt !important; }
  body { background: #fff; color: #111; }
  .topbar, .sidenav, .tabbar, .footer, .banner-slot, .no-print, .toast, .back-link { display: none !important; }
  .shell { display: block; }
  main { padding: 0 !important; }
  .view { max-width: none; }
  a { color: #111; text-decoration: none; }
  .card, .print-sheet { box-shadow: none; border: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* Nhịp ép tim là chức năng, không phải trang trí: vẫn chạy khi giảm chuyển động nhưng không phóng to. */
@media (prefers-reduced-motion: reduce) {
  .beat.on { animation: beat-flat var(--beat, .545s) infinite !important; }
}
@keyframes beat-flat { 0%, 30% { background: var(--danger-solid); color: #fff; } 31%, 100% { background: var(--moss-100); } }

/* Hình minh họa SVG */
.ill text { stroke: none; }
.ill svg { width: 32px; height: 32px; }
.page-toc button { display: block; width: 100%; text-align: left; background: none; border: 0; cursor: pointer; }
.figure svg.ill { max-width: 560px; margin: 0 auto; }

/* Thanh đầu trang giữ cỡ cố định để không vỡ khi tăng cỡ chữ nội dung */
.brand-name { font-size: 21px; }
.brand-tag { font-size: 13.5px; }
.call-chip { font-size: 19px; }
.icon-btn { font-size: 16px; }
@media (max-width: 559px) {
  .brand-name { font-size: 18px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .icon-btn { font-size: 10.5px; }
  .call-chip { font-size: 18px; }
}
@media (max-width: 400px) {
  .brand-name { font-size: 16.5px; }
}
.tab { font-size: 12.5px; }

/* =================== Màu theo nhóm nguy cơ =================== */
:root { --gc: var(--brand); --gc-bg: var(--moss-100); --gc-ground: var(--moss-200); }
.g-vn { --gc: #2d6fa3; --gc-bg: #e3eef7; --gc-ground: #c9dcea; }
.g-urban { --gc: #c24a1c; --gc-bg: #fbe9e0; --gc-ground: #f1d2c2; }
.g-geo { --gc: #8a5a2b; --gc-bg: #f3e9dd; --gc-ground: #e3d2bd; }
.g-env { --gc: #a96d12; --gc-bg: #fbf1dc; --gc-ground: #efdcb4; }
.g-health { --gc: #0f766e; --gc-bg: #dff3f0; --gc-ground: #c3e4df; }
.g-large { --gc: #6d3fc0; --gc-bg: #ece6f8; --gc-ground: #d9cff0; }
.g-know { --gc: #475569; --gc-bg: #e7ebf0; --gc-ground: #d3dae2; }
.g-fa { --gc: #c2241b; --gc-bg: #fdecea; --gc-ground: #f6d0cc; }
:root[data-theme="dark"] .g-vn { --gc: #7fb4e0; --gc-bg: #172633; --gc-ground: #1e3242; }
:root[data-theme="dark"] .g-urban { --gc: #f0936a; --gc-bg: #2f1d16; --gc-ground: #3b251c; }
:root[data-theme="dark"] .g-geo { --gc: #d4a373; --gc-bg: #2a2118; --gc-ground: #352a1f; }
:root[data-theme="dark"] .g-env { --gc: #f0c068; --gc-bg: #2c2412; --gc-ground: #382e17; }
:root[data-theme="dark"] .g-health { --gc: #6fd1c4; --gc-bg: #13292a; --gc-ground: #183435; }
:root[data-theme="dark"] .g-large { --gc: #b49af0; --gc-bg: #221c33; --gc-ground: #2b2440; }
:root[data-theme="dark"] .g-know { --gc: #a8b4c4; --gc-bg: #1d232b; --gc-ground: #262e38; }
:root[data-theme="dark"] .g-fa { --gc: #ff8a80; --gc-bg: #351513; --gc-ground: #42201d; }

/* Ô tình huống */
.hz-tile .hz-ico, .hz-tile.is-knowledge .hz-ico { background: var(--gc-bg); color: var(--gc); }
.hz-tile { border-top: 3px solid var(--gc); }
.hz-tile:hover { border-color: var(--gc); background: var(--surface); }
.hz-tile.more { border-top-color: var(--line); }
.hz-grid.dense { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 640px) { .hz-grid.dense { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .hz-grid.dense { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.hz-tile.compact { min-height: 0; padding: 12px 6px 10px; align-items: center; text-align: center; gap: 8px; }
.hz-tile.compact .hz-ico { width: 52px; height: 52px; border-radius: 16px; }
.hz-tile.compact .hz-ico svg { width: 30px; height: 30px; }
.hz-tile.compact strong { font-size: .9rem; line-height: 1.2; }
.group-title .g-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--gc); flex: none; }
.group-title { color: var(--ink); font-weight: 700; }

/* Trang thẻ */
.hz-page .hz-head .hz-ico { background: var(--gc-bg); color: var(--gc); }
.hz-page .eyebrow { color: var(--gc); }
.scene-wrap { border-radius: 18px; overflow: hidden; margin: 6px 0 14px; line-height: 0; box-shadow: var(--shadow); }
.scene-wrap svg.ill { width: 100%; height: auto; display: block; stroke: none; }
.hz-page .do-now { border-color: var(--gc); }
.hz-page .do-now > h2 svg { color: var(--gc); }

/* Bước làm ngay có biểu tượng */
.steps > li.has-pic { padding: 4px 0 16px 72px; min-height: 64px; }
.steps > li.has-pic::before { display: none; }
.steps .pic { position: absolute; left: 0; top: 0; width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--gc-bg); color: var(--gc); }
.steps .pic svg { width: 32px; height: 32px; stroke-width: 1.9; }
.steps .pic b { position: absolute; top: -7px; left: -7px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-bg); color: var(--brand-ink); font-size: 13px; font-family: system-ui, -apple-system, "Segoe UI", sans-serif; box-shadow: 0 0 0 2px var(--surface); }
.steps .st-body > strong { display: block; font-size: 1.1rem; line-height: 1.3; }
.steps .st-body > span { display: block; color: var(--ink-2); font-size: .95rem; margin-top: 3px; line-height: 1.45; }
.steps.small .st-body > strong { font-size: 1.03rem; }
.steps > li:not(.has-pic) .st-body { display: block; }

/* Tránh làm có biểu tượng gạch chéo */
.xlist li.has-pic { padding-left: 56px; min-height: 44px; display: flex; align-items: center; }
.xlist li.has-pic::before { display: none; }
.pic-no { position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--surface); color: var(--danger); border: 1.5px solid var(--danger-line); overflow: hidden; }
.pic-no svg { width: 24px; height: 24px; }
.pic-no::after { content: ""; position: absolute; left: 50%; top: -6px; bottom: -6px; width: 3px; background: var(--danger-solid); transform: translateX(-50%) rotate(45deg); border-radius: 2px; }
@media (min-width: 720px) { .avoid .xlist { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; } .avoid .xlist li { margin: 0 0 6px; } }

/* Thẻ kiến thức */
.pic.sm { width: 36px; height: 36px; border-radius: 10px; display: inline-grid; place-items: center; background: var(--gc-bg); color: var(--gc); flex: none; }
.pic.sm svg { width: 22px; height: 22px; }
.know-card .card-title svg { color: inherit; }

/* Nguồn thu gọn */
details.meta-box { padding: 0; }
details.meta-box > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 8px 14px; color: var(--ink-2); font-size: .9rem; }
details.meta-box > summary::-webkit-details-marker { display: none; }
details.meta-box > summary::after { content: "+"; margin-left: auto; font-size: 1.2rem; }
details.meta-box[open] > summary::after { content: "–"; }
details.meta-box > :not(summary) { margin-left: 14px; margin-right: 14px; }
details.meta-box[open] { padding-bottom: 10px; }

/* Chương học có biểu tượng */
.chapter-no svg { width: 26px; height: 26px; }
.chapter .eyebrow { margin-bottom: 0; }
.hz-head { margin-bottom: 4px; }
.hz-page .hz-head h1 { margin-top: 0; }
@media (max-width: 559px) { .hz-page .eyebrow { display: none; } .hz-page h1 { font-size: 1.6rem; } }

/* Đầu thẻ: tiêu đề + tranh (máy tính: hai cột) */
@media (min-width: 900px) {
  .hz-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 22px; align-items: center; margin-bottom: 8px; }
  .hz-top .scene-wrap { margin: 0; }
}
.steps > li > .st-body { display: block; color: var(--ink); font-size: inherit; margin-top: 0; }
