/*
 * ═══════════════════════════════════════════════════════════════
 *  SEOWOLF'S NOTEPAD — EDITOR APP
 *  Tool page + task pages only. Loads after style.css and uses its
 *  brand tokens (--orange, --text, --text-dim, --border, --tint-*…).
 *
 *  Desktop: command bar (sticky) → suggestion / step chips → editor.
 *  ≤720px:  editor fills the screen; a bottom bar opens the command
 *           bar as a sheet; drawers become bottom sheets too.
 * ═══════════════════════════════════════════════════════════════
 */

.np-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 28px 24px 64px;
    display: grid;
    gap: 18px;
}

/* Buttons inside the app are sentence case, not the site's uppercase style */
.np-page button, .np-drawer button, .np-mbar button { text-transform: none; letter-spacing: 0; font-weight: normal; }
.np-page .btn-primary, .np-drawer .btn-primary { font-weight: bold; letter-spacing: 0.04em; }

/* Components below set display:flex/grid, which would otherwise beat the
   browser's own [hidden] rule and show "hidden" drawers and rows */
[hidden] { display: none !important; }

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ── Title ───────────────────────────────────────────────────── */
.np-hero { display: grid; gap: 6px; }
.np-hero h1 { font-size: var(--h1); letter-spacing: 0.04em; text-shadow: var(--glow-text); }
.np-hero p { color: var(--text-dim); max-width: 72ch; }
.np-crumb { font-size: 12px; color: var(--text-dim); }
.np-crumb a { color: var(--text); border-bottom: none; }
.np-crumb a:hover { color: var(--orange); }

/* ── Task preset panel ───────────────────────────────────────── */
.np-task {
    border: 1px solid var(--border);
    border-left: 3px solid var(--orange);
    background: var(--tint-1);
    border-radius: var(--radius);
    padding: 16px 18px;
    display: grid;
    gap: 12px;
}
.np-task-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.np-task h2 { font-size: var(--h4); }
.np-task-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 6px 18px; }
.np-task-list label {
    display: flex; align-items: center; gap: 10px;
    padding: 7px 10px; border: 1px solid transparent; border-radius: var(--radius);
    cursor: pointer; color: var(--text);
}
.np-task-list label:hover { border-color: var(--border); background: var(--tint-2); }
.np-task-list input { accent-color: var(--orange); width: 16px; height: 16px; flex-shrink: 0; }
.np-task-list .np-task-name { flex: 1; min-width: 0; }
/* On a narrow screen the hint wraps under the name instead of widening the page */
.np-task-list label { flex-wrap: wrap; }
.np-task-list .np-task-hint { margin-left: auto; }
.np-task-hint { font-size: 11px; color: var(--warn); white-space: nowrap; font-variant-numeric: tabular-nums; }
.np-task-hint.is-zero { color: var(--text-dim); }
.np-task-foot { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ── Command bar ─────────────────────────────────────────────── */
.np-cmd {
    position: sticky;
    top: 66px;
    z-index: 60;
    background: var(--bg);
    padding-block: 6px;
}
.np-cmd-bar { position: relative; display: flex; align-items: center; }
.np-cmd-icon { position: absolute; left: 14px; color: var(--orange); pointer-events: none; font-size: 15px; }
.np-cmd input.np-cmd-input {
    width: 100%;
    font-size: 15px;
    padding: 13px 110px 13px 40px;
    border: 1px solid var(--border-hi);
    background: #050403;
    box-shadow: var(--glow);
}
.np-cmd input.np-cmd-input::placeholder { color: var(--text-dim); }
.np-cmd-keys { position: absolute; right: 12px; display: flex; gap: 4px; color: var(--text-dim); font-size: 11px; pointer-events: none; }
kbd {
    font-family: var(--font); font-size: 11px; color: var(--text-dim);
    border: 1px solid #333; border-bottom-width: 2px; border-radius: 2px; padding: 0 5px;
}
.np-cmd-panel {
    display: none;
    position: absolute;
    left: 0; right: 0; top: calc(100% - 2px);
    max-height: min(68vh, 560px);
    overflow-y: auto;
    background: #070504;
    border: 1px solid var(--border-hi);
    border-top: 2px solid var(--orange);
    box-shadow: 0 24px 60px #000, var(--glow-lg);
    border-radius: 0 0 var(--radius) var(--radius);
    overscroll-behavior: contain;
}
body.cmd-open .np-cmd-panel { display: block; }
.np-cmd-scrim { display: none; }

.np-opt-group { padding: 6px 0; border-bottom: 1px solid var(--tint-3); }
.np-opt-group:last-child { border-bottom: none; }
.np-opt-head {
    padding: 6px 16px 4px;
    font-size: var(--text-xs); letter-spacing: var(--tracking); text-transform: uppercase;
    color: var(--text-dim);
}
.np-opt {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2px 14px;
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    border-left: 2px solid transparent;
    color: var(--text);
    padding: 7px 16px 7px 14px;
    font-family: inherit;
    font-size: var(--text-sm);
    cursor: pointer;
    white-space: normal;
}
.np-opt[aria-selected="true"] { background: var(--tint-3); border-left-color: var(--orange); color: #fff; }
.np-opt-main { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.np-opt-label mark { background: none; color: var(--orange); }
.np-opt-hint { color: var(--warn); font-size: 12px; }
.np-opt-meta { color: var(--text-dim); font-size: 11px; white-space: nowrap; align-self: center; }
.np-opt-desc { grid-column: 1 / -1; color: var(--text-dim); font-size: 12px; line-height: 1.45; }
.np-cmd-none { padding: 18px 16px; color: var(--text-dim); }
.np-cmd-none em { color: var(--text); font-style: normal; }

/* Settings view inside the command panel */
.np-settings { padding: 14px 18px 18px; display: grid; gap: 12px; }
.np-back {
    justify-self: start; background: none; border: none; color: var(--text-dim);
    font-family: inherit; font-size: 12px; cursor: pointer; padding: 0;
}
.np-back:hover { color: var(--orange); }
.np-settings-title { font-size: var(--h3); }
.np-settings-desc { color: var(--text-dim); font-size: var(--text-sm); max-width: 70ch; }
.np-settings-desc a { white-space: nowrap; }
.np-fields { display: grid; gap: 12px; }
.np-field { display: grid; gap: 5px; }
.np-field > span { font-size: 12px; color: var(--text-dim); }
.np-field em.np-count { font-style: normal; color: var(--text-dim); }
.np-field-hint { color: var(--text-dim); font-size: 11px; }
.np-field textarea { min-height: 110px; }
.np-check { display: inline-flex; align-items: center; gap: 8px; color: var(--text); cursor: pointer; }
.np-check input { accent-color: var(--orange); width: 16px; height: 16px; }
.np-preview { font-size: 13px; color: var(--good); min-height: 1.4em; }
.np-preview.is-error { color: var(--bad); }
.np-settings-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ── Chip rows (suggestions, steps) ──────────────────────────── */
.np-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.np-row-label {
    flex-shrink: 0;
    font-size: var(--text-xs); letter-spacing: var(--tracking); text-transform: uppercase;
    color: var(--text-dim); min-width: 88px;
}
.np-chips { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.np-sugg {
    background: transparent;
    border: 1px dashed var(--border-hi);
    color: var(--text);
    border-radius: var(--radius);
    padding: 5px 11px;
    font-family: inherit; font-size: 12px;
    cursor: pointer;
}
.np-sugg:hover { border-style: solid; color: var(--orange); background: var(--tint-2); }
.np-sugg.is-warn { border-color: color-mix(in srgb, var(--warn) 55%, transparent); color: var(--warn); }
.np-sugg.is-warn:hover { background: var(--warn-bg); }

.np-step {
    display: inline-flex; align-items: stretch;
    border: 1px solid var(--border-hi);
    border-radius: var(--radius);
    background: var(--tint-2);
}
.np-step button { background: none; border: none; font-family: inherit; font-size: 12px; cursor: pointer; }
.np-step-main { color: var(--text); padding: 5px 8px 5px 10px; }
.np-step-main small { color: var(--text-dim); font-size: 11px; }
.np-step-main:hover { color: var(--orange); }
.np-step-x { color: var(--text-dim); padding: 5px 9px; border-left: 1px solid var(--border) !important; }
.np-step-x:hover { color: var(--bad); }
.np-step.is-off { opacity: 0.55; }
.np-step.is-off .np-step-main { text-decoration: line-through; }
.np-step.is-error { border-color: var(--bad); }
.np-link {
    background: none; border: none; color: var(--orange); font-family: inherit; font-size: 12px;
    cursor: pointer; white-space: nowrap; padding: 4px 2px;
}
.np-link:hover { text-decoration: underline; }

/* ── Editor ──────────────────────────────────────────────────── */
.np-editor-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--tint-1);
    box-shadow: var(--glow);
    display: grid;
    min-width: 0;
}
.np-toolbar {
    display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
    padding: 8px 10px;
    border-bottom: 1px solid var(--border);
    background: var(--tint-2);
}
.np-toolbar .np-spacer { flex: 1; }
.np-tb {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text);
    font-family: inherit; font-size: 12px;
    padding: 5px 9px;
    border-radius: var(--radius);
    cursor: pointer;
    white-space: nowrap;
}
.np-tb:hover { border-color: var(--border); color: var(--orange); background: var(--tint-2); }
.np-tb:disabled { color: #555; cursor: not-allowed; background: none; border-color: transparent; }
.np-tb.is-accent { color: var(--orange); border-color: var(--border); }

.np-editor-wrap { position: relative; }
.np-editor-wrap textarea#np-editor {
    display: block;
    width: 100%;
    min-height: max(340px, calc(100vh - 420px));
    border: none;
    border-radius: 0;
    background: #000;
    padding: 16px 18px;
    font-size: var(--text-base);
    line-height: 1.75;
    resize: vertical;
    box-shadow: none;
    tab-size: 4;
}
.np-editor-wrap textarea#np-editor:focus { box-shadow: inset 0 0 0 1px var(--border-hi); }
.np-editor-wrap.is-dragover textarea#np-editor {
    box-shadow: inset 0 0 0 2px var(--orange);
    background: var(--tint-2);
}

/* Empty state — under an empty editor, in the normal flow so that however
   many tasks there are it can never spill over the editor or the page */
.np-empty {
    display: grid; gap: 10px;
    padding: 14px 18px 16px;
    border-top: 1px dashed var(--border);
    background: #000;
}
.np-editor-wrap:has(.np-empty:not([hidden])) textarea#np-editor { min-height: 180px; }
.np-empty-title { font-size: var(--text-xs); letter-spacing: var(--tracking); text-transform: uppercase; color: var(--text-dim); }
.np-empty-tasks { display: flex; flex-wrap: wrap; gap: 8px; }
.np-empty-tasks a, .np-empty-tasks button {
    border: 1px solid var(--border);
    background: var(--tint-1);
    color: var(--text);
    border-radius: var(--radius);
    padding: 7px 12px;
    font-family: inherit; font-size: 12px;
    cursor: pointer;
}
.np-empty-tasks a:hover, .np-empty-tasks button:hover { border-color: var(--border-hi); color: var(--orange); }

.np-statusbar {
    display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap;
    padding: 7px 10px;
    border-top: 1px solid var(--border);
    font-size: 12px;
}
.np-stats { display: flex; gap: 14px; color: var(--text-dim); font-variant-numeric: tabular-nums; flex: 1; min-width: 0; flex-wrap: wrap; }
.np-stats .np-warn { color: var(--warn); }

/* ── Drawer (reports, recipe, lists, diff) ───────────────────── */
.np-drawer-scrim {
    display: none;
    position: fixed; inset: 0; z-index: 900;
    background: rgba(0,0,0,0.6);
}
body.drawer-open .np-drawer-scrim { display: block; }
.np-drawer {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: min(600px, 100%);
    z-index: 950;
    background: #050403;
    border-left: 2px solid var(--orange);
    box-shadow: -30px 0 60px #000;
    display: flex; flex-direction: column;
    padding-top: env(safe-area-inset-top, 0px);
}
.np-drawer-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    background: var(--tint-2);
}
.np-drawer-head h2 { font-size: var(--h4); }
.np-drawer-close {
    background: none; border: 1px solid var(--border); color: var(--text);
    width: 32px; height: 32px; border-radius: var(--radius); cursor: pointer; font-size: 14px;
}
.np-drawer-close:hover { color: var(--orange); border-color: var(--border-hi); }
.np-drawer-body {
    flex: 1; overflow-y: auto; overscroll-behavior: contain;
    padding: 16px 18px calc(24px + env(safe-area-inset-bottom, 0px));
    display: grid; gap: 14px; align-content: start;
}
.np-drawer-body .panel { box-shadow: none; }
.np-drawer-body .panel:hover { box-shadow: none; }
.np-drawer-note { color: var(--text-dim); font-size: 12px; }
.np-drawer-foot { font-size: 13px; }
.np-drawer-h { font-size: var(--text-xs); letter-spacing: var(--tracking); text-transform: uppercase; color: var(--text-dim); margin-top: 8px; }
.np-muted { color: var(--text-dim); font-size: 13px; }

/* Recipe list */
.np-recipe { list-style: none; display: grid; gap: 6px; }
.np-rstep {
    display: flex; align-items: center; gap: 10px;
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: 8px 10px; background: var(--tint-1);
}
.np-rstep.is-off .np-rstep-name { color: var(--text-dim); text-decoration: line-through; }
.np-rstep.is-error { border-color: var(--bad); }
.np-rstep-name { flex: 1; min-width: 0; font-size: 13px; }
.np-rstep-name b { color: var(--orange); font-weight: normal; }
.np-rstep-name small { color: var(--text-dim); }
.np-err { color: var(--bad) !important; }
.np-rstep-btns { display: flex; gap: 4px; }
.np-rstep-btns button {
    background: none; border: 1px solid var(--border); color: var(--text);
    width: 28px; height: 28px; border-radius: var(--radius); cursor: pointer; font-size: 13px;
}
.np-rstep-btns button:hover:not(:disabled) { color: var(--orange); border-color: var(--border-hi); }
.np-rstep-btns button:disabled { color: #444; cursor: default; }
.np-switch { position: relative; display: inline-flex; cursor: pointer; }
.np-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.np-switch-ui {
    width: 30px; height: 16px; border-radius: 8px; background: #333; position: relative; transition: background var(--ease);
}
.np-switch-ui::after {
    content: ''; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%;
    background: #888; transition: transform var(--ease), background var(--ease);
}
.np-switch input:checked + .np-switch-ui { background: var(--orange); }
.np-switch input:checked + .np-switch-ui::after { transform: translateX(14px); background: #000; }
.np-switch input:focus-visible + .np-switch-ui { outline: 2px solid var(--orange); outline-offset: 2px; }

.np-recipe-actions { display: grid; gap: 10px; }
.np-inline-form { display: flex; gap: 8px; }
.np-inline-form input { flex: 1; min-width: 0; }
.np-btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.np-saved { list-style: none; display: grid; gap: 6px; }
.np-saved li {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 10px;
}
.np-saved li > span:first-child { display: grid; min-width: 0; }
.np-saved b { color: var(--text); font-weight: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-saved small { color: var(--text-dim); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-shared { border: 1px solid var(--orange); border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 8px; background: var(--tint-2); }
.np-shared h3 { font-size: var(--h4); }
.np-shared p { color: var(--text-dim); font-size: 13px; }
.np-shared .btn-primary { justify-self: start; }

/* Diff */
.np-diff-sum { font-size: 13px; color: var(--text-dim); }
.np-diff { font-size: 13px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }

/* ── Content below the tool ──────────────────────────────────── */
.np-section { margin-top: 36px; display: grid; gap: 14px; }
.np-section > h2 { font-size: var(--h2); }
.np-tasks-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 10px; }
.np-task-card {
    display: grid; gap: 4px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    background: var(--tint-1);
    color: var(--text);
    border-bottom: 1px solid var(--border);
}
.np-task-card:hover { border-color: var(--border-hi); background: var(--tint-2); text-shadow: none; }
.np-task-card b { color: var(--orange); font-size: var(--text-lg); }
.np-task-card span { color: var(--text-dim); font-size: 13px; }
.np-howto { list-style: none; counter-reset: s; display: grid; gap: 8px; max-width: 76ch; }
.np-howto li { counter-increment: s; padding-left: 36px; position: relative; }
.np-howto li::before {
    content: counter(s); position: absolute; left: 0; top: 1px;
    width: 24px; height: 24px; display: grid; place-items: center;
    border: 1px solid var(--border-hi); border-radius: var(--radius); color: var(--orange); font-size: 12px;
}
.np-ops-explained { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 10px 24px; }
.np-ops-explained div { display: grid; gap: 3px; }
.np-ops-explained a { color: var(--orange); border-bottom: none; }
.np-ops-explained p { color: var(--text-dim); font-size: 13px; }
.np-faq { display: grid; gap: 10px; max-width: 80ch; }
.np-faq details { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; background: var(--tint-1); }
.np-faq summary { cursor: pointer; color: var(--text); }
.np-faq summary:hover { color: var(--orange); }
.np-faq p { color: var(--text-dim); margin-top: 8px; }
.np-keys { color: var(--text-dim); font-size: 13px; display: flex; flex-wrap: wrap; gap: 8px 18px; }

/* ── No-JavaScript fallback form ─────────────────────────────── */
.np-fallback { display: grid; gap: 12px; border: 1px solid var(--border); padding: 14px; border-radius: var(--radius); }
.np-fallback .np-fields { grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); }
.js .np-fallback { display: none; }
.no-js .np-js-only { display: none !important; }
.np-report-server { display: grid; gap: 14px; }

/* ── Mobile bottom bar (hidden on desktop) ───────────────────── */
.np-mbar { display: none; }

/* ═══════════════════ PHONES ═══════════════════ */
@media (max-width: 720px) {
    .np-page { padding: 16px 12px 110px; gap: 12px; }
    .np-hero h1 { font-size: var(--h2); }
    .np-hero p { font-size: 13px; }

    /* Chip rows scroll sideways instead of stacking */
    .np-row { gap: 8px; }
    .np-row-label { min-width: 0; }
    .np-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
    .np-chips::-webkit-scrollbar { display: none; }
    .np-step, .np-sugg { flex-shrink: 0; }
    .np-empty { padding: 12px 14px 14px; }
    /* Task cards: tighter, with the description clamped to two lines */
    .np-tasks-grid { gap: 8px; }
    .np-task-card { padding: 10px 12px; gap: 4px; }
    .np-task-card b { font-size: var(--text-base); }
    .np-task-card span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    .np-empty-tasks { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 0 14px 2px; }
    .np-empty-tasks::-webkit-scrollbar { display: none; }
    .np-empty-tasks a, .np-empty-tasks button { flex-shrink: 0; white-space: nowrap; }

    .np-toolbar { gap: 4px; padding: 6px 8px; }
    .np-toolbar .np-spacer { display: none; }
    .np-toolbar .np-tb { padding: 6px 8px; }
    .np-editor-wrap textarea#np-editor { min-height: 52vh; padding: 12px 14px; font-size: 15px; }
    .np-hide-sm { display: none; }
    .np-statusbar .np-tb { display: none; }

    /* Command bar → bottom sheet, opened from the bottom bar */
    .np-cmd { display: none; }
    body.cmd-open .np-cmd {
        display: flex; flex-direction: column;
        position: fixed; left: 0; right: 0; bottom: 0; top: auto;
        max-height: 88vh;
        z-index: 960;
        padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px));
        background: #070504;
        border-top: 2px solid var(--orange);
        border-radius: 14px 14px 0 0;
        box-shadow: 0 -24px 60px #000;
    }
    body.cmd-open .np-cmd::before {
        content: ''; width: 38px; height: 4px; border-radius: 2px; background: #444;
        align-self: center; margin-bottom: 10px; flex-shrink: 0;
    }
    body.cmd-open .np-cmd-scrim { display: block; position: fixed; inset: 0; z-index: 955; background: rgba(0,0,0,0.6); }
    body.cmd-open .np-cmd-bar { flex-direction: column; align-items: stretch; flex: 1; min-height: 0; }
    .np-cmd-icon { top: 15px; }
    .np-cmd-keys { display: none; }
    .np-cmd input.np-cmd-input { padding-right: 14px; font-size: 16px; }
    .np-cmd-panel {
        position: static; display: block;
        max-height: none; flex: 1; min-height: 0;
        border: none; box-shadow: none; background: transparent; margin-top: 8px;
    }
    .np-opt { padding: 10px 12px; min-height: 44px; }
    .np-opt-meta { display: none; }
    .np-settings { padding: 6px 2px 4px; }

    /* Drawer → bottom sheet */
    .np-drawer {
        top: auto; left: 0; right: 0;
        width: 100%;
        max-height: 88vh;
        border-left: none;
        border-top: 2px solid var(--orange);
        border-radius: 14px 14px 0 0;
        padding-top: 0;
    }

    .np-task-list { grid-template-columns: 1fr; }
    .np-task-list label { padding: 8px; row-gap: 2px; }
    .np-task-list .np-task-hint { flex-basis: 100%; margin-left: 26px; }

    .np-mbar {
        display: grid;
        grid-template-columns: 1fr auto auto;
        gap: 8px;
        position: fixed; left: 0; right: 0; bottom: 0;
        z-index: 800;
        padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
        background: rgba(0,0,0,0.96);
        border-top: 1px solid var(--border-hi);
        backdrop-filter: blur(8px);
    }
    .np-mbar button {
        min-height: 44px;
        border-radius: var(--radius);
        font-family: inherit; font-size: 14px;
        border: 1px solid var(--border-hi);
        background: transparent; color: var(--text);
        padding: 0 16px;
    }
    .np-mbar .np-mbar-main { background: var(--orange); color: #000; border-color: var(--orange); font-weight: bold; text-align: left; }
    .np-mbar button:disabled { color: #555; border-color: #222; }
    body.cmd-open .np-mbar, body.drawer-open .np-mbar { display: none; }

    .toast { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
}

@media (prefers-reduced-motion: reduce) {
    .np-switch-ui, .np-switch-ui::after { transition: none; }
}
.np-preview.is-muted { color: var(--text-dim); }

/* ── Search panel key hints (desktop) ── */
.np-cmd-foot {
    position: sticky; bottom: 0;
    display: flex; flex-wrap: wrap; gap: 6px 16px;
    padding: 8px 16px;
    border-top: 1px solid var(--border);
    background: #070504;
    font-size: 11px; color: var(--text-dim);
}
@media (max-width: 720px) { .np-cmd-foot { display: none; } }

/* ── Empty editor: the three-step guide ── */
.np-empty-steps { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; counter-reset: s; color: var(--text-dim); font-size: 13px; }
.np-empty-steps li { counter-increment: s; }
.np-empty-steps li::before { content: counter(s) '. '; color: var(--orange); }

/* ── Help drawer ── */
.np-help-steps { counter-reset: s; list-style: none; display: grid; gap: 10px; }
.np-help-steps li { counter-increment: s; padding-left: 34px; position: relative; color: var(--text-dim); }
.np-help-steps li b { color: var(--text); font-weight: normal; }
.np-help-steps li::before {
    content: counter(s); position: absolute; left: 0; top: 0;
    width: 22px; height: 22px; display: grid; place-items: center;
    border: 1px solid var(--border-hi); border-radius: var(--radius); color: var(--orange); font-size: 12px;
}
.np-help-keys { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 13px; }
.np-help-keys dt { white-space: nowrap; }
.np-help-keys dd { color: var(--text-dim); }

/* ── Extended reports ── */
.np-share { display: inline-block; width: 90px; height: 6px; background: var(--tint-3); border-radius: 3px; vertical-align: middle; margin-right: 6px; overflow: hidden; }
.np-share span { display: block; height: 100%; background: var(--orange); }
.np-overlap { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 14px; }
.np-overlap-list { font-size: 13px; line-height: 1.7; max-height: 320px; overflow-y: auto; word-break: break-word; }

/* ── Hero: eyebrow + trust row ── */
.np-eyebrow { font-size: 13px; letter-spacing: var(--tracking); text-transform: uppercase; color: var(--text-dim); }
.np-trust { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--text-dim); margin-top: 2px; }
.np-trust li::before { content: '✓ '; color: var(--good); }

/* ── All tools: every tool, grouped, with a quick filter ── */
.np-all-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; }
.np-all-head > div { display: grid; gap: 6px; max-width: 70ch; }
.np-all-find { flex: 0 1 320px; }
.np-all-find input {
    width: 100%; padding: 10px 12px; font: inherit; font-size: 14px;
    background: #000; color: var(--text); border: 1px solid var(--border); border-radius: var(--radius);
}
.np-all-find input:focus { outline: none; border-color: var(--border-hi); box-shadow: var(--glow); }
.np-all-grid { columns: 3 260px; column-gap: 14px; }
.np-all-cat {
    break-inside: avoid; margin-bottom: 14px; padding: 14px 16px 12px;
    border: 1px solid var(--border); border-top: 2px solid var(--orange);
    border-radius: var(--radius); background: var(--tint-1);
}
.np-all-cat h3 { font-size: 13px; letter-spacing: var(--tracking); text-transform: uppercase; margin-bottom: 8px; }
.np-all-cat h3 a { color: var(--orange); border-bottom: none; }
.np-all-cat ul { list-style: none; display: grid; gap: 1px; }
.np-all-cat li a {
    display: block; padding: 5px 0 5px 14px; position: relative;
    color: var(--text); border-bottom: none; font-size: 14px; line-height: 1.45;
}
.np-all-cat li a::before { content: '›'; position: absolute; left: 0; color: var(--text-dim); }
.np-all-cat li a:hover { color: var(--orange); }
.np-all-cat li a:hover::before { color: var(--orange); }
@media (max-width: 720px) {
    .np-all-find { flex-basis: 100%; }
    .np-all-grid { columns: 1; }
    .np-all-cat li a { padding: 8px 0 8px 14px; }  /* comfortable tap targets */
}
#all-tools { scroll-margin-top: 64px; }
.np-all-cat summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.np-all-cat summary::-webkit-details-marker { display: none; }
.np-all-cat summary h3 { margin-bottom: 0; color: var(--orange); }
.np-all-cat summary::after { content: '+'; color: var(--text-dim); font-size: 16px; line-height: 1; }
.np-all-cat[open] summary::after { content: '−'; }
.np-all-cat[open] summary { margin-bottom: 8px; }
.np-all-cat summary:hover h3 { color: var(--orange-hi, var(--orange)); }
