/* Bổ sung cho bản chạy thật (dùng chung token màu trong style.css) */
.subject-tile span.small { font-family: var(--font); font-size: 12.5px; }
.btn.on-dark { color: #fff; }
.btn.on-dark:hover { background: rgba(255,255,255,.12); }
a.avatar { text-decoration: none; }
nav.sections a.strong { color: var(--ink); font-weight: 600; }
nav.sections a.strong.on { color: var(--primary); }
.notice { font-size: 14px; padding-block: 10px; }
.notice.warn { background: var(--warn-soft); color: var(--ink); }
.notice.bad { background: var(--bad-soft); color: var(--ink); }
.demo-bar code { background: rgba(0,0,0,.08); padding: 0 5px; border-radius: 4px; }

/* Biểu mẫu đăng nhập / đăng ký */
.auth { max-width: 460px; margin: 32px auto; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 28px; box-shadow: var(--shadow); }
.auth h1 { margin-bottom: 4px; }
.auth .sub { color: var(--muted); margin-bottom: 20px; font-size: 14px; }
.field .msg { font-size: 13px; min-height: 18px; }
.field .msg.ok { color: var(--good); }
.field .msg.bad { color: var(--bad); }
.input.big { font-size: 18px; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; }

/* Mã lớp nổi bật */
.code-box { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px 18px; border-radius: 12px; background: var(--gold-soft); }
.code-box .code { font: 700 28px var(--display); letter-spacing: .08em; color: var(--ink); }
.code-box .hint { color: var(--ink); opacity: .8; }

/* Video */
.yt { position: relative; aspect-ratio: 16 / 9; max-width: 100%; border-radius: var(--radius); overflow: hidden; background: #000; }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Thẻ việc cần làm */
.task { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.task:first-child { border-top: 0; }
.task .grow { flex: 1; min-width: 200px; }

/* Danh sách có hành động */
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.pill-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 12px; font-weight: 700; }
.q-builder { border: 1px solid var(--line); border-radius: 10px; padding: 14px; background: var(--surface-2); }
.q-builder .opt-row { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.q-builder .opt-row input[type=text] { flex: 1; min-width: 0; }
.toast.err { background: var(--bad); color: #fff; }
.big-num { font: 600 34px var(--display); }
/* Hướng dẫn */
.guide { max-width: 860px; }
.guide-sec { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.guide-sec h2 { margin-bottom: 8px; }
.g-step { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.g-step:first-of-type { border-top: 0; }
.g-n { width: 32px; height: 32px; border-radius: 50%; background: var(--gold); color: #2b2000; display: grid; place-items: center; font-weight: 700; }
.g-body p { font-size: 16px; margin-top: 4px; }
.g-body img { display: block; max-width: 100%; margin-top: 10px; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); }
.print-only { display: none; }
@media print {
  /* In luôn dùng màu sáng, kể cả khi máy đang ở chế độ tối */
  :root, :root:not([data-theme="light"]) {
    --bg: #ffffff; --surface: #ffffff; --surface-2: #eef1f8; --ink: #131a33; --muted: #59627c; --line: #dde2ee;
    --primary: #1b3a9a; --primary-ink: #ffffff; --primary-soft: #e4eafa; --gold: #f2b705; --gold-soft: #fdf2cc; --gold-ink: #6b4d00;
    --shadow: none; color-scheme: light;
  }
  .demo-bar, header.top, nav.sections, footer.foot, .no-print, .notice, .page-head { display: none !important; }
  .print-only { display: block; margin-bottom: 10px; }
  body { background: #fff; }
  .guide-sec { break-inside: avoid-page; box-shadow: none; }
  .g-step { break-inside: avoid; }
  .g-body img { max-height: 380px; width: auto; box-shadow: none; }
}
.steps-mini { counter-reset: s; list-style: none; margin: 0; padding: 0; }
.steps-mini li { counter-increment: s; display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 8px 0; }
.steps-mini li::before { content: counter(s); width: 26px; height: 26px; border-radius: 50%; background: var(--primary); color: var(--primary-ink); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
