/* Web Toán tư duy, Trạm Tư Duy. Điện thoại trước, nới ra cho máy tính.
   Không có chữ nào dưới 16 px. Màu theo bộ nhận diện Bản 2 (19/11/2026). */

:root {
  --tim: #463665;
  --tim-dam: #33254d;
  --tim-nhat: #8b77c2;
  --tim-nen: #efebf7;
  --dat: #7a4e32;
  --dat-nen: #f6ede4;
  --cat: #d2a06c;
  --bac-ha: #eaf7f1;
  --bac-ha-dam: #d6eee3;
  --kem: #fff9f0;
  --trang: #ffffff;
  --chu: #1f1b2b;
  --chu-phu: #4a4458;
  --chu-mo: #6a6478;
  --vien: #e3dfeb;
  --vien-dam: #cbc4da;
  --be: 14px;
  --rong: 1120px;
  --le: 20px;
  --phong: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  /* bảy mạch: chấm màu luôn đi kèm chữ */
  --m-LG: #463665; --m-SO: #7a4e32; --m-SH: #2e8b57; --m-QL: #b07514;
  --m-DT: #c4553a; --m-MH: #8b77c2; --m-HH: #2f6f9f;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
body {
  margin: 0; background: var(--kem); color: var(--chu);
  font-family: var(--phong); font-size: 1.0625rem; line-height: 1.65;
  -webkit-font-smoothing: antialiased; overflow-wrap: break-word;
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

img, svg { max-width: 100%; height: auto; }
a { color: var(--tim); text-underline-offset: 3px; }
a:hover { color: var(--tim-dam); }
:focus-visible { outline: 3px solid var(--tim-nhat); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3, h4 { color: var(--tim); font-weight: 600; line-height: 1.18; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 1.5rem + 3vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 1.25rem + 1.6vw, 2.4rem); }
h3 { font-size: 1.25rem; line-height: 1.3; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.2em; margin: 0 0 1em; }
.wrap { width: 100%; max-width: var(--rong); margin-inline: auto; padding-inline: var(--le); }
.nho { font-size: 1rem; color: var(--chu-phu); }
.nhan { display: block; font-size: 1rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--dat); margin-bottom: .5rem; }
.an-thi-giac { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bo-qua { position: absolute; left: 12px; top: -60px; background: var(--tim); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 100; }
.bo-qua:focus { top: 12px; color: #fff; }

/* ===== Đầu trang ===== */
.dau { position: sticky; top: 0; z-index: 50; background: rgba(255, 249, 240, .96); border-bottom: 1px solid var(--vien); backdrop-filter: saturate(1.4) blur(8px); }
.dau__hang { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.dau__logo { display: inline-flex; align-items: center; min-height: 48px; }
.dau__logo img { display: block; height: 44px; width: auto; }
.nut-menu { display: none; font: inherit; font-weight: 600; color: var(--tim); background: transparent; border: 1.5px solid var(--tim); border-radius: 999px; min-height: 48px; padding: 0 20px; cursor: pointer; }
.nut-menu[aria-expanded="true"] { background: var(--tim-nen); }
.menu { padding: 8px 0 20px; max-height: calc(100vh - 72px); overflow-y: auto; }
.menu ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.menu a { display: flex; align-items: center; min-height: 48px; padding: 0 12px; border-radius: 10px; text-decoration: none; font-weight: 500; color: var(--chu); }
.menu a:hover, .menu a[aria-current="page"] { background: var(--tim-nen); color: var(--tim); }
.menu a.btn--chinh, .menu a.btn--chinh:hover { background: var(--tim); color: #fff; }
.menu a.btn--chinh:hover { background: var(--tim-dam); }
.menu .menu__phu { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--vien); }
.menu .menu__phu a { color: var(--chu-phu); font-weight: 400; }
.menu .btn { width: 100%; margin-top: 10px; }
.js .nut-menu { display: inline-flex; align-items: center; }
.js .menu[hidden] { display: none; }
.dau__hang { flex-wrap: wrap; }
.menu { flex-basis: 100%; }
@media (min-width: 1180px) {
  .js .nut-menu { display: none; }
  .dau__hang { min-height: 72px; flex-wrap: nowrap; }
  .js .menu[hidden] { display: block; }
  .menu { padding: 0; flex: 1; flex-basis: auto; max-height: none; overflow: visible; }
  .menu ul { display: flex; align-items: center; justify-content: flex-end; gap: 2px; }
  .menu a { min-height: 44px; padding: 0 10px; white-space: nowrap; }
  .menu .menu__phu { margin: 0 0 0 8px; padding: 0 0 0 8px; border-top: 0; border-left: 1px solid var(--vien); }
  .menu .menu__khong-pc { display: none; }
  .menu .btn { width: auto; margin: 0 0 0 8px; min-height: 44px; padding: 0 20px; }
}

/* ===== Nút ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 28px; border-radius: 999px; border: 1.5px solid var(--tim); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; transition: background-color .16s ease, transform .12s ease; }
.btn--chinh { background: var(--tim); color: #fff; }
.btn--chinh:hover { background: var(--tim-dam); color: #fff; }
.btn--phu { background: transparent; color: var(--tim); }
.btn--phu:hover { background: var(--tim-nen); }
.btn--sang { background: #fff; color: var(--tim); border-color: #fff; }
.btn--sang:hover { background: var(--tim-nen); }
.btn:active { transform: scale(.98); }
.hang-nut { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.5rem; }
@media (max-width: 479px) { .hang-nut .btn { width: 100%; } }
.lien-ket-mui { font-weight: 600; text-decoration: none; }
.lien-ket-mui::after { content: " ›"; }
.lien-ket-mui:hover { text-decoration: underline; }

/* ===== Mở đầu ===== */
.mo { position: relative; overflow: hidden; padding: 40px 0 48px; background:
  radial-gradient(120% 70% at 85% 100%, var(--bac-ha-dam) 0, var(--bac-ha) 38%, rgba(234,247,241,0) 70%), var(--kem); }
.mo__luoi { display: grid; gap: 28px; align-items: center; }
.mo h1 { margin-bottom: .4em; }
.mo h1 span { display: block; color: #5b4a8c; }
.mo__loi { font-size: clamp(1.125rem, 1.05rem + .5vw, 1.35rem); line-height: 1.5; color: var(--chu-phu); max-width: 36ch; }
.mo__cay { justify-self: center; width: min(46vw, 210px); }
.mo__cay img { display: block; width: 100%; }
@media (min-width: 760px) {
  .mo { padding: 72px 0 80px; }
  .mo__luoi { grid-template-columns: 1.35fr .65fr; gap: 48px; }
  .mo__cay { width: min(100%, 320px); }
}
.so-chip { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 28px 0 0; padding: 0; list-style: none; }
.so-chip li { background: #fff; border: 1px solid var(--vien); border-radius: var(--be); padding: 12px 14px; }
.so-chip b { display: block; font-size: 1.75rem; line-height: 1.1; color: var(--tim); font-weight: 600; }
.so-chip span { font-size: 1rem; color: var(--chu-phu); }
@media (min-width: 760px) { .so-chip { grid-template-columns: repeat(4, 1fr); max-width: 640px; } }

/* ===== Khối nội dung ===== */
.khoi { padding: 48px 0; }
.khoi--bac-ha { background: var(--bac-ha); }
.khoi--trang { background: var(--trang); }
.khoi--tim { background: var(--tim); color: #fff; }
.khoi--tim h2, .khoi--tim h3 { color: #fff; }
.khoi--tim .nhan { color: #f0d9bf; }
.khoi--tim p { color: #ece7f5; }
.khoi__dau { max-width: 44rem; margin-bottom: 28px; }
.khoi__dau p { color: var(--chu-phu); font-size: 1.125rem; margin-bottom: 0; }
@media (min-width: 760px) { .khoi { padding: 72px 0; } }

.dau-trang { background: var(--bac-ha); padding: 40px 0 32px; border-bottom: 1px solid var(--bac-ha-dam); }
.dau-trang h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem); margin-bottom: .3em; }
.dau-trang p { font-size: 1.1875rem; line-height: 1.5; color: var(--chu-phu); max-width: 44rem; margin: 0; }
.vet-banh { font-size: 1rem; margin: 0 0 14px; color: var(--chu-phu); }
.vet-banh a { color: var(--chu-phu); }

.luoi { display: grid; gap: 16px; }
@media (min-width: 640px) { .luoi--2, .luoi--3, .luoi--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .luoi--3 { grid-template-columns: repeat(3, 1fr); } .luoi--4 { grid-template-columns: repeat(4, 1fr); } }
.the { background: #fff; border: 1px solid var(--vien); border-radius: var(--be); padding: 22px; }
.the h3 { margin-bottom: .35em; }
.the p:last-child { margin-bottom: 0; }
.the--nen { background: var(--tim-nen); border-color: transparent; }
.the--dat { background: var(--dat-nen); border-color: transparent; }
@media (prefers-reduced-motion: no-preference) {
  a.the { transition: transform .16s ease, box-shadow .16s ease; }
  a.the:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(70, 54, 101, .12); }
}
a.the { display: block; text-decoration: none; color: inherit; }
a.the:hover h3 { text-decoration: underline; text-underline-offset: 4px; }

/* Ba năm */
.nam { position: relative; padding-top: 26px; }
.nam::before { content: ""; position: absolute; left: 22px; right: 22px; top: 0; height: 5px; border-radius: 0 0 5px 5px; background: var(--tim); }
.nam--2::before { background: var(--dat); }
.nam--3::before { background: var(--tim-nhat); }
.nam__tuoi { font-size: 1rem; color: var(--chu-phu); margin: 0 0 .6em; }
.nam__loi { color: var(--dat); font-weight: 600; font-style: normal; margin: .2em 0 .9em; }
.nam__so { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; padding: 0; list-style: none; font-size: 1rem; color: var(--chu-phu); }
.nam__so b { color: var(--tim); }

/* Bốn bước */
.buoc { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 760px) { .buoc { grid-template-columns: repeat(4, 1fr); } }
.buoc li { background: #fff; border: 1px solid var(--vien); border-radius: var(--be); padding: 18px 20px; border-top: 6px solid var(--c, var(--tim)); }
.buoc b { display: block; font-size: 1.2rem; letter-spacing: .04em; color: var(--chu); margin-bottom: .2em; }
.buoc span { color: var(--chu-phu); }
.buoc .b-think { --c: #2f6f9f; } .buoc .b-plan { --c: #2e8b57; } .buoc .b-solve { --c: #b07514; } .buoc .b-explain { --c: #c4553a; }

/* Mạch */
.mach-hang { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 16px; border-radius: 999px; background: #fff; border: 1.5px solid var(--vien-dam); color: var(--chu); text-decoration: none; font-weight: 500; }
.chip::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--c, var(--tim)); flex: none; }
a.chip:hover { background: var(--tim-nen); border-color: var(--tim); }
.chip[aria-current="true"] { background: var(--tim); border-color: var(--tim); color: #fff; }
.chip[aria-current="true"]::before { box-shadow: 0 0 0 2px #fff; }
.c-LG { --c: var(--m-LG); } .c-SO { --c: var(--m-SO); } .c-SH { --c: var(--m-SH); } .c-QL { --c: var(--m-QL); }
.c-DT { --c: var(--m-DT); } .c-MH { --c: var(--m-MH); } .c-HH { --c: var(--m-HH); }
.mach-the { border-left: 6px solid var(--c); }
.mach-the .mach-bac { margin: 0; padding: 0; list-style: none; }
.mach-the .mach-bac li { padding: 6px 0; border-top: 1px solid var(--vien); }
.mach-the .mach-bac li:first-child { border-top: 0; }
.mach-the .mach-bac b { color: var(--tim); }

/* Thẻ Trạm */
.tram { border-left: 6px solid var(--c, var(--tim)); display: flex; flex-direction: column; gap: 4px; }
.tram__dau { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; color: var(--chu-phu); font-size: 1rem; }
.tram__dau b { color: var(--tim); font-size: 1.0625rem; }
.tram h3 { margin: 4px 0 2px; }
.tram__hoi { color: var(--chu-phu); margin: 0 0 .5em; }
.tram__hua { margin: 0; padding: 10px 12px; background: var(--bac-ha); border-radius: 10px; color: var(--chu); }
.tram__chan { margin-top: auto; padding-top: 10px; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 1rem; color: var(--chu-phu); }
.tram__chan i { font-style: normal; display: inline-flex; align-items: center; gap: 6px; }
.tram__chan i::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--tim)); }
.loc { display: grid; gap: 14px; margin-bottom: 28px; }
.loc h2 { font-size: 1.0625rem; margin: 0 0 8px; color: var(--chu-phu); font-weight: 600; letter-spacing: 0; }
.nhom-nam { margin: 36px 0 14px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.nhom-nam h2 { margin: 0; }
.nhom-nam span { color: var(--chu-phu); }
.mach-mo-ta { margin-bottom: 20px; padding: 16px 20px; background: #fff; border: 1px solid var(--vien); border-left: 6px solid var(--c); border-radius: var(--be); }
.mach-mo-ta p { margin: 0; }
.mach-mo-ta b { color: var(--tim); }

/* Dòng thời gian */
.dong { list-style: none; margin: 0; padding: 0 0 0 26px; border-left: 3px solid var(--vien-dam); display: grid; gap: 22px; }
.dong > li { position: relative; }
.dong > li::before { content: ""; position: absolute; left: -35px; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--tim); border: 3px solid var(--kem); }
.dong h3 { margin-bottom: .2em; }
.bang-buoi { width: 100%; border-collapse: collapse; margin: 12px 0 0; font-size: 1rem; }
.bang-buoi th, .bang-buoi td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--vien); vertical-align: top; }
.bang-buoi th { color: var(--chu-phu); font-weight: 600; }
.bang-buoi td:last-child, .bang-buoi th:last-child { text-align: right; white-space: nowrap; }
.bang-buoi tfoot td, .bang-buoi tfoot th { font-weight: 600; color: var(--tim); border-bottom: 0; }
.bang-cuon { overflow-x: auto; }
.bang-lh th, .bang-lh td { text-align: left; white-space: normal; }
.bang-lh th { width: 8.5rem; color: var(--tim); }
.bang-lh td:last-child, .bang-lh th:last-child { text-align: left; white-space: normal; }
.bang-lh .cho--nho { display: block; }
.cho--nho { max-width: 100%; }
@media (max-width: 639px) {
  .bang-lh, .bang-lh tbody, .bang-lh tr, .bang-lh th, .bang-lh td { display: block; width: 100%; }
  .bang-lh tr { padding: 10px 0; border-bottom: 1px solid var(--vien); }
  .bang-lh th, .bang-lh td { border: 0; padding: 2px 0; }
}

/* Chỗ chờ cô điền */
.cho { border: 2px dashed var(--dat); background: var(--dat-nen); border-radius: var(--be); padding: 18px 20px; color: var(--chu); }
.cho b.cho__nhan { display: inline-block; background: var(--dat); color: #fff; font-size: 1rem; font-weight: 600; letter-spacing: .03em; padding: 2px 10px; border-radius: 6px; margin-bottom: 8px; }
.cho p:last-child { margin-bottom: 0; }
.cho--nho { display: inline-block; padding: 4px 12px; border-width: 1.5px; border-radius: 8px; }
.cho--nho b.cho__nhan { margin: 0 6px 0 0; }

/* Hỏi đáp */
.hoi { border: 1px solid var(--vien); background: #fff; border-radius: var(--be); margin-bottom: 10px; }
.hoi summary { cursor: pointer; list-style: none; padding: 16px 52px 16px 20px; min-height: 56px; font-weight: 600; color: var(--tim); position: relative; }
.hoi summary::-webkit-details-marker { display: none; }
.hoi summary::after { content: "+"; position: absolute; right: 20px; top: 50%; translate: 0 -50%; font-size: 1.5rem; font-weight: 400; line-height: 1; }
.hoi[open] summary::after { content: "−"; }
.hoi__tra { padding: 0 20px 16px; color: var(--chu-phu); }
.hoi__tra p:last-child { margin-bottom: 0; }

/* Kêu gọi */
.keu { text-align: left; }
.keu .hang-nut { margin-top: 1.25rem; }
.lab-khoi { display: grid; gap: 22px; align-items: center; }
@media (min-width: 760px) { .lab-khoi { grid-template-columns: 1.2fr .8fr; } }
.lab-thung { background: #fff; color: var(--chu); border-radius: var(--be); padding: 20px; border: 1px solid var(--vien); }
.lab-thung b { display: block; color: var(--tim); margin-bottom: 4px; }
.lab-thung ul { margin: 8px 0 0; }

/* Chân trang */
.chan { background: var(--tim-dam); color: #e9e3f4; padding: 44px 0 32px; margin-top: 0; }
.chan a { color: #fff; }
.chan__luoi { display: grid; gap: 28px; }
@media (min-width: 760px) { .chan__luoi { grid-template-columns: 1.2fr 1fr 1fr; } }
.chan h2 { font-size: 1rem; letter-spacing: .06em; text-transform: uppercase; color: #f0d9bf; margin-bottom: 10px; }
.chan ul { list-style: none; margin: 0; padding: 0; }
.chan li a { display: inline-flex; min-height: 44px; align-items: center; }
.chan__logo { display: block; width: 150px; background: var(--kem); border-radius: 14px; padding: 12px; }
.chan__logo img { display: block; width: 100%; }
.chan__nho { margin-top: 28px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .18); font-size: 1rem; color: #d6cde8; }

.noi-dung p, .noi-dung li { max-width: 46rem; }
.hai-cot { display: grid; gap: 24px; }
@media (min-width: 760px) { .hai-cot { grid-template-columns: 1fr 1fr; gap: 36px; } }
.danh-sach-tick { list-style: none; padding: 0; }
.danh-sach-tick li { position: relative; padding-left: 28px; margin-bottom: .6em; }
.danh-sach-tick li::before { content: ""; position: absolute; left: 4px; top: .55em; width: 10px; height: 10px; border-radius: 50%; background: var(--tim-nhat); }
.luu-y { border-left: 6px solid var(--dat); background: var(--dat-nen); padding: 14px 18px; border-radius: 0 var(--be) var(--be) 0; }
.luu-y p:last-child { margin: 0; }
.chua-co-so { color: var(--chu-phu); }

@media print { .dau, .chan, .nut-menu { display: none; } body { background: #fff; } }
