/* Giải thích neo hash (partials/anchor-explainer, trust-explainer) và trang tra ngược (public/anchor-lookup).
   Chỉ dùng biến màu của app.css :root. Bố cục theo bề rộng khung chứa (container query): cùng một khối
   nằm gọn trong trang QR 560px hay trải 4 cột trên trang chủ. */

/* ---------- Khối giải thích 4 bước ---------- */
.ax { container-type: inline-size; margin: 0 0 28px; }
.ax-compact { margin-top: 32px; }
/* nằm trong .hero (trang neo hash, tra ngược) nhưng trên tấm thẻ trắng: nhãn nhỏ giữ màu xanh lá đậm */
:is(.ax, .axl) .eyebrow { color: var(--mint-text); }
.ax-head { max-width: 760px; margin-bottom: 16px; }
.ax-title { font-size: var(--fs-page); font-weight: 700; letter-spacing: -.02em; margin: 6px 0 8px; }
.ax-compact .ax-title { font-size: var(--fs-h2); }
.ax-lead { color: var(--text-2); font-size: var(--fs-body); margin: 0; }
.ax-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp12); grid-template-columns: minmax(0, 1fr); }
.ax-step { min-width: 0; display: flex; flex-direction: column; gap: var(--sp12); padding: var(--card-pad); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-card); }
.ax-txt { display: flex; gap: var(--sp12); align-items: flex-start; }
.ax-txt > div { min-width: 0; }
.ax-txt :is(h3, h4) { font-size: var(--fs-h2); margin: 5px 0 4px; }
.ax-txt p { margin: 0; color: var(--text-2); font-size: var(--fs-body); overflow-wrap: break-word; }
.ax-num { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--accent-grad); color: var(--on-accent); box-shadow: var(--shadow-btn); }
.ax-step:nth-child(even) .ax-num { background: var(--icon-grad-mint); color: var(--on-mint); box-shadow: none; }
/* hình minh họa nằm dưới chữ */
.ax-art { margin-top: auto; padding: 10px; border-radius: var(--r); background: var(--tile-bg); border: 1px solid var(--tile-line); }
.ax-step:nth-child(even) .ax-art { background: var(--tile-bg-mint); border-color: var(--tile-line-mint); }
.ax-art svg { display: block; width: 100%; height: auto; max-height: 130px; }
/* bản gọn: khung hẹp chỉ giữ chữ, khung rộng mới có hình */
.ax-compact .ax-art { display: none; }
@container (min-width: 600px) {
  .ax-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ax-compact .ax-art { display: block; }
  .ax-compact .ax-art svg { max-height: 96px; }
}
@container (min-width: 1000px) { .ax-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* nét vẽ minh họa: xanh dương mang chữ trắng, bạc hà mang chữ xanh đen */
.ax-art .b { fill: var(--blue); }
.ax-art .m { fill: var(--mint); }
.ax-art .w { fill: var(--panel); }
.ax-art .sb { fill: var(--accent-line); }
.ax-art .sm { fill: var(--mint-line); }
.ax-art .ln { stroke: var(--line-2); stroke-width: 2; }
.ax-art path.ln { fill: none; }
.ax-art .lb { fill: none; stroke: var(--blue); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.ax-art .lk { fill: none; stroke: var(--text-2); stroke-width: 2.5; }
.ax-art .lm { fill: var(--mint-hi); stroke: var(--mint-text); stroke-width: 1.5; stroke-linejoin: round; }
.ax-art .bad { fill: none; stroke: var(--danger); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.ax-art .ck { fill: none; stroke: var(--on-accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.ax-art .fp path { fill: none; stroke: var(--on-mint); stroke-width: 2.6; stroke-linecap: round; }
.ax-art .lock { fill: var(--text-2); }
.ax-art .lockr { fill: none; stroke: var(--text-2); stroke-width: 2.5; }
.ax-art text { font-family: var(--font); font-size: 14px; font-weight: 700; }
.ax-art .tx { fill: var(--text); }
.ax-art .tw { fill: var(--on-accent); }
.ax-art .tn { fill: var(--on-mint); }
.ax-art .tbad { fill: var(--danger-fg); font-size: 12px; }
.ax-art .tx-s { fill: var(--text-2); font-size: 11px; font-weight: 600; }
.ax-art .tx-mono { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 11px; font-weight: 600; }
.ax-art .tn-btc { font-size: 22px; }

/* “Có tra ngược được không?” */
.ax-faq { margin-top: 22px; }
.ax-faq-title { font-size: var(--fs-h2); margin: 0 0 12px; }
.ax-faq-grid { display: grid; gap: var(--sp12); grid-template-columns: minmax(0, 1fr); }
@container (min-width: 600px) { .ax-faq-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ax-a { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: var(--card-pad); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-card); }
.ax-a-yes { border-color: var(--mint-line); background: linear-gradient(180deg, var(--mint-soft) 0%, var(--panel) 70%); }
.ax-a :is(h4, h5) { margin: 0; font-size: var(--fs-h2); }
.ax-a p { margin: 0; color: var(--text-2); font-size: var(--fs-body); overflow-wrap: break-word; }
.ax-a .btn { margin-top: auto; max-width: 100%; white-space: normal; }
.ax-note { margin: 14px 0 0; }
.ax-qa { margin-top: 12px; padding: var(--card-pad); background: var(--panel); border: 1px solid var(--mint-line); border-radius: var(--r-lg); box-shadow: var(--shadow-card); }
.ax-qa :is(h4, h5) { margin: 0 0 6px; font-size: var(--fs-h2); }
.ax-qa p { margin: 0; color: var(--text-2); font-size: var(--fs-body); }
.ax-links { display: flex; flex-wrap: wrap; gap: var(--gap-grid); margin-top: 12px; }
.ax-links .btn { flex: 1 1 180px; max-width: 360px; white-space: normal; text-align: center; }
@media (max-width: 420px) { .ax-links .btn { max-width: none; } }

/* ---------- Trang QR của người mua: “Làm sao biết thông tin này không bị sửa?” ---------- */
.ax-trust-list { list-style: none; margin: 0 0 12px; padding: 0; counter-reset: t; display: flex; flex-direction: column; gap: var(--gap-grid); }
.ax-trust-list li { display: flex; gap: var(--gap-grid); align-items: flex-start; font-size: var(--fs-body); }
.ax-trust-list li > span { min-width: 0; }
.ax-trust-list li::before { counter-increment: t; content: counter(t); flex: none; width: 24px; height: 24px; margin-top: 1px; border-radius: 50%; display: grid; place-items: center; font-size: var(--fs-xs); font-weight: 700; background: var(--accent-grad); color: var(--on-accent); }
.ax-trust-list li:nth-child(even)::before { background: var(--icon-grad-mint); color: var(--on-mint); }
.ax-more { margin-bottom: 12px; }
.ax-more > summary { min-height: 44px; color: var(--accent-text); font-weight: 600; }
.ax-more .ax { margin: 0; }
/* thắng cả luật thu hẹp cho điện thoại của app.css (details.fold > .fold-body) */
details.ax-more > .fold-body { padding: 0 0 12px; }
/* trong thẻ "Làm sao biết…" các bước đã nằm trong 2 lớp thẻ rồi: bỏ viền, bỏ nền, bỏ đệm,
   số bước thả nổi bên trái để chữ được trọn bề ngang thẻ */
.ax-more .ax-steps { gap: var(--gap-card); }
.ax-more .ax-step { padding: 0; background: none; border: 0; box-shadow: none; }
.ax-more .ax-txt { display: block; }
.ax-more .ax-num { float: left; width: 24px; height: 24px; margin: 2px 8px 0 0; font-size: var(--fs-sm); box-shadow: none; }
/* tiêu đề cao bằng số bước để đoạn văn bên dưới bắt đầu từ mép trái, không thụt vào */
.ax-more .ax-txt :is(h3, h4, h5) { margin-top: 0; min-height: 26px; }
.ax-more .ax-art { clear: both; }
.ax-trust-note { margin: 0 0 12px; }

/* ---------- Trang tra ngược ---------- */
/* lối tắt trong khối xanh của /neo-hash: xuống bảng neo hoặc xuống phần giải thích */
/* hai nút nhảy tới mục: dùng khuôn .btn-grid (hai ô bằng nhau, món lẻ cuối trải hết hàng) — chỉ còn lề trên */
.axl-jump { margin: var(--gap-card) 0 0; }
.axl-label { display: block; margin-bottom: 8px; font-weight: 600; color: var(--on-grad); text-shadow: var(--grad-text-shadow); }
.axl-form .lookup-input input { text-transform: none; }
.axl { display: flex; flex-direction: column; gap: var(--gap-card); padding-bottom: 24px; }
.axl > .alert { margin-bottom: 0; }
.axl .alert > div { min-width: 0; overflow-wrap: anywhere; }
.axl-h2 { font-size: var(--fs-h2); margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.axl-h2 > .i { color: var(--accent); }
.axl-h3 { font-size: var(--fs-body); margin: 18px 0 6px; }
.axl-result .tr-kv { margin-bottom: 4px; }
.axl-result .tr-kv dd { min-width: 0; }
.axl-kind { display: flex; gap: var(--sp12); align-items: center; margin-bottom: 12px; }
.axl-kind > div { min-width: 0; }
.axl-kind .axl-h2 { margin: 2px 0 0; }
.axl-ico { flex: none; width: var(--ico); height: var(--ico); border-radius: var(--r-tile); display: grid; place-items: center; font-size: var(--fs-emoji); background: var(--tile-bg-mint); border: 1px solid var(--tile-line-mint); }
.axl-ico-b { background: var(--tile-bg); border-color: var(--tile-line); }
.axl-stack { margin: 0; }
.axl-stack dt { color: var(--muted); font-size: var(--fs-sm); margin: 10px 0 4px; }
.axl-stack dt:first-child { margin-top: 0; }
.axl-stack dd { margin: 0; }
code.axl-h { display: block; font-size: var(--fs-xs); line-height: 1.45; padding: 6px 8px; border-radius: var(--r-xs); background: var(--bg-2); border: 1px solid var(--line); color: var(--text); overflow-wrap: anywhere; word-break: break-all; }
.axl-links { display: flex; flex-wrap: wrap; gap: var(--gap-grid); margin-top: 14px; }
.axl-links .btn { flex: 1 1 200px; white-space: normal; text-align: center; }
.axl-verify { display: flex; flex-direction: column; gap: var(--gap-grid); margin-top: 16px; }
.axl-verify .btn { width: 100%; white-space: normal; text-align: center; }
@media (min-width: 640px) { .axl-verify { max-width: 520px; } }
.axl-verify .tr-verify-out:empty { display: none; }
.axl-verify .tr-verify-out { margin-top: 0; overflow-wrap: anywhere; }

/* đường đi bản ghi → lá → các lần ghép → gốc */
.axl-path { list-style: none; margin: 8px 0 0; padding: 0; }
.axl-path > li { position: relative; padding: 0 0 14px 34px; min-width: 0; }
.axl-path > li::before { content: ''; position: absolute; left: 4px; top: 1px; width: 18px; height: 18px; border-radius: 50%; background: var(--accent-soft); border: 2px solid var(--blue); box-sizing: border-box; }
.axl-path > li::after { content: ''; position: absolute; left: 12px; top: 21px; bottom: 1px; width: 2px; background: var(--line-2); }
.axl-path > li:last-child { padding-bottom: 0; }
.axl-path > li:last-child::after { display: none; }
.axl-path > li.leaf::before, .axl-path > li.hop::before { background: var(--mint-soft); border-color: var(--mint-text); }
.axl-path > li.root::before { background: var(--mint); border-color: var(--mint-text); }
.axl-path > li.root.bad::before { background: var(--danger-bg); border-color: var(--danger); }
.axl-path .lbl { font-weight: 600; font-size: var(--fs-body); margin-bottom: 4px; }
.axl-path li.root.ok .lbl { color: var(--ok-fg); }
.axl-path li.root.bad .lbl { color: var(--danger-fg); }
.axl-path .sub { font-size: var(--fs-sm); color: var(--muted); margin-bottom: 4px; overflow-wrap: anywhere; }
.axl-path .sub code { word-break: break-all; }
.axl-hops { margin-top: 6px; font-size: var(--fs-sm); }
.axl-hops > summary { cursor: pointer; color: var(--accent-text); font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.axl-hops ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }

/* nơi neo */
.axl-proofs ul { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: var(--gap-grid); }
.axl-proofs li { display: flex; gap: var(--gap-grid); align-items: flex-start; font-size: var(--fs-body); }
.axl-proofs li > div { min-width: 0; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.axl-proofs li span:not(.axl-st) { color: var(--text-2); }
.axl-st { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: var(--fs-xs); font-weight: 700; margin-top: 1px; }
.axl-st.ok { background: var(--ok-bg); color: var(--ok-fg); border: 1px solid var(--ok-line); }
.axl-st.wait { background: var(--warn-bg); color: var(--warn-fg); border: 1px solid var(--warn-line); }
.axl-st.no { background: var(--danger-bg); color: var(--danger-fg); border: 1px solid var(--danger-line); }
.axl-dl { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.axl-dl .link { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; }

/* nhật ký của lô: chữ trước, trạng thái neo ngay dưới */
.axl-recs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.axl-recs a { display: flex; gap: var(--sp12); align-items: center; min-height: 56px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--bg-2); border: 1px solid var(--line); color: var(--text); text-decoration: none; }
.axl-recs a:hover { border-color: var(--accent-line); }
.axl-recs a > .i { color: var(--faint); }
.axl-recs .axl-ri { flex: none; width: var(--ico-sm); height: var(--ico-sm); border-radius: var(--r-sm); display: grid; place-items: center; font-size: var(--fs-emoji-inline); background: var(--tile-bg); border: 1px solid var(--tile-line); }
.axl-recs li:nth-child(even) .axl-ri { background: var(--tile-bg-mint); border-color: var(--tile-line-mint); }
.axl-recs .axl-rm { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.axl-recs .axl-rm b { font-size: var(--fs-body); }
.axl-recs .axl-rm small { color: var(--muted); font-size: var(--fs-sm); }
.axl-recs .axl-rm .badge { white-space: normal; }
.axl-recs .void .axl-rm b { text-decoration: line-through; color: var(--muted); }

/* trống / không tìm thấy / các loại mã */
.axl-empty { text-align: center; padding: 28px 18px; }
.axl-empty .axl-h2 { justify-content: center; }
.axl-big { font-size: var(--fs-stat); margin-bottom: var(--sp6); }
.axl-types { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: var(--gap-grid); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .axl-types { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.axl-types li { display: flex; gap: var(--sp12); align-items: center; min-width: 0; }
.axl-types li > div { min-width: 0; display: flex; flex-direction: column; }
.axl-types li span:not(.axl-ico) { color: var(--muted); font-size: var(--fs-sm); }
.axl-member label { font-weight: 600; color: var(--text); }
.axl-member input { flex: 1 1 200px; min-width: 0; }
.axl-member .btn { flex: 1 0 auto; }
@media (min-width: 521px) { .axl-member .btn { flex-grow: 0; } }
.axl-more { margin-top: 10px; }
/* bảng neo trên /neo-hash: lối vào tra ngược một gốc */
.axl-row-link { display: inline-flex; align-items: center; min-height: 44px; }
