/* Trang hướng dẫn — mặc định sáng; thêm class "dark" trên <html> cho chế độ tối */
:root {
  --retro-case: #eb4d28;
  --retro-case-dark: #c03515;
  --cyan: #22d3ee;
  --emerald: #34d399;
  --sky: #7dd3fc;
  --amber: #fbbf24;
  --purple: #c084fc;
  --radius-lg: 18px;
  --radius-xl: 22px;

  --bg0: #f8fafc;
  --bg1: #f1f5f9;
  --bg2: #e2e8f0;
  --header-bg: rgba(255, 255, 255, 0.88);
  --brand-kicker: rgba(71, 85, 105, 0.9);
  --heading: #0f172a;
  --lead: rgba(71, 85, 105, 0.95);
  --btn-border: rgba(15, 23, 42, 0.12);
  --btn-bg: rgba(255, 255, 255, 0.95);
  --btn-fg: #0f172a;
  --chip-border: rgba(15, 23, 42, 0.1);
  --chip-bg: rgba(255, 255, 255, 0.75);
  --chip-text: #334155;
  --chip-dot-off: rgba(148, 163, 184, 0.35);
  --hero-bg: radial-gradient(800px 350px at 20% 0%, rgba(235, 77, 40, 0.12), transparent 45%),
    radial-gradient(650px 320px at 85% 20%, rgba(34, 211, 238, 0.08), transparent 55%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(241, 245, 249, 0.98));
  --notice-border: rgba(245, 158, 11, 0.45);
  --notice-bg: rgba(254, 243, 199, 0.7);
  --notice-fg: #78350f;
  --notice-label: #92400e;
  --notice-fine: rgba(120, 53, 15, 0.85);
  --notice-icon: #b45309;
  --notice-shadow: 0 15px 45px rgba(15, 23, 42, 0.08);
  --surface: rgba(255, 255, 255, 0.92);
  --border: rgba(15, 23, 42, 0.1);
  --table-divider: rgba(15, 23, 42, 0.08);
  --table-th-bg: rgba(241, 245, 249, 0.95);
  --table-th-color: rgba(71, 85, 105, 0.9);
  --table-cell: #475569;
  --badge-border: rgba(15, 23, 42, 0.1);
  --badge-bg: rgba(255, 255, 255, 0.85);
  --badge-fg: #334155;
  --pill-border: rgba(15, 23, 42, 0.1);
  --pill-bg: rgba(255, 255, 255, 0.85);
  --pill-fg: #334155;
  --list-fg: #475569;
  --check-stroke: #0f172a;
  --commands-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(241, 245, 249, 0.98));
  --cmd-border: rgba(15, 23, 42, 0.1);
  --cmd-bg: rgba(255, 255, 255, 0.88);
  --cmd-fg: #334155;
  --footer-bg: rgba(255, 255, 255, 0.78);
  --meta-fg: #475569;
  --text: #334155;
  --shadow-lg: 0 20px 60px rgba(15, 23, 42, 0.08);
  --shadow-xl: 0 20px 60px rgba(15, 23, 42, 0.12);
  --white: #ffffff;
}

html.dark {
  --bg0: #0f172a;
  --bg1: #020617;
  --bg2: #000000;
  --header-bg: rgba(2, 6, 23, 0.65);
  --brand-kicker: rgba(148, 163, 184, 0.85);
  --heading: #ffffff;
  --lead: rgba(148, 163, 184, 0.98);
  --btn-border: rgba(255, 255, 255, 0.1);
  --btn-bg: rgba(255, 255, 255, 0.05);
  --btn-fg: #ffffff;
  --chip-border: rgba(255, 255, 255, 0.1);
  --chip-bg: rgba(255, 255, 255, 0.04);
  --chip-text: rgba(226, 232, 240, 0.9);
  --chip-dot-off: rgba(255, 255, 255, 0.18);
  --hero-bg: radial-gradient(800px 350px at 20% 0%, rgba(235, 77, 40, 0.14), transparent 45%),
    radial-gradient(650px 320px at 85% 20%, rgba(34, 211, 238, 0.09), transparent 55%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.82), rgba(2, 6, 23, 0.8));
  --notice-border: rgba(251, 191, 36, 0.3);
  --notice-bg: rgba(251, 191, 36, 0.11);
  --notice-fg: rgba(255, 251, 235, 0.96);
  --notice-label: rgba(255, 251, 235, 0.98);
  --notice-fine: rgba(255, 251, 235, 0.75);
  --notice-icon: currentColor;
  --notice-shadow: 0 15px 45px rgba(0, 0, 0, 0.25);
  --surface: rgba(15, 23, 42, 0.62);
  --border: rgba(255, 255, 255, 0.08);
  --table-divider: rgba(255, 255, 255, 0.06);
  --table-th-bg: rgba(255, 255, 255, 0.04);
  --table-th-color: rgba(226, 232, 240, 0.85);
  --table-cell: rgba(226, 232, 240, 0.92);
  --badge-border: rgba(255, 255, 255, 0.12);
  --badge-bg: rgba(255, 255, 255, 0.04);
  --badge-fg: rgba(226, 232, 240, 0.9);
  --pill-border: rgba(255, 255, 255, 0.12);
  --pill-bg: rgba(255, 255, 255, 0.04);
  --pill-fg: rgba(255, 255, 255, 0.9);
  --list-fg: rgba(226, 232, 240, 0.88);
  --check-stroke: rgba(255, 255, 255, 0.95);
  --commands-bg: linear-gradient(135deg, rgba(15, 23, 42, 0.7), rgba(2, 6, 23, 0.75));
  --cmd-border: rgba(255, 255, 255, 0.12);
  --cmd-bg: rgba(255, 255, 255, 0.04);
  --cmd-fg: rgba(226, 232, 240, 0.95);
  --footer-bg: rgba(255, 255, 255, 0.04);
  --meta-fg: rgba(226, 232, 240, 0.85);
  --text: #e5e7eb;
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.35);
  --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: linear-gradient(to bottom, var(--bg0), var(--bg1), var(--bg2));
  color: var(--text);
  transition: background-color 0.3s ease, color 0.3s ease;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: -1;
}

.glow {
  position: absolute;
  width: 420px;
  height: 420px;
  filter: blur(120px);
  opacity: 0.9;
}
.glow.a {
  top: -80px;
  left: -40px;
  background: color-mix(in oklab, var(--retro-case) 18%, transparent);
}
.glow.b {
  bottom: -80px;
  right: 40px;
  width: 340px;
  height: 340px;
  background: color-mix(in oklab, var(--cyan) 12%, transparent);
}

header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
  background: var(--header-bg);
}

.header-inner {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.logo {
  width: 36px;
  height: 36px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--retro-case), var(--retro-case-dark));
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
  flex: 0 0 auto;
}

.brand-text {
  display: grid;
  line-height: 1.1;
}

.brand-kicker {
  font-size: 12px;
  color: var(--brand-kicker);
}

.brand-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--heading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--btn-border);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 14px;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  user-select: none;
}

.btn:hover {
  border-color: color-mix(in oklab, var(--retro-case) 55%, rgba(255, 255, 255, 0.12));
  color: var(--retro-case);
}

.btn.primary {
  border-color: color-mix(in oklab, var(--retro-case) 45%, transparent);
  background: color-mix(in oklab, var(--retro-case) 12%, rgba(255, 255, 255, 0.04));
  color: var(--retro-case);
  font-weight: 700;
}

.btn.primary:hover {
  background: var(--retro-case);
  color: var(--white);
  transform: translateY(-1px);
}

.theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 40px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid var(--btn-border);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}
.theme-btn:hover {
  border-color: color-mix(in oklab, var(--retro-case) 45%, transparent);
}

main {
  padding: 48px 0 56px;
}

.hero {
  border-radius: 26px;
  border: 1px solid var(--border);
  background: var(--hero-bg);
  box-shadow: var(--shadow-xl);
  padding: 28px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--chip-border);
  background: var(--chip-bg);
  font-size: 12px;
  color: var(--chip-text);
}

.chip .dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--chip-dot-off);
  box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.12);
}

html.dark .chip .dot {
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.05);
}

.chip.orange .dot {
  background: var(--retro-case);
}
.chip.emerald .dot {
  background: var(--emerald);
}
.chip.sky .dot {
  background: var(--sky);
}

h1 {
  margin: 0;
  font-size: 34px;
  letter-spacing: -0.02em;
  color: var(--heading);
}

.lead {
  margin: 12px 0 0;
  color: var(--lead);
  max-width: 72ch;
  line-height: 1.6;
  font-size: 15px;
}

.notice {
  margin-top: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--notice-border);
  background: var(--notice-bg);
  color: var(--notice-fg);
  padding: 14px 14px;
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 12px;
  align-items: start;
  box-shadow: var(--notice-shadow);
}

.notice .icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  margin-top: 2px;
  color: var(--notice-icon);
}

.notice .label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 6px;
  color: var(--notice-label);
}
.notice p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
}
.notice .fine {
  margin-top: 6px;
  font-size: 12px;
  color: var(--notice-fine);
}

section {
  margin-top: 36px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--heading);
  margin: 0 0 12px;
}

.section-title .marker {
  width: 10px;
  height: 10px;
  border-radius: 99px;
  background: var(--retro-case);
  box-shadow: 0 0 0 5px rgba(235, 77, 40, 0.12);
}

.panel {
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table th,
.table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--table-divider);
  vertical-align: top;
  color: var(--table-cell);
}

.table thead th {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  color: var(--table-th-color);
  background: var(--table-th-bg);
  border-bottom: 1px solid var(--table-divider);
}

.table tbody td:first-child {
  font-weight: 800;
  color: var(--heading);
}

.table td + td,
.table th + th {
  border-left: 1px solid var(--table-divider);
}

.table-foot {
  padding: 12px 14px;
  background: var(--table-th-bg);
  font-size: 12px;
  color: var(--table-cell);
  border-top: 1px solid var(--table-divider);
  opacity: 0.95;
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 860px) {
  .grid.cols-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.card {
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: var(--heading);
}

.badge {
  font-size: 11px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--badge-border);
  background: var(--badge-bg);
  color: var(--badge-fg);
  white-space: nowrap;
}

.pill-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid var(--pill-border);
  background: var(--pill-bg);
  display: grid;
  place-items: center;
  color: var(--pill-fg);
}

.list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
  color: var(--list-fg);
  font-size: 14px;
  line-height: 1.55;
}

.list li {
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 10px;
  align-items: start;
}

.check {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 1px solid rgba(235, 77, 40, 0.5);
  background: rgba(235, 77, 40, 0.18);
  display: grid;
  place-items: center;
  margin-top: 2px;
}
.check svg {
  width: 11px;
  height: 11px;
  fill: none;
  stroke: var(--check-stroke);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.commands {
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--commands-bg);
  box-shadow: var(--shadow-lg);
  padding: 20px;
}

.commands-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 760px) {
  .commands-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.cmd {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--cmd-border);
  background: var(--cmd-bg);
  color: var(--cmd-fg);
  font-size: 14px;
}

.wand {
  width: 18px;
  height: 18px;
  border-radius: 8px;
  background: rgba(52, 211, 153, 0.15);
  border: 1px solid rgba(52, 211, 153, 0.35);
  display: grid;
  place-items: center;
}

footer {
  margin-top: 22px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--footer-bg);
  padding: 14px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--meta-fg);
  font-size: 14px;
}

footer a {
  color: var(--retro-case);
  text-decoration: underline;
}

.meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--meta-fg);
  font-size: 13px;
}

.meta .tag {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(192, 132, 252, 0.75);
  box-shadow: 0 0 0 5px rgba(192, 132, 252, 0.12);
}

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

@media (max-width: 700px) {
  .nav .btn {
    padding: 10px 10px;
  }
  h1 {
    font-size: 28px;
  }
  .table th,
  .table td {
    padding: 10px 10px;
  }
}
