/* Trang giới thiệu Dino Kids.
   Viết tay, không framework: cả trang chỉ có ba file (HTML + CSS này + ảnh),
   nên thời gian tải không phụ thuộc vào CDN nào — cùng lý do app không gọi
   dịch vụ ngoài. Bảng màu lấy đúng từ design/icon/app_icon.svg. */

:root {
  --brand-600: #2c6bd8;
  --brand-500: #3d8bfd;
  --brand-300: #6fc3ff;
  --accent: #ff7a1a;
  --pink: #ff9bb0;

  --ink: #17233a;
  --ink-soft: #47546b;
  --ink-faint: #6b7789;
  --line: #dfe5ee;
  --bg: #ffffff;
  --bg-tint: #f4f7fc;
  --bg-card: #ffffff;

  --radius: 18px;
  --wrap: 1080px;

  /* M PLUS Rounded 1c là font trong app, nhưng trang này KHÔNG tải font từ
     Google Fonts: một trang nói "không gọi dịch vụ bên thứ ba" mà lại nạp
     font từ máy chủ Google thì tự mâu thuẫn. Dùng font hệ thống. */
  --font-ja: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans",
    "Noto Sans JP", "Noto Sans", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font: var(--font-ja);

  /* Tiếng Hàn và tiếng Trung cũng dùng phông hệ thống, cùng lý do trên — và
     phải là danh sách RIÊNG chứ không nối thêm vào cuối danh sách trên.
     Trình duyệt chọn phông theo từng chữ, đi lần từ trái sang: "Hiragino
     Sans" và "Noto Sans JP" có đủ chữ Hán, nên đứng trước thì chữ Hán của
     trang tiếng Trung được vẽ bằng tự dạng NHẬT (骨, 直, 角 mỗi nước viết
     một kiểu) dù `lang` khai đúng `zh-Hans`. Phông Trung giản thể phải đứng trước
     mọi phông Nhật. Chữ Latin và số vẫn rơi về -apple-system / Segoe UI ở đầu
     danh sách, nên tên app và con số nhìn giống hệt các bản kia. */
  --font-ko: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
    "Segoe UI", "Malgun Gothic", "Noto Sans KR", "Noto Sans CJK KR",
    "Noto Sans", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-zh: -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Hiragino Sans GB", "Segoe UI", "Microsoft YaHei", "Noto Sans SC",
    "Noto Sans CJK SC", "Source Han Sans SC", "Noto Sans", Roboto,
    "Helvetica Neue", Arial, sans-serif;
}

/* Trang nào thì phông của thứ tiếng trang đó. Đổi biến `--font` ở gốc là đủ
   cho cả trang, kể cả ô nhập của form (`font: inherit`). */
:root:lang(ko) { --font: var(--font-ko); }
:root:lang(zh) { --font: var(--font-zh); }

/* Đoạn chữ khác thứ tiếng nằm giữa trang — tên ngôn ngữ trên thanh chọn,
   bảng chữ mẫu Hangul / chữ Hán trong mục môn học, tên truyện Nhật trên
   trang tiếng Trung. Không có ba dòng này thì 中文 trên trang tiếng Nhật
   mang tự dạng Nhật, và ㄱ ㄴ ㄷ trên trang tiếng Việt rơi vào phông nào
   máy tình cờ có. */
[lang|="ja"] { font-family: var(--font-ja); }
[lang|="ko"] { font-family: var(--font-ko); }
[lang|="zh"] { font-family: var(--font-zh); }

/* Tiếng Hàn viết cách từ như tiếng Việt, nhưng mặc định trình duyệt được
   ngắt dòng giữa hai âm tiết bất kỳ — từ 아이 rớt nửa sang dòng dưới. Giữ
   nguyên từ (`keep-all`), và chỉ bẻ giữa từ khi một từ dài hơn cả dòng. */
:lang(ko) { word-break: keep-all; overflow-wrap: break-word; }

/* Hangul và chữ Hán không có kiểu nghiêng: trình duyệt tự xô nghiêng chữ đứng,
   nét đổ lệch và trông như lỗi. Ví dụ đọc (<i>) trong hai thứ tiếng này để
   đứng, dấu ngoặc kép đã đủ tách nó khỏi câu dẫn. */
i:lang(ko), i:lang(zh) { font-style: normal; }

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--brand-600); }
a:hover { color: var(--brand-500); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* ---------- Thanh đầu trang ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.topbar .wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}

.brand img { width: 32px; height: 32px; border-radius: 8px; }

/* Menu mục chính (`mainnav()` trong `layout.py`). Màn rộng: một hàng với thương
   hiệu và ô ngôn ngữ. Màn ≤ 960 px: xuống hàng riêng, vuốt ngang được. Điện
   thoại ≤ 520 px: thu vào nút ☰ (từ 2026-11-13, chủ dự án quyết) — trước đó
   tám mục xuống ba hàng, ăn ~200 px đầu màn, và nút tải app của trang tính
   năng rơi xuống màn thứ hai. Cái giá: menu giấu đi thì phụ huynh không thấy
   ngay có truyện và bài viết — trang tính năng vẫn trỏ tới chúng ở khối
   «Trong Dino Kids còn có» cuối trang.

   Ngân sách bề ngang: `--wrap` trừ lề còn 1 040 px cho cả hàng. Trước
   2026-10-25 năm viên ngôn ngữ chiếm 304 px; thu vào một ô (~130 px) trả lại
   chỗ. Tới 2026-11-07 menu đã lên tám mục và lại tràn: bản vi — bản dài nhất —
   cần 123 + 811 + 131 px, nên ô ngôn ngữ rớt hàng ở mọi bề ngang. Ba kho nội
   dung (truyện, thẻ học từ, chữ Hán) gom vào nhóm «Thư viện» (`.navgroup`,
   xem `ITEMS` trong `layout.py`): menu còn 593 px, cả hàng 867 px, giữ một
   hàng tới bề ngang 961 px (921 px chỗ), chừa ~6 % cho phông rộng hơn. */
.mainnav { display: flex; gap: 2px; }

/* Nút ☰ (ô đánh dấu + nhãn, xem `mainnav()`): chỉ hiện ở khối ≤ 520 px. */
.navtoggle, .navtoggle-btn { display: none; }

.mainnav a {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink-soft);
  white-space: nowrap;
}

.mainnav a:hover { background: var(--bg-tint); color: var(--ink); }

/* Đang ở trong mục truyện / bài viết. */
.mainnav a[aria-current="page"] { color: var(--brand-600); background: var(--bg-tint); }

/* Nhóm menu hai cấp. Bảng con mở bằng `:hover` (chuột) và `:focus-within`
   (bàn phím, và chạm trên iPad ngang — chạm vào nhãn `tabindex="0"` là đặt
   tiêu điểm lên nó), không cần JS: CSP chỉ cho chạy `hit.js`. Bảng nằm đè lên
   trang như bảng ngôn ngữ. Màn ≤ 960 px không có bảng — xem khối media dưới. */
.navgroup { position: relative; display: flex; }

.navgroup-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
  cursor: default;
  user-select: none;
}

/* Mũi tên ▾ cùng kiểu với ô ngôn ngữ — dấu hiệu «còn mục bên trong». */
.navgroup-label::after {
  content: "";
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}

.navgroup:hover .navgroup-label,
.navgroup:focus-within .navgroup-label { background: var(--bg-tint); color: var(--ink); }

.navgroup:hover .navgroup-label::after,
.navgroup:focus-within .navgroup-label::after { margin-top: 3px; transform: rotate(-135deg); }

.navgroup-label:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 2px; }

/* Đang ở trong một mục của nhóm: nhãn nhóm cũng tô, để thấy «mình đang ở đâu»
   khi bảng con đóng. */
.navgroup-current .navgroup-label { color: var(--brand-600); background: var(--bg-tint); }

.navgroup-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 20;
  display: none;
  min-width: 176px;
  padding: 6px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(23, 35, 58, 0.14), 0 2px 6px rgba(23, 35, 58, 0.06);
}

/* Cầu nối vô hình qua khe 8 px giữa nhãn và bảng: thiếu nó thì chuột đi từ
   nhãn xuống bảng rơi khỏi `:hover` và bảng đóng giữa đường. */
.navgroup-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }

.navgroup:hover .navgroup-menu,
.navgroup:focus-within .navgroup-menu { display: grid; }

.navgroup-menu a { border-radius: 10px; padding: 8px 12px; color: var(--ink); }

/* Ô chọn ngôn ngữ (`langnav()` trong `tools/site/site_nav.py`): `<details>`
   mở/đóng không cần JS — CSP chỉ cho chạy `hit.js`. Nút hiện tên thứ tiếng
   đang xem kèm hình quả địa cầu, để người không đọc được trang vẫn nhận ra
   đó là chỗ đổi ngôn ngữ. Bảng xổ xuống nằm ĐÈ lên trang (absolute) chứ không
   đẩy trang xuống, nên mở ra không làm cả trang giật. */
.langs { position: relative; flex: none; }

.langs summary {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.langs summary::-webkit-details-marker { display: none; }

/* Quả địa cầu vẽ bằng mask để mang đúng màu chữ (`currentColor`) ở mọi
   trạng thái; ảnh `data:` được CSP cho (`img-src 'self' data:`). */
.langs summary::before {
  content: "";
  width: 17px;
  height: 17px;
  flex: none;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9.3'/%3E%3Cpath d='M2.7 12h18.6M12 2.7c2.5 2.5 3.9 5.8 3.9 9.3s-1.4 6.8-3.9 9.3c-2.5-2.5-3.9-5.8-3.9-9.3s1.4-6.8 3.9-9.3z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9.3'/%3E%3Cpath d='M2.7 12h18.6M12 2.7c2.5 2.5 3.9 5.8 3.9 9.3s-1.4 6.8-3.9 9.3c-2.5-2.5-3.9-5.8-3.9-9.3s1.4-6.8 3.9-9.3z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Mũi tên ▾ — quay ngược khi đang mở. */
.langs summary::after {
  content: "";
  width: 6px;
  height: 6px;
  margin: -3px 0 0 2px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}

.langs summary:hover { background: var(--bg-tint); color: var(--ink); }

.langs summary:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 2px; }

.langs details[open] summary {
  border-color: var(--brand-300);
  background: var(--bg-tint);
  color: var(--brand-600);
}

.langs details[open] summary::after { margin-top: 3px; transform: rotate(-135deg); }

.langs-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  display: grid;
  min-width: 176px;
  padding: 6px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(23, 35, 58, 0.14), 0 2px 6px rgba(23, 35, 58, 0.06);
}

.langs-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}

.langs-menu a:hover { background: var(--bg-tint); color: var(--ink); }

/* Thứ tiếng đang xem: chữ xanh kèm dấu ✓, không tô đặc — bảng chỉ có năm
   dòng, một dấu là đủ thấy «mình đang ở đây». */
.langs-menu a[aria-current="true"] { color: var(--brand-600); background: var(--bg-tint); }

.langs-menu a[aria-current="true"]::after {
  content: "";
  width: 5px;
  height: 10px;
  margin: -3px 2px 0 0;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

/* Thanh đầu trang dính ở trên, nên nhảy tới `#hoc-gi` thì tiêu đề khối nằm
   khuất dưới nó. Chừa đúng chiều cao thanh ở từng bề ngang (đo: 63 px một
   hàng; 94–109 px khi menu xuống hàng; điện thoại ≤ 520 px thì thanh không
   dính, xem khối max-width: 520px). */
html { scroll-padding-top: 76px; }

@media (max-width: 960px) {
  html { scroll-padding-top: 118px; }
  /* Hai hàng thì hàng trên cao đúng bằng nút ngôn ngữ (44 px ở màn cảm
     ứng), nên thiếu đệm này nút dính sát mép trên của thanh. */
  .topbar .wrap { padding-top: 8px; }
  .mainnav {
    order: 3;
    flex: 1 0 100%;
    overflow-x: auto;
    scrollbar-width: none;
    margin: -6px -20px 0;
    padding: 0 16px 8px;
  }
  .mainnav::-webkit-scrollbar { display: none; }
  /* Hàng vuốt ngang cắt mất bảng xổ, nên ở đây nhóm trải phẳng: bỏ nhãn,
     ba liên kết đứng thẳng trong hàng menu như trước khi có nhóm. */
  .navgroup, .navgroup-menu { display: contents; }
  .navgroup-menu::before, .navgroup-label { display: none; }
  .navgroup-menu a { border-radius: 999px; padding: 6px 12px; color: var(--ink-soft); }
}

/* ---------- Hero ---------- */

.hero {
  background: linear-gradient(168deg, #eaf4ff 0%, #f7fbff 58%, #ffffff 100%);
  border-bottom: 1px solid var(--line);
  padding: 56px 0 48px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 44px;
  align-items: center;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(30px, 4.6vw, 46px);
  line-height: 1.22;
  letter-spacing: -0.02em;
}

/* Tiếng Nhật (và tiếng Trung) không có dấu cách nên trình duyệt ngắt ở bất kỳ
   chữ nào — tiêu đề từng rớt một chữ 「す」 xuống dòng riêng. Mỗi cụm trong tiêu đề là một
   `.nowrap` đứng nguyên khối, và cỡ chữ hạ một bậc để cụm dài nhất vừa cột. */
.hero h1 .nowrap { display: inline-block; }
.hero h1:lang(ja),
.hero h1:lang(zh) { font-size: clamp(28px, 3.9vw, 40px); }

/* Tiêu đề và chú thích nhiều dòng thì chia đều các dòng, không để một từ mồ
   côi ở dòng cuối. Trình duyệt chưa hỗ trợ thì bỏ qua, không hỏng gì. */
h1, h2, h3, figcaption { text-wrap: balance; }

.hero .lede {
  margin: 0 0 20px;
  font-size: clamp(17px, 2vw, 19px);
  color: var(--ink-soft);
}

.hero-icon {
  width: 74px;
  height: 74px;
  border-radius: 17px;
  margin-bottom: 20px;
  box-shadow: 0 8px 22px rgba(16, 48, 92, 0.18);
}

.badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }

.badges li {
  font-size: 14px;
  font-weight: 600;
  color: var(--brand-600);
  background: #fff;
  border: 1px solid #cfe0f8;
  border-radius: 999px;
  padding: 5px 13px;
}

.hero-shot img {
  border-radius: 22px;
  border: 1px solid var(--line);
  box-shadow: 0 18px 44px rgba(16, 48, 92, 0.14);
}

/* Video dọc 9:16 quay màn hình app: hẹp lại cho vừa một màn điện thoại,
   ở máy tính không chiếm cả bề ngang trang */
.video-tour { margin: 40px auto 0; max-width: 380px; text-align: center; }
.video-tour video {
  display: block; width: 100%; height: auto; background: #fff8ec;
  border-radius: 22px; border: 1px solid var(--line);
  box-shadow: 0 18px 44px rgba(16, 48, 92, 0.14);
}
.video-tour figcaption { margin-top: 14px; font-size: 15px; color: var(--ink-soft, #5b6472); }

/* ---------- Khối chung ---------- */

section { padding: 60px 0; }
section.tint { background: var(--bg-tint); border-block: 1px solid var(--line); }

h2 {
  margin: 0 0 10px;
  font-size: clamp(24px, 3.2vw, 32px);
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.section-lede {
  margin: 0 0 30px;
  max-width: 62ch;
  color: var(--ink-soft);
}

h3 { margin: 0 0 8px; font-size: 19px; line-height: 1.35; }

/* ---------- Tính năng nổi bật (giọng bố mẹ) ---------- */

.feature {
  display: grid;
  grid-template-columns: 1fr 0.75fr;
  gap: 44px;
  align-items: center;
}

.feature-body p { color: var(--ink-soft); }
.feature-body p:first-of-type { color: var(--ink); font-size: 18px; }

.steps { margin: 22px 0 0; padding: 0; list-style: none; counter-reset: s; }

.steps li {
  position: relative;
  padding-left: 42px;
  margin-bottom: 14px;
  counter-increment: s;
  color: var(--ink-soft);
}

.steps li::before {
  content: counter(s);
  position: absolute;
  left: 0;
  top: 2px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand-600);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.steps b { color: var(--ink); }

/* Hai khối nổi bật đứng liền nhau (Bố mẹ kể chuyện, rồi Giọng bố mẹ) cùng nền
   trắng; cùng ảnh bên phải thì hai khối dính thành một mảng chữ dài. Khối đầu
   đổi ảnh sang trái để mắt thấy chỗ ngắt. Dưới 860 px xem lại ở khối "Màn hẹp". */
.feature.flip { grid-template-columns: 0.75fr 1fr; }
.feature.flip .hero-shot { order: -1; }

/* ---------- Lưới thẻ ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 18px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}

.card .ico { font-size: 26px; line-height: 1; margin-bottom: 12px; }
.card p { margin: 0; color: var(--ink-soft); font-size: 16px; }

.card .num {
  display: block;
  margin-top: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--brand-600);
}

/* ---------- Danh sách "không có gì" ---------- */

.nolist { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }

.nolist div {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  font-weight: 600;
}

.nolist span { display: block; font-weight: 400; font-size: 15px; color: var(--ink-faint); margin-top: 3px; }

/* ---------- Ảnh chụp màn hình ---------- */
/* Mọi ảnh trong lưới là ảnh iPad dựng đứng cùng một khổ 900 × 1200. Trộn ảnh
   iPhone (830 × 1800) vào cùng lưới là hàng nào có ảnh điện thoại thì cao gấp
   rưỡi hàng bên cạnh, và ảnh lẻ rơi xuống một mình ở hàng cuối. Số cột chọn tay
   theo bề ngang chứ không dùng `auto-fit`: 12 ảnh chia hết cho 3 và 2, nên
   không bề rộng nào để lại một ảnh mồ côi. Tối đa ba cột: bốn cột thì mỗi ảnh
   iPad chỉ còn ~250 px và chữ trong ảnh không đọc được nữa. */

.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px 22px; }

.shots figure { margin: 0; display: flex; flex-direction: column; }

.shots a { display: block; border-radius: 16px; }

.shots img,
.trio img,
.subject-shot img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: 0 10px 26px rgba(16, 48, 92, 0.1);
  background: #fff;
}

/* Chú thích giữ đúng chỗ của hai dòng dù câu chỉ một dòng: ảnh hàng dưới không
   bị đẩy lệch chỉ vì một chú thích dài hơn chú thích bên cạnh. */
.shots figcaption,
.trio figcaption {
  margin-top: 10px;
  min-height: 2.9em;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-soft);
  text-align: center;
}

.shots-hint { margin: -14px 0 26px; font-size: 14px; color: var(--ink-faint); }

@media (max-width: 640px) { .shots { grid-template-columns: repeat(2, 1fr); gap: 18px 14px; } }

/* ---------- Từng môn: một hàng ảnh – chữ ---------- */
/* Thay cho lưới mười hai thẻ cũ: thẻ dài nhất (piano) cao gấp ba thẻ ngắn nhất,
   mà lưới thì kéo mọi thẻ cao bằng nhau, nên các thẻ ngắn trống trơn nửa dưới.
   Mỗi môn giờ là một hàng cùng một khuôn — ảnh thật của môn đó, một câu dẫn,
   bốn ý, một dòng số liệu — và ảnh đổi bên xen kẽ để mắt đi theo hình chữ Z. */

.subjects { display: grid; gap: 0; }

.subject {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 52px;
  align-items: center;
  padding: 40px 0;
  border-top: 1px solid var(--line);
}

.subject:first-child { border-top: 0; padding-top: 8px; }
.subject:nth-child(even) { grid-template-columns: 1fr 320px; }
.subject:nth-child(even) .subject-shot { order: 2; }

.subject .tag {
  display: inline-block;
  margin: 0 0 10px;
  padding: 4px 12px;
  border-radius: 999px;
  background: #e4efff;
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-600);
}

.subject h3 { font-size: clamp(21px, 2.4vw, 25px); margin: 0 0 8px; }
.subject .lead { margin: 0 0 16px; color: var(--ink-soft); }

.points {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.points li {
  position: relative;
  padding-left: 26px;
  font-size: 16px;
  color: var(--ink-soft);
}

.points li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.62em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
}

.points b { color: var(--ink); }

.chip {
  display: inline-block;
  margin-top: 18px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid #cfe0f8;
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  color: var(--brand-600);
}

@media (max-width: 860px) {
  .subject,
  .subject:nth-child(even) { grid-template-columns: 1fr; gap: 22px; padding: 32px 0; }
  .subject:nth-child(even) .subject-shot { order: 0; }
  .subject-shot { width: 100%; max-width: 300px; margin-inline: auto; }
}

/* ---------- Kể chuyện ---------- */

.story-points { grid-template-columns: repeat(2, 1fr); gap: 12px 32px; margin-bottom: 30px; }

/* Ba ảnh đứng cạnh nhau cùng khổ. Trên điện thoại ba cột thì mỗi ảnh chỉ còn
   ~110 px, chữ trong ảnh thành vệt mờ; nên ở đó dải ảnh trượt ngang — cuộn
   NẰM TRONG dải (`overflow-x`), trang vẫn không bao giờ cuộn ngang. */
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.trio figure { margin: 0; }

/* Dải ảnh iPad nằm ngang (màn piano chụp với máy xoay ngang, 1200 × 900):
   hai cột trên máy tính, một cột trên điện thoại — ảnh ngang thu về một
   nửa màn điện thoại thì phím đàn và chữ trong ảnh không còn đọc được. */
.duo-wide { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; margin-top: 26px; }
.duo-wide figure { margin: 0; }
.duo-wide img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: 0 10px 26px rgba(16, 48, 92, 0.1);
  background: #fff;
}
.duo-wide figcaption { margin-top: 10px; font-size: 14px; line-height: 1.45; color: var(--ink-soft); }

@media (max-width: 640px) {
  .duo-wide { grid-template-columns: 1fr; }
}

.credit { margin: 18px 0 0; font-size: 14px; color: var(--ink-faint); }

@media (max-width: 860px) {
  .story-points { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .trio {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 76%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 6px;
  }
  .trio figure { scroll-snap-align: center; }
}

/* ---------- Khối liên hệ / phát hành ---------- */

.note {
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand-500);
  background: #fff;
  border-radius: 0 14px 14px 0;
  padding: 18px 20px;
  color: var(--ink-soft);
}

.note strong { color: var(--ink); }

/* ---------- Chân trang ---------- */

footer {
  border-top: 1px solid var(--line);
  padding: 34px 0 44px;
  font-size: 15px;
  color: var(--ink-faint);
  background: var(--bg-tint);
}

footer .wrap { display: flex; gap: 16px 28px; flex-wrap: wrap; align-items: baseline; }
footer .legal { margin-right: auto; }
footer a { text-decoration: none; }
footer a:hover { text-decoration: underline; }
footer a.fanpage svg, footer a.youtube svg, footer a.instagram svg,
footer a.tiktok svg, footer a.x-social svg, footer a.threads-social svg { vertical-align: -3px; margin-right: 6px; }

/* ---------- Trang văn bản (điều khoản, quyền riêng tư) ---------- */

.doc { padding: 44px 0 64px; }
.doc .wrap { max-width: 760px; }
.doc h1 { font-size: clamp(27px, 4vw, 36px); line-height: 1.25; margin: 0 0 8px; }
.doc .meta { color: var(--ink-faint); font-size: 15px; margin: 0 0 34px; }
.doc h2 { font-size: 21px; margin: 38px 0 10px; }
.doc h3 { font-size: 17px; margin: 24px 0 6px; }
.doc p, .doc li { color: var(--ink-soft); }
.doc li { margin-bottom: 6px; }
.doc ul, .doc ol { padding-left: 22px; }

.doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 15px;
}

.doc th, .doc td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; vertical-align: top; }
.doc th { background: var(--bg-tint); font-weight: 600; color: var(--ink); }

.doc .scroller { overflow-x: auto; }

.transnote {
  background: #fff7ed;
  border: 1px solid #f7d9b5;
  border-radius: 12px;
  padding: 13px 16px;
  font-size: 15px;
  color: #7a4a12;
  margin: 0 0 30px;
}

.back { display: inline-block; margin-top: 40px; font-weight: 600; text-decoration: none; }

/* ---------- Màn hẹp ---------- */

@media (max-width: 860px) {
  .hero-grid, .feature { grid-template-columns: 1fr; gap: 30px; }
  /* `.feature.flip` nặng hơn `.feature` nên phải nêu lại ở đây, kẻo vẫn hai
     cột trên điện thoại. Ảnh về sau chữ như mọi khối nổi bật khác. */
  .feature.flip { grid-template-columns: 1fr; }
  .feature.flip .hero-shot { order: 0; }
  .hero { padding: 40px 0 36px; }
  section { padding: 46px 0; }

  /* `margin-inline: auto` KHÔNG thừa. Dưới 860 px thì lưới đổ về một cột,
     nhưng ảnh vẫn bị chặn ở 460 px — thiếu dòng căn giữa thì nó dính mép
     trái và chừa một khoảng trắng câm bên phải. Đo trên iPad dựng đứng:
     264 px trống ở 744, 288 px ở 768, 354 px ở 834. Chiều rộng tablet đủ lớn
     để chỗ trống đó đọc ra như trang vỡ chứ không như khoảng thở. */
  .hero-shot { max-width: 460px; margin-inline: auto; }
}

/* Vùng chạm trên máy cảm ứng.
   Bố mẹ mở trang này bằng một tay trong lúc tay kia bế con, nên cỡ chạm ở đây
   cũng đáng giá như trong app. Đo được: nút đổi ngôn ngữ cao 34 px và liên kết
   chân trang cao 26 px — qua ngưỡng 24 px của WCAG 2.5.8 mức AA, nhưng dưới
   khuyến nghị 44 px của Apple. Ô đổi ngôn ngữ là điều hướng chính của một
   trang năm thứ tiếng, nên cả nút lẫn từng dòng trong bảng xổ phải chạm trúng
   ngay lần đầu.
   Chỉ nới ở màn cảm ứng: trên desktop, viên 44 px làm thanh đầu trang nặng nề. */
@media (max-width: 860px) {
  .mainnav a, .langs summary, .langs-menu a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  .langs-menu a { display: flex; }

  footer .wrap { gap: 4px 28px; }
  footer a { padding: 9px 0; }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  /* Một hàng (thương hiệu · ngôn ngữ · ☰): bỏ đệm trên 8 px của khối 960 px,
     vốn chỉ dành cho kiểu hai hàng. */
  .topbar .wrap { min-height: 56px; padding-top: 0; position: relative; }
  .brand { font-size: 17px; }

  /* Thanh đầu trang đứng yên ở đầu trang: menu ☰ mở ra là một cột dài,
     dính ở trên thì che nửa màn khi cuộn. */
  .topbar { position: static; }
  html { scroll-padding-top: 0; }
  /* Ô đánh dấu vẫn nhận tiêu điểm bàn phím (không `display: none`), nằm
     ngay dưới nút vẽ ra; chạm vào nhãn là đổi trạng thái của nó. Neo nó vào
     thanh đầu trang: để trôi tự do thì chạm nút là trình duyệt cuộn trang tới
     chỗ ô đánh dấu (đo: lệch 6 px, đầu thanh bị cắt). */
  .navtoggle {
    display: block;
    position: absolute;
    top: 6px;
    right: 16px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
  }
  .navtoggle-btn {
    display: flex;
    order: 2;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--bg);
    color: var(--ink);
    cursor: pointer;
  }
  .langs { order: 1; }
  /* Ba vạch ☰ vẽ bằng CSS, không dùng ký tự/emoji (mỗi máy một kiểu). Mở ra
     thì vạch giữa ẩn, hai vạch kia chéo thành ✕. */
  .navtoggle-btn span,
  .navtoggle-btn span::before,
  .navtoggle-btn span::after {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform 0.15s ease, background-color 0.15s ease;
  }
  .navtoggle-btn span { position: relative; }
  .navtoggle-btn span::before,
  .navtoggle-btn span::after { content: ""; position: absolute; left: 0; }
  .navtoggle-btn span::before { top: -6px; }
  .navtoggle-btn span::after { top: 6px; }
  .navtoggle:checked + .navtoggle-btn span { background-color: transparent; }
  .navtoggle:checked + .navtoggle-btn span::before { transform: translateY(6px) rotate(45deg); }
  .navtoggle:checked + .navtoggle-btn span::after { transform: translateY(-6px) rotate(-45deg); }
  .navtoggle:focus-visible + .navtoggle-btn { outline: 2px solid var(--brand-500); outline-offset: 2px; }

  /* Menu mở: một cột, mỗi mục một hàng cao 44 px cho ngón tay. */
  .mainnav {
    display: none;
    flex-direction: column;
    overflow-x: visible;
    margin: 0;
    padding: 4px 0 12px;
  }
  .navtoggle:checked ~ .mainnav { display: flex; }
  .mainnav a,
  .navgroup-menu a {
    padding: 11px 14px;
    border-radius: 12px;
    font-size: 16px;
  }
}

/* Người dùng chọn giảm chuyển động thì bỏ cuộn mượt. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .langs summary::after { transition: none; }
  .navgroup-label::after { transition: none; }
}

/* ---------- Nút gọi hành động ---------- */
/* Trang này bán một app miễn phí cho phụ huynh đang lướt điện thoại: nút phải
   to, đứng ngay dưới câu mở đầu, và lặp lại ở cuối trang. 88 pt là cỡ chạm tối
   thiểu của chính app — dùng lại ở đây cho nhất quán và cho ngón tay người lớn
   đang bế con. */

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 26px 0 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 54px;
  padding: 0 26px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--brand-600);
  color: #fff;
  box-shadow: 0 10px 24px rgba(44, 107, 216, 0.28);
}

.btn-primary:hover { background: var(--brand-500); color: #fff; }

/* Nút Google Play. Cùng cỡ, cùng độ nổi với nút App Store — hai store đứng
   ngang hàng nhau, không cái nào là "cái phụ". Nút link store thì khối dưới
   thay bằng huy hiệu; lớp này còn cho nút khác dùng. */
.btn-play {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 10px 24px rgba(23, 35, 58, 0.24);
}

.btn-play:hover { background: #24334f; color: #fff; }

/* Nút «Mở trong app» (`a.app-open`, href `dinokids://…`, layout.DEEP_LINKS):
   viền xanh, nền trắng để không lẫn với huy hiệu hai store đứng cạnh. Đứng
   một mình trong đoạn (`p.open-app`) thì là nút đủ cỡ ngón tay; nằm giữa câu
   (bài viết) thì là chữ đậm có mũi tên. open-app.js lo đường lùi về store. */
a.app-open {
  font-weight: 700;
  color: var(--brand-600);
  text-decoration: none;
}
a.app-open::after { content: " \2197"; }
a.app-open:hover { text-decoration: underline; }
.open-app { margin: 14px 0; }
.open-app a.app-open {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 20px;
  border: 2px solid var(--brand-600);
  border-radius: 999px;
  background: #fff;
  font-size: 16px;
}
.open-app a.app-open:hover { background: var(--brand-600); color: #fff; text-decoration: none; }

/* Nút tải app = huy hiệu CHÍNH THỨC của hai store (từ 2026-11-13). Trước đó là
   nút chữ hai màu thương hiệu — trông đơn điệu, và khách vào từ ChatGPT (gần hết
   trên điện thoại) chỉ chạm nút 4 % trong khi trang khác 12–28 %. Huy hiệu là
   thứ bố mẹ nhận ra ngay mà không cần đọc.

   Không vẽ lại, không đổi màu, không đặt logo vào nút tự làm — quy định của
   cả Apple lẫn Google chỉ cho dùng nguyên file của họ: SVG từ App Store
   Marketing Tools, PNG từ trang huy hiệu Google Play (đã cắt phần lề trong
   suốt để hai huy hiệu cao bằng nhau, như quy định đòi). Mỗi thứ tiếng một
   bản dịch của chính store. Ghi nhãn hiệu ở /licenses.

   Làm bằng CSS, không sửa HTML: hơn mười một nghìn trang sinh từ năm bộ dựng
   và trang viết tay, mọi nút đều cùng dạng `a.btn[href^=store]`. Chữ trong nút
   vẫn ở đó (cỡ 0, trong suốt) để trình đọc màn hình đọc tên nút và `hit.js`
   vẫn đổi chỗ hai nút trên máy Android. File ảnh đặt trong CSS nên KHÔNG được
   `stamp.py` đóng dấu `?v=` — đổi huy hiệu thì đổi tên file. */
a.btn[href^="https://apps.apple.com/"],
a.btn[href^="https://play.google.com/"] {
  width: auto;
  height: 56px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent center / contain no-repeat;
  box-shadow: none;
  font-size: 0;
  color: transparent;
}

a.btn[href^="https://apps.apple.com/"]:hover,
a.btn[href^="https://play.google.com/"]:hover { background-color: transparent; opacity: 0.86; }

a.btn[href^="https://apps.apple.com/"]:focus-visible,
a.btn[href^="https://play.google.com/"]:focus-visible { outline: 3px solid var(--brand-500); outline-offset: 3px; }

/* Tỉ lệ khung = viewBox của từng SVG Apple (cao 40) và cỡ PNG Google đã cắt
   lề. Mặc định là bản tiếng Anh; trang tiếng Việt nằm ở gốc site. */
a.btn[href^="https://apps.apple.com/"] { aspect-ratio: 119.66 / 40; background-image: url("/assets/img/badges/app-store-en.svg"); }
:lang(vi) a.btn[href^="https://apps.apple.com/"] { aspect-ratio: 119.66 / 40; background-image: url("/assets/img/badges/app-store-vi.svg"); }
:lang(ja) a.btn[href^="https://apps.apple.com/"] { aspect-ratio: 108.85 / 40; background-image: url("/assets/img/badges/app-store-ja.svg"); }
:lang(ko) a.btn[href^="https://apps.apple.com/"] { aspect-ratio: 129.70 / 40; background-image: url("/assets/img/badges/app-store-ko.svg"); }
:lang(zh) a.btn[href^="https://apps.apple.com/"] { aspect-ratio: 108.85 / 40; background-image: url("/assets/img/badges/app-store-zh.svg"); }

a.btn[href^="https://play.google.com/"] { aspect-ratio: 564 / 168; background-image: url("/assets/img/badges/google-play-en.webp"); }
:lang(vi) a.btn[href^="https://play.google.com/"] { aspect-ratio: 646 / 192; background-image: url("/assets/img/badges/google-play-vi.webp"); }
:lang(ja) a.btn[href^="https://play.google.com/"] { aspect-ratio: 646 / 192; background-image: url("/assets/img/badges/google-play-ja.webp"); }
:lang(ko) a.btn[href^="https://play.google.com/"] { aspect-ratio: 646 / 192; background-image: url("/assets/img/badges/google-play-ko.webp"); }
:lang(zh) a.btn[href^="https://play.google.com/"] { aspect-ratio: 646 / 192; background-image: url("/assets/img/badges/google-play-zh.webp"); }

.btn-ghost {
  background: #fff;
  color: var(--brand-600);
  border-color: #cfe0f8;
}

.btn-ghost:hover { background: var(--bg-tint); }

.btn .sub {
  display: block;
  font-size: 12px;
  font-weight: 600;
  opacity: 0.82;
  letter-spacing: 0.02em;
}

.trustline {
  margin: 0;
  font-size: 15px;
  color: var(--ink-faint);
}

/* ---------- Dải số liệu dưới hero ---------- */

.proof {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.proof li {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  text-align: center;
}

.proof b {
  display: block;
  font-size: 27px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--brand-600);
}

.proof span { font-size: 14px; color: var(--ink-faint); }

/* ---------- Sứ mệnh: vì sao app miễn phí ---------- */
/* Khối này nằm ngay dưới dải số liệu, không phải ở cuối trang, vì nó trả lời
   đúng thắc mắc đầu tiên của người vừa thấy một app học miễn phí không quảng
   cáo: "vậy họ thu tiền ở chỗ nào?". Câu trả lời để tới cuối trang thì phần
   lớn người đọc không bao giờ đọc tới — mà đó lại là lý do tồn tại của app.

   Dùng `.pillars` chứ không dùng lại `.cards`: `.cards` xếp theo minmax 255 px
   cho mười hai thẻ tính năng, còn ở đây chỉ có ba cột và mỗi cột là một đoạn
   văn, nên cần ô rộng hơn để không vỡ thành ba cột hẹp trên tablet. */

.mission-lead {
  margin: 0 0 28px;
  max-width: 54ch;
  font-size: clamp(18px, 2.1vw, 22px);
  line-height: 1.5;
  color: var(--ink);
}

.mission-lead b { color: var(--brand-600); }

.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.pillars div {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}

.pillars .ico { display: block; font-size: 26px; line-height: 1; margin-bottom: 12px; }
.pillars h3 { margin: 0 0 8px; }
.pillars p { margin: 0; color: var(--ink-soft); font-size: 16px; }

/* Viên chữ trên tiêu đề hero — chỗ duy nhất nêu tên công ty ở nửa trên trang.
   `inline-block` để nền chỉ bám quanh chữ; để `block` là dải màu kéo hết chiều
   rộng cột và trông như một thanh thông báo lỗi. */
.kicker {
  display: inline-block;
  margin: 0 0 14px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #e4efff;
  border: 1px solid #cfe0f8;
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-600);
}

/* ---------- Ba bước bắt đầu ---------- */

.how {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  counter-reset: h;
}

.how div {
  position: relative;
  padding: 22px 22px 22px 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  counter-increment: h;
}

.how h3 { margin: 0 0 6px; }
.how p { margin: 0; color: var(--ink-soft); font-size: 16px; }

.how div::before {
  content: counter(h);
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
}

/* ---------- Câu hỏi thường gặp ---------- */
/* <details> thay vì JavaScript: nội dung vẫn nằm trong HTML nên máy tìm kiếm
   đọc được đủ câu trả lời dù người dùng chưa mở ra. */

.faq { display: grid; gap: 10px; }

.faq details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 2px 20px;
}

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 15px 28px 15px 0;
  font-weight: 600;
  position: relative;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  font-weight: 400;
  color: var(--brand-600);
  line-height: 1;
}

.faq details[open] summary::after { content: "–"; }

.faq p { margin: 0 0 16px; color: var(--ink-soft); font-size: 16px; }

/* ---------- Khối kết ---------- */

.final {
  background: linear-gradient(160deg, #eaf4ff 0%, #f7fbff 100%);
  text-align: center;
}

.final .wrap { max-width: 720px; }
.final .cta-row { justify-content: center; }
.final p { color: var(--ink-soft); }

/* ---------- Hộp tóm tắt đầu trang văn bản ---------- */

.tldr {
  background: var(--bg-tint);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin: 0 0 32px;
}

.tldr h2 { font-size: 18px; margin: 0 0 10px; }
.tldr ul { margin: 0; padding-left: 20px; }
.tldr li { margin-bottom: 5px; }

@media (max-width: 520px) {
  .btn { width: 100%; }
  .cta-row { gap: 10px; }
  /* Huy hiệu không kéo hết bề ngang (cao theo bề ngang thì một huy hiệu
     chiếm cả màn): hai huy hiệu đứng chung một hàng ở 375 px, màn hẹp hơn
     thì tự xuống hàng. */
  a.btn[href^="https://apps.apple.com/"],
  a.btn[href^="https://play.google.com/"] { width: auto; height: 50px; }
}

/* ---------- Form liên hệ ---------- */
/* Trang không có JavaScript (CSP đặt `script-src 'none'`), nên toàn bộ việc
   kiểm dữ liệu tại chỗ dựa vào thuộc tính HTML5: `required`, `type=email`,
   `minlength`. Trình duyệt tự chặn và tự chỉ vào ô sai — không cần một dòng
   script nào, và cũng không có gì để chặn. */

.form {
  display: grid;
  gap: 18px;
  max-width: 620px;
}

.field { display: grid; gap: 6px; }

.field label { font-weight: 600; font-size: 15px; }

.field .hint { font-size: 14px; color: var(--ink-faint); }

.field input,
.field select,
.field textarea {
  font: inherit;
  font-size: 16px;               /* < 16px làm Safari trên iPhone tự phóng to trang khi bấm vào ô */
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  width: 100%;
  min-height: 48px;
}

.field textarea { min-height: 170px; resize: vertical; line-height: 1.6; }

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 3px solid var(--brand-300);
  outline-offset: 1px;
  border-color: var(--brand-500);
}

/* Ô bẫy mật: ẩn khỏi người thật, nhưng vẫn nằm trong HTML để bot điền vào.
   `display: none` là cách nhiều bot nhận ra và bỏ qua, nên đẩy ra ngoài khung
   nhìn thay vì ẩn hẳn. `aria-hidden` + `tabindex=-1` giữ cho người dùng bàn
   phím và trình đọc màn hình không bao giờ chạm tới nó. */
.trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-note {
  font-size: 15px;
  color: var(--ink-faint);
  margin: 0;
}

/* ---------- Bảng thông tin liên hệ ---------- */

.infolist {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
}

.infolist li {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
}

.infolist b { display: block; font-size: 15px; margin-bottom: 3px; }
.infolist span { font-size: 15px; color: var(--ink-faint); }

/* ---------- Trang kết quả gửi ---------- */

.result { text-align: center; padding: 70px 0 80px; }
.result .wrap { max-width: 620px; }
.result .ico { font-size: 54px; line-height: 1; margin-bottom: 18px; }
.result h1 { font-size: clamp(26px, 4vw, 34px); margin: 0 0 14px; }
.result p { color: var(--ink-soft); }
.result .cta-row { justify-content: center; margin-top: 26px; }

/* ---------- Số cột cố định theo bề ngang ---------- */
/* `auto-fit` để trình duyệt tự chọn số cột thì ở vài bề rộng trung gian, tám ô
   thành 3 + 3 + 2 và ba ô thành 2 + 1 — một ô lẻ nằm trơ ở hàng cuối. Chọn
   tay để mọi khối luôn chia đều: 4 → 2 → 1, 3 → 1. */
@media (max-width: 960px) {
  .nolist { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .pillars, .how { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .proof { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 520px) {
  .nolist { grid-template-columns: 1fr; }
}

/* -----------------------------------------------------------
   Mục truyện cổ tích (/stories, /ja/stories, /en/stories).
   Sinh bởi tools/site/build_story_pages.py — sửa giao diện ở đây,
   sửa câu chữ ở tools/stories/data/.
----------------------------------------------------------- */
.stories { padding: 36px 0 64px; }
.stories h1 { font-size: clamp(28px, 4vw, 40px); line-height: 1.2; margin: 0 0 14px; }
.stories h2 { margin-top: 40px; }
.crumbs { font-size: 14px; color: var(--ink-faint); margin: 0 0 18px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

.story-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px;
}
.story-list a {
  display: flex; gap: 14px; height: 100%; padding: 16px 18px;
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 14px;
  text-decoration: none; color: var(--ink-soft); font-size: 15px; line-height: 1.5;
}
.story-list a:hover { border-color: var(--brand-300); background: var(--bg-tint); }
.story-list .e { font-size: 30px; line-height: 1.1; flex: 0 0 auto; }
.story-list b { display: block; color: var(--ink); font-size: 17px; margin-bottom: 3px; }

.story .story-emoji { font-size: 64px; line-height: 1; margin: 6px 0 12px; }
.story .story-summary { font-size: 19px; color: var(--ink); margin: 0 0 28px; }
.story-text p { font-size: 19px; line-height: 1.85; color: var(--ink); margin: 0 0 1.1em; }
.story-text:lang(ja) p { line-height: 2.2; }
.story rt { font-size: 0.55em; color: var(--ink-faint); }
.story h1 rt, .story-list b rt { font-size: 0.45em; }

.story-cta {
  margin: 40px 0 28px; padding: 26px 26px 6px;
  background: var(--bg-tint); border: 1px solid var(--line); border-radius: var(--radius);
}
.story-cta h2 { margin: 0 0 8px; font-size: 22px; }
.story-cta p { color: var(--ink-soft); }
.story-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 20px; margin: 0 0 8px; font-weight: 600; }
.story-nav a { text-decoration: none; }
