/* =====================================================================
   Hướng dẫn xử lý sự cố máy chiếu – CSS dùng chung
   Mobile-first, chữ to, tương phản cao, không phụ thuộc font/CDN ngoài.
   ===================================================================== */

:root {
  --c-primary: #0b3d91;
  --c-primary-dark: #082b66;
  --c-primary-light: #e8effc;
  --c-accent: #c8102e;
  --c-accent-dark: #9e0c24;
  --c-text: #1b1f24;
  --c-muted: #4b5563;
  --c-bg: #f3f5f9;
  --c-surface: #ffffff;
  --c-border: #cfd6e0;
  --c-focus: #ffbf47;

  --c-warn-bg: #fff6d6;
  --c-warn-border: #e0a800;
  --c-warn-text: #6b4e00;
  --c-stop-bg: #fdecec;
  --c-stop-border: #c8102e;
  --c-ok-bg: #e7f5ea;
  --c-ok-border: #2e7d32;
  --c-info-bg: #e8effc;
  --c-info-border: #0b3d91;

  --radius: 12px;
  --shadow: 0 1px 3px rgba(16, 24, 40, 0.12);
  --tap: 48px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
}

/* ---------- Cơ bản ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 112.5%; /* 18px */
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--c-text);
  background: var(--c-bg);
  padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); /* chừa chỗ cho thanh Gọi IT */
}

img,
svg {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--c-primary);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--c-primary-dark);
}

:focus-visible {
  outline: 3px solid var(--c-focus);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px rgba(0, 0, 0, 0.6);
}

h1,
h2,
h3,
h4 {
  line-height: 1.25;
  margin: 0 0 0.5em;
  color: var(--c-primary-dark);
  overflow-wrap: anywhere;
}

h1 {
  font-size: 1.65rem;
}

h2 {
  font-size: 1.35rem;
  margin-top: 1.6em;
}

h3 {
  font-size: 1.12rem;
  margin-top: 1.2em;
}

p,
ul,
ol {
  margin: 0 0 1em;
}

ul,
ol {
  padding-left: 1.4em;
}

li {
  margin-bottom: 0.45em;
}

li > ul,
li > ol {
  margin-top: 0.4em;
  margin-bottom: 0.4em;
}

kbd {
  font-family: inherit;
  font-size: 0.95em;
  font-weight: 700;
  padding: 0.1em 0.5em;
  border: 2px solid #98a2b3;
  border-bottom-width: 3px;
  border-radius: 6px;
  background: #fff;
  color: #101828;
  white-space: nowrap;
}

code {
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.95em;
  background: #eef1f6;
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

hr {
  border: 0;
  border-top: 2px solid var(--c-border);
  margin: 2rem 0;
}

.container {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 0 16px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Bỏ qua điều hướng ---------- */
.skip-link {
  position: absolute;
  top: -100px;
  left: 8px;
  z-index: 1000;
  padding: 12px 16px;
  background: #fff;
  color: var(--c-primary-dark);
  font-weight: 700;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.skip-link:focus {
  top: 8px;
}

/* ---------- Đầu trang ---------- */
.site-header {
  background: var(--c-primary);
  color: #fff;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  min-height: var(--tap);
}

.brand:hover {
  color: #fff;
}

.brand__logo {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border-radius: 10px;
  background: #fff;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand__school {
  font-size: 0.78rem;
  opacity: 0.92;
}

.brand__title {
  font-size: 1.02rem;
  font-weight: 700;
}

.btn.btn--header {
  display: none; /* chỉ hiện trên màn hình rộng, mobile dùng thanh Gọi IT dưới đáy */
}

.site-nav {
  background: var(--c-primary-dark);
}

.site-nav > ul {
  list-style: none;
  margin: 0 auto;
  padding: 6px 16px;
  width: max-content; /* rộng vừa nội dung để căn giữa trên màn hình rộng */
  max-width: 100%; /* dài hơn màn hình (điện thoại) thì cuộn ngang */
  display: flex;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.site-nav > ul > li {
  margin: 0;
  flex: 0 0 auto;
}

.site-nav > ul > li > a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  border: 2px solid transparent;
}

.site-nav > ul > li > a:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.site-nav > ul > li > a[aria-current="page"] {
  background: #fff;
  color: var(--c-primary-dark);
}

.site-nav > ul > li > a:focus-visible {
  border-color: var(--c-focus);
  outline-offset: -2px;
}

/* Menu thả xuống "Loại máy chiếu" (details/summary – không cần JS vẫn mở/đóng được).
   Bảng menu định vị theo .site-nav (không phải theo <ul> đang cuộn ngang) nên không bị cắt. */
.site-nav {
  position: relative;
}

.nav-dd summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 8px 12px 8px 14px;
  border-radius: 999px;
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  border: 2px solid transparent;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

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

.nav-dd summary:hover {
  background: rgba(255, 255, 255, 0.12);
}

.nav-dd summary:focus-visible {
  outline: 3px solid var(--c-focus);
  outline-offset: -2px;
}

.nav-dd__caret {
  font-size: 0.8em;
  transition: transform 0.15s;
}

.nav-dd[open] .nav-dd__caret {
  transform: rotate(180deg);
}

.nav-dd[open] summary,
.nav-dd summary.is-current {
  background: #fff;
  color: var(--c-primary-dark);
}

.nav-dd__menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 60;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: #fff;
  border: 1px solid var(--c-border);
  border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.22);
}

.nav-dd__menu li {
  margin: 0;
}

.nav-dd__menu a {
  display: grid;
  grid-template-columns: 44px 1fr;
  align-items: center;
  column-gap: 8px;
  min-height: 52px;
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--c-text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.02rem;
  white-space: normal;
  border: 2px solid transparent;
}

.nav-dd__menu a:hover {
  background: var(--c-primary-light);
  color: var(--c-primary-dark);
}

.nav-dd__menu a:focus-visible {
  border-color: var(--c-focus);
  outline: none;
}

.nav-dd__menu a[aria-current="page"] {
  background: var(--c-primary-light);
  color: var(--c-primary-dark);
  box-shadow: inset 4px 0 0 var(--c-primary);
}

.nav-dd__menu .swatch {
  justify-self: center;
  margin: 0;
}

.nav-dd__sub {
  display: block;
  font-weight: 400;
  font-size: 0.86rem;
  color: var(--c-muted);
}

.nav-dd__menu a[aria-current="page"] .nav-dd__sub {
  color: var(--c-primary-dark);
}

.swatch--khac {
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 10px;
  text-align: center;
  color: #3b4249;
  border-style: dashed;
}

@media (min-width: 900px) {
  /* Đủ chỗ cho mọi mục nên không cần cuộn ngang → bảng menu bám ngay dưới nút */
  .site-nav > ul {
    overflow: visible;
  }

  .nav-dd {
    position: relative;
  }

  .nav-dd__menu {
    left: 0;
    right: auto;
    width: 320px;
    border-top: 1px solid var(--c-border);
    border-radius: var(--radius);
    margin-top: 6px;
  }
}

/* ---------- Nội dung chính ---------- */
main {
  padding-top: 20px;
  padding-bottom: 24px;
}

.page-title {
  margin-top: 0.4em;
}

.lead {
  font-size: 1.08rem;
  color: var(--c-muted);
}

.section {
  margin-top: 2rem;
}

.section > h2:first-child {
  margin-top: 0;
}

/* Thẻ nội dung */
.box {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.box > :last-child {
  margin-bottom: 0;
}

.note {
  padding: 14px 16px;
  border-left: 6px solid var(--c-info-border);
  border-radius: 8px;
  background: var(--c-info-bg);
  margin: 1em 0;
}

.note > :last-child {
  margin-bottom: 0;
}

.note--warn {
  border-left-color: var(--c-warn-border);
  background: var(--c-warn-bg);
}

.note--stop {
  border-left-color: var(--c-stop-border);
  background: var(--c-stop-bg);
}

.note--ok {
  border-left-color: var(--c-ok-border);
  background: var(--c-ok-bg);
}

.note__title {
  display: block;
  font-weight: 700;
  margin-bottom: 0.3em;
}

/* ---------- Nút bấm ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 10px 20px;
  border-radius: 10px;
  border: 2px solid transparent;
  font: inherit;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  cursor: pointer;
  text-align: center;
  line-height: 1.2;
}

.btn--call {
  background: var(--c-accent);
  color: #fff;
  border-color: var(--c-accent);
}

.btn--call:hover {
  background: var(--c-accent-dark);
  color: #fff;
}

.btn--primary {
  background: var(--c-primary);
  color: #fff;
  border-color: var(--c-primary);
}

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

.btn--secondary {
  background: #fff;
  color: var(--c-primary-dark);
  border-color: var(--c-primary);
}

.btn--secondary:hover {
  background: var(--c-primary-light);
}

.btn--big {
  width: 100%;
  font-size: 1.25rem;
  min-height: 64px;
  padding: 14px 20px;
}

.btn--sm {
  min-height: 44px;
  font-size: 0.95rem;
  padding: 8px 14px;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0;
}

/* ---------- Hộp Gọi IT ---------- */
.call-box {
  background: #fff;
  border: 3px solid var(--c-accent);
  border-radius: var(--radius);
  padding: 16px;
  margin: 16px 0 24px;
  box-shadow: var(--shadow);
}

.section.call-box {
  margin-top: 2rem;
}

.call-box__title {
  margin: 0 0 8px;
  font-size: 1.1rem;
  color: var(--c-accent-dark);
}

.call-box__meta {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 4px 12px;
  margin: 12px 0 0;
}

.call-box__meta dt {
  font-weight: 700;
  color: var(--c-muted);
}

.call-box__meta dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.is-placeholder {
  background: #fff3bf;
  border-bottom: 2px dashed #b38600;
  padding: 0 2px;
  border-radius: 3px;
}

/* Thanh Gọi IT dính đáy màn hình (mobile) */
.call-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 900;
  display: flex;
  gap: 10px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.97);
  border-top: 2px solid var(--c-border);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
}

.call-bar .btn {
  flex: 1 1 0;
  min-height: 56px;
  font-size: 1.1rem;
}

/* ---------- Quy trình 4 bước (trang chủ) ---------- */
.flow {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 28px;
}

.flow__step {
  position: relative;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 14px;
  align-items: start;
  padding: 14px 16px;
  background: var(--c-surface);
  border: 2px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.flow__step:not(:last-child)::after {
  content: "↓";
  position: absolute;
  left: 50%;
  bottom: -28px;
  transform: translateX(-50%);
  height: 28px;
  line-height: 28px;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--c-primary);
}

.flow__num {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--c-primary);
  color: #fff;
  font-weight: 800;
  font-size: 1.3rem;
  display: grid;
  place-items: center;
}

.flow__body {
  display: grid;
  gap: 4px;
}

.flow__icon {
  font-size: 1.9rem;
  line-height: 1;
}

.flow__title {
  font-size: 1.15rem;
  color: var(--c-primary-dark);
}

.flow__desc {
  color: var(--c-muted);
  font-size: 0.98rem;
}

.flow__step--alert {
  border-color: var(--c-accent);
  background: #fff5f7;
}

.flow__step--alert .flow__num {
  background: var(--c-accent);
}

.flow__step--alert .flow__title {
  color: var(--c-accent-dark);
}

/* ---------- Chọn hãng máy chiếu theo remote ---------- */
.hang {
  margin: 0 0 20px;
}

.hang-hint {
  margin-top: -4px;
}

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

.hang-list li {
  margin: 0;
}

.hang-card {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 14px;
  align-items: center;
  min-height: var(--tap);
  padding: 12px 14px;
  background: var(--c-surface);
  border: 2px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: var(--c-text);
  text-decoration: none;
}

.hang-card:hover,
.hang-card:focus-visible {
  border-color: var(--c-primary);
  color: var(--c-text);
}

.hang-card__img {
  width: 78px;
  height: auto;
  display: block;
}

.hang-card__body {
  display: grid;
  gap: 3px;
}

.hang-card__name {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--c-primary-dark);
  line-height: 1.15;
}

.hang-card__cue {
  font-size: 1rem;
}

.hang-card__rooms {
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--c-muted);
}

.hang-card--khac .hang-card__img {
  width: 60px;
}

.hang-card__cta {
  margin-top: 4px;
  color: var(--c-primary);
  font-weight: 700;
  text-decoration: underline;
}

.hang-other {
  color: var(--c-muted);
  font-size: 0.95rem;
}

/* Ô gõ số phòng (trang chủ) */
.phong__form {
  display: flex;
  gap: 10px;
  margin: 0 0 10px;
}

.phong__input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 56px;
  font: inherit;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 10px 14px;
  border: 2px solid var(--c-primary);
  border-radius: 10px;
  background: #fff;
  color: var(--c-text);
}

.phong__form .btn {
  flex: 0 0 auto;
  min-height: 56px;
  padding-left: 22px;
  padding-right: 22px;
  width: auto;
}

.phong__kq {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: 0 0 8px;
  padding: 12px 14px;
  background: var(--c-ok-bg);
  border: 2px solid var(--c-ok-border);
  border-radius: var(--radius);
  font-size: 1.1rem;
}

.phong__kq[hidden] {
  display: none;
}

.phong__kq .btn {
  width: auto;
}

.phong__kq--loi {
  background: var(--c-warn-bg);
  border-color: var(--c-warn-border);
  color: var(--c-warn-text);
  font-size: 1rem;
}

/* Miếng màu mô phỏng remote nhìn nghiêng: đen / trắng mỏng / trắng dày */
.swatch {
  display: inline-block;
  width: 36px;
  height: 14px;
  margin-right: 8px;
  border: 2px solid #3b4249;
  border-radius: 4px;
  background: #f5f6f8;
  vertical-align: middle;
}

.swatch--black {
  background: #1c1e22;
  border-color: #000;
}

.swatch--thin {
  height: 7px;
  border-radius: 3px;
}

.swatch--thick {
  height: 20px;
  border-radius: 7px;
}

/* Miếng màu chú giải sơ đồ remote: đỏ bật/tắt · xanh lá bật/tắt (Sony) · xanh chọn HDMI · vàng dễ bấm nhầm */
.swatch--red,
.swatch--green,
.swatch--blue,
.swatch--yellow {
  width: 22px;
  height: 13px;
  margin-right: 4px;
  border-color: #15171a;
}

.swatch--red { background: #c8102e; }
.swatch--green { background: #1f9d55; }
.swatch--blue { background: #0b3d91; }
.swatch--yellow { background: #f2b632; }

/* Chip chọn hãng trên trang sự cố (chỉ có tác dụng khi có JavaScript) */
.chips {
  display: none;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
}

.js .chips {
  display: flex;
}

.chips__label {
  font-weight: 700;
  margin-right: 4px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 14px;
  border: 2px solid var(--c-border);
  border-radius: 999px;
  background: var(--c-surface);
  color: var(--c-text);
  font-weight: 700;
  text-decoration: none;
}

.chip:hover {
  border-color: var(--c-primary);
  color: var(--c-text);
}

.chip.is-active {
  border-color: var(--c-primary);
  background: var(--c-primary-light);
  color: var(--c-primary-dark);
}

.hang-banner {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 14px;
  align-items: center;
  margin: 0 0 8px;
  padding: 12px 14px;
  background: var(--c-info-bg);
  border: 2px solid var(--c-info-border);
  border-radius: var(--radius);
}

.hang-banner[hidden] {
  display: none;
}

.hang-banner img {
  width: 64px;
  height: auto;
  border-radius: 6px;
  mix-blend-mode: multiply; /* nền trắng của ảnh hoà vào nền xanh nhạt */
}

.hang-banner p {
  margin: 0 0 4px;
}

.hang-banner p:last-child {
  margin-bottom: 0;
}

.hang-banner__keys {
  font-size: 0.95rem;
}

.hang-banner__phong {
  color: var(--c-primary-dark);
}

.hang-banner--trong {
  display: block;
  color: var(--c-muted);
  font-size: 0.95rem;
  background: none;
  border-style: dashed;
  border-color: var(--c-border);
}

/* ---------- Danh sách sự cố: đầu danh sách + khối theo thời điểm ---------- */
.list-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin: 24px 0 12px;
  scroll-margin-top: 12px;
}

.list-head__title {
  margin: 0;
}

.toolbar {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.js .toolbar {
  display: flex;
}

/* Mỗi thời điểm trong lớp là một khối: thanh tiêu đề + các sự cố xếp thành hàng */
.stage-block {
  margin: 0 0 18px;
  background: var(--c-surface);
  border: 2px solid var(--c-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  scroll-margin-top: 12px;
}

.stage-block__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  min-height: 48px;
  padding: 10px 14px;
  background: var(--c-primary);
  color: #fff;
  font-size: 1.05rem;
}

.stage-block__icon {
  font-size: 1.3em;
  line-height: 1;
}

.stage-block .acc {
  margin: 0;
  border: 0;
  border-top: 1px solid var(--c-border);
  border-radius: 0;
  box-shadow: none;
}

.stage-block .acc:first-of-type {
  border-top: 0;
}

.stage-block .acc:target,
.stage-block .acc.is-current {
  box-shadow: inset 5px 0 0 var(--c-primary);
}

.stage-block .acc__btn {
  border-radius: 0;
}

.toc {
  columns: 1;
  padding-left: 1.3em;
}

.toc li {
  margin-bottom: 0;
}

.toc a {
  display: inline-flex;
  align-items: center;
  min-height: 44px; /* vùng chạm đủ lớn */
  padding: 6px 0;
}

.acc {
  background: var(--c-surface);
  border: 2px solid var(--c-border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  scroll-margin-top: 12px;
}

.acc:target,
.acc.is-current {
  border-color: var(--c-primary);
}

.acc__heading {
  margin: 0;
  font-size: 1rem;
}

.acc__btn {
  display: grid;
  grid-template-columns: 40px 1fr 28px;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 60px;
  padding: 12px 14px;
  background: transparent;
  border: 0;
  border-radius: var(--radius);
  font: inherit;
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--c-primary-dark);
  text-align: left;
  cursor: pointer;
}

.acc__btn:hover {
  background: var(--c-primary-light);
}

.acc__btn[aria-expanded="true"] {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  background: var(--c-primary-light);
}

.acc__icon {
  font-size: 1.7rem;
  line-height: 1;
  text-align: center;
}

.acc__text {
  display: grid;
  gap: 2px;
}

.acc__sub {
  font-weight: 400;
  font-size: 0.93rem;
  line-height: 1.35;
  color: var(--c-muted);
}

.acc__chev {
  width: 14px;
  height: 14px;
  justify-self: center;
  border-right: 3px solid var(--c-primary);
  border-bottom: 3px solid var(--c-primary);
  transform: rotate(45deg);
  transition: transform 0.15s ease;
  margin-top: -6px;
}

.acc__btn[aria-expanded="true"] .acc__chev {
  transform: rotate(225deg);
  margin-top: 6px;
}

.acc__panel {
  padding: 4px 16px 16px;
  border-top: 1px solid var(--c-border);
}

.js .acc__panel:not(.is-open) {
  display: none;
}

.acc__panel > .lbl:first-child {
  margin-top: 0.8em;
}

.acc__foot {
  margin: 16px 0 0;
  font-size: 0.95rem;
}

/* Nhãn 4 phần trong mỗi sự cố */
.lbl {
  display: inline-block;
  font-size: 1rem;
  padding: 4px 12px;
  border-radius: 8px;
  margin-top: 1.4em;
  margin-bottom: 0.5em;
}

.lbl--sign {
  background: var(--c-info-bg);
  color: var(--c-primary-dark);
}

.lbl--steps {
  background: var(--c-ok-bg);
  color: #1b5e20;
}

.lbl--warn {
  background: var(--c-warn-bg);
  color: var(--c-warn-text);
}

.lbl--stop {
  background: var(--c-stop-bg);
  color: var(--c-accent-dark);
}

/* Danh sách bước đánh số vòng tròn */
.steps {
  list-style: none;
  counter-reset: buoc;
  padding-left: 0;
}

.steps > li {
  counter-increment: buoc;
  position: relative;
  padding-left: 46px;
  min-height: 36px;
  margin-bottom: 0.8em;
}

.steps > li::before {
  content: counter(buoc);
  position: absolute;
  left: 0;
  top: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--c-primary);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.steps > li > strong:first-child {
  color: var(--c-primary-dark);
}

.warn-list,
.stop-list {
  list-style: none;
  padding-left: 0;
}

.warn-list > li,
.stop-list > li {
  position: relative;
  padding-left: 32px;
}

.warn-list > li::before {
  content: "✕";
  position: absolute;
  left: 4px;
  top: 0;
  font-weight: 700;
  color: var(--c-warn-text);
}

.stop-list > li::before {
  content: "🛑";
  position: absolute;
  left: 0;
  top: 0;
  font-size: 0.95em;
}

/* ---------- Bảng ---------- */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 1em;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 480px;
  background: #fff;
  font-size: 0.97rem;
}

th,
td {
  border: 1px solid var(--c-border);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--c-primary-light);
  color: var(--c-primary-dark);
}

tbody tr:nth-child(even) {
  background: #fafbfd;
}

/* Đèn báo trạng thái */
.led {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  vertical-align: -3px;
  margin-right: 6px;
  border: 2px solid rgba(0, 0, 0, 0.25);
}

.led--green {
  background: #2ecc71;
}

.led--orange {
  background: #f39c12;
}

.led--red {
  background: #e53935;
}

.led--off {
  background: #d0d4da;
}

.led--blink {
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px currentColor;
  animation: nhay 1s steps(2, start) infinite;
}

@keyframes nhay {
  to {
    opacity: 0.25;
  }
}

/* ---------- Hình ảnh / placeholder ---------- */
.figure {
  margin: 1em 0;
  padding: 12px;
  background: #fff;
  border: 2px dashed #98a2b3;
  border-radius: var(--radius);
  text-align: center;
}

.figure img {
  display: block;
  margin: 0 auto;
  max-height: 520px;
}

/* Ảnh chụp + sơ đồ remote trên trang hãng: cho cao hơn để đọc được tên nút */
.figure--remote {
  border-style: solid;
  border-color: var(--c-border);
}

.figure--remote img {
  max-height: none;
  width: 100%;
  max-width: 300px;
}

.figure figcaption {
  margin-top: 8px;
  font-size: 0.92rem;
  color: var(--c-muted);
  text-align: left;
}

.figure-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.figure-row > * {
  min-width: 0; /* cho phép bảng/ảnh co lại trong grid, tránh tràn ngang trên điện thoại */
}

/* Bảng nút bấm */
.keys {
  list-style: none;
  padding: 0;
  margin: 0 0 1em;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.keys li {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(120px, 36%) 1fr;
  gap: 10px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: 10px;
}

.keys .key {
  display: inline-block;
  font-weight: 700;
  color: var(--c-primary-dark);
}

.tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--c-primary-light);
  color: var(--c-primary-dark);
  vertical-align: middle;
}

/* ---------- Biểu mẫu (trang liên hệ) ---------- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.field label,
.field legend {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
}

.field input[type="text"],
.field select,
.field textarea {
  width: 100%;
  min-height: 52px;
  font: inherit;
  font-size: 1.05rem;
  padding: 10px 12px;
  border: 2px solid #98a2b3;
  border-radius: 10px;
  background: #fff;
  color: var(--c-text);
}

.field textarea {
  min-height: 260px;
  line-height: 1.5;
  resize: vertical;
}

.field__hint {
  margin: 6px 0 0;
  font-size: 0.95rem;
  color: var(--c-primary-dark);
}

.field__hint[hidden] {
  display: none;
}

.field fieldset {
  border: 2px solid var(--c-border);
  border-radius: 10px;
  padding: 8px 12px 4px;
  margin: 0;
}

.checks {
  list-style: none;
  padding: 0;
  margin: 0;
}

.checks li {
  margin: 0;
}

.checks label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-weight: 400;
  margin: 0;
}

.checks input {
  width: 24px;
  height: 24px;
  accent-color: var(--c-primary);
}

.copy-status {
  min-height: 1.4em;
  font-weight: 700;
  color: #1b5e20;
  margin: 8px 0 0;
}

/* ---------- Chân trang ---------- */
.site-footer {
  margin-top: 24px;
  padding: 24px 0;
  background: #e6eaf1;
  color: var(--c-muted);
  font-size: 0.93rem;
  border-top: 1px solid var(--c-border);
}

.site-footer p {
  margin-bottom: 0.4em;
}

.site-footer a {
  color: var(--c-primary-dark);
}

/* ---------- Màn hình rộng ---------- */
@media (min-width: 640px) {
  h1 {
    font-size: 2rem;
  }

  .figure-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .keys {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-grid {
    grid-template-columns: 1fr 1fr;
  }

  .form-grid .field--full {
    grid-column: 1 / -1;
  }

  .toc {
    columns: 2;
    column-gap: 32px;
  }

  .btn--big {
    width: auto;
    min-width: 320px;
  }

  .hang-list {
    grid-template-columns: repeat(3, 1fr);
  }

  .hang-card {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    padding: 18px 14px 16px;
  }

  .hang-card__img {
    width: 84px;
  }

  .hang-card__body {
    justify-items: center;
  }

  .hang-list__wide {
    grid-column: 1 / -1;
  }

  .hang-card--khac {
    grid-template-columns: 60px 1fr;
    justify-items: start;
    text-align: left;
    padding: 12px 16px;
  }

  .hang-card--khac .hang-card__img {
    width: 60px;
  }

  .hang-card--khac .hang-card__body {
    justify-items: start;
  }
}

@media (min-width: 900px) {
  body {
    padding-bottom: 0;
  }

  .call-bar {
    display: none;
  }

  .btn.btn--header {
    display: inline-flex;
  }

  .brand__school {
    font-size: 0.9rem;
  }

  .brand__title {
    font-size: 1.2rem;
  }

  .flow {
    grid-template-columns: repeat(4, 1fr);
    gap: 36px;
  }

  .flow__step {
    grid-template-columns: 1fr;
    align-content: start;
    justify-items: center;
    text-align: center;
    padding-top: 18px;
  }

  .flow__step:not(:last-child)::after {
    content: "→";
    left: auto;
    right: -33px;
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
    height: auto;
    line-height: 1;
    width: 30px;
    text-align: center;
  }

  .flow__body {
    justify-items: center;
  }
}

/* ---------- In ấn: dán tại phòng học ---------- */
@media print {
  @page {
    margin: 12mm;
  }

  html {
    font-size: 11pt;
  }

  body {
    background: #fff;
    color: #000;
    padding-bottom: 0;
  }

  .site-nav,
  .call-bar,
  .skip-link,
  .chips,
  .hang-banner--trong,
  .phong__form,
  .phong__kq,
  .toolbar,
  .btn,
  .btn-row,
  .acc__chev,
  .acc__foot,
  .no-print {
    display: none !important;
  }

  .site-header {
    background: none;
    color: #000;
    border-bottom: 2px solid #000;
  }

  .brand,
  .brand:visited {
    color: #000;
  }

  .brand__logo {
    display: none;
  }

  .container {
    max-width: none;
    padding: 0;
  }

  .acc,
  .box,
  .note,
  .call-box,
  .figure,
  .keys li {
    box-shadow: none;
    border-color: #000;
    break-inside: avoid;
  }

  .acc__panel {
    display: block !important;
    border-top: 1px solid #000;
  }

  .acc__btn {
    display: block;
    padding: 8px 12px;
    color: #000;
    background: none !important;
  }

  .acc__icon {
    display: inline;
    margin-right: 6px;
  }

  .steps > li::before {
    background: #000;
    color: #fff;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .lbl,
  .note,
  .call-box,
  .led {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .led--blink {
    animation: none;
  }

  a {
    color: #000;
    text-decoration: none;
  }

  main a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
  }

  .stage-block {
    box-shadow: none;
    border-color: #000;
    break-inside: auto;
  }

  .stage-block__head {
    background: none;
    color: #000;
    border-bottom: 2px solid #000;
  }

  .stage-block .acc {
    border-top: 1px solid #000;
  }

  .stage-block .acc:target,
  .stage-block .acc.is-current {
    box-shadow: none;
  }

  .acc__sub {
    color: #333;
  }

  .field textarea {
    min-height: 200px;
  }

  .site-footer {
    background: none;
    border-top: 1px solid #000;
  }
}
