/* #49 Linux 命令速查 · 「运维值班手册」设计系统
   场景导轨 + 终端命令卡 + 批量脚本；浅色默认，深色由导航 #themeToggle 联动 */
.lnx-page {
    --lnx-bg: #f4f6f0;
    --lnx-surface: #ffffff;
    --lnx-surface-2: #f7f9f4;
    --lnx-ink: #1a2620;
    --lnx-ink-2: #53635a;
    --lnx-ink-3: #8b9a8f;
    --lnx-brand: #1c4035;
    --lnx-brand-2: #2c6b54;
    --lnx-brand-soft: #e3efe7;
    --lnx-accent: #b98516;
    --lnx-accent-soft: #fbf1d8;
    --lnx-danger: #b5443a;
    --lnx-danger-soft: #fbe9e6;
    --lnx-line: #dee6da;
    --lnx-line-2: #cbd8cc;
    --lnx-term-bg: #101d17;
    --lnx-term-ink: #d9f2df;
    --lnx-shadow: 0 8px 24px rgba(28, 55, 38, .08);
    --lnx-shadow-lg: 0 20px 50px rgba(12, 30, 20, .24);
    --lnx-sans: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    --lnx-mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    background: var(--lnx-bg);
    color: var(--lnx-ink);
    font-family: var(--lnx-sans);
    font-size: 14px;
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
}
:root[data-theme="dark"] .lnx-page {
    --lnx-bg: #0c1511;
    --lnx-surface: #14211b;
    --lnx-surface-2: #1a2a22;
    --lnx-ink: #e7f3ea;
    --lnx-ink-2: #abc3b2;
    --lnx-ink-3: #7e9887;
    --lnx-brand: #8ad3aa;
    --lnx-brand-2: #a5e6c1;
    --lnx-brand-soft: #1e3a2c;
    --lnx-accent: #f0c65a;
    --lnx-accent-soft: #372c13;
    --lnx-danger: #ff8e7f;
    --lnx-danger-soft: #3a201d;
    --lnx-line: #293d31;
    --lnx-line-2: #395340;
    --lnx-term-bg: #07120c;
    --lnx-shadow: 0 8px 24px rgba(0, 0, 0, .32);
    --lnx-shadow-lg: 0 20px 50px rgba(0, 0, 0, .55);
}
.lnx-page * { box-sizing: border-box; }
.lnx-wrap { max-width: 1220px; margin: 0 auto; padding: 26px 22px 70px; }
.lnx-page .detail-breadcrumb { margin-bottom: 22px; }
.lnx-page h1, .lnx-page h2, .lnx-page h3 { font-family: var(--lnx-sans); letter-spacing: -.03em; }
.lnx-page b, .lnx-page strong { color: var(--lnx-brand); font-weight: 900; }
.lnx-page input[type="search"], .lnx-page input[type="text"] {
    width: 100%; font-family: var(--lnx-mono); font-size: 13px; color: var(--lnx-ink);
    background: var(--lnx-surface); border: 1px solid var(--lnx-line-2);
    border-radius: 8px; padding: 9px 12px; outline: none; transition: .18s;
}
.lnx-page input:focus { border-color: var(--lnx-brand); box-shadow: 0 0 0 3px var(--lnx-brand-soft); }
.lnx-page button { font-family: inherit; cursor: pointer; }
.lnx-main-btn {
    border: 1px solid var(--lnx-brand); background: var(--lnx-brand); color: #fff;
    border-radius: 8px; padding: 10px 18px; font-size: 13.5px; font-weight: 800;
    box-shadow: 0 6px 16px rgba(28, 64, 53, .2); transition: .18s; white-space: nowrap;
}
.lnx-main-btn:hover { background: var(--lnx-brand-2); transform: translateY(-1px); }
.lnx-ghost-btn {
    border: 1px solid var(--lnx-line-2); background: var(--lnx-surface); color: var(--lnx-brand);
    border-radius: 8px; padding: 8px 13px; font-size: 12.8px; font-weight: 700; transition: .18s; white-space: nowrap;
}
.lnx-ghost-btn:hover { background: var(--lnx-brand-soft); border-color: var(--lnx-brand); }
.lnx-chip {
    border: 1px solid var(--lnx-line-2); background: var(--lnx-surface); color: var(--lnx-ink-2);
    border-radius: 6px; padding: 6px 12px; font-size: 12.5px; font-weight: 700; transition: .18s;
}
.lnx-chip:hover, .lnx-chip.is-on { border-color: var(--lnx-accent); color: var(--lnx-accent); background: var(--lnx-accent-soft); }
:root[data-theme="dark"] .lnx-main-btn { color: #0c1511; }

/* ---------- 首屏 ---------- */
.lnx-hero {
    display: grid; grid-template-columns: minmax(0, 1.3fr) 390px; gap: 24px;
    background: var(--lnx-surface); border: 1px solid var(--lnx-line);
    border-radius: 18px; padding: 28px 30px; box-shadow: var(--lnx-shadow);
}
.lnx-kicker {
    display: inline-block; font-family: var(--lnx-mono); font-size: 11px; font-weight: 800;
    letter-spacing: .14em; color: var(--lnx-accent); background: var(--lnx-accent-soft);
    border: 1px solid var(--lnx-line); border-radius: 5px; padding: 6px 12px; margin-bottom: 18px;
}
.lnx-hero h1 { font-size: clamp(26px, 3vw, 36px); font-weight: 900; line-height: 1.35; margin: 0 0 15px; }
.lnx-sub { font-size: 15px; line-height: 1.95; color: var(--lnx-ink-2); margin: 0 0 20px; max-width: 620px; }
.lnx-hero-kpi { display: flex; gap: 10px; flex-wrap: wrap; }
.lnx-hero-kpi > div { min-width: 108px; background: var(--lnx-surface-2); border: 1px solid var(--lnx-line); border-radius: 9px; padding: 10px 14px; }
.lnx-hero-kpi b { display: block; font-family: var(--lnx-mono); font-size: 23px; line-height: 1.25; color: var(--lnx-brand); }
.lnx-hero-kpi span { font-size: 11.5px; color: var(--lnx-ink-3); }
.lnx-scene-board {
    background: var(--lnx-term-bg); color: var(--lnx-term-ink); border-radius: 14px; padding: 16px 17px;
    border: 1px solid var(--lnx-line-2); box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}
.lnx-board-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.lnx-board-head b { font-family: var(--lnx-mono); font-size: 13px; color: #a8e9bc; }
.lnx-board-head span { font-family: var(--lnx-mono); font-size: 10.5px; color: #7fa38c; }
.lnx-scene-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.lnx-scene-btn {
    border: 1px solid #2b4434; background: #16281e; color: #c7e6cf; border-radius: 7px;
    padding: 8px 10px; text-align: left; font-family: var(--lnx-mono); font-size: 11.5px;
    display: flex; justify-content: space-between; gap: 6px; transition: .18s;
}
.lnx-scene-btn:hover { border-color: #5aa87a; transform: translateX(2px); }
.lnx-scene-btn.is-on { background: #2f6b4b; border-color: #8ad3aa; color: #fff; }
.lnx-scene-btn i { font-style: normal; opacity: .65; }
.lnx-board-foot { margin-top: 12px; font-size: 10.8px; color: #8fb89c; line-height: 1.6; }

/* ---------- 首屏入口 ---------- */
.lnx-quick {
    display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap;
    background: var(--lnx-surface); border: 1px solid var(--lnx-line); border-radius: 14px;
    padding: 14px 18px; margin: 16px 0 20px; box-shadow: var(--lnx-shadow);
}
.lnx-search { display: flex; flex-direction: column; gap: 5px; flex: 1 1 250px; min-width: 210px; }
.lnx-search > span, .lnx-note > span { font-size: 12px; font-weight: 700; color: var(--lnx-ink-2); }
.lnx-quick-presets { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.lnx-quick-label { font-size: 12px; color: var(--lnx-ink-3); }

/* ---------- 主体 ---------- */
.lnx-grid { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 18px; align-items: start; }
.lnx-sidebar, .lnx-list, .lnx-script {
    background: var(--lnx-surface); border: 1px solid var(--lnx-line);
    border-radius: 15px; box-shadow: var(--lnx-shadow); min-width: 0; padding: 18px 20px;
}
.lnx-sidebar { position: sticky; top: 18px; }
.lnx-sec-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; border-bottom: 2px solid var(--lnx-line); padding-bottom: 9px; margin: 2px 0 14px; }
.lnx-sec-head h2 { font-size: 15px; margin: 0; font-weight: 900; }
.lnx-sec-head span { font-family: var(--lnx-mono); font-size: 10.5px; color: var(--lnx-ink-3); }
.lnx-rail { display: flex; flex-direction: column; gap: 5px; }
.lnx-rail-btn {
    display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
    border: 1px solid transparent; background: transparent; color: var(--lnx-ink-2);
    border-radius: 8px; padding: 8px 10px; font-size: 12.8px; font-weight: 700;
    border-left: 3px solid var(--lnx-line); transition: .16s;
}
.lnx-rail-btn:hover { background: var(--lnx-surface-2); }
.lnx-rail-btn.is-on { background: var(--lnx-brand-soft); border-left-color: var(--lnx-brand); color: var(--lnx-brand); }
.lnx-rail-btn i { font-style: normal; font-family: var(--lnx-mono); font-size: 10.5px; margin-left: auto; color: var(--lnx-ink-3); }
.lnx-legend { margin-top: 20px; border-top: 1px dashed var(--lnx-line-2); padding-top: 14px; }
.lnx-legend h3 { font-size: 12.5px; margin: 0 0 9px; }
.lnx-legend > div { font-size: 11.5px; color: var(--lnx-ink-2); line-height: 1.7; margin-bottom: 6px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.lnx-risk { font-family: var(--lnx-mono); font-size: 10px; font-weight: 800; border-radius: 5px; padding: 2px 7px; border: 1px solid; white-space: nowrap; }
.lnx-risk.is-safe { color: var(--lnx-brand); border-color: var(--lnx-brand); background: var(--lnx-brand-soft); }
.lnx-risk.is-care { color: var(--lnx-accent); border-color: var(--lnx-accent); background: var(--lnx-accent-soft); }
.lnx-risk.is-danger { color: var(--lnx-danger); border-color: var(--lnx-danger); background: var(--lnx-danger-soft); }
.lnx-side-note { margin-top: 16px; font-size: 11.2px; line-height: 1.75; color: var(--lnx-ink-3); background: var(--lnx-surface-2); border-radius: 8px; padding: 10px 11px; }

/* ---------- 命令卡片 ---------- */
.lnx-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.lnx-card {
    border: 1px solid var(--lnx-line); border-radius: 11px; background: var(--lnx-surface);
    padding: 12px 13px; min-width: 0; transition: .18s; display: flex; flex-direction: column; gap: 8px;
}
.lnx-card:hover { border-color: var(--lnx-line-2); box-shadow: var(--lnx-shadow); }
.lnx-card.is-picked { border-color: var(--lnx-brand); background: var(--lnx-brand-soft); }
.lnx-card-top { display: flex; align-items: center; gap: 7px; }
.lnx-card-top label { display: flex; align-items: center; gap: 7px; min-width: 0; flex: 1; cursor: pointer; font-family: var(--lnx-mono); font-size: 11px; color: var(--lnx-ink-3); }
.lnx-card-top input { width: 16px; height: 16px; accent-color: var(--lnx-brand); flex: 0 0 auto; }
.lnx-card-cmd {
    display: block; background: var(--lnx-term-bg); color: var(--lnx-term-ink); border-radius: 7px;
    padding: 9px 11px; font-family: var(--lnx-mono); font-size: 12px; line-height: 1.6;
    overflow-wrap: anywhere; white-space: pre-wrap; position: relative;
}
.lnx-card-cmd::before { content: "$ "; color: #7fc79a; }
.lnx-card-desc { font-size: 12px; line-height: 1.7; color: var(--lnx-ink-2); margin: 0; }
.lnx-card-foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.lnx-param { font-family: var(--lnx-mono); font-size: 10.5px; color: var(--lnx-brand); background: var(--lnx-surface-2); border: 1px solid var(--lnx-line); border-radius: 5px; padding: 2px 7px; }
.lnx-copy { margin-left: auto; border: 1px solid var(--lnx-line-2); background: var(--lnx-surface); color: var(--lnx-brand); border-radius: 6px; padding: 3px 9px; font-size: 11px; font-weight: 700; }
.lnx-copy:hover { border-color: var(--lnx-brand); }
.lnx-card mark { background: var(--lnx-accent-soft); color: var(--lnx-accent); border-radius: 3px; padding: 0 2px; font-weight: 700; }
.lnx-empty { font-size: 12.5px; color: var(--lnx-ink-3); margin: 16px 0 0; }
.lnx-empty[hidden] { display: none !important; }

/* ---------- 批量脚本 ---------- */
.lnx-script { margin-top: 20px; }
.lnx-sec-head--wide { margin-bottom: 14px; }
.lnx-script-top { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-start; }
.lnx-picked { flex: 1 1 300px; display: flex; gap: 6px; flex-wrap: wrap; min-height: 34px; }
.lnx-pick-chip { font-family: var(--lnx-mono); font-size: 10.8px; border: 1px solid var(--lnx-line-2); background: var(--lnx-surface-2); color: var(--lnx-ink-2); border-radius: 6px; padding: 4px 8px; }
.lnx-pick-chip.is-danger { color: var(--lnx-danger); border-color: var(--lnx-danger); background: var(--lnx-danger-soft); }
.lnx-script-actions { display: flex; gap: 7px; flex-wrap: wrap; align-items: flex-end; }
.lnx-note { display: flex; flex-direction: column; gap: 4px; min-width: 200px; flex: 1 1 200px; }
.lnx-note input { font-size: 12px !important; }
.lnx-script-pre {
    margin: 14px 0 0; background: var(--lnx-term-bg); color: var(--lnx-term-ink); border-radius: 10px;
    padding: 14px 16px; font-family: var(--lnx-mono); font-size: 12px; line-height: 1.85;
    max-height: 300px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere;
}
.lnx-checks { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.lnx-checks span { font-size: 11.5px; border-radius: 7px; padding: 5px 10px; border: 1px solid var(--lnx-line); background: var(--lnx-surface-2); color: var(--lnx-ink-2); }
.lnx-checks span.is-ok { color: var(--lnx-brand); border-color: var(--lnx-brand); background: var(--lnx-brand-soft); }
.lnx-checks span.is-warn { color: var(--lnx-accent); border-color: var(--lnx-accent); background: var(--lnx-accent-soft); }
.lnx-checks span.is-danger { color: var(--lnx-danger); border-color: var(--lnx-danger); background: var(--lnx-danger-soft); }

/* ---------- 弹窗 / toast ---------- */
.lnx-modal { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 18px; background: rgba(10, 24, 16, .62); }
.lnx-modal[hidden] { display: none !important; }
.lnx-modal-box { width: min(700px, 100%); max-height: 86vh; overflow: auto; background: var(--lnx-surface); border: 1px solid var(--lnx-line-2); border-radius: 14px; box-shadow: var(--lnx-shadow-lg); padding: 20px 22px; }
.lnx-modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.lnx-modal-head h3 { font-size: 17px; margin: 0; }
.lnx-modal-x { border: 0; background: var(--lnx-surface-2); color: var(--lnx-ink-2); width: 30px; height: 30px; border-radius: 7px; font-size: 19px; line-height: 1; }
.lnx-modal-hint { font-size: 12px; color: var(--lnx-ink-3); margin: 0 0 10px; line-height: 1.7; }
.lnx-modal-pre { background: var(--lnx-term-bg); color: var(--lnx-term-ink); border-radius: 9px; padding: 14px; font-family: var(--lnx-mono); font-size: 12px; line-height: 1.75; max-height: 46vh; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.lnx-modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.lnx-toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 10000; background: var(--lnx-ink); color: var(--lnx-surface); border-radius: 9px; padding: 10px 18px; font-size: 13px; box-shadow: var(--lnx-shadow-lg); pointer-events: none; max-width: 86vw; text-align: center; }
.lnx-toast[hidden] { display: none !important; }
.lnx-page .tskb-card, .lnx-page .tskb-panel, .lnx-page .tskb-rel { background: var(--lnx-surface); border-color: var(--lnx-line); color: var(--lnx-ink); }

/* ---------- 响应式 ---------- */
@media (max-width: 1000px) {
    .lnx-hero { grid-template-columns: 1fr; }
    .lnx-grid { grid-template-columns: 200px minmax(0, 1fr); }
    .lnx-cards { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
    .lnx-grid { grid-template-columns: 1fr; }
    .lnx-sidebar { position: static; }
    .lnx-rail { display: grid; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
    .lnx-wrap { padding: 18px 14px 54px; }
    .lnx-hero { padding: 22px 18px; }
    .lnx-hero h1 { font-size: 25px; }
    .lnx-sidebar, .lnx-list, .lnx-script { padding: 16px 14px; min-width: 0; }
    .lnx-quick { padding: 12px; }
    .lnx-scene-grid { grid-template-columns: 1fr 1fr; }
    .lnx-grid > *, .lnx-wrap > *, .lnx-hero > * { min-width: 0; }
    .lnx-script-pre { font-size: 11px; }
    .lnx-note { min-width: 100%; }
    .tool-rec-item { min-width: 0 !important; width: 100% !important; max-width: 100% !important; box-sizing: border-box; }
    .tool-rec-body, .tool-rec-body b, .tool-rec-body small { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
    .tskb-card { overflow-x: auto; }
    .tskb-legend { min-width: 0; width: 100%; table-layout: fixed; }
    .tskb-legend th, .tskb-legend td { overflow-wrap: anywhere; word-break: break-word; white-space: normal; }
    .tskb-tabs { flex-wrap: wrap; }
    .lnx-page .tskb-rel-grid { grid-template-columns: 1fr; }
}

