/* Only the managed learning page and plugin root are affected. */
#i4t-pod-lab .i4t-lab-admin { background: #fff; border: 1px solid #e3e7ed; border-radius: 8px; padding: 18px; margin-bottom: 14px; }
#i4t-pod-lab .i4t-lab-admin[hidden] { display: none !important; }
#i4t-pod-lab .i4t-lab-admin header { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
#i4t-pod-lab .i4t-lab-admin h2 { font-size: 20px; margin: 0; }
#i4t-pod-lab .i4t-lab-admin button { padding: 6px 12px; border: 1px solid #e0e4ea; border-radius: 4px; background: #fff7f0; color: #a7460c; cursor: pointer; }
#i4t-pod-lab .i4t-lab-admin small { display: block; color: #758195; margin-top: 4px; }
#i4t-pod-lab .i4t-lab-admin p { font-size: 12px; line-height: 1.7; margin: 8px 0; }
#i4t-pod-lab .i4t-lab-admin-table { overflow-x: auto; }
#i4t-pod-lab .i4t-lab-admin table { width: 100%; min-width: 650px; border-collapse: collapse; font-size: 13px; }
#i4t-pod-lab .i4t-lab-admin td, #i4t-pod-lab .i4t-lab-admin th { padding: 12px; border-bottom: 1px solid #edf0f4; text-align: left; vertical-align: top; }
#i4t-pod-lab .i4t-lab-admin details ul { max-height: 180px; overflow: auto; padding-left: 16px; }
#i4t-pod-lab .i4t-lab-admin footer { padding-top: 12px; font-size: 12px; }
#i4t-pod-lab .i4t-pod-output { display: none !important; }
#i4t-pod-lab .i4t-learning-progress { padding: 8px 12px; border-bottom: 1px solid #edf0f4; }
#i4t-pod-lab .i4t-learning-progress > small { display: block; font-size: 11px; color: #68778b; margin-top: 5px; }
#i4t-pod-lab .i4t-learning-stages { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 6px; }
#i4t-pod-lab .i4t-learning-stages button { min-width: 0; background: #f7f8fa; color: inherit; border: 1px solid #e7eaf0; border-radius: 4px; padding: 6px; cursor: pointer; font: inherit; font-size: 12px; }
#i4t-pod-lab .i4t-learning-stages button[aria-pressed="true"] { color: #d85d12; border-color: #f8bb92; background: #fff5ed; }
#i4t-pod-lab .i4t-learning-stages small { display: block; margin: 3px 0; }
#i4t-pod-lab .i4t-learning-stages progress { display: block; width: 100%; height: 5px; accent-color: #f77723; }
#i4t-pod-lab .i4t-lesson-complete { margin-top: 16px; padding: 10px 14px; border: 1px solid #f8bb92; border-radius: 4px; background: #fff5ed; color: #ab470b; cursor: pointer; }
#i4t-pod-lab .i4t-lesson-complete:disabled { opacity: .5; cursor: wait; }
/* 1.8.1：不再撑满整宽，跟随主题 wrapper 宽度，与站内菜单/内容对齐 */
body.i4t-pod-page .b2-single-content.wrapper { padding-top: 12px !important; }
body.i4t-pod-page #primary-home { min-width: 0; }
#i4t-pod-lab { width: 100%; max-width: none; margin: 0 auto 16px; color: #182230; }
#i4t-pod-lab .i4t-pod-hero { gap: 18px; padding: 18px 20px; border-radius: 12px; margin-bottom: 10px; }
#i4t-pod-lab .i4t-pod-brand { flex: 1; min-width: 0; gap: 12px; }
#i4t-pod-lab .i4t-pod-logo { width: 48px; height: 48px; min-width: 48px; font-size: 25px; border-radius: 12px; }
#i4t-pod-lab .i4t-pod-brand h1 { font-size: clamp(20px, 1.5vw, 28px); margin: 4px 0; }
#i4t-pod-lab .i4t-pod-brand p { margin: 0; font-size: 13px; }
#i4t-pod-lab .i4t-pod-eyebrow { font-size: 11px; letter-spacing: 1px; }
#i4t-pod-lab .i4t-pod-plan { min-width: 150px; padding: 10px 15px; }
#i4t-pod-lab .i4t-pod-plan strong { font-size: 24px; margin: 2px 0; }
#i4t-pod-lab .i4t-pod-fullscreen,
#i4t-pod-lab .i4t-pod-guide-filter { padding: 9px 12px; border: 1px solid #d6dde7; border-radius: 8px; color: #344154; background: #fff; font: inherit; font-size: 12px; cursor: pointer; white-space: nowrap; }
#i4t-pod-lab .i4t-pod-guide-filter[aria-pressed="true"] { background: #fff2e8; color: #9a3412; border-color: #fb923c; }
#i4t-pod-lab .i4t-pod-notice { padding: 9px 15px; margin: 0 0 10px; font-size: 12px; }
#i4t-pod-lab .i4t-pod-card { border-radius: 12px; }
#i4t-pod-lab .i4t-pod-card-head { padding: 14px 20px; }
#i4t-pod-lab .i4t-pod-card-head h2 { font-size: 19px; }
#i4t-pod-lab .i4t-pod-view-tabs { padding: 0 12px; }
#i4t-pod-lab .i4t-pod-current-type { padding: 12px 20px; }
#i4t-pod-lab .i4t-pod-current-type b { font-size: 15px; }
#i4t-pod-lab .i4t-pod-monitor-head { padding: 12px 20px; }
#i4t-pod-lab .i4t-pod-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
#i4t-pod-lab .i4t-pod-stat { min-width: 0; padding: 18px 20px; background: #fff; }
#i4t-pod-lab .i4t-pod-stat label { display: block; color: #475569; font-size: 13px; margin-bottom: 10px; }
#i4t-pod-lab .i4t-pod-stat strong { display: block; color: #172033; font-size: clamp(18px, 1.4vw, 28px); line-height: 1.4; overflow-wrap: anywhere; }
#i4t-pod-lab .i4t-pod-stat strong.i4t-pod-namespace,
#i4t-pod-lab .i4t-pod-stat strong.i4t-pod-expiry { font-size: 16px; white-space: normal; }
#i4t-pod-lab .i4t-pod-stat small { color: #526176; font-size: 12px; }
#i4t-pod-lab .i4t-pod-meter { height: 8px; margin-top: 12px; background: #e8edf4; }
#i4t-pod-lab .i4t-pod-meter i { display: block; height: 100%; background: #ef6c20; }
#i4t-pod-lab .i4t-pod-trends { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; padding: 12px 20px; }
#i4t-pod-lab .i4t-pod-trends section { min-width: 0; padding: 12px 14px; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; color: #e66b24; }
#i4t-pod-lab .i4t-pod-trends section:nth-child(2) { color: #138575; }
#i4t-pod-lab .i4t-pod-trends h4 { margin: 0 0 4px; color: #253247; font-size: 14px; }
#i4t-pod-lab .i4t-pod-trends svg { display: block; width: 100%; height: 140px; }
#i4t-pod-lab .i4t-pod-trends > p { grid-column: 1 / -1; margin: 0; color: #68778b; font-size: 11px; }
#i4t-pod-lab .i4t-pod-trend-scale,
#i4t-pod-lab .i4t-pod-trend-range { color: #68778b; font-size: 11px; }
#i4t-pod-lab .i4t-pod-trend-range { display: flex; justify-content: space-between; }
#i4t-pod-lab .i4t-pod-trend-empty { padding: 50px 10px; text-align: center; color: #68778b; }
#i4t-pod-lab .i4t-pod-actions { padding: 12px 20px; }
#i4t-pod-lab .i4t-pod-terminal-panel { padding: 0 16px 16px; }
#i4t-pod-lab .i4t-pod-terminal-head { padding: 10px 0; }
#i4t-pod-lab .i4t-pod-terminal-workspace { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 12px; }
/* 1.8.1：高度由 JS 按视口剩余空间设定（applyWorkspaceLayout），CSS 仅负责填满工作区 */
#i4t-pod-lab .i4t-pod-terminal-workspace { align-items: stretch; }
#i4t-pod-lab .i4t-pod-terminal,
#i4t-pod-lab .i4t-pod-command-guide { height: 100% !important; min-height: 420px; }
#i4t-pod-lab .i4t-pod-terminal-column { display: flex; min-height: 0; min-width: 0; }
#i4t-pod-lab .i4t-pod-terminal-column .i4t-pod-terminal { flex: 1; min-width: 0; }
/* xterm 画布按初始化时尺寸固定像素宽，容器变化时靠 ResizeObserver 重排；
   这里裁剪溢出，防止测量偏差时终端盖住右侧面板 */
#i4t-pod-lab .i4t-pod-terminal { overflow: hidden; }
#i4t-pod-lab .i4t-pod-terminal .xterm { width: 100%; }
#i4t-pod-lab .i4t-pod-command-head { flex-wrap: wrap; align-items: center; padding: 10px 12px; }
#i4t-pod-lab .i4t-pod-command-head > div { flex: 1; }
#i4t-pod-lab .i4t-pod-command-head > [data-role="command-result"] { font-size: 11px; white-space: normal; }
#i4t-pod-lab .i4t-pod-command-content { grid-template-columns: minmax(170px, .8fr) minmax(0, 1.4fr); }
/* 1.8.1：筛选 chips 换行展示，不再自带滚动条 */
#i4t-pod-lab .i4t-pod-command-categories { flex-wrap: wrap; max-height: none; overflow: visible; flex-shrink: 0; }
#i4t-pod-lab .i4t-pod-command-chip { font-size: 12px; }
#i4t-pod-lab .i4t-pod-command-fill code { font-size: 13px; }
#i4t-pod-lab .i4t-pod-command-fill span { font-size: 12px; }
#i4t-pod-lab .i4t-pod-lesson-detail { padding: 14px; }
#i4t-pod-lab .i4t-pod-lesson-detail > p,
#i4t-pod-lab .i4t-pod-param-row span,
#i4t-pod-lab .i4t-pod-param-row code,
#i4t-pod-lab .i4t-pod-example-command,
#i4t-pod-lab .i4t-pod-example-output pre { font-size: 12px; }
#i4t-pod-lab .i4t-pod-param-row { grid-template-columns: minmax(80px,.8fr) minmax(0,1.2fr); overflow-wrap: anywhere; }
#i4t-pod-lab:fullscreen { padding: 12px 16px; overflow: auto; background: #f4f6fa; }
@media (max-width: 1100px) {
    #i4t-pod-lab .i4t-pod-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    #i4t-pod-lab .i4t-pod-terminal-workspace { grid-template-columns: 1fr; }
    #i4t-pod-lab .i4t-pod-terminal { height: 52dvh !important; min-height: 300px; }
    #i4t-pod-lab .i4t-pod-command-guide { height: auto !important; min-height: 0; }
    #i4t-pod-lab .i4t-pod-hero { flex-wrap: wrap; }
}
@media (max-width: 600px) {
    body.i4t-pod-page .b2-single-content.wrapper { padding-top: 8px !important; }
    #i4t-pod-lab .i4t-pod-hero { flex-direction: row; padding: 12px; gap: 10px; }
    #i4t-pod-lab .i4t-pod-brand { flex-basis: 100%; }
    #i4t-pod-lab .i4t-pod-plan { flex: 1; width: auto; min-width: 0; }
    #i4t-pod-lab .i4t-pod-stat { padding: 12px; }
    #i4t-pod-lab .i4t-pod-stat strong { font-size: 18px; }
    #i4t-pod-lab .i4t-pod-trends { grid-template-columns: 1fr; padding: 10px; }
    #i4t-pod-lab .i4t-pod-trends svg { height: 110px; }
    #i4t-pod-lab .i4t-pod-terminal-panel { padding: 0 10px 10px; }
    #i4t-pod-lab .i4t-pod-command-guide { height: auto; }
    #i4t-pod-lab .i4t-pod-command-content { grid-template-columns: 1fr; }
    #i4t-pod-lab .i4t-pod-command-index { height: 300px; }
    #i4t-pod-lab .i4t-pod-lesson-detail { max-height: 540px; }
    #i4t-pod-lab .i4t-pod-type-grid { grid-template-columns: 1fr; }
}

/* ── 1.8.0 题库练习（运维版 LeetCode）────────────────────────── */
.i4t-pod-guide-tabs{display:flex;gap:2px;background:#eef1f5;border-radius:8px;padding:3px;width:max-content}
.i4t-pod-guide-tabs button{border:0;background:transparent;padding:6px 14px;border-radius:6px;font-size:13px;cursor:pointer;color:#5b6472}
.i4t-pod-guide-tabs button.is-active{background:#fff;color:#111827;font-weight:600;box-shadow:0 1px 2px rgba(15,23,42,.08)}
.i4t-task-row.is-done code{color:#16803c}
.i4t-task-diff{display:inline-block;font-style:normal;font-size:11px;line-height:1;padding:3px 7px;border-radius:99px;margin-right:6px;font-weight:600}
.i4t-task-diff.d1{background:#e6f7ee;color:#0f7a3d}
.i4t-task-diff.d2{background:#e8f0fe;color:#1d5fd6}
.i4t-task-diff.d3{background:#fdeee6;color:#c2560f}
.i4t-task-title{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.i4t-task-title h3{margin:0;flex:1}
.i4t-task-passed{font-style:normal;color:#16803c;font-weight:700;background:#e6f7ee;border-radius:99px;padding:3px 10px;font-size:12px}
.i4t-task-body p{white-space:pre-wrap;line-height:1.7}
.i4t-task-actions{display:flex;gap:8px;margin-top:8px}
.i4t-task-actions button{border:1px solid #d4dae3;background:#fff;border-radius:6px;padding:5px 12px;cursor:pointer;font-size:12px}
.i4t-task-actions button:hover{border-color:#94a3b8}
.i4t-task-verify{border-top:1px dashed #d4dae3;margin-top:14px;padding-top:12px}
.i4t-task-verify-tip{color:#6b7280;font-size:12px;margin:4px 0 10px}
.i4t-task-verify-btn{background:#1a56db;color:#fff;border:0;border-radius:8px;padding:9px 22px;font-size:14px;font-weight:600;cursor:pointer}
.i4t-task-verify-btn:hover:not(:disabled){background:#1744ad}
.i4t-task-verify-btn.is-passed,.i4t-task-verify-btn:disabled{background:#e6f7ee;color:#16803c;cursor:default}
.i4t-verify-ok{color:#16803c;font-weight:700;margin:10px 0 0}
.i4t-verify-fail{color:#c2560f;font-weight:600;margin:10px 0 4px}
.i4t-verify-output{background:#111827;color:#e5e7eb;border-radius:6px;padding:8px 10px;font-size:12px;max-height:160px;overflow:auto;white-space:pre-wrap}

/* ── 1.8.1 滚动收敛：整页只保留 题目列表/题目详情 两个内部滚动区（终端滚屏属正常）── */
#i4t-pod-lab .i4t-pod-syntax,
#i4t-pod-lab .i4t-pod-example-command { white-space: pre-wrap; overflow: visible; word-break: break-all; }
#i4t-pod-lab .i4t-pod-example-output pre { max-height: none; overflow: visible; white-space: pre-wrap; }
#i4t-pod-lab .i4t-pod-verify-output { max-height: 200px; }

/* ── 1.8.1 按钮显式配色（防主题继承导致白底白字）── */
#i4t-pod-lab button { color: #344154; }
#i4t-pod-lab .i4t-pod-guide-tabs button { color: #5b6472; }
#i4t-pod-lab .i4t-pod-guide-tabs button.is-active { color: #111827; }
#i4t-pod-lab .i4t-task-actions button { color: #1d5fd6; background: #fff; }
#i4t-pod-lab .i4t-task-verify-btn { color: #fff; }
#i4t-pod-lab .i4t-task-verify-btn.is-passed,
#i4t-pod-lab .i4t-task-verify-btn:disabled { color: #16803c; }
#i4t-pod-lab .i4t-pod-btn-primary { color: #fff !important; }
/* 1.8.1：列最小宽放宽，避免窄容器下横向溢出 */
#i4t-pod-lab .i4t-pod-terminal-workspace { grid-template-columns: minmax(360px, 1fr) minmax(430px, 1.15fr); }
#i4t-pod-lab .i4t-pod-command-list { overflow-y: auto; min-height: 0; }

/* 1.8.2 兜底：响应式断点必须晚于上方基础规则，否则被同权重规则覆盖 */
@media (max-width: 1100px) {
    #i4t-pod-lab .i4t-pod-terminal-workspace { grid-template-columns: 1fr !important; height: auto !important; }
    #i4t-pod-lab .i4t-pod-terminal { height: 52dvh !important; }
    #i4t-pod-lab .i4t-pod-command-guide { height: auto !important; min-height: 0; }
}
