/* Trang /network-affiliate — chỉ trang này tải file này (các trang khác không phải tải) */
.page-hero .nw-updated{ margin-top:14px; font-size:13px; font-weight:600; color:var(--muted); }
/* Thanh lọc: mỗi hàng một dòng, cuộn ngang; không dính trên đầu khi cuộn trang (người dùng chọn) */
.nw-toolbar{ position:static; }
.nw-toolbar .wrap{ align-items:center; padding-top:10px; padding-bottom:10px; }
.nw-filters{ display:flex; flex-direction:column; gap:8px; flex:1; min-width:0; }
.nw-filter-row{ position:relative; display:flex; align-items:center; gap:12px; min-width:0; }
.nw-filter-label{ flex:0 0 64px; font-size:12px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; color:var(--muted); }
.nw-filter-row .kb-chips{ flex:1; min-width:0; flex-wrap:nowrap; gap:8px; overflow-x:auto; scrollbar-width:none; margin:0; padding:2px 0; scroll-behavior:smooth; }
.nw-filter-row .kb-chips::-webkit-scrollbar{ display:none; }
/* còn nút bị che bên phải / trái thì mép đó mờ dần */
.nw-filter-row.more-right .kb-chips{ -webkit-mask-image:linear-gradient(to right, #000 calc(100% - 56px), transparent); mask-image:linear-gradient(to right, #000 calc(100% - 56px), transparent); }
.nw-filter-row.more-left .kb-chips{ -webkit-mask-image:linear-gradient(to left, #000 calc(100% - 40px), transparent); mask-image:linear-gradient(to left, #000 calc(100% - 40px), transparent); }
.nw-filter-row.more-left.more-right .kb-chips{ -webkit-mask-image:linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 56px), transparent); mask-image:linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 56px), transparent); }
.nw-toolbar .chip{ padding:6px 12px; font-size:13px; }
.nw-toolbar .chip span{ padding:0 7px; }
.nw-more{
  position:absolute; right:0; top:50%; transform:translateY(-50%);
  display:none; width:32px; height:32px; border-radius:50%; align-items:center; justify-content:center;
  background:#fff; border:1.5px solid var(--line); color:var(--ink); font-size:18px; line-height:1;
  box-shadow:0 6px 14px -8px rgba(18,19,15,.4);
}
.nw-more:hover{ background:#F3EEE4; }
.nw-filter-row.more-right .nw-more:not(.nw-less){ display:inline-flex; }
/* nút ‹ đứng ngay sau chữ "Loại" / "Khu vực" (64px chữ + 12px khoảng cách), hiện khi đã cuộn sang phải */
.nw-filter-row .nw-less{ right:auto; left:76px; display:none; }
.nw-filter-row.more-left .nw-less{ display:inline-flex; }
.nw-body{ padding:28px 0 0; }
/* thanh kết quả trên danh sách: số network + chọn kiểu xem */
.nw-listbar{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:8px; }
.nw-listbar .kb-count{ display:inline; font-size:14px; font-weight:600; color:var(--ink); }
.nw-view{ display:inline-flex; gap:2px; padding:3px; border-radius:999px; background:#fff; border:1.5px solid var(--line); }
.nw-view-btn{ display:inline-flex; align-items:center; gap:6px; padding:6px 14px; border-radius:999px; font-size:13px; font-weight:600; color:var(--muted); transition:background-color .15s, color .15s; }
.nw-view-btn .icon{ font-size:16px; }
.nw-view-btn:hover{ color:var(--ink); }
.nw-view-btn.is-active{ background:var(--ink); color:#fff; }
.nw-card.is-capped{ display:none; }
.nw-more-cards{ display:flex; justify-content:center; margin-top:32px; }
.nw-more-cards .btn{ border:1.5px solid var(--ink); border-radius:10px; }
.nw-more-cards .btn span{ font-weight:500; color:var(--muted); }
.nw-more-cards .btn:hover{ background:var(--lime); box-shadow:none; }
#nw-tableview{ padding-top:8px; }
/* thẻ network dùng kiểu thẻ trang Kiến thức (.mod-card): 5 thẻ / hàng, hàng thiếu thì canh giữa */
.nw-grid{ --cols:5; list-style:none; display:flex; flex-wrap:wrap; justify-content:flex-start; gap:28px 16px; padding-top:16px; }
.nw-card{ flex:0 0 calc((100% - (var(--cols) - 1) * 16px) / var(--cols)); min-width:0; padding:30px 16px 18px; gap:8px; }
.nw-logo{ display:inline-flex; width:48px; height:48px; flex-shrink:0; align-items:center; justify-content:center; margin-top:4px; border-radius:12px; background:#fff; border:1px solid var(--line); box-shadow:0 6px 14px -10px rgba(18,19,15,.35); font-size:16px; font-weight:800; color:var(--tone); }
.nw-logo img{ width:34px; height:34px; object-fit:contain; }
.nw-card h3{ font-size:16px; font-weight:800; line-height:1.3; color:var(--ink); margin-top:4px; }
.nw-region{ display:inline-flex; align-items:center; gap:5px; margin-top:-4px; font-size:12.5px; color:var(--muted); }
.nw-region .icon{ font-size:13px; }
.nw-pay{ margin-top:auto; font-size:12px; font-weight:700; letter-spacing:.02em; color:var(--muted); }
.nw-level{ display:inline-flex; align-items:center; gap:6px; font-size:12.5px; color:var(--muted); }
.nw-level strong{ color:var(--ink); }
.nw-dots{ display:inline-flex; gap:3px; }
.nw-dots i{ width:7px; height:7px; border-radius:50%; background:#E2DED4; }
.nw-dots i.on{ background:var(--tone); }
.mod-card.g-card.nw-card .btn{ margin-top:4px; min-width:0; width:100%; padding:9px 14px; }
.mod-card .mod-tip p{ display:block; overflow:visible; margin:0; font-size:13px; color:rgba(255,255,255,0.82); }
.mod-card .mod-tip p + p{ margin-top:6px; }
.mod-tip b{ color:#fff; }
.nw-card > p{ -webkit-line-clamp:4; }
.nw-terms{ padding:80px 0 0; }
.nw-table-wrap{ overflow-x:auto; background:#fff; border:1px solid var(--line); border-radius:16px; }
.nw-table{ width:100%; border-collapse:collapse; font-size:14.5px; }
.nw-table th, .nw-table td{ padding:10px 16px; text-align:left; border-bottom:1px solid var(--line); white-space:nowrap; }
.nw-table thead th{ background:var(--ink); color:#fff; font-weight:600; font-size:13px; }
.nw-table tbody tr:last-child > *, .nw-table tbody tr.is-last > *{ border-bottom:none; }
.nw-table tbody th{ font-weight:700; }
.nw-table tbody th a{ display:inline-flex; align-items:center; gap:10px; }
.nw-tlogo{ display:inline-flex; width:24px; height:24px; flex-shrink:0; align-items:center; justify-content:center; border-radius:6px; background:#fff; border:1px solid var(--line); font-size:10px; font-weight:800; color:var(--muted); }
.nw-tlogo img{ width:18px; height:18px; object-fit:contain; }
.nw-table tbody th a:hover{ color:var(--blue-ink); text-decoration:underline; text-underline-offset:3px; }
.nw-table td:first-child{ color:var(--muted); font-weight:700; }
.nw-swipe{ display:none; margin-bottom:10px; font-size:13px; font-weight:600; color:var(--muted); text-align:right; }
.nw-legend{ max-width:960px; margin:18px auto 0; display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:12px; }
.nw-legend > div{ padding:12px 14px; border-radius:12px; background:#fff; border:1px solid var(--line); }
.nw-legend dt{ font-size:14px; font-weight:800; color:var(--ink); }
.nw-legend dt small{ font-size:12px; font-weight:600; color:var(--muted); margin-left:4px; }
.nw-legend dd{ margin-top:2px; font-size:13px; line-height:1.55; color:var(--muted); }
.nw-pager{ margin-top:14px; display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; }
.nw-pager-info{ font-size:13px; color:var(--muted); }
.nw-pager-btns{ display:flex; flex-wrap:wrap; justify-content:center; gap:6px; }
.nw-pager-btns button{ min-width:36px; height:36px; padding:0 10px; border-radius:10px; font-size:14px; font-weight:700; background:#fff; border:1.5px solid var(--line); color:var(--ink); }
.nw-pager-btns button:hover:not(:disabled){ border-color:var(--ink); }
.nw-pager-btns button[aria-current="page"]{ background:var(--ink); border-color:var(--ink); color:#fff; }
.nw-pager-btns button:disabled{ opacity:.35; cursor:default; }
.nw-pager-gap{ display:inline-flex; align-items:flex-end; padding:0 2px 8px; color:var(--muted); }
.nw-tips{ padding:80px 0 0; }
.nw-tip-grid{ display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:20px; }
.nw-tip{ display:flex; flex-direction:column; gap:10px; padding:24px; }
.nw-tip-ic{ display:inline-flex; width:44px; height:44px; border-radius:12px; align-items:center; justify-content:center; font-size:22px; background:#E4F3FB; color:var(--blue-ink); }
.nw-tip h3{ font-size:17px; font-weight:800; line-height:1.35; text-wrap:balance; }
.nw-tip p{ font-size:14.5px; line-height:1.6; color:var(--muted); }
.nw-tip .read-more{ margin-top:auto; padding-top:4px; }
@media (max-width:1180px){
  .nw-grid{ --cols:4; }
}
@media (max-width:960px){
  .nw-grid{ --cols:2; }
  .nw-tip-grid{ grid-template-columns:minmax(0,1fr); }
}
@media (max-width:600px){
  .nw-body{ padding-top:28px; }
  .nw-filter-row{ gap:10px; }
  .nw-filter-label{ flex-basis:64px; font-size:12px; }
  .nw-more{ display:none !important; }
  .nw-grid{ --cols:1; gap:24px; }
  .nw-terms, .nw-tips{ padding-top:56px; }
  /* bảng trên điện thoại: bỏ cột #, ghim cột tên khi vuốt ngang */
  .nw-table td:first-child, .nw-table thead th:first-child{ display:none; }
  .nw-table tbody th, .nw-table thead th:nth-child(2){ position:sticky; left:0; z-index:1; box-shadow:inset -1px 0 0 var(--line); }
  .nw-table tbody th{ background:#fff; }
  .nw-table thead th:nth-child(2){ background:var(--ink); box-shadow:inset -1px 0 0 rgba(255,255,255,.15); }
  .nw-view-btn{ padding:6px 12px; }
  .nw-table th, .nw-table td{ padding:9px 12px; }
  .nw-pager{ justify-content:center; }
  .nw-swipe{ display:block; }
}



/* Icon dùng lại từ bộ icon đầu trang (partials/icon, use: true) */
.icon-use{ fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }

/* Thuật ngữ có giải thích: gạch chân chấm, trỏ chuột / chạm vào là hiện ô giải thích (public/js/network.js) */
.tip-term{ border-bottom:1px dotted currentColor; cursor:help; }
.tip-term:focus-visible{ outline:2px solid var(--blue); outline-offset:2px; border-radius:3px; }
.nw-card > .tag[data-term]{ cursor:help; }
.tipbox{
  position:fixed; z-index:200; max-width:min(320px, calc(100vw - 24px));
  padding:10px 12px; border-radius:12px; background:var(--ink); color:#fff;
  font-size:13px; font-weight:500; line-height:1.55; text-align:left;
  box-shadow:0 16px 32px -12px rgba(18,19,15,.5); pointer-events:none;
  opacity:0; transform:translateY(4px); transition:opacity .12s ease, transform .12s ease;
}
.tipbox.is-on{ opacity:1; transform:none; }
.tipbox b{ color:var(--lime); font-weight:700; }
@media (prefers-reduced-motion: reduce){ .tipbox{ transition:none; } }
@media (max-width:960px){ .nw-legend{ grid-template-columns:repeat(2, minmax(0,1fr)); } }
@media (max-width:600px){ .nw-legend{ grid-template-columns:minmax(0,1fr); } }

/* mô tả trên thẻ: không để một chữ đứng lẻ ở dòng cuối */
.nw-card > p{ text-wrap:pretty; }

/* hỏi đáp về network */
.nw-faq{ padding:80px 0 0; }
@media (max-width:600px){ .nw-faq{ padding-top:56px; } }
