/* Trang hướng dẫn sử dụng (/huong-dan) */
.g-hero { padding: 48px 0 28px; background: radial-gradient(ellipse at 15% 0%, #e9f9ef, transparent 55%), radial-gradient(ellipse at 90% 10%, #fff0f6, transparent 50%); border-bottom: 1px solid var(--line); }
.g-hero h1 { font-size: clamp(28px, 5vw, 44px); margin: 14px 0 10px; }
.g-hero .lead { max-width: 720px; color: var(--ink-2); font-size: 16.5px; }
.g-search { max-width: 560px; margin-top: 18px; }
.g-search .input { border-radius: 999px; padding: 13px 18px 13px 46px; font-size: 15px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%236b7c74' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='8' cy='8' r='6'/%3E%3Cpath d='M13 13l4 4'/%3E%3C/svg%3E") no-repeat 18px 50%; box-shadow: var(--shadow); }
.g-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.g-quick a { padding: 7px 13px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--ink); font-size: 13.5px; font-weight: 600; transition: border-color .15s, transform .15s; }
.g-quick a:hover { border-color: var(--brand-400); transform: translateY(-1px); }

.g-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 36px; align-items: start; padding-top: 32px; padding-bottom: 60px; }
.g-toc { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow-y: auto; scrollbar-width: thin; }
.g-toc-toggle { display: none; }
.g-toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; display: grid; gap: 2px; }
.g-toc li { counter-increment: toc; }
.g-toc a { display: flex; gap: 10px; padding: 7px 10px; border-radius: 10px; color: var(--ink-2); font-size: 14px; line-height: 1.35; }
.g-toc a::before { content: counter(toc); flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; background: var(--surface-2); color: var(--muted); }
.g-toc a:hover { background: var(--surface-2); color: var(--ink); }
.g-toc a.on { background: #effaf4; color: var(--brand-700); font-weight: 700; }
.g-toc a.on::before { background: var(--brand-500); color: #fff; }
.g-toc li.dim { display: none; }

.g-body { min-width: 0; }
.g-sec { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px 30px; margin-bottom: 22px; scroll-margin-top: 84px; }
.g-sec h2 { display: flex; align-items: center; gap: 12px; font-size: 23px; margin-bottom: 14px; }
.g-sec h2 > span { flex: none; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; background: var(--grad-soft); }
.g-sec h3 { font-size: 17px; margin: 22px 0 10px; }
.g-sec p, .g-sec li { color: var(--ink-2); }
.g-sec code { background: var(--surface-2); padding: 1px 6px; border-radius: 6px; font-size: .92em; color: var(--brand-700); }
.g-code { background: #12221c; color: #d3f9d8; padding: 12px 14px; border-radius: 10px; font-size: 13.5px; line-height: 1.6; overflow-x: auto; margin: 10px 0 4px; white-space: pre-wrap; overflow-wrap: anywhere; }

.g-steps { list-style: none; counter-reset: st; margin: 0 0 14px; padding: 0; display: grid; gap: 12px; }
.g-steps > li { counter-increment: st; position: relative; padding-left: 46px; min-height: 32px; line-height: 1.6; min-width: 0; }
.g-steps > li::before { content: counter(st); position: absolute; left: 0; top: -2px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 14px; color: #fff; background: var(--grad); box-shadow: 0 4px 10px rgba(25, 169, 111, .3); }
.g-list { margin: 0 0 14px; padding-left: 20px; display: grid; gap: 9px; line-height: 1.6; }
/* phần tử con của lưới mặc định không co nhỏ hơn nội dung → khối code, link dài làm vỡ khung trên điện thoại */
.g-list > li, .g-grid2 > *, .g-grid3 > *, .g-card { min-width: 0; overflow-wrap: anywhere; }

/* nhãn mô phỏng nút bấm trên giao diện */
.ui { display: inline-block; padding: 1px 9px; border-radius: 8px; border: 1px solid var(--line); background: #fff; font-size: 13px; font-weight: 700; color: var(--ink); white-space: nowrap; box-shadow: 0 1px 0 rgba(0, 0, 0, .06); line-height: 1.6; }
.ui-primary { background: var(--grad); color: #fff; border-color: transparent; }
.ui-dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.ui-warn { background: #fff8e1; border-color: #ffe08a; color: #8a5a00; }
.ui-danger { color: var(--danger); border-color: #f5c2c2; }

.g-tip, .g-warn { padding: 13px 16px; border-radius: 12px; font-size: 14.5px; line-height: 1.6; margin: 12px 0; color: var(--ink-2); }
.g-tip { background: #effaf4; border: 1px solid #c3ead3; }
.g-warn { background: #fff8e6; border: 1px solid #ffe2a8; }
.g-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.g-grid2 > * { margin: 0; }
.g-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 10px 0 14px; }
.g-card { display: grid; gap: 6px; align-content: start; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.g-card > b { color: var(--ink); font-size: 15px; }

.g-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.g-chips span { padding: 4px 11px; border-radius: 999px; background: var(--surface-2); font-size: 13px; font-weight: 600; }
.g-open { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; margin: 10px 0 14px; }
.g-open div { display: flex; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.g-open i { font-style: normal; font-size: 22px; line-height: 1.1; }
.g-open b { display: block; color: var(--ink); }
.g-styles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; margin: 10px 0 14px; }
.g-styles div { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.g-styles b { display: block; color: var(--ink); margin-bottom: 2px; }

.g-tiers td:first-child { white-space: nowrap; }
.g-tiers .price-old { font-size: .82em; }
.g-sale { margin: 10px 0; padding: 10px 14px; border-radius: 12px; background: #fff0f6; color: #a61e4d; font-size: 14px; border: 1px solid #ffc9de; }
.g-actions { display: grid; gap: 8px; margin: 10px 0 14px; }
.g-actions div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-size: 14.5px; color: var(--ink-2); }
.g-actions .ui { min-width: 150px; text-align: center; }
.g-faq details { margin-bottom: 8px; }
.g-faq p { margin-top: 10px; line-height: 1.65; }
.g-contact { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 6px 0 12px; }
.g-contact div { display: grid; gap: 2px; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); }
.g-contact a { font-size: 19px; font-weight: 800; }
.g-cta { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 18px; padding: 20px 22px; border-radius: 16px; background: var(--grad-soft); }
.g-cta b { display: block; font-size: 18px; }
.g-cta span { color: var(--ink-2); font-size: 14.5px; }
.g-empty { padding: 18px 20px; border-radius: 14px; background: #fff8e6; border: 1px solid #ffe2a8; margin-bottom: 20px; }
.g-sec.dim { display: none; }
mark.g-hit { background: #fff3a3; padding: 0 2px; border-radius: 3px; }

.g-top { position: fixed; right: 18px; bottom: 18px; z-index: 40; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; font-size: 18px; cursor: pointer; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: opacity .3s; }
.g-top.in { opacity: 1; pointer-events: auto; }

@media (max-width: 900px) {
  .g-layout { grid-template-columns: 1fr; gap: 16px; padding-top: 16px; }
  .g-toc { position: sticky; top: 64px; z-index: 30; max-height: none; overflow: visible; background: var(--bg); padding: 8px 0; margin: 0 -16px; padding-left: 16px; padding-right: 16px; border-bottom: 1px solid var(--line); }
  .g-toc-toggle { display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font-weight: 700; font-size: 14px; cursor: pointer; }
  .g-toc-toggle span { color: var(--brand-700); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .g-toc ol { display: none; margin-top: 8px; max-height: 60vh; overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 6px; box-shadow: var(--shadow-lg); }
  .g-toc.open ol { display: grid; }
  .g-sec { padding: 22px 18px; scroll-margin-top: 130px; }
  .g-sec h2 { font-size: 20px; }
  .g-grid2, .g-grid3 { grid-template-columns: 1fr; }
  .g-steps > li { padding-left: 40px; }
  .g-steps > li::before { width: 28px; height: 28px; font-size: 13px; top: 0; }
  .g-code { font-size: 12.5px; padding: 10px 12px; margin-left: -40px; }
  .g-actions .ui { min-width: 0; }
}
@media print { .site-header, .site-footer, .g-toc, .g-search, .g-quick, .g-top, .sale-bar, .sales-ticker { display: none !important; } .g-layout { display: block; } .g-sec { box-shadow: none; break-inside: avoid; } }
.g-hits { max-width: 720px; margin-top: 10px; font-size: 14px; color: var(--ink-2); line-height: 1.7; }
.g-hits a { font-weight: 700; }
