body.portal { line-height: 1.6; }
.nl-shell { max-width: 860px; margin: 0 auto; padding: 24px 16px 56px; }
.nl-visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nl-h1-sub { display: block; margin-top: 4px; color: var(--muted); font-size: .55em; font-weight: 700; letter-spacing: 0; }
.nl-intro h1 { margin-bottom: 12px; }
.nl-intro .lead { margin-bottom: 16px; font-size: 17px; }
.nl-tool { margin: 22px 0 36px; padding: 16px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.nl-ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 0; }

.nl-label { display: flex; align-items: center; gap: 8px; margin: 16px 0 10px; color: var(--text); font-size: 14px; font-weight: 750; }
.nl-label:first-of-type { margin-top: 0; }
.nl-num { display: inline-grid; place-items: center; flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 13px; }
.nl-setup { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.nl-setup label { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-size: 14px; font-weight: 650; }
.nl-setup select { min-height: 40px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); color: var(--text); font: inherit; font-weight: 700; }
.nl-setup input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--accent); }
.nl-chips, .nl-controls { display: flex; flex-wrap: wrap; gap: 8px; }
.nl-chip { min-width: 44px; min-height: 44px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-soft); color: var(--text); font-size: 14px; font-weight: 700; cursor: pointer; touch-action: manipulation; }
.nl-chip:hover:not(:disabled) { border-color: var(--accent); }
.nl-chip:disabled { opacity: .45; cursor: default; }
.nl-chip-strong { background: var(--accent); border-color: var(--accent); color: #fff; }
.nl-chip-quiet { background: transparent; color: var(--muted); }

/* Palette: the color the next dot gets. */
.nl-palette { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.nl-swatch { position: relative; width: 36px; height: 36px; padding: 0; border: 2px solid rgba(20, 24, 30, .25); border-radius: 50%; background: var(--c); color: var(--ink, #fff); font-size: 13px; font-weight: 800; cursor: pointer; touch-action: manipulation; }
.nl-swatch[aria-pressed="true"] { outline: 3px solid var(--text); outline-offset: 2px; }
.nl-swatch[data-dots="2"]::after { content: '✓'; position: absolute; right: -4px; bottom: -4px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); color: var(--text); font-size: 11px; line-height: 16px; text-shadow: none; }

/* Grids: --cols square cells on dark glass; dots are colored circles with a letter. */
.nl-grid { --cols: 7; position: relative; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); width: min(100%, calc(var(--cols) * 52px)); margin: 0 auto 12px; padding: 0; box-sizing: content-box; border: 6px solid #2f2a3d; border-radius: 12px; background: #2f2a3d; }
.nl-cell { position: relative; display: grid; place-items: center; aspect-ratio: 1; min-width: 0; padding: 0; border: 0; border-radius: 0; background: #1d1a26; box-shadow: inset 0 0 0 1px rgba(244, 239, 226, .14); cursor: pointer; touch-action: manipulation; }
.nl-board .nl-cell { cursor: default; }
.nl-dot { position: relative; z-index: 2; display: grid; place-items: center; width: 74%; height: 74%; border-radius: 50%; background: var(--c); color: var(--ink, #fff); font-size: clamp(8px, 2.6vw, 15px); font-weight: 800; line-height: 1; }
.nl-paths { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; pointer-events: none; }
.nl-tint { opacity: .28; }
.nl-line { fill: none; stroke-width: .36; stroke-linecap: round; stroke-linejoin: round; }
.nl-latest { stroke-width: .46; }

.nl-presets { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.nl-status { min-height: 3.2em; margin: 12px 0 0; color: var(--text); font-size: 14px; }
.nl-solve { width: 100%; font-size: 16px; }
.nl-progress { display: flex; align-items: center; gap: 10px; margin-top: 10px; color: var(--muted); font-size: 14px; }

.nl-result { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); scroll-margin-top: 12px; }
.nl-result:focus { outline: none; }
.nl-result-title { margin: 0 0 12px; font-size: 22px; }
.nl-caption { min-height: 3.2em; margin: 0 0 10px; color: var(--text); font-size: 15px; font-weight: 650; }
.nl-controls { margin-bottom: 12px; }
.nl-controls .nl-chip { padding: 8px 12px; }
.nl-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.nl-copy-status { flex-basis: 100%; margin: 0; color: var(--muted); font-size: 13px; }
.nl-copy-status:empty { display: none; }
.nl-note { margin: 8px 0 0; font-size: 13px; }
.nl-steps { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; padding: 0; list-style: none; }
.nl-step { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text); font-size: 13px; font-weight: 700; cursor: pointer; font-variant-numeric: tabular-nums; }
.nl-step[data-done="true"] { color: var(--muted); }
.nl-step[aria-current="step"] { border-color: var(--accent); background: #e2f0e9; }
.nl-key { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--c); color: var(--ink, #fff); font-size: 11px; box-shadow: inset 0 0 0 1px rgba(20, 24, 30, .25); }

.nl-article h2 { margin: 30px 0 12px; font-size: 24px; }
.nl-article li { margin-bottom: 8px; color: var(--muted); }
.nl-article li strong { color: var(--text); }
.nl-faq details { padding: 12px 0; border-bottom: 1px solid var(--line); }
.nl-faq summary { color: var(--text); font-weight: 750; cursor: pointer; }
.nl-faq details p { margin: 8px 0 0; }
.nl-cta { margin-top: 32px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
.nl-cta h2 { margin-top: 0; }
.nl-cta .text-link { color: var(--accent-strong); }
.nl-footer { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

@media (min-width: 640px) {
  .nl-shell { padding: 36px 24px 64px; }
  .nl-tool { padding: 22px; }
}
