/* =============================================================================
   Trang bán ebook "Sử dụng hiệu quả ChatGPT và ChatGPT Codex trong nghiên cứu y khoa"
   Áp vào mã ở GV-1225 từ BẢN MẪU GV-1176 (phòng Thiết kế, anh chốt 13/10/2026). Hệ màu Apple nền trắng của anh
   (13.Cac phong/07.Thiet ke/04.Tai san/tokens.css), KHÔNG dùng vàng của sách 135.
   Mọi HEX nằm ở :root; phần dưới chỉ gọi tên vai. Nhãn [Apple] / [đề xuất] như tokens.css.
   ============================================================================= */

@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/phong/be-vietnam-pro-400.woff2") format("woff2"); }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/phong/be-vietnam-pro-600.woff2") format("woff2"); }
@font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/phong/be-vietnam-pro-700.woff2") format("woff2"); }

:root {
  color-scheme: light;
  --nen: #FFFFFF;          /* [Apple] canvas */
  --mat-2: #F5F5F7;        /* [Apple] canvas-parchment: dải xen kẽ */
  --mat-3: #FAFAFC;        /* [Apple] surface-pearl */
  --chu: #1D1D1F;          /* [Apple] ink */
  --chu-2: #333333;        /* [Apple] ink-muted-80 */
  --chu-3: #6A6A6F;        /* [đề xuất] chú thích; 5,38:1 trên trắng */
  --vien: #E0E0E0;         /* [Apple] hairline */
  --vien-manh: #86868B;    /* [đề xuất] viền ô nhập >= 3:1 */
  --nhan: #0066CC;         /* [Apple] primary: nút, liên kết */
  --nhan-nhan: #0071E3;    /* [Apple] primary-focus: vòng focus, cùng xanh với bìa sách */
  --nhan-manh: #0052A3;    /* [đề xuất] hover nút, chữ trên nền nhạt */
  --nhan-nhat: #E8F1FB;    /* [đề xuất] nền nhãn nhạt */
  --tren-nhan: #FFFFFF;    /* [Apple] on-primary */
  --gia: #945E18;          /* [đề xuất] vàng đồng, MỘT con số nổi (giá) */
  --canh-bao: #7A4B00;     /* [đề xuất] chữ nhãn ưu đãi */
  --canh-bao-nen: #FFF3D6; /* [đề xuất] nền nhãn ưu đãi (không dùng đỏ cho giảm giá) */
  --ok: #1F6D3A;           /* [đề xuất] */
  --ok-nen: #EAF3EA;       /* [đề xuất] */
  --loi: #B3261E;          /* [đề xuất] */
  --loi-nen: #FBE9E7;      /* [đề xuất] */
  --bong: rgba(0, 0, 0, .18); /* [Apple] shadow-product: chỉ cho ảnh bìa */

  --phong: "Be Vietnam Pro", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --le: 20px;
  --rong: 1080px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--phong); font-size: 17px; line-height: 1.6; color: var(--chu); background: var(--nen); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--nhan); text-underline-offset: 3px; }
a:hover { color: var(--nhan-manh); }
:focus-visible { outline: 3px solid var(--nhan-nhan); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
.khung { width: 100%; max-width: var(--rong); margin: 0 auto; padding: 0 var(--le); }
.khung-hep { max-width: 720px; }
.chi-doc { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bo-qua { position: absolute; left: -999px; top: 8px; background: var(--chu); color: var(--tren-nhan); padding: 10px 16px; border-radius: 8px; z-index: 10; }
.bo-qua:focus { left: 8px; }

/* --- Đầu trang --- */
.dau { border-bottom: 1px solid var(--vien); background: var(--nen); }
.dau-trong { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.dau-trong > * { min-width: 0; }
.logo img { height: 36px; width: auto; }
.dau-nut { white-space: nowrap; }

/* --- Nút --- */
.nut { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 28px;
  font: 600 17px/1 var(--phong); border: 2px solid transparent; border-radius: 999px; cursor: pointer; text-decoration: none; }
.nut-chinh { background: var(--nhan); color: var(--tren-nhan); }
.nut-chinh:hover { background: var(--nhan-manh); color: var(--tren-nhan); }
.nut-phu { background: var(--nen); color: var(--nhan); border-color: var(--nhan); }
.nut-phu:hover { background: var(--nhan-nhat); color: var(--nhan-manh); }
.nut-nho { min-height: 40px; padding: 0 20px; font-size: 15px; }
.nut-rong { width: 100%; }

/* --- Mở đầu trang --- */
.mo { padding: 40px 0 56px; background: linear-gradient(180deg, var(--mat-3) 0, var(--nen) 100%); }
.mo-luoi { display: grid; gap: 32px; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: center; }
.mo-luoi > * { min-width: 0; }
.bia { display: flex; justify-content: center; }
.bia img { width: 100%; max-width: 380px; border-radius: 6px; box-shadow: 0 18px 40px var(--bong), 0 2px 6px var(--bong); aspect-ratio: 800 / 1131; }
.nhan-nho { display: inline-block; font-size: 14px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--nhan-manh); background: var(--nhan-nhat); padding: 6px 12px; border-radius: 999px; margin-bottom: 16px; }
.mo h1 { font-size: clamp(28px, 4.4vw, 44px); font-weight: 700; margin-bottom: 16px; }
.mo h1 em { font-style: normal; color: var(--nhan); }
.mo .dan { font-size: 19px; color: var(--chu-2); max-width: 34em; }
.tac-gia-dong { font-size: 15px; color: var(--chu-3); margin-top: -4px; }

/* --- Khối giá --- */
.gia-khoi { margin-top: 24px; padding: 20px; background: var(--nen); border: 1px solid var(--vien); border-radius: 16px; max-width: 460px; }
.gia { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 8px; }
.gia-moi { font-size: 40px; font-weight: 700; line-height: 1.1; color: var(--gia); }
.gia-cu { font-size: 20px; color: var(--chu-3); text-decoration: line-through; }
.gia-nhan { font-size: 14px; font-weight: 600; color: var(--canh-bao); background: var(--canh-bao-nen); padding: 4px 10px; border-radius: 999px; }
.gia-han { font-size: 15px; color: var(--chu-2); margin-bottom: 16px; }
.gia-ghi { font-size: 14px; color: var(--chu-3); margin: 12px 0 0; }

/* --- Khối nội dung --- */
.khoi { padding: 64px 0; }
.khoi-xen { background: var(--mat-2); }
.khoi h2 { font-size: clamp(26px, 3.4vw, 34px); font-weight: 700; margin-bottom: 12px; }
.khoi .tieu-de-phu { color: var(--chu-2); font-size: 18px; max-width: 40em; margin-bottom: 32px; }

.viec { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; counter-reset: viec; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.viec li { counter-increment: viec; position: relative; background: var(--nen); border: 1px solid var(--vien); border-radius: 16px; padding: 20px 20px 20px 68px; min-width: 0; }
.viec li::before { content: counter(viec); position: absolute; left: 20px; top: 20px; width: 32px; height: 32px; border-radius: 50%; background: var(--nhan); color: var(--tren-nhan); font-weight: 700; display: grid; place-items: center; font-size: 16px; }
.viec b { display: block; font-size: 18px; margin-bottom: 4px; }
.viec span { color: var(--chu-2); font-size: 16px; display: block; }
.viec li:last-child:nth-child(odd) { grid-column: 1 / -1; }

.luat { margin-top: 24px; padding: 24px; border-left: 4px solid var(--nhan); background: var(--nhan-nhat); border-radius: 0 12px 12px 0; }
.luat h3 { font-size: 18px; margin-bottom: 8px; }
.luat ol { margin: 0; padding-left: 22px; }
.luat li { margin-bottom: 6px; }
.luat li:last-child { margin-bottom: 0; }

/* --- Mục lục --- */
.phan-luoi { display: grid; gap: 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.phan-luoi > * { min-width: 0; }
.phan h3 { font-size: 14px; text-transform: uppercase; letter-spacing: .08em; color: var(--chu-3); margin-bottom: 12px; font-weight: 600; }
details.chuong { background: var(--nen); border: 1px solid var(--vien); border-radius: 12px; margin-bottom: 10px; }
details.chuong summary { cursor: pointer; padding: 14px 18px; font-weight: 600; list-style: none; display: flex; gap: 12px; min-height: 48px; align-items: center; }
details.chuong summary::-webkit-details-marker { display: none; }
details.chuong summary::after { content: "+"; margin-left: auto; font-size: 22px; color: var(--nhan); font-weight: 400; }
details.chuong[open] summary::after { content: "\2212"; }
.so-chuong { flex: none; min-width: 28px; height: 28px; border-radius: 8px; background: var(--nhan-nhat); color: var(--nhan-manh); display: grid; place-items: center; font-size: 14px; font-weight: 700; padding: 0 6px; }
.ten-chuong { min-width: 0; }
details.chuong ul { margin: 0; padding: 0 18px 16px 58px; color: var(--chu-2); font-size: 16px; }
details.chuong li { margin-bottom: 4px; }
.phu-luc { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 16px; color: var(--chu-2); }
.phu-luc b { color: var(--chu); }

/* --- Đọc thử --- */
.doc-thu { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.doc-thu li { min-width: 0; }
.doc-thu figure { margin: 0; }
.doc-thu img { width: 100%; border: 1px solid var(--vien); border-radius: 6px; box-shadow: 0 6px 18px var(--bong); background: var(--nen); aspect-ratio: 642 / 909; }
.doc-thu figcaption { font-size: 14px; color: var(--chu-2); margin-top: 10px; }

/* --- Gói tài nguyên --- */
.goi { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); list-style: none; margin: 0; padding: 0; }
.goi li { background: var(--nen); border: 1px solid var(--vien); border-radius: 12px; padding: 16px; font-size: 16px; min-width: 0; }
.goi b { display: block; margin-bottom: 2px; }
.ghi-chu-goi { margin-top: 16px; font-size: 15px; color: var(--chu-3); }

/* --- Tác giả --- */
.tac-gia { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; max-width: 760px; }
.tac-gia-ten { font-size: 20px; font-weight: 700; margin: 0; }
.ho-so { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0; padding: 0; list-style: none; font-size: 16px; }

/* --- Hỏi đáp --- */
.hoi details { border-bottom: 1px solid var(--vien); }
.hoi summary { cursor: pointer; padding: 18px 0; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; min-height: 56px; align-items: center; }
.hoi summary::-webkit-details-marker { display: none; }
.hoi summary::after { content: "+"; font-size: 24px; color: var(--nhan); font-weight: 400; flex: none; }
.hoi details[open] summary::after { content: "\2212"; }
.hoi details p { color: var(--chu-2); margin: 0 0 18px; max-width: 40em; }

/* --- Khối mua + biểu mẫu --- */
.mua { background: var(--chu); color: var(--tren-nhan); }
.mua h2 { color: var(--tren-nhan); }
.mua-luoi { display: grid; gap: 32px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.mua-luoi > * { min-width: 0; }
.mua .gia-moi { color: #FFD28A; } /* [đề xuất] vàng đồng sáng trên nền đen, 11,9:1 */
.mua .gia-cu { color: #C7C7CC; }
.mua .gia-han { color: #E5E5EA; }
.mua-ds { margin: 0 0 24px; padding: 0; list-style: none; color: #E5E5EA; font-size: 16px; }
.mua-ds li { padding-left: 26px; position: relative; margin-bottom: 8px; }
.mua-ds li::before { content: "\2713"; position: absolute; left: 0; color: #8EC5FF; font-weight: 700; }
.form { background: var(--nen); color: var(--chu); border-radius: 16px; padding: 24px; }
.form h3 { font-size: 20px; margin-bottom: 16px; }
.o { margin-bottom: 16px; }
.o label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.o input[type=text], .o input[type=email] { width: 100%; min-height: 48px; padding: 10px 14px; font: 400 17px/1.3 var(--phong); color: var(--chu); background: var(--nen); border: 1.5px solid var(--vien-manh); border-radius: 10px; }
.o input::placeholder { color: var(--chu-3); opacity: 1; }
.o-dong { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--chu-2); }
.o-dong input { width: 22px; height: 22px; margin: 2px 0 0; flex: none; accent-color: var(--nhan); }
.o-dong label { font-weight: 400; font-size: 15px; margin: 0; }
.loi-o { color: var(--loi); font-size: 14px; margin: 6px 0 0; }
.loi-o[hidden] { display: none; }
.form .gia-ghi { margin-top: 12px; }

/* --- Chân trang --- */
.chan { padding: 40px 0 48px; background: var(--mat-2); font-size: 15px; color: var(--chu-2); }
.chan-luoi { display: grid; gap: 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.chan-luoi > * { min-width: 0; }
.chan p { margin: 0 0 6px; }
.chan-ten { font-weight: 700; color: var(--chu); font-size: 17px; }
.mien-tru { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--vien); font-size: 14px; color: var(--chu-3); }

/* --- Trang thanh toán --- */
.tt-trang { padding: 32px 0 64px; }
.tt-trang .nhan-quay { font-size: 15px; margin-bottom: 20px; }
.the { background: var(--nen); border: 1px solid var(--vien); border-radius: 16px; padding: 28px; }
.the h1 { font-size: clamp(24px, 3.4vw, 30px); margin-bottom: 16px; }
.the[hidden] { display: none; }
.tt-luoi { display: grid; gap: 24px; grid-template-columns: minmax(0, 240px) minmax(0, 1fr); align-items: start; }
.tt-luoi > * { min-width: 0; }
.qr { background: var(--nen); border: 1px solid var(--vien); border-radius: 12px; padding: 12px; }
.qr svg { width: 100%; height: auto; display: block; }
.qr p { font-size: 13px; color: var(--chu-3); margin: 8px 0 0; text-align: center; }
.so { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 16px; }
.so dt { color: var(--chu-3); font-size: 15px; }
.so dd { margin: 0; font-weight: 600; word-break: break-word; }
.so .to { font-size: 26px; color: var(--gia); }
.chep { font: 600 14px/1 var(--phong); color: var(--nhan); background: var(--nhan-nhat); border: 0; border-radius: 8px; padding: 0 12px; min-height: 32px; cursor: pointer; margin-left: 6px; }
.chep:hover { color: var(--nhan-manh); }
.canh { display: block; font-weight: 400; font-size: 14px; color: var(--canh-bao); background: var(--canh-bao-nen); padding: 8px 12px; border-radius: 8px; margin-top: 8px; }
.cho-bao { display: flex; align-items: center; gap: 10px; margin: 24px 0 8px; font-weight: 600; flex-wrap: wrap; }
.quay { width: 18px; height: 18px; border: 3px solid var(--vien); border-top-color: var(--nhan); border-radius: 50%; animation: quay 1s linear infinite; }
@keyframes quay { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .quay { animation: none; } html { scroll-behavior: auto; } }
.nho { font-size: 15px; color: var(--chu-2); }
.thanh-cong { color: var(--ok); }
.hop-ok { background: var(--ok-nen); color: var(--ok); border-radius: 12px; padding: 14px 18px; margin-bottom: 20px; font-weight: 600; }
hr { border: 0; border-top: 1px solid var(--vien); margin: 24px 0; }

/* --- Điện thoại --- */
@media (max-width: 860px) {
  .mo-luoi, .mua-luoi, .phan-luoi { grid-template-columns: minmax(0, 1fr); }
  .viec { grid-template-columns: minmax(0, 1fr); }
  .goi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .doc-thu { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .khoi { padding: 48px 0; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .mo { padding: 24px 0 40px; }
  .bia img { max-width: 260px; }
  .gia-moi { font-size: 36px; }
  .goi { grid-template-columns: minmax(0, 1fr); }
  .chan-luoi { grid-template-columns: minmax(0, 1fr); }
  .tt-luoi { grid-template-columns: minmax(0, 1fr); }
  .qr { max-width: 240px; }
  .the { padding: 20px; }
  .logo img { height: 30px; }
  .nut-nho { padding: 0 14px; }
}
.ma { white-space: nowrap; }

/* --- Phần thêm khi áp vào mã thật (GV-1225) --- */
[hidden] { display: none !important; }
.gia { min-height: 44px; }          /* chỗ giữ cho số giá, điền từ /api/gia nên không đẩy bố cục */
.gia-han { min-height: 1.6em; }
.qr img { width: 100%; height: auto; display: block; aspect-ratio: 1 / 1; }
.so .phu { display: block; font-weight: 400; font-size: 14px; color: var(--chu-3); }
.link-hien { word-break: break-all; }
.the h2 { font-size: 20px; margin-bottom: 8px; }
.trang-loi { padding-bottom: 64px; }
