/*
#111111	(17, 17, 17)
#222222	(34, 34, 34)
#333333	(51, 51, 51)
#444444	(68, 68, 68)
#555555	(85, 85, 85)
#666666	(102, 102, 102)
*/

/*
#f44336 Red Salsa: Rực rỡ, hiện đại
#ffc107 Amber: Sáng, hiện đại

#dc143c Crimson Red: Sâu, mạnh mẽ
#fdd835 Sunset Yellow: Nhẹ nhàng, như nắng chiều

#ef5350 Soft Red: Dịu hơn, dùng làm nền phụ
#fcbf49 Goldenrod: Gợi màu áo dài học sinh

#a1170f Rosewood: Đỏ nâu cổ điển, sang trọng
#e0ac00 Honey Gold: Vàng sẫm, gợi chiều sâu
*/

/* PHỐI MÀU 001
Chính: #f44336 Red Salsa
Phụ: #ffc107 Amber
Nền: #fefefe hoặc #f9f9f9
Nhấn: #fdd835 Sunset Yellow hoặc #ef5350 Soft Red
*/

body {
  font-size: 1rem; /* Kích thước font cơ bản của văn bản */
  font-weight: 400; /* Độ đậm nhạt mặc định của văn bản (normal, bold, 400, 700, ...) */
  color: #222222; /* Màu chữ mặc định của văn bản (ví dụ: màu xám đậm) */
}

mjx-container {
  font-size: 1rem !important; /* Đồng bộ kích thước, !important để ghi đè */
  font-weight: 400 !important; /* Đồng bộ độ đậm nhạt, !important để ghi đè */
  color: inherit !important; /* Đồng bộ màu sắc, !important để ghi đè */
}

/* Định dạng bài tập, đáp án, lời giải, và details */
.de-muc,
.nhap,
.ket-qua,
.giai-de-muc,
.details summary {
  display: block;
  border: none;
  text-align: center;
  font-weight: bold;
  padding: 10px;
  width: 100%;
  margin-top: 20px;
  margin-bottom: 10px;
  border-radius: 5px;
  cursor: pointer;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
}

.de-muc p,
.nhap p,
.ket-qua p,
.giai-de-muc p,
.details summary p {
  margin: 0;
}

.de-muc,
.details summary {
  background-color: #f8d7da;
}
.de-muc:hover,
.details summary:hover {
  background-color: #f1bfc4;
}
.de-muc:active,
.details summary:active {
  background-color: #e89aa0;
}

.nhap {
  background-color: #f0f0f0;
}
.nhap:hover {
  background-color: #dddddd;
}
.nhap:active {
  background-color: #bbbbbb;
}

.ket-qua {
  background-color: #d4edda;
}
.ket-qua:hover {
  background-color: #bfe1bf;
}
.ket-qua:active {
  background-color: #9aca9a;
}

.giai-de-muc {
  background-color: #cfe2ff;
}
.giai-de-muc:hover {
  background-color: #b0ccff;
}
.giai-de-muc:active {
  background-color: #9ab6ff;
}

.details summary {
  list-style: none;
  font-variant: small-caps;
}

.details {
  border-radius: 5px;
  border: none;
  background: white;
  padding: 5px;
}

.details[open] summary {
  margin-bottom: 10px;
}

/* Dấu kết thúc */
.ket-thuc {
  display: flex;
  justify-content: flex-end;
  margin: 20px 0;
}
.ket-thuc::after {
  content: "\25FB";
  font-size: 20px;
  font-weight: bold;
}

mjx-mrow {
  margin: 0 2px;
}

/* === Dành cho câu hỏi trong các đề thi === */

.cau,
.dap-an,
.giai-thich,
.luyen-tap,
.details summary {
  display: block;
  border: none;
  text-align: center;
  font-weight: bold;
  color: white;
  padding: 10px;
  width: 100%;
  margin-top: 20px;
  margin-bottom: 10px;
  border-radius: 5px;
  cursor: pointer;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
}

.cau p,
.dap-an p,
.giai-thich p,
.luyen-tap p,
.details summary p {
  margin: 0;
}

.cau,
.details summary {
  background-color: #f44336;
}
.cau:hover,
.details summary:hover {
  background-color: #666666;
}
.cau:active,
.details summary:active {
  background-color: #111111;
}

.dap-an {
  background-color: #ffc107;
}
.dap-an:hover {
  background-color: #666666;
}
.dap-an:active {
  background-color: #111111;
}

.giai-thich {
  background-color: #a1170f;
}
.giai-thich:hover {
  background-color: #666666;
}
.giai-thich:active {
  background-color: #111111;
}

.luyen-tap {
  background-color: #e0ac00;
}
.luyen-tap:hover {
  background-color: #666666;
}
.luyen-tap:active {
  background-color: #111111;
}

.details summary {
  list-style: none;
  font-variant: small-caps;
}

.details {
  border-radius: 5px;
  border: none;
  background: white;
  padding: 5px;
}

.details[open] summary {
  margin-bottom: 10px;
}

/* ========== */

/* Tùy chỉnh công thức toán trong tooltip */
.mathjax-tooltip mjx-container {
  font-size: 0.75em;
  filter: none;
  margin: 0.5em 0;
  font-family: inherit !important;
}

.mathjax-tooltip mjx-container[jax="CHTML"][display="true"] {
  margin: 0.5em auto;
  display: block;
}

/* Các định dạng tooltip, tham chiếu, nguồn, liên kết, chú thích... (giữ nguyên) */
.tooltip {
  --bs-tooltip-zindex: 1000;
  --bs-tooltip-max-width: calc(50vw - 40px);
  --tooltip-before-background: rgba(0, 0, 0, 0.85);
  position: relative; /* Đảm bảo .tooltip::before định vị tương đối với .tooltip */
}

.tooltip-inner {
  background-color: rgba(0, 0, 0, 0.85);
  color: #fff;
  font-size: 0.75em;
  padding: 8px 12px;
  border-radius: 5px;
  text-align: left;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.95);
  /* min-width: 200px; */
}

.tooltip::before {
  content: "";
  position: absolute;
  display: block;
  border-style: solid;
}

.bs-tooltip-top.tooltip::before {
  border-width: 5px 5px 0;
  border-color: var(--tooltip-before-background) transparent transparent;
  bottom: -5px; /* Đặt mũi tên ở dưới cùng */
  left: 50%;
  transform: translateX(-50%);
}

.bs-tooltip-bottom.tooltip::before {
  border-width: 0 5px 5px;
  border-color: transparent transparent var(--tooltip-before-background);
  top: -5px; /* Đặt mũi tên ở trên cùng */
  left: 50%;
  transform: translateX(-50%);
}

.bs-tooltip-start.tooltip::before {
  border-width: 5px 0 5px 5px;
  border-color: transparent transparent transparent
    var(--tooltip-before-background);
  right: -5px; /* Đặt mũi tên ở bên phải */
  top: 50%;
  transform: translateY(-50%);
}

.bs-tooltip-end.tooltip::before {
  border-width: 5px 5px 5px 0;
  border-color: transparent var(--tooltip-before-background) transparent
    transparent;
  left: -5px; /* Đặt mũi tên ở bên trái */
  top: 50%;
  transform: translateY(-50%);
}

[data-bs-toggle="tooltip"] {
  color: inherit;
  cursor: pointer;
  transition: color 0.3s ease;
}

[data-bs-toggle="tooltip"]:hover {
  color: #ef5350;
}

a.quarto-xref {
  text-decoration: none; /* Bỏ gạch dưới */
  color: inherit;
}

a.quarto-xref:hover {
  text-decoration: underline; /* Gạch dưới khi hover */
  color: #ef5350;
}

.nguon {
  width: 90%; /* Giới hạn chiều rộng 50% */
  margin-left: auto; /* Căn phải trong container cha */
  text-align: right; /* Căn phải nguồn */
  font-size: 15.3px; /* Kích thước chữ nhỏ hơn */
  color: #6d7a86; /* Màu chữ nhạt hơn */
  margin-top: 0.5em; /* Khoảng cách phía trên nguồn */
  margin-bottom: 0.5em; /* Khoảng cách phía trên nguồn */
}

a {
  color: inherit; /* Màu xanh dương */
  text-decoration: none; /* Bỏ gạch chân */
  transition: color 0.3s ease; /* Hiệu ứng chuyển màu mượt mà */
}

a:hover {
  color: #ef5350;
  text-decoration: underline; /* Thêm gạch chân khi hover */
}

a:focus {
  outline: 2px solid #1de8b5; /* Viền focus rõ ràng */
}

a:active {
  color: #dc3545; /* Màu đỏ khi nhấp */
}

/* a:visited {
  color: #6c757d;
} */

.tieu-de-chu-thich {
  font-weight: bold;
  color: #666666;
  font-size: 0.85em; /* Kích thước 0.85 lần kích thước cha */
  margin-top: 1em;
  margin-bottom: 0.5em;
  display: block; /* Đảm bảo nó hoạt động như một khối */
}

/* In đậm  a. b. ... */
ol li::marker {
  font-weight: bold;
}

ol[type="A"] {
  padding-left: 1.5em;
  margin: 1em 0;
}

ol[type="A"] li::marker {
  font-weight: bold;
}

/* Nhấn mạnh */

.highlight-box-rosewood {
  /* Rosewood */
  border: 1px solid #a1170f;
  /* Light gray */
  /* background-color: #f5f5f5;  */
  /* Snow gray */
  /* background-color: #f2f2f2;  */
  /* Paper gray */
  /* background-color: #eeeeee;  */
  /* Mid gray */
  /* background-color: #e0e0e0;  */
  /* Cool gray */
  background-color: #e8e8e8;
  padding: 1rem;
  border-radius: 8px;
  margin: 1.5rem 0;
  font-weight: normal;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.05); /* Nhẹ nhàng hiện đại */
}

/* Xóa margin cuối cùng của phần tử con bên trong box */
.highlight-box-rosewood > *:last-child {
  margin-bottom: 0;
}

.highlight-box-crimson-red {
  /* Crimson Red */
  border: 1px solid #dc143c;
  /* Light gray */
  /* background-color: #f5f5f5;  */
  /* Snow gray */
  /* background-color: #f2f2f2;  */
  /* Paper gray */
  /* background-color: #eeeeee;  */
  /* Mid gray */
  /* background-color: #e0e0e0;  */
  /* Cool gray */
  background-color: #e8e8e8;
  padding: 1rem;
  border-radius: 8px;
  margin: 1.5rem 0;
  font-weight: normal;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.05); /* Nhẹ nhàng hiện đại */
}

/* Xóa margin cuối cùng của phần tử con bên trong box */
.highlight-box-crimson-red > *:last-child {
  margin-bottom: 0;
}

.highlight-box-red-salsa {
  /* Red Salsa */
  border: 1px solid #f44336;
  /* Light gray */
  /* background-color: #f5f5f5;  */
  /* Snow gray */
  /* background-color: #f2f2f2;  */
  /* Paper gray */
  /* background-color: #eeeeee;  */
  /* Mid gray */
  /* background-color: #e0e0e0;  */
  /* Cool gray */
  background-color: #e8e8e8;
  padding: 1rem;
  border-radius: 8px;
  margin: 1.5rem 0;
  font-weight: normal;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.05); /* Nhẹ nhàng hiện đại */
}

/* Xóa margin cuối cùng của phần tử con bên trong box */
.highlight-box-red-salsa > *:last-child {
  margin-bottom: 0;
}

.highlight-box-soft-red {
  /* Soft Red */
  border: 1px solid #ef5350;
  /* Light gray */
  /* background-color: #f5f5f5;  */
  /* Snow gray */
  /* background-color: #f2f2f2;  */
  /* Paper gray */
  /* background-color: #eeeeee;  */
  /* Mid gray */
  /* background-color: #e0e0e0;  */
  /* Cool gray */
  background-color: #e8e8e8;
  padding: 1rem;
  border-radius: 8px;
  margin: 1.5rem 0;
  font-weight: normal;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.05); /* Nhẹ nhàng hiện đại */
}

/* Xóa margin cuối cùng của phần tử con bên trong box */
.highlight-box-soft-red > *:last-child {
  margin-bottom: 0;
}

.highlight-box-honey-gold {
  /* Honey Gold */
  border: 1px solid #e0ac00;
  /* Light gray */
  /* background-color: #f5f5f5;  */
  /* Snow gray */
  /* background-color: #f2f2f2;  */
  /* Paper gray */
  /* background-color: #eeeeee;  */
  /* Mid gray */
  /* background-color: #e0e0e0;  */
  /* Cool gray */
  background-color: #e8e8e8;
  padding: 1rem;
  border-radius: 8px;
  margin: 1.5rem 0;
  font-weight: normal;
  /* Nhẹ nhàng hiện đại */
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.05);
}

/* Xóa margin cuối cùng của phần tử con bên trong box */
.highlight-box-honey-gold > *:last-child {
  margin-bottom: 0;
}

.highlight-box-goldenrod {
  /* Goldenord */
  border: 1px solid #fcbf49;
  /* Light gray */
  /* background-color: #f5f5f5;  */
  /* Snow gray */
  /* background-color: #f2f2f2;  */
  /* Paper gray */
  /* background-color: #eeeeee;  */
  /* Mid gray */
  /* background-color: #e0e0e0;  */
  /* Cool gray */
  background-color: #e8e8e8;
  padding: 1rem;
  border-radius: 8px;
  margin: 1.5rem 0;
  font-weight: normal;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.05); /* Nhẹ nhàng hiện đại */
}

/* Xóa margin cuối cùng của phần tử con bên trong box */
.highlight-box-goldenrod > *:last-child {
  margin-bottom: 0;
}

.highlight-box-amber {
  /* Amber */
  border: 1px solid #ffc107;
  /* Light gray */
  /* background-color: #f5f5f5;  */
  /* Snow gray */
  /* background-color: #f2f2f2;  */
  /* Paper gray */
  /* background-color: #eeeeee;  */
  /* Mid gray */
  /* background-color: #e0e0e0;  */
  /* Cool gray */
  background-color: #e8e8e8;
  padding: 1rem;
  border-radius: 8px;
  margin: 1.5rem 0;
  font-weight: normal;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.05); /* Nhẹ nhàng hiện đại */
}

/* Xóa margin cuối cùng của phần tử con bên trong box */
.highlight-box-amber > *:last-child {
  margin-bottom: 0;
}

.highlight-box-sunset-yellow {
  /* Sunset Yellow */
  border: 1px solid #fdd835;
  /* Light gray */
  /* background-color: #f5f5f5;  */
  /* Snow gray */
  /* background-color: #f2f2f2;  */
  /* Paper gray */
  /* background-color: #eeeeee;  */
  /* Mid gray */
  /* background-color: #e0e0e0;  */
  /* Cool gray */
  background-color: #e8e8e8;
  padding: 1rem;
  border-radius: 8px;
  margin: 1.5rem 0;
  font-weight: normal;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.05); /* Nhẹ nhàng hiện đại */
}

/* Xóa margin cuối cùng của phần tử con bên trong box */
.highlight-box-sunset-yellow > *:last-child {
  margin-bottom: 0;
}

/* =========== BOX: Tư liệu =========== */
/* HONEY GOLD */
/* Box Cuộn Vàng Mật: Thiết lập màu nền và đường viền */
.collapsible-box-honey-gold {
  border: 1px solid #e0ac00;
  background-color: #e8e8e8; /* Cool-gray */
  border-radius: 8px;
  margin: 1.5rem 0;
  padding: 0;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.05);
}

/* Tiêu đề Box: Sử dụng lớp summary bên trong */
.collapsible-box-honey-gold summary {
  background-color: #e0ac00; /* Honey Gold */
  color: #fff; /* Chữ trắng */
  font-weight: bold;
  font-variant: normal;
  padding: 10px 15px;
  border-radius: 8px;
  cursor: pointer;
  list-style: none;
}

/* Hiệu ứng hover cho tiêu đề */
.collapsible-box-honey-gold summary:hover {
  background-color: #d4a200; /* Sắc thái đậm hơn khi hover */
}

/* Xóa border-radius dưới khi box mở */
.collapsible-box-honey-gold[open] summary {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

/* Nội dung của box */
.collapsible-box-honey-gold .content {
  padding: 10px 15px;
  transition: all 0.3s ease-in-out;
}

/* Ẩn mũi tên tùy chỉnh */
.collapsible-box-honey-gold summary::before {
  content: "";
  display: none;
}

/* ===================================== */

/* --- # Tạo bảng HTML với căn giữa theo dấu phẩy --- */
.math-table {
  border-collapse: collapse;
  width: 100%;
  margin: 1em 0;
  font-family: monospace;
}
.math-table th {
  text-align: center;
  padding: 8px;
  background-color: #f2f2f2;
  border: 1px solid #ddd;
}
.math-table td {
  padding: 4px 8px;
  border: 1px solid #ddd;
  text-align: center;
}
.number-cell {
  display: flex;
  justify-content: center;
  align-items: center;
}
.integer-part {
  text-align: right;
  flex: 1;
}
.decimal-part {
  text-align: left;
  flex: 1;
}
.decimal-comma {
  padding: 0 2px;
}
/* ===================================== */

/* Căn chỉnh ảnh trong listing card thành khung vuông 150x150 */
.quarto-grid .thumbnail img {
  object-fit: contain; /* giữ nguyên tỉ lệ ảnh, thêm khoảng trắng nếu cần */
  width: 150px;
  height: 150px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* ===================================== */

/* Toàn bộ khối hội thoại hiển thị dạng lưới 2 cột */
.dialogue dl {
  display: grid;
  grid-template-columns: auto 1fr; /* cột trái hẹp, cột phải rộng */
  column-gap: 0.75em;
  margin: 0;
}

/* Cột trái: người nói – in nghiêng, canh trên cùng */
.dialogue dt {
  grid-column: 1;
  font-style: italic;
  font-weight: normal; /* bỏ in đậm mặc định của <dt> */
  margin: 0;
}

/* Cột phải: lời nói – chữ thường, không thụt đầu dòng */
.dialogue dd {
  grid-column: 2;
  margin: 0 0 0.25em 0; /* giãn nhẹ giữa các lượt nói */
}

/* ===================================== */

/* Các môi trường thụt lề cho nội dung */

.indent-left {
  margin-left: 2em !important;
}

.indent-both {
  margin-left: 2em !important;
  margin-right: 2em !important;
}

.indent-right {
  margin-right: 2em !important;
}

.navbar-brand img {
  max-height: 36px;
  width: auto;
}

/* Home and gateway pages */

.quarto-title-block {
  display: none;
}

.zo-home,
.zo-home h1,
.zo-home h2,
.zo-home h3,
.zo-home p,
.zo-home a,
.zo-home span {
  font-family: "Be Vietnam Pro", Arial, sans-serif;
}

.zo-home {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 24px 80px;
}

.zo-home p {
  margin-bottom: 0;
}

.zo-home-hero {
  padding: 56px 0;
  border-bottom: 1px solid #eeeeee;
}

.zo-home-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 96px;
  align-items: start;
  max-width: 1120px;
}

.zo-home-hero-copy {
  min-width: 0;
  max-width: 760px;
}

.zo-home-hero-mark {
  justify-self: end;
  align-self: start;
}

.zo-home-logo {
  width: 190px;
  height: auto;
  display: block;
}

.zo-home-tagline {
  position: relative;
  max-width: 760px;
  margin: -8px 0 34px;
  color: #333333;
  font-size: 1.6rem;
  line-height: 1.45;
  font-weight: 400;
}

.zo-home-tagline::after {
  content: "";
  display: block;
  width: 96px;
  height: 4px;
  margin-top: 18px;
  background: #ffca28;
  border-radius: 999px;
}

.zo-home-kicker,
.zo-home-card-label,
.quarto-title .subtitle,
.navbar .nav-link,
.zo-section-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.zo-home-kicker {
  color: #ef5350;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 14px;
}

.zo-home-kicker p,
.zo-home-card-label p {
  margin: 0;
}

main h1,
main h2,
main h3,
.zo-home h1,
.zo-home h2,
.zo-home h3 {
  text-transform: none;
}

/* Site: page title weight */
/* .quarto-title h1.title,
.quarto-title-block .title,
main h1 {
  font-weight: 400;
} */

.zo-home h1 {
  color: #ef5350;
  font-size: clamp(2.2rem, 3.4vw, 3.8rem);
  font-weight: 400;
  line-height: 1.24;
  letter-spacing: 0;
  max-width: 840px;
  margin: 0 0 24px;
}

.zo-home h2 {
  color: #222222;
  font-size: 2rem;
  font-weight: 500;
  line-height: 1.25;
  margin: 0;
  border-bottom: none;
}

.zo-home h3 {
  font-weight: 500;
}

.zo-home-lead {
  max-width: 760px;
  color: #4a4a4a;
  font-size: 1.05rem;
  line-height: 1.8;
}

.zo-home-actions {
  margin-top: 28px;
}

.zo-home-primary-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(239, 83, 80, 0.42);
  border-radius: 8px;
  background: #ffffff;
  color: #222222 !important;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.035);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.zo-home-primary-link:hover {
  border-color: rgba(239, 83, 80, 0.72);
  color: #ef5350 !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.055);
  transform: translateY(-1px);
}

.zo-home-section {
  padding: 72px 0 0;
}

.zo-home-section-head {
  max-width: 680px;
  margin-bottom: 28px;
}

.zo-home-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.zo-home-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 240px;
  padding: 26px 30px 28px;
  overflow: hidden;
  border: 1px solid #e7e7e7;
  border-radius: 8px;
  background: #ffffff;
}

.zo-home-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: #f7a9a7;
}

.zo-home-card:hover::before {
  background: #ef5350;
}

.zo-home-card-label {
  min-height: 46px;
  margin-bottom: 18px;
  color: #5f5f5f;
  font-size: 0.75rem;
  line-height: 1.55;
  font-weight: 600;
  letter-spacing: 0.11em;
}

.zo-home-card h3 {
  min-height: 64px;
  display: flex;
  align-items: flex-start;
  color: #252525;
  font-size: 1.35rem;
  line-height: 1.25;
  margin: 0 0 8px;
}

.zo-home-card h3 a {
  color: #2b2b2b;
  text-decoration: none;
}

.zo-home-card h3 a:hover {
  color: #ef5350;
  text-decoration: none;
}

.zo-home-card p {
  margin-top: 0;
  color: #555555;
  font-size: 0.98rem;
  line-height: 1.7;
}

.zo-feature-list {
  display: grid;
  gap: 0;
  border-top: 1px solid #e7e7e7;
  border-bottom: 1px solid #e7e7e7;
}

.zo-feature-item {
  padding: 22px 24px;
}

.zo-feature-item:nth-child(odd) {
  background: #fafafa;
}

.zo-feature-item:nth-child(even) {
  background: #ffffff;
}

.zo-feature-item:hover {
  background: #f8f5f5;
}

.zo-feature-item h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  line-height: 1.35;
  font-weight: 500;
}

.zo-feature-item h3 a {
  color: #222222;
  text-decoration: none;
}

.zo-feature-item h3 a:hover {
  color: #ef5350;
  text-decoration: none;
}

.zo-feature-item p {
  max-width: 760px;
  margin: 0;
  color: #555555;
  line-height: 1.7;
}

.zo-home-note {
  max-width: 760px;
  padding-top: 88px;
}

.zo-home-note p {
  color: #4a4a4a;
  font-size: 1.08rem;
  line-height: 1.8;
}

.zo-section-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
}

/* Home: representative groups */
.zo-representative-list {
  display: grid;
  gap: 24px;
  margin-top: 30px;
}

.zo-representative-group {
  padding: 0;
  border: 0;
  background: transparent;
}

.zo-representative-label {
  margin-bottom: 12px;
  color: #ef5350;
  font-size: 0.98rem;
  font-weight: 400;
}

.zo-representative-label p {
  margin: 0;
}

.zo-representative-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.zo-representative-items .zo-section-item {
  /* background: #f7f7f7; */
  background: #fafafa;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.zo-representative-items .zo-section-item:hover {
  background: #ffffff;
  border-color: rgba(239, 83, 80, 0.24);
  /* box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06); */
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.055);
  transform: translateY(-2px);
}

.zo-section-item {
  padding: 24px;
  border: 1px solid #e7e7e7;
  border-radius: 8px;
  background: #ffffff;
}

.zo-section-item h3 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 1.35rem;
  line-height: 1.3;
}

.zo-section-item h3 a {
  color: #222222;
  text-decoration: none;
}

.zo-section-item h3 a:hover {
  color: #ef5350;
  text-decoration: none;
}

.zo-gateway .anchorjs-link,
.zo-home .anchorjs-link,
.zo-home-card h3 .anchorjs-link {
  display: none;
}

.zo-section-item p {
  margin-bottom: 0;
  color: #555555;
  line-height: 1.7;
}

main a:not(.nav-link):not(.navbar-brand):not(.dropdown-item) {
  color: inherit;
  text-decoration: none;
}

main a:not(.nav-link):not(.navbar-brand):not(.dropdown-item):hover {
  color: #ef5350;
  text-decoration: none;
}

@media (max-width: 900px) {
  .zo-home-hero-inner {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .zo-home-hero-mark {
    justify-self: start;
    order: -1;
  }

  .zo-home-logo {
    width: 136px;
  }

  .zo-home-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .zo-section-list,
  .zo-representative-items {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .zo-home {
    padding: 32px 18px 64px;
  }

  .zo-home-hero {
    padding: 48px 0;
  }

  .zo-home-grid {
    grid-template-columns: 1fr;
  }

  .zo-home-card {
    min-height: auto;
    padding: 24px 28px 26px;
  }

  .zo-home-card-label {
    min-height: auto;
    margin-bottom: 28px;
  }

  .zo-home-card h3 {
    min-height: auto;
    margin-bottom: 18px;
  }

  .zo-home-card p {
    font-size: 1rem;
    line-height: 1.7;
  }
}

/* Home: main pathway cards */
.zo-home-card {
  background: #fffdf6;
  border-color: rgba(239, 83, 80, 0.24);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.035);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.zo-home-card:hover {
  border-color: rgba(239, 83, 80, 0.52);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

/* Support page donation box */
.support-box {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 2rem;
  align-items: center;
  margin: 1.5rem 0 2.5rem;
  padding: 1.5rem;
  border: 1px solid #e7e7e7;
  border-radius: 8px;
  background: #fafafa;
}

.support-qr {
  display: flex;
  justify-content: center;
}

.support-qr img {
  width: 175px;
  max-width: 100%;
  height: auto;
  margin: 0;
}

.support-info p:first-child {
  margin-top: 0;
}

.support-info table {
  margin: 1rem 0;
}

.support-info p:last-child {
  margin-bottom: 0;
}

@media (max-width: 700px) {
  .support-box {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

/* Support page closing note */
.support-closing {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e7e7e7;
  color: #555555;
  font-style: italic;
}

/* System layout: keep title-banner text aligned with title meta and body on sidebar pages */
body.nav-sidebar #title-block-header .quarto-title-banner.page-columns {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* ZO Math 100 gateway page */
.zo-page-gateway .zo-gateway {
  max-width: 980px;
}
.zo-gateway-principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 1.5rem 0 2.4rem;
}

.zo-gateway-principle {
  padding: 1.2rem;
  border: 1px solid #eeeeee;
  border-radius: 10px;
  background: #ffffff;
}

.zo-gateway-principle strong {
  display: block;
  margin-bottom: 0.45rem;
  color: #ef5350;
  font-weight: 500;
}

.zo-gateway-principle p {
  margin: 0;
  color: #555555;
  line-height: 1.65;
}

.zo-page-gateway .zo-section-item {
  background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.zo-page-gateway .zo-section-item:hover {
  border-color: rgba(239, 83, 80, 0.24);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.055);
  transform: translateY(-2px);
}

@media (max-width: 760px) {
  .zo-gateway-principles {
    grid-template-columns: 1fr;
  }
}

/* === zo-gateway-project-action:start === */
.zo-page-gateway .zo-gateway-project-card {
  display: flex;
  flex-direction: column;
}

.zo-page-gateway .zo-gateway-project-action {
  display: flex;
  justify-content: flex-end;
  margin-top: auto;
  padding-top: 1rem;
}

.zo-page-gateway .zo-gateway-project-action a {
  font-weight: 600;
  text-decoration: none;
}
/* === zo-gateway-project-action:end === */

/* === zo-system-heading-weight:start === */
/* System typography: headings are already larger, so keep their weight regular. */
main h1,
main h2,
main h3,
.quarto-title h1.title,
.quarto-title-block .title {
  font-weight: 400 !important;
}
/* === zo-system-heading-weight:end === */

/* === zo-gateway-project-card-vertical:start === */
.zo-page-gateway .zo-gateway-project-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.zo-page-gateway .zo-gateway-project-card {
  display: flex;
  flex-direction: column;
  min-height: 430px;
  padding: 0;
  overflow: hidden;
}

.zo-page-gateway .zo-gateway-project-media {
  height: 210px;
  overflow: hidden;
  background: #f7f7f7;
}

.zo-page-gateway .zo-gateway-project-media p {
  height: 100%;
  margin: 0;
}

.zo-page-gateway .zo-gateway-project-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.zo-page-gateway .zo-gateway-project-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.55rem 1.45rem 1.3rem;
}

.zo-page-gateway .zo-gateway-project-body > h3 {
  margin-top: 0;
}

.zo-page-gateway .zo-gateway-project-action {
  display: flex;
  justify-content: flex-end;
  margin-top: auto;
  padding-top: 1rem;
}

.zo-page-gateway .zo-gateway-project-action a {
  font-weight: 600;
  text-decoration: none;
}

@media (max-width: 760px) {
  .zo-page-gateway .zo-gateway-project-list {
    grid-template-columns: 1fr;
  }

  .zo-page-gateway .zo-gateway-project-media {
    height: 200px;
  }
}
/* === zo-gateway-project-card-vertical:end === */

/* === zo-pdf-download:start === */
body.zo-page-article .zo-pdf-download {
  display: flex;
  justify-content: flex-end;
  margin: 1.5rem 0 0;
}

body.zo-page-article .zo-pdf-download p {
  margin: 0;
}

body.zo-page-article .zo-pdf-download__link,
body.zo-page-article .zo-pdf-download__link:visited {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  padding: 0.15rem 0;
  border: 0;
  background: transparent;
  color: #9f968b;
  font-size: 0.84rem;
  font-weight: 400;
  line-height: 1.25;
  text-decoration: none;
  transition: color 150ms ease;
}

body.zo-page-article .zo-pdf-download__link:hover {
  color: #ef5350;
  text-decoration: none;
}

body.zo-page-article .zo-pdf-download__link:focus-visible {
  border-radius: 2px;
  outline: 2px solid #ef5350;
  outline-offset: 3px;
}

body.zo-page-article .zo-pdf-download__link .bi {
  color: currentColor;
  font-size: 0.95rem;
}
/* === zo-pdf-download:end === */

