/* rulespage-20261117 -- public Rules page (rules.html). Loaded by rules.html only; no other page uses it.
   Built on the portal's own .card / .card-header / .card-title and the theme variables, so it follows each
   store's palette (portal.css) and the neon theme (nl-themeui.css) with nothing store-specific in here. */

.nl-rules { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.nl-rules-lead { color: var(--text-secondary, #AEB6B0); font-size: 14px; margin: 0 0 24px; max-width: 680px; line-height: 1.55; }

.nl-rules-jump { display: flex; flex-wrap: wrap; gap: 10px; }

.nl-rules .card { min-width: 0; overflow-wrap: anywhere; scroll-margin-top: 80px; }
.nl-rules .card-header { margin-bottom: 12px; }
.nl-rules .card-title { line-height: 1.3; }
.nl-rules .card-title svg { flex: 0 0 18px; color: var(--t-primary, var(--sc-lime, #B6FF00)); }

.nl-rules-intro { color: var(--text-secondary, #AEB6B0); font-size: 14px; line-height: 1.6; margin: 0 0 14px; }
.nl-rules-intro:last-child { margin-bottom: 0; }

/* label/value rows */
.nl-rules-items { margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; }
.nl-rules-items:last-child { margin-bottom: 0; }
.nl-rules-item {
  display: grid; grid-template-columns: minmax(0, 40%) minmax(0, 1fr); gap: 16px;
  padding: 10px 0; border-bottom: 1px solid var(--sc-border, rgba(255,255,255,0.08));
}
.nl-rules-item:first-child { padding-top: 0; }
.nl-rules-item:last-child { border-bottom: 0; padding-bottom: 0; }
.nl-rules-item dt { margin: 0; font-size: 14px; color: var(--text-secondary, #AEB6B0); }
.nl-rules-item dd { margin: 0; font-size: 14px; font-weight: 600; color: var(--sc-text, #F7F8F7); white-space: pre-wrap; }

.nl-rules-list { margin: 0 0 14px 20px; padding: 0; }
.nl-rules-list:last-child { margin-bottom: 0; }
.nl-rules-list li { font-size: 14px; color: var(--text-secondary, #AEB6B0); line-height: 1.7; }

/* tables scroll inside their own box; the page never scrolls sideways */
.nl-rules-table { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 14px;
  border: 1px solid var(--sc-border, rgba(255,255,255,0.08)); border-radius: 8px; }
.nl-rules-table:last-child { margin-bottom: 0; }
.nl-rules-table table { width: 100%; border-collapse: collapse; }
.nl-rules-table th, .nl-rules-table td { text-align: left; padding: 10px 12px; font-size: 13.5px; line-height: 1.45;
  vertical-align: top; overflow-wrap: break-word; }
.nl-rules-table th { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px;
  color: var(--sc-text-dim, #8a8a8a); background: var(--sc-surface-alt, rgba(255,255,255,0.03));
  border-bottom: 1px solid var(--sc-border, rgba(255,255,255,0.08)); }
.nl-rules-table td { color: var(--sc-text, #F7F8F7); border-bottom: 1px solid var(--sc-border, rgba(255,255,255,0.06)); }
.nl-rules-table tr:last-child td { border-bottom: 0; }
.nl-rules-table td:first-child { font-weight: 600; }

.nl-rules-notes { margin: 0; padding: 0; list-style: none; }
.nl-rules-notes li { font-size: 12.5px; color: var(--sc-text-dim, #8a8a8a); line-height: 1.55; margin-top: 6px; }
.nl-rules-notes li:first-child { margin-top: 0; }

.nl-rules-text { font-size: 14px; color: var(--text-secondary, #AEB6B0); line-height: 1.65; white-space: pre-wrap; margin: 0; }

.nl-rules-updated { font-size: 13px; color: var(--sc-text-dim, #8a8a8a); text-align: center; margin: 4px 0 8px; }

.nl-rules-state { text-align: center; color: var(--text-secondary, #AEB6B0); font-size: 14px; padding: 32px 20px; }
.nl-rules-state .btn { margin-top: 14px; }
.nl-rules-spin { display: inline-block; width: 18px; height: 18px; border-radius: 50%; vertical-align: -4px; margin-right: 10px;
  border: 2px solid var(--sc-border, rgba(255,255,255,0.15)); border-top-color: var(--t-primary, var(--sc-lime, #B6FF00));
  animation: nlRulesSpin .8s linear infinite; }
@keyframes nlRulesSpin { to { transform: rotate(360deg); } }

@media (max-width: 600px) {
  .nl-rules { gap: 16px; }
  .nl-rules .card { padding: 18px 16px; }
  .nl-rules-item { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .nl-rules-jump .btn { width: auto; flex: 0 0 auto; }
  /* phone: each table row becomes a small stacked block ("Tier  Bronze" / "Reward  1% cashback"), no sideways scroll */
  .nl-rules-table { border: 0; overflow: visible; }
  .nl-rules-table table, .nl-rules-table tbody, .nl-rules-table tr, .nl-rules-table td { display: block; width: 100%; }
  .nl-rules-table thead { display: none; }
  .nl-rules-table tr { border: 1px solid var(--sc-border, rgba(255,255,255,0.08)); border-radius: 8px; padding: 6px 0; margin-bottom: 10px; }
  .nl-rules-table tr:last-child { margin-bottom: 0; }
  .nl-rules-table td { display: grid; grid-template-columns: minmax(0, 42%) minmax(0, 1fr); gap: 10px; border-bottom: 0;
    padding: 5px 12px; font-size: 13.5px; }
  .nl-rules-table td::before { content: attr(data-label); font-size: 12px; color: var(--sc-text-dim, #8a8a8a); font-weight: 500;
    text-transform: uppercase; letter-spacing: .3px; }
  .nl-rules-table td:not([data-label]) { display: block; }
  .nl-rules-table td:not([data-label])::before { content: none; }
}
