@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Condensed:wght@500;600&family=IBM+Plex+Sans:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap");

.nl-root { background: var(--bg); color: var(--ink); font-family: var(--font-sans); font-size: 16px; line-height: 26px; padding: var(--space-5); }
.nl-row { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.nl-stack { display: grid; gap: var(--space-4); }
.nl-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.nl-icon { flex: none; display: block; }
:where(.nl-btn, .nl-term input, .nl-sheet-close):focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Button */
.nl-btn { font-family: var(--font-sans); font-size: 15px; line-height: 20px; font-weight: 500; min-height: 40px; padding: 10px 18px; border-radius: var(--radius-md); border: 1px solid transparent; cursor: pointer; display: inline-flex; align-items: center; gap: var(--space-2); transition: background-color 150ms ease-out, border-color 150ms ease-out; }
.nl-btn-primary { background: var(--accent); color: var(--on-accent); }
.nl-btn-primary:hover { background: color-mix(in oklab, var(--accent) 88%, var(--ink)); }
.nl-btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.nl-btn-secondary:hover { background: var(--surface-raised); }
.nl-btn-quiet { background: transparent; color: var(--accent); padding-inline: 10px; }
.nl-btn-quiet:hover { background: var(--accent-soft); }
.nl-btn:disabled { cursor: not-allowed; background: var(--surface-raised); color: var(--ink-muted); border-color: var(--line); }

/* Kader */
.nl-kader { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-4) var(--space-5) var(--space-5); display: grid; gap: var(--space-2); max-width: 720px; }
.nl-kader-head { display: flex; align-items: center; gap: var(--space-2); color: var(--accent); }
.nl-kader-label { font-family: var(--font-condensed); font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .08em; }
.nl-kader-title { margin: 0; font-size: 17px; line-height: 24px; font-weight: 600; color: var(--ink); }
.nl-kader-body { font-size: 16px; line-height: 26px; color: var(--ink); max-width: 68ch; }
.nl-kader-body p { margin: 0 0 var(--space-2); }
.nl-kader-body p:last-child { margin-bottom: 0; }
.nl-kader-body code { font-family: var(--font-mono); font-size: 14px; font-weight: 500; background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 1px 6px; }
.nl-kader-letop .nl-kader-head { color: var(--warn); }
.nl-kader-letop { border-color: color-mix(in oklab, var(--warn) 45%, var(--line)); }
.nl-kader-commando .nl-kader-body pre, .nl-kader pre { margin: 0; font-family: var(--font-mono); font-size: 14px; line-height: 22px; background: var(--term-bg); color: var(--term-ink); border-radius: var(--radius-sm); padding: var(--space-3) var(--space-4); overflow-x: auto; }
.nl-kader-recall .nl-kader-head, .nl-kader-uitdaging .nl-kader-head { color: var(--ink); }
.nl-kader-uitdaging { background: var(--accent-soft); border-color: transparent; }

/* Status */
.nl-status { display: inline-flex; align-items: center; gap: var(--space-1); font-size: 13px; line-height: 18px; font-weight: 500; padding: 2px 8px 2px 6px; border-radius: var(--radius-sm); white-space: nowrap; }
.nl-status-glyph { font-family: var(--font-mono); font-weight: 600; width: 14px; text-align: center; }
.nl-status-ok { color: var(--ok); background: var(--ok-soft); }
.nl-status-warn { color: var(--warn); background: var(--warn-soft); }
.nl-status-bad { color: var(--bad); background: var(--bad-soft); }
.nl-status-neutral { color: var(--neutral); background: var(--surface-raised); }
.nl-status-info { color: var(--accent); background: var(--accent-soft); }

/* SkillStatus */
.nl-skill { display: inline-flex; align-items: center; gap: var(--space-2); font-size: 13px; line-height: 18px; font-weight: 500; color: var(--ink-muted); }
.nl-skill-meter { display: inline-flex; gap: 2px; }
.nl-skill-meter i { width: 10px; height: 10px; border-radius: 2px; border: 1.5px solid var(--line-strong); }
.nl-skill-meter i.on { background: var(--accent); border-color: var(--accent); }
.nl-skill-aangetoond, .nl-skill-beheerst { color: var(--ink); }
.nl-skill-beheerst .nl-skill-meter i { background: var(--ok); border-color: var(--ok); }

/* DeviceTag */
.nl-dev { display: inline-flex; align-items: center; gap: var(--space-2); font-size: 14px; }
.nl-dev-mark { font-family: var(--font-mono); font-size: 12px; font-weight: 500; width: 22px; height: 22px; display: inline-grid; place-items: center; border-radius: var(--radius-sm); border: 1.5px solid var(--accent); color: var(--accent); }
.nl-dev-S .nl-dev-mark { background: var(--accent); color: var(--on-accent); }
.nl-dev-H .nl-dev-mark { border-color: var(--line-strong); color: var(--ink-muted); }
.nl-dev-name { font-family: var(--font-mono); font-size: 14px; color: var(--ink); }

/* Progress */
.nl-progress { display: grid; gap: 6px; min-width: 160px; }
.nl-progress-top { display: flex; justify-content: space-between; gap: var(--space-3); font-size: 14px; line-height: 20px; color: var(--ink); }
.nl-progress-val { color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.nl-progress-track { height: 8px; border-radius: var(--radius-pill); background: var(--surface-raised); border: 1px solid var(--line); overflow: hidden; }
.nl-progress-track i { display: block; height: 100%; background: var(--accent); border-radius: var(--radius-pill); transition: width 200ms ease-out; }

/* Mission */
.nl-mission { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-5); display: grid; gap: var(--space-4); align-content: start; max-width: 360px; }
.nl-mission-label { display: flex; align-items: center; gap: var(--space-2); color: var(--accent); font-family: var(--font-condensed); font-size: 12px; font-weight: 600; letter-spacing: .08em; }
.nl-mission-title { margin: 0; font-family: var(--font-condensed); font-size: 20px; line-height: 26px; font-weight: 600; }
.nl-mission-desc { margin: 0; font-size: 14px; line-height: 22px; color: var(--ink-muted); }
.nl-mission-block { display: grid; gap: var(--space-2); border-top: 1px solid var(--line); padding-top: var(--space-4); }
.nl-mission-sub { font-family: var(--font-condensed); font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .08em; color: var(--ink-muted); }
.nl-kv { display: grid; grid-template-columns: auto 1fr; gap: 4px var(--space-4); margin: 0; font-size: 14px; line-height: 22px; }
.nl-kv dt { color: var(--ink-muted); }
.nl-kv dd { margin: 0; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.nl-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; line-height: 22px; }
.nl-checks li { display: flex; gap: var(--space-2); color: var(--ink-muted); }
.nl-checks li.is-done { color: var(--ink); }
.nl-check-glyph { font-family: var(--font-mono); width: 16px; text-align: center; color: var(--neutral); }
.nl-checks li.is-done .nl-check-glyph { color: var(--ok); }
.nl-mission-count { font-size: 12px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.nl-mission-hidden { margin: 0; font-size: 14px; line-height: 22px; color: var(--ink-muted); }

/* HintLadder */
.nl-hints { display: grid; gap: var(--space-3); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-4); max-width: 420px; }
.nl-hints-top { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); }
.nl-hints-label { font-family: var(--font-condensed); font-size: 12px; font-weight: 600; letter-spacing: .08em; color: var(--ink-muted); }
.nl-hints-bank { font-size: 13px; color: var(--ink); font-variant-numeric: tabular-nums; }
.nl-hints-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.nl-hints-steps li { border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); padding: var(--space-2) var(--space-3); }
.nl-hints-steps li.is-open { border-style: solid; border-color: var(--line); background: var(--surface-raised); }
.nl-hints-step { display: flex; justify-content: space-between; gap: var(--space-3); font-size: 14px; line-height: 20px; }
.nl-hints-name { font-weight: 500; }
.nl-hints-cost { color: var(--ink-muted); font-size: 13px; }
.nl-hints-text { margin: var(--space-1) 0 0; font-size: 14px; line-height: 22px; }
.nl-hints-why { margin: 0; font-size: 12px; line-height: 17px; color: var(--ink-muted); }

/* SidePanel */
.nl-sheet { background: var(--surface-raised); border-left: 1px solid var(--line); box-shadow: var(--shadow-sheet); width: min(440px, 100%); display: grid; grid-template-rows: auto 1fr auto; border-radius: var(--radius-lg) 0 0 var(--radius-lg); animation: nl-sheet-in 200ms ease-out; }
@keyframes nl-sheet-in { from { transform: translateX(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.nl-sheet-head { display: flex; justify-content: space-between; align-items: center; padding: var(--space-3) var(--space-3) var(--space-3) var(--space-5); border-bottom: 1px solid var(--line); }
.nl-sheet-kicker { font-family: var(--font-condensed); font-size: 12px; font-weight: 600; letter-spacing: .08em; color: var(--accent); }
.nl-sheet-close { width: 40px; height: 40px; display: grid; place-items: center; background: transparent; border: 0; border-radius: var(--radius-md); color: var(--ink-muted); cursor: pointer; }
.nl-sheet-close:hover { background: var(--surface); color: var(--ink); }
.nl-sheet-main { display: grid; grid-template-columns: auto 1fr; gap: var(--space-4); padding: var(--space-5); align-items: start; }
.nl-osi { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; width: 28px; }
.nl-osi li { font-family: var(--font-mono); font-size: 12px; line-height: 20px; text-align: center; border-radius: 3px; background: var(--surface); color: var(--ink-muted); border: 1px solid var(--line); }
.nl-osi li.on { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.nl-sheet-content { display: grid; gap: var(--space-2); }
.nl-sheet-title { margin: 0; font-size: 17px; line-height: 24px; font-weight: 600; }
.nl-sheet-body { font-size: 14px; line-height: 22px; color: var(--ink); }
.nl-sheet-body p { margin: 0 0 var(--space-2); }
.nl-sheet-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); padding: var(--space-4) var(--space-5) var(--space-5); border-top: 1px solid var(--line); }

/* Terminal */
.nl-term { background: var(--term-bg); color: var(--term-ink); border: 1px solid var(--term-line); border-radius: var(--radius-md); font-family: var(--font-mono); font-size: 15px; line-height: 24px; display: grid; grid-template-rows: auto auto 1fr auto; overflow: hidden; min-height: 260px; }
.nl-term-head { display: flex; justify-content: space-between; gap: var(--space-3); padding: 10px var(--space-5); border-bottom: 1px solid var(--term-line); font-size: 12px; line-height: 16px; letter-spacing: .06em; color: var(--term-muted); }
.nl-term-dev { color: var(--term-ink); font-weight: 500; }
.nl-term-conn { display: inline-flex; align-items: center; gap: 6px; }
.nl-term-conn i { width: 7px; height: 7px; border-radius: 50%; background: var(--term-prompt); }
.nl-term-mode { padding: 6px var(--space-5); font-family: var(--font-condensed); font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .08em; color: var(--term-prompt); background: rgba(127, 216, 234, 0.08); border-bottom: 1px solid var(--term-line); }
.nl-term-log { padding: var(--space-4) var(--space-5) 0; overflow: auto; max-height: 360px; white-space: pre-wrap; word-break: break-word; }
.nl-term-prompt { color: var(--term-prompt); white-space: pre; }
.nl-term-out { color: var(--term-ink); white-space: pre; word-break: normal; }
.nl-term-err { color: var(--term-error); white-space: pre; }
.nl-term-sys { color: var(--term-sys); }
.nl-term-input { display: flex; gap: 1ch; align-items: baseline; padding: var(--space-2) var(--space-5) var(--space-4); }
.nl-term-input input { flex: 1; min-width: 0; background: transparent; border: 0; color: var(--term-ink); font: inherit; caret-color: var(--term-prompt); padding: 0; border-radius: 2px; }
.nl-term-input input:focus-visible { outline-offset: 3px; }

/* Netwerkiconen en topologie */
.nl-devicon { color: var(--ink); flex: none; display: block; }
.nl-devicon-up { color: var(--accent); }
.nl-devicon-admin { color: var(--warn); }
.nl-devicon-down { color: var(--neutral); }
.nl-topo { margin: 0; display: grid; gap: var(--space-2); max-width: 640px; }
.nl-topo svg { width: 100%; height: auto; display: block; overflow: visible; }
.nl-topo-link line { stroke-width: 2; stroke-linecap: round; transition: stroke 200ms ease-out; }
.nl-topo-up line { stroke: var(--accent); }
.nl-topo-down line { stroke: var(--neutral); stroke-dasharray: 4 5; }
.nl-topo-admin line { stroke: var(--warn); stroke-dasharray: 4 5; }
.nl-topo-none line { stroke: var(--line-strong); }
.nl-topo-if, .nl-topo-name, .nl-topo-sub { paint-order: stroke; stroke: var(--bg); stroke-width: 4px; stroke-linejoin: round; }
.nl-topo-if { font-family: var(--font-mono); font-size: 12px; fill: var(--ink-muted); }
.nl-topo-node { color: var(--ink); }
.nl-topo-node.nl-devicon-up { color: var(--accent); }
.nl-topo-node.nl-devicon-admin { color: var(--warn); }
.nl-topo-node.nl-devicon-down { color: var(--neutral); }
.nl-topo-halo { fill: var(--surface); stroke: var(--line); stroke-width: 1; }
.nl-topo-name { font-family: var(--font-mono); font-size: 14px; font-weight: 500; fill: var(--ink); }
.nl-topo-sub { font-family: var(--font-mono); font-size: 12px; fill: var(--ink-muted); }
.nl-topo-cap { font-size: 13px; line-height: 20px; color: var(--ink-muted); }

@media (prefers-reduced-motion: reduce) {
  .nl-topo-link line { transition: none; }
  .nl-sheet { animation: none; }
  .nl-btn, .nl-progress-track i { transition: none; }
}

/* Soort-pictogram */
.nl-kind { display: inline-grid; place-items: center; flex: none; border-radius: var(--radius-md); color: var(--kind-learn); background: var(--kind-learn-soft); }
.nl-kind-ref { color: var(--kind-ref); background: var(--kind-ref-soft); }
.nl-kind-recall { color: var(--kind-recall); background: var(--kind-recall-soft); }
.nl-kind-practice { color: var(--kind-practice); background: var(--kind-practice-soft); }
.nl-kind-fix { color: var(--kind-fix); background: var(--kind-fix-soft); }
.nl-kind-test { color: var(--proof-ink); background: var(--proof-bg); }
