.notebook-editor-host{background:var(--paper);min-height:145px;direction:ltr}
.notebook-editor-host .cm-editor{font:13px/1.65 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;color:var(--ink);background:var(--paper)}
.notebook-editor-host .cm-scroller{overflow:auto;max-height:520px;min-height:145px}
.notebook-editor-host .cm-content{padding:14px 0;caret-color:var(--brand)}
.notebook-editor-host .cm-line{padding:0 16px 0 10px}
.notebook-editor-host .cm-gutters{background:#f7f9fb;border-right:1px solid var(--line);color:var(--subtle)}
.notebook-editor-host .cm-lineNumbers .cm-gutterElement{min-width:34px;padding:0 9px 0 10px}
.notebook-editor-host .cm-activeLine,.notebook-editor-host .cm-activeLineGutter{background:#eef4f8}
.notebook-editor-host .cm-focused{outline:0}
.notebook-editor-host .cm-selectionBackground{background:#cce3ef!important}
.notebook-editor-host .cm-tooltip{border:1px solid var(--line);background:var(--paper);color:var(--ink);box-shadow:0 5px 20px #19364816}
.notebook-editor-host .cm-tooltip-autocomplete>ul{font:12px/1.6 ui-monospace,SFMono-Regular,Menlo,monospace;max-height:220px}
.notebook-editor-host .cm-tooltip-autocomplete>ul>li[aria-selected]{background:var(--brand);color:#fff}
.notebook-key-help{font-size:11px;color:var(--muted);margin:8px 0 16px}
.notebook-key-help kbd{font:10px/1.4 ui-monospace,SFMono-Regular,Menlo,monospace;background:var(--soft);border:1px solid var(--line);border-radius:4px;padding:1px 4px;white-space:nowrap}
.notebook-cell.is-selected{border-color:#99b9c9}
.notebook-cell.is-queued{border-color:#c5a34e;box-shadow:0 0 0 2px #fff5dc}
.notebook-cell.is-running{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent-soft)}
.notebook-cell.is-running .notebook-cell-head{background:var(--accent-soft)}
.notebook-cell.is-queued .notebook-cell-head{background:var(--warning-soft)}
.notebook-cell-state{font-size:11px;line-height:1.4;color:var(--muted)}
.notebook-cell.is-running .notebook-cell-state{color:var(--accent)}
.notebook-cell.is-queued .notebook-cell-state{color:var(--warning)}
.notebook-cell .notebook-run-busy{opacity:1;cursor:wait;background:var(--brand);color:#fff}
.notebook-run-busy .spinner{width:12px;height:12px;border-color:#ffffff50;border-top-color:#fff;vertical-align:-2px;margin-right:5px}
.notebook-status-message{font-size:12px;color:var(--muted);min-height:18px;margin-top:6px}
.submission-history{margin-top:18px;padding-top:16px;border-top:1px solid var(--line)}
.submission-history-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
.submission-history h4{margin:0;font-size:14px;font-weight:650;color:var(--ink)}
.submission-history-list{display:grid;gap:7px}
.submission-history-item{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 11px;border:1px solid var(--line);border-radius:8px;background:var(--paper)}
.submission-history-item.is-selected{border-color:#94b8cb;background:#f3f8fb}
.submission-history-item strong{font-size:12px;overflow-wrap:anywhere}
.submission-history-meta{font-size:11px;color:var(--muted);margin-top:2px}
.submission-preview{margin-top:12px;border:1px solid var(--line);border-radius:9px;background:var(--paper);overflow:hidden}
.submission-preview-header{padding:12px 13px;border-bottom:1px solid var(--line)}
.submission-preview-header p{font-size:12px;color:var(--muted);margin-top:4px}
.submission-preview .table-wrap{border:0;border-radius:0;margin:0;max-height:340px;overflow:auto}
.submission-preview .data-table{font-size:12px;min-width:0;width:100%}
.submission-preview .data-table th{letter-spacing:0;text-transform:none}
.submission-preview .data-table th,.submission-preview .data-table td{padding:7px 12px;max-width:340px;overflow-wrap:anywhere;white-space:pre-wrap}
.submission-preview-note{padding:10px 13px;font-size:11px;color:var(--muted);border-top:1px solid var(--line)}
.submission-sha{font:10px/1.6 ui-monospace,SFMono-Regular,Menlo,monospace;overflow-wrap:anywhere;margin-top:6px;color:var(--subtle)}
.submission-history-empty{font-size:12px;color:var(--muted);padding:8px 0}
.notebook-shell,.notebook-cells,.notebook-cell,.notebook-editor-host,.notebook-submit,.submission-history,.submission-preview{min-width:0;max-width:100%}
.notebook-editor-host .cm-editor,.notebook-editor-host .cm-scroller{min-width:0;max-width:100%}
@media(max-width:720px){
  .notebook-toolbar>div,.notebook-cell-head>div,.submission-history-item>div{min-width:0}
  .notebook-toolbar>.actions{width:100%}
  .notebook-toolbar>.actions .btn{flex:1}
  .notebook-shell .btn,.submission-history .btn{min-height:44px;white-space:normal;overflow-wrap:anywhere}
  .notebook-shell .remove-button{min-width:44px;min-height:44px}
  .notebook-cell-head{flex-wrap:wrap;gap:8px}
  .notebook-cell-head>div:first-child{flex:1 1 120px}
  .notebook-cell-head>.actions{margin-left:auto;justify-content:flex-end;max-width:100%}
  .notebook-editor-host .cm-editor,.notebook-code{font-size:16px}
  .notebook-editor-host .cm-scroller{min-height:180px;max-height:min(440px,65dvh)}
  .notebook-editor-host .cm-tooltip{max-width:calc(100vw - 48px)}
  .notebook-editor-host .cm-tooltip-autocomplete>ul{max-width:100%;max-height:200px}
  .notebook-caption,.notebook-runtime,.notebook-save-state,.notebook-status-message,.submission-history-meta{overflow-wrap:anywhere}
  .notebook-key-help{font-size:12px;line-height:1.6;overflow-wrap:anywhere}
  .notebook-submit .inline-form{grid-template-columns:minmax(0,1fr)}
  .notebook-submit .inline-form .field{min-width:0}
  .notebook-submit .input{min-width:0;font-size:16px}
  .notebook-output .table-wrap,.submission-preview .table-wrap{max-width:100%;overflow:auto}
  .submission-history-heading,.submission-history-item{flex-wrap:wrap;align-items:flex-start;gap:8px}
  .submission-history-item>div{flex:1 1 140px}
  .submission-history-item .btn{flex:none}
  .submission-preview-header,.submission-preview-note{overflow-wrap:anywhere}
  .submission-preview .data-table th,.submission-preview .data-table td{padding:7px 9px}
}
@media(max-width:480px){
  .submission-history-item .btn{width:100%}
}
