/* Typst Document Editor. Only typst_document_editor.html links this file. */
[data-tool=typst_document_editor]{--te-bg:#1a1527;--te-deep:#120e1c;--te-card:#241f33;--te-line:#3d3358;--te-purple:#6f5686;--te-lilac:#c8a2ff;--te-gold:#f6cd63;--te-text:#eadcf7;--te-mute:#b8abd2;--te-red:#ff8a9a;--te-green:#7fe0b0;--te-mono:ui-monospace,"Cascadia Code",Consolas,"DejaVu Sans Mono",monospace;max-width:1440px;margin-inline:auto;color:var(--te-text);font-size:14px}
[data-tool=typst_document_editor] *{box-sizing:border-box}
[data-tool=typst_document_editor] [hidden]{display:none!important}
[data-tool=typst_document_editor] button{font:inherit;cursor:pointer}
[data-tool=typst_document_editor] input,[data-tool=typst_document_editor] select{font:inherit;color:var(--te-text);background:var(--te-deep);border:1px solid var(--te-line);border-radius:8px;padding:7px 9px;min-width:0;max-width:100%}
[data-tool=typst_document_editor] input[type=checkbox]{accent-color:var(--te-gold)}
[data-tool=typst_document_editor] :is(input,select,button,textarea):focus-visible{outline:2px solid var(--te-gold);outline-offset:1px}
[data-tool=typst_document_editor] code{font:12px var(--te-mono);background:var(--te-deep);padding:1px 5px;border-radius:4px;color:var(--te-gold)}

[data-tool=typst_document_editor] .te-hero{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:28px;align-items:center;padding:28px 32px;border:1px solid var(--te-purple);border-radius:20px;background:radial-gradient(ellipse at 92% 0%,#9b6fe040,transparent 55%),radial-gradient(ellipse at 0% 100%,#f6cd6318,transparent 50%),linear-gradient(160deg,#2d2640,#242032);margin:0 0 14px;text-align:left;box-shadow:0 14px 40px #0006}
[data-tool=typst_document_editor] .te-eyebrow{display:inline-flex;align-items:center;gap:8px;font-size:12px;letter-spacing:1.3px;text-transform:uppercase;color:var(--te-gold);font-weight:700;margin-bottom:8px}
[data-tool=typst_document_editor] .te-eyebrow i{width:9px;height:9px;border-radius:50%;background:var(--te-gold);animation:te-ping 2s infinite}
@keyframes te-ping{0%{box-shadow:0 0 0 0 #f6cd6399}80%,100%{box-shadow:0 0 0 10px #f6cd6300}}
[data-tool=typst_document_editor] .te-hero h1{margin:0;font-size:2.2rem;line-height:1.12;color:#fff;text-align:left}
[data-tool=typst_document_editor] .te-hero p{margin:10px 0 0;color:#e1cfea;max-width:68ch;line-height:1.6;text-align:left}
[data-tool=typst_document_editor] .te-chips{display:flex;flex-wrap:wrap;gap:8px;list-style:none;padding:0;margin:16px 0 0}
[data-tool=typst_document_editor] .te-chips li{padding:6px 12px;border:1px solid #756087;border-radius:999px;font-size:13px;background:#1c1729aa}
[data-tool=typst_document_editor] .te-chips li:first-child{border-color:var(--te-gold);color:var(--te-gold)}
[data-tool=typst_document_editor] .te-live{padding:14px;border-radius:16px;border:1px solid var(--te-line);background:#1a1527cc}
[data-tool=typst_document_editor] .te-live-head{display:flex;justify-content:space-between;gap:10px;margin-bottom:8px}
[data-tool=typst_document_editor] .te-live-head span{font-size:11px;letter-spacing:1.2px;text-transform:uppercase;color:var(--te-mute);font-weight:700}
[data-tool=typst_document_editor] .te-live-head b{color:#fff}
[data-tool=typst_document_editor] .te-live-head b.ok{color:var(--te-green)}
[data-tool=typst_document_editor] .te-live-head b.err{color:var(--te-red)}
[data-tool=typst_document_editor] .te-live-paper{position:relative;height:240px;border-radius:10px;overflow:hidden;background:radial-gradient(circle at 50% 30%,#2e2742,#15111f);display:flex;justify-content:center;padding-top:14px}
[data-tool=typst_document_editor] .te-live-page{width:170px;height:240px;background:#fff;border-radius:3px;box-shadow:0 8px 24px #000a;overflow:hidden;transform-origin:top center;animation:te-float 6s ease-in-out infinite}
[data-tool=typst_document_editor] .te-live-page svg{width:100%;height:auto;display:block}
@keyframes te-float{0%,100%{transform:translateY(0) rotate(-1deg)}50%{transform:translateY(-6px) rotate(1deg)}}
[data-tool=typst_document_editor] .te-live-load{position:absolute;left:14px;right:14px;bottom:14px;padding:8px 10px;border-radius:8px;background:#120e1cee;font-size:12px}
[data-tool=typst_document_editor] .te-live-load i{display:block;height:5px;border-radius:3px;background:linear-gradient(90deg,var(--te-purple),var(--te-gold));width:0;margin-bottom:6px;transition:width .2s}
[data-tool=typst_document_editor] .te-live-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin:10px 0 0}
[data-tool=typst_document_editor] .te-live-stats div{background:var(--te-deep);border-radius:8px;padding:6px 8px;min-width:0}
[data-tool=typst_document_editor] .te-live-stats dt{font-size:10px;text-transform:uppercase;letter-spacing:.8px;color:var(--te-mute)}
[data-tool=typst_document_editor] .te-live-stats dd{margin:2px 0 0;font:800 15px var(--te-mono);color:#fff;white-space:nowrap}

[data-tool=typst_document_editor] .te-ws{border:1px solid var(--te-line);border-radius:18px;background:var(--te-bg);overflow:hidden;box-shadow:0 14px 40px #0005}
[data-tool=typst_document_editor] .te-topbar{display:flex;flex-wrap:wrap;gap:8px 10px;align-items:flex-end;padding:10px 12px;border-bottom:1px solid var(--te-line);background:linear-gradient(180deg,#2a2340,#221c31)}
[data-tool=typst_document_editor] .te-field{display:flex;flex-direction:column;gap:3px;min-width:0}
[data-tool=typst_document_editor] .te-field>span{font-size:10px;text-transform:uppercase;letter-spacing:.9px;color:var(--te-mute);font-weight:700}
[data-tool=typst_document_editor] .te-name input{width:220px;font-weight:700}
[data-tool=typst_document_editor] .te-top-actions{display:flex;flex-wrap:wrap;gap:6px;margin-left:auto;align-items:center}
[data-tool=typst_document_editor] .te-btn,[data-tool=typst_document_editor] .te-ib{border:1px solid var(--te-line);background:#2c2540;color:var(--te-text);border-radius:8px;padding:7px 11px;line-height:1.1;transition:background .15s,border-color .15s,transform .1s}
[data-tool=typst_document_editor] .te-ib{min-width:32px;padding:6px 8px}
[data-tool=typst_document_editor] :is(.te-btn,.te-ib):hover{border-color:var(--te-lilac);background:#352d4d}
[data-tool=typst_document_editor] :is(.te-btn,.te-ib):active{transform:scale(.96)}
[data-tool=typst_document_editor] :is(.te-btn,.te-ib,.te-primary):disabled{opacity:.45;cursor:not-allowed}
[data-tool=typst_document_editor] .te-primary{border:0;background:var(--te-gold);color:#241f33;font-weight:800;border-radius:9px;padding:8px 14px}
[data-tool=typst_document_editor] .te-main{display:grid;grid-template-columns:200px minmax(0,var(--te-a,1fr)) minmax(0,var(--te-b,1fr));height:780px}
[data-tool=typst_document_editor] .te-main[data-view=code]{grid-template-columns:200px minmax(0,1fr)}
[data-tool=typst_document_editor] .te-main[data-view=code] .te-prev-col{display:none}
[data-tool=typst_document_editor] .te-main[data-view=preview]{grid-template-columns:200px minmax(0,1fr)}
[data-tool=typst_document_editor] .te-main[data-view=preview] .te-code-col{display:none}
[data-tool=typst_document_editor] .te-side{border-right:1px solid var(--te-line);background:#1d1829;overflow:auto;min-height:0}
[data-tool=typst_document_editor] .te-side-head{padding:10px 12px 6px;font-size:11px;text-transform:uppercase;letter-spacing:1px;color:var(--te-mute);font-weight:700}
[data-tool=typst_document_editor] .te-files,[data-tool=typst_document_editor] .te-outline{list-style:none;margin:0;padding:0 6px 8px}
[data-tool=typst_document_editor] .te-files li{display:flex;align-items:center;gap:4px;border-radius:8px}
[data-tool=typst_document_editor] .te-files li button.te-fname{flex:1;min-width:0;text-align:left;border:0;background:transparent;color:var(--te-text);padding:6px 8px;border-radius:8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:13px}
[data-tool=typst_document_editor] .te-files li[aria-current=true] button.te-fname{background:#3a3054;color:#fff}
[data-tool=typst_document_editor] .te-files li button.te-fname:hover{background:#2c2540}
[data-tool=typst_document_editor] .te-files li .te-fx{border:0;background:transparent;color:var(--te-mute);padding:3px 5px;border-radius:5px;font-size:12px;opacity:.6}
[data-tool=typst_document_editor] .te-files li .te-fx:hover{opacity:1;background:#ffffff12;color:#fff}
[data-tool=typst_document_editor] .te-files .te-main-badge{font-size:9px;font-weight:800;color:#241f33;background:var(--te-gold);border-radius:4px;padding:1px 4px}
[data-tool=typst_document_editor] .te-outline li button{display:block;width:100%;text-align:left;border:0;background:transparent;color:var(--te-mute);padding:4px 8px;border-radius:6px;font-size:12.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
[data-tool=typst_document_editor] .te-outline li button:hover{background:#2c2540;color:#fff}
[data-tool=typst_document_editor] .te-code-col{display:flex;flex-direction:column;min-width:0;min-height:0;border-right:1px solid var(--te-line)}
[data-tool=typst_document_editor] .te-toolbar{display:flex;flex-wrap:wrap;gap:3px;align-items:center;padding:6px 8px;border-bottom:1px solid var(--te-line);background:#1d1829}
[data-tool=typst_document_editor] .te-toolbar button{min-width:30px;height:30px;border:1px solid transparent;background:transparent;color:var(--te-text);border-radius:7px;font-size:13px;padding:0 6px}
[data-tool=typst_document_editor] .te-toolbar button:hover,[data-tool=typst_document_editor] .te-toolbar button[aria-expanded=true]{background:#2c2540;border-color:var(--te-line)}
[data-tool=typst_document_editor] .te-grow{flex:1}
[data-tool=typst_document_editor] .te-pos{font:12px var(--te-mono);color:var(--te-mute)}
[data-tool=typst_document_editor] .te-symbols{display:grid;grid-template-columns:repeat(auto-fill,minmax(36px,1fr));gap:3px;padding:8px;border-bottom:1px solid var(--te-line);background:#18131f;max-height:150px;overflow:auto}
[data-tool=typst_document_editor] .te-symbols button{height:32px;border:1px solid var(--te-line);background:#221c31;color:#fff;border-radius:6px;font-size:16px;font-family:"Cambria Math","STIX Two Math","Libertinus Math",serif}
[data-tool=typst_document_editor] .te-symbols button:hover{border-color:var(--te-gold)}
[data-tool=typst_document_editor] .te-editor{flex:1;display:flex;min-height:0;overflow:auto;background:#15111f;position:relative}
[data-tool=typst_document_editor] .te-gutter{flex:none;padding:12px 8px 40px 10px;text-align:right;font:13px/20px var(--te-mono);color:#6c5f86;background:#18131f;user-select:none;min-width:46px;position:sticky;left:0;z-index:2;border-right:1px solid #2a2338}
[data-tool=typst_document_editor] .te-gutter span{display:block;height:20px}
[data-tool=typst_document_editor] .te-gutter span.err{color:var(--te-red);font-weight:800;background:#ff8a9a1f}
[data-tool=typst_document_editor] .te-gutter span.warn{color:var(--te-gold)}
[data-tool=typst_document_editor] .te-code{position:relative;flex:1;min-width:max-content}
[data-tool=typst_document_editor] .te-hl,[data-tool=typst_document_editor] .te-src{margin:0;padding:12px 14px 40px;font:13px/20px var(--te-mono);tab-size:2;white-space:pre;border:0;letter-spacing:0;word-spacing:0}
[data-tool=typst_document_editor] .te-hl{position:absolute;inset:0;pointer-events:none;color:#e6dcf5;overflow:visible}
[data-tool=typst_document_editor] .te-src{position:relative;display:block;width:100%;min-width:100%;min-height:100%;resize:none;background:transparent;color:transparent;caret-color:var(--te-gold);outline:none;overflow:hidden}
[data-tool=typst_document_editor] .te-src::selection{background:#6f568677;color:transparent}
[data-tool=typst_document_editor] .te-hl .l-err{background:#ff8a9a1c;box-shadow:inset 3px 0 0 var(--te-red)}
[data-tool=typst_document_editor] .te-hl .l-warn{background:#f6cd6314}
[data-tool=typst_document_editor] .tk-c{color:#7f7396;font-style:italic}
[data-tool=typst_document_editor] .tk-h{color:#f6cd63;font-weight:700}
[data-tool=typst_document_editor] .tk-s{color:#fff;font-weight:700}
[data-tool=typst_document_editor] .tk-e{color:#e9d9ff;font-style:italic}
[data-tool=typst_document_editor] .tk-m{color:#7fe0b0}
[data-tool=typst_document_editor] .tk-f{color:#c8a2ff}
[data-tool=typst_document_editor] .tk-k{color:#ff9ad2;font-weight:700}
[data-tool=typst_document_editor] .tk-q{color:#ffcf8a}
[data-tool=typst_document_editor] .tk-n{color:#8fd3ff}
[data-tool=typst_document_editor] .tk-r{color:#9fe3c9}
[data-tool=typst_document_editor] .tk-l{color:#8fd3ff}
[data-tool=typst_document_editor] .tk-b{color:#ffd28a}
[data-tool=typst_document_editor] .te-diag{max-height:150px;overflow:auto;border-top:1px solid var(--te-line);background:#18131f;font-size:13px}
[data-tool=typst_document_editor] .te-diag:empty{display:none}
[data-tool=typst_document_editor] .te-diag button{display:grid;grid-template-columns:auto 1fr;gap:2px 8px;width:100%;text-align:left;border:0;border-bottom:1px solid #ffffff0d;background:transparent;color:var(--te-text);padding:7px 10px}
[data-tool=typst_document_editor] .te-diag button:hover{background:#ffffff08}
[data-tool=typst_document_editor] .te-diag b{font:800 11px var(--te-mono);padding:2px 6px;border-radius:4px;background:#5a1f3a;color:#ffd0d8;align-self:start}
[data-tool=typst_document_editor] .te-diag b.warning{background:#4a3d1a;color:#ffe9a8}
[data-tool=typst_document_editor] .te-diag small{grid-column:2;color:var(--te-mute)}
[data-tool=typst_document_editor] .te-diag .te-ok{padding:7px 10px;color:var(--te-green)}
[data-tool=typst_document_editor] .te-prev-col{display:flex;flex-direction:column;min-width:0;min-height:0;background:#2a2536}
[data-tool=typst_document_editor] .te-prev-bar{display:flex;flex-wrap:wrap;gap:8px;align-items:center;padding:6px 10px;border-bottom:1px solid var(--te-line);background:#1d1829}
[data-tool=typst_document_editor] .te-pager{display:inline-flex;align-items:center;gap:6px}
[data-tool=typst_document_editor] .te-pager output{font:700 12px var(--te-mono);min-width:54px;text-align:center}
[data-tool=typst_document_editor] .te-zoom{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:var(--te-mute)}
[data-tool=typst_document_editor] .te-zoom select{padding:5px 6px}
[data-tool=typst_document_editor] .te-check{display:inline-flex;align-items:center;gap:6px;font-size:13px;margin-left:auto}
[data-tool=typst_document_editor] .te-preview{flex:1;overflow:auto;padding:16px;min-height:0;position:relative}
[data-tool=typst_document_editor] .te-pages{margin:0 auto;transition:opacity .15s}
[data-tool=typst_document_editor] .te-pages.stale{opacity:.55}
[data-tool=typst_document_editor] .te-pg{background:#fff;margin:0 auto 16px;box-shadow:0 8px 26px #0009;border-radius:2px;overflow:hidden;animation:te-in .25s ease}
[data-tool=typst_document_editor] .te-pg svg{display:block;width:100%;height:auto}
@keyframes te-in{from{opacity:.4}to{opacity:1}}
[data-tool=typst_document_editor] .te-loading{display:flex;flex-direction:column;gap:10px;align-items:center;justify-content:center;height:100%;color:var(--te-mute)}

[data-tool=typst_document_editor] .te-exports{margin-top:16px;padding:20px 22px;border:1px solid var(--te-line);border-radius:18px;background:var(--te-card)}
[data-tool=typst_document_editor] .te-exports-head{display:flex;flex-wrap:wrap;justify-content:space-between;gap:12px 20px;align-items:flex-end;margin-bottom:14px}
[data-tool=typst_document_editor] .te-exports h2{margin:0;color:#fff;font-size:1.35rem;text-align:left}
[data-tool=typst_document_editor] .te-exports-head p{margin:4px 0 0;color:var(--te-mute);max-width:70ch;line-height:1.5}
[data-tool=typst_document_editor] .te-export-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:10px}
[data-tool=typst_document_editor] .te-ex{display:grid;grid-template-columns:40px minmax(0,1fr);gap:4px 10px;align-items:center;text-align:left;padding:12px;border:1px solid var(--te-line);border-radius:12px;background:#1d1829;color:var(--te-text);transition:border-color .15s,transform .15s,box-shadow .15s}
[data-tool=typst_document_editor] .te-ex:hover{border-color:var(--te-gold);transform:translateY(-2px);box-shadow:0 8px 20px #0005}
[data-tool=typst_document_editor] .te-ex:disabled{opacity:.5;transform:none}
[data-tool=typst_document_editor] .te-ex i{grid-row:span 2;width:40px;height:40px;border-radius:10px;display:flex;align-items:center;justify-content:center;font:800 11px var(--te-mono);font-style:normal;color:#241f33;background:var(--te-lilac)}
[data-tool=typst_document_editor] .te-ex[data-kind=doc] i{background:var(--te-gold)}
[data-tool=typst_document_editor] .te-ex[data-kind=src] i{background:#9fe3c9}
[data-tool=typst_document_editor] .te-ex b{color:#fff;font-size:14px}
[data-tool=typst_document_editor] .te-ex small{color:var(--te-mute);font-size:12px;line-height:1.35}
[data-tool=typst_document_editor] .te-progress{display:flex;align-items:center;gap:12px;margin-top:14px}
[data-tool=typst_document_editor] .te-progress-bar{flex:1;height:10px;border-radius:6px;background:var(--te-deep);overflow:hidden}
[data-tool=typst_document_editor] .te-progress-bar i{display:block;height:100%;width:0;background:linear-gradient(90deg,var(--te-purple),var(--te-gold));transition:width .15s}
[data-tool=typst_document_editor] .te-status{min-height:1.4em;margin:10px 0 0;color:var(--te-mute)}
[data-tool=typst_document_editor] .te-status[data-tone=ok]{color:var(--te-green)}
[data-tool=typst_document_editor] .te-status[data-tone=warn]{color:var(--te-gold)}
[data-tool=typst_document_editor] .te-status[data-tone=err]{color:var(--te-red)}
[data-tool=typst_document_editor] .te-dialog{position:fixed;inset:0;margin:auto;height:fit-content;max-height:calc(100vh - 32px);overflow:auto;border:1px solid var(--te-purple);border-radius:16px;background:var(--te-card);color:var(--te-text);padding:20px 22px;width:min(680px,calc(100vw - 32px))}
[data-tool=typst_document_editor] .te-dialog::backdrop{background:#0009}
[data-tool=typst_document_editor] .te-dialog h2{margin:0 0 12px;color:#fff;font-size:1.2rem}
[data-tool=typst_document_editor] .te-keys-grid{display:grid;grid-template-columns:1fr 1fr;gap:6px 18px;margin-bottom:14px}
[data-tool=typst_document_editor] .te-keys-grid div{display:flex;justify-content:space-between;gap:10px;font-size:13px;border-bottom:1px solid #ffffff10;padding:4px 0}
[data-tool=typst_document_editor] kbd{font:700 11px var(--te-mono);padding:2px 6px;border-radius:5px;background:var(--te-deep);border:1px solid var(--te-line);color:var(--te-gold);white-space:nowrap}

@media (max-width:1180px){
 [data-tool=typst_document_editor] .te-main{grid-template-columns:180px minmax(0,1fr);height:auto}
 [data-tool=typst_document_editor] .te-side,[data-tool=typst_document_editor] .te-code-col{height:640px}
 [data-tool=typst_document_editor] .te-prev-col{grid-column:1/-1;height:720px;border-top:1px solid var(--te-line)}
}
@media (max-width:820px){
 [data-tool=typst_document_editor] .te-hero{grid-template-columns:1fr;padding:20px 18px;gap:18px}
 [data-tool=typst_document_editor] .te-hero h1{font-size:1.75rem}
 [data-tool=typst_document_editor] .te-main{grid-template-columns:minmax(0,1fr)}
 [data-tool=typst_document_editor] .te-side{height:auto;max-height:220px;border-right:0;border-bottom:1px solid var(--te-line);display:grid;grid-template-columns:1fr 1fr}
 [data-tool=typst_document_editor] .te-side .te-side-head:nth-of-type(2){grid-column:2;grid-row:1}
 [data-tool=typst_document_editor] .te-side .te-outline{grid-column:2;grid-row:2}
 [data-tool=typst_document_editor] .te-code-col{height:520px;border-right:0}
 [data-tool=typst_document_editor] .te-prev-col{height:620px}
 [data-tool=typst_document_editor] .te-name input{width:100%}
 [data-tool=typst_document_editor] .te-topbar .te-field{flex:1 1 140px}
 [data-tool=typst_document_editor] .te-top-actions{margin-left:0}
 [data-tool=typst_document_editor] .te-keys-grid{grid-template-columns:1fr}
 [data-tool=typst_document_editor] .te-exports{padding:16px 14px}
}
@media (prefers-reduced-motion:reduce){[data-tool=typst_document_editor] *{animation:none!important;transition:none!important}}

/* round 2: autocomplete, find bar, views, divider, history */
[data-tool=typst_document_editor] .te-ac{position:absolute;z-index:6;list-style:none;margin:0;padding:4px;min-width:180px;max-width:320px;background:#2a2340;border:1px solid var(--te-purple);border-radius:8px;box-shadow:0 10px 24px #000a;font:13px var(--te-mono)}
[data-tool=typst_document_editor] .te-ac li{padding:5px 9px;border-radius:5px;cursor:pointer;color:var(--te-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
[data-tool=typst_document_editor] .te-ac li[aria-selected=true]{background:var(--te-purple);color:#fff}
[data-tool=typst_document_editor] .te-findbar{padding:6px 8px;border-bottom:1px solid var(--te-line);background:#18131f;display:flex;flex-direction:column;gap:6px}
[data-tool=typst_document_editor] .te-findrow{display:flex;flex-wrap:wrap;gap:5px;align-items:center}
[data-tool=typst_document_editor] .te-findrow input[type=text]{flex:1 1 160px;padding:5px 8px;font:13px var(--te-mono)}
[data-tool=typst_document_editor] .te-findrow .te-check{margin:0;font-size:12px}
[data-tool=typst_document_editor] .te-findcount{font-size:12px;color:var(--te-mute);min-width:70px}
[data-tool=typst_document_editor] .te-seg{display:inline-flex;border:1px solid var(--te-line);border-radius:8px;overflow:hidden;margin-right:8px}
[data-tool=typst_document_editor] .te-seg button{border:0;border-radius:0;background:transparent;color:var(--te-mute);padding:0 10px;height:32px;font-size:13px}
[data-tool=typst_document_editor] .te-seg button+button{border-left:1px solid var(--te-line)}
[data-tool=typst_document_editor] .te-seg button[aria-pressed=true]{background:#3a3054;color:#fff}
[data-tool=typst_document_editor] .te-prev-col{position:relative}
[data-tool=typst_document_editor] .te-divider{position:absolute;left:-4px;top:0;bottom:0;width:8px;cursor:col-resize;z-index:5}
[data-tool=typst_document_editor] .te-divider:hover,[data-tool=typst_document_editor] .te-divider:focus-visible{background:linear-gradient(90deg,transparent 3px,var(--te-gold) 3px,var(--te-gold) 5px,transparent 5px)}
[data-tool=typst_document_editor] .te-note{color:var(--te-mute);font-size:13px;line-height:1.5;margin:0 0 10px}
[data-tool=typst_document_editor] .te-hist{display:flex;flex-direction:column;gap:6px;max-height:50vh;overflow:auto;margin-bottom:12px}
[data-tool=typst_document_editor] .te-hist-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:8px;align-items:center;padding:8px 10px;border:1px solid var(--te-line);border-radius:10px;background:#1d1829}
[data-tool=typst_document_editor] .te-hist-row b{display:block;color:#fff;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
[data-tool=typst_document_editor] .te-hist-row small{color:var(--te-mute);font-size:12px}
[data-tool=typst_document_editor] .te-hist-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
[data-tool=typst_document_editor] .te-hist-actions form{margin:0}
@media (max-width:1180px){[data-tool=typst_document_editor] .te-divider{display:none}[data-tool=typst_document_editor] .te-main,[data-tool=typst_document_editor] .te-main[data-view]{grid-template-columns:180px minmax(0,1fr)}[data-tool=typst_document_editor] .te-main[data-view] .te-code-col,[data-tool=typst_document_editor] .te-main[data-view] .te-prev-col{display:flex}}
@media (max-width:820px){[data-tool=typst_document_editor] .te-main,[data-tool=typst_document_editor] .te-main[data-view]{grid-template-columns:minmax(0,1fr)}[data-tool=typst_document_editor] .te-seg{display:none}[data-tool=typst_document_editor] .te-hist-row{grid-template-columns:1fr 1fr}[data-tool=typst_document_editor] .te-hist-row>div{grid-column:1/-1}}

/* round 3 */
[data-tool=typst_document_editor] .te-opts{display:flex;flex-direction:column;gap:6px;padding:0 12px 12px}
[data-tool=typst_document_editor] .te-opts .te-check{margin:0;font-size:12.5px}
[data-tool=typst_document_editor] .te-opts small{color:var(--te-mute);font-size:11.5px;line-height:1.4}
[data-tool=typst_document_editor] .te-tablepop{padding:10px;border-bottom:1px solid var(--te-line);background:#18131f;display:flex;gap:14px;align-items:flex-start;flex-wrap:wrap}
[data-tool=typst_document_editor] .te-tgrid{display:grid;grid-template-columns:repeat(8,20px);gap:3px}
[data-tool=typst_document_editor] .te-tgrid button{width:20px;height:20px;padding:0;border:1px solid var(--te-line);border-radius:3px;background:#221c31}
[data-tool=typst_document_editor] .te-tgrid button.on{background:var(--te-purple);border-color:var(--te-gold)}
[data-tool=typst_document_editor] .te-trow{display:flex;flex-direction:column;gap:8px}
[data-tool=typst_document_editor] .te-trow b{font:800 18px var(--te-mono);color:#fff}
[data-tool=typst_document_editor] .te-refs{display:flex;flex-direction:column;gap:6px;max-height:34vh;overflow:auto;margin-bottom:10px}
[data-tool=typst_document_editor] .te-ref-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center;padding:8px 10px;border:1px solid var(--te-line);border-radius:10px;background:#1d1829}
[data-tool=typst_document_editor] .te-ref-row b{display:block;color:#fff;font-size:13px}
[data-tool=typst_document_editor] .te-ref-row small{color:var(--te-mute);font-size:12px}
[data-tool=typst_document_editor] .te-sub{margin:6px 0 8px;font-size:12px;text-transform:uppercase;letter-spacing:1px;color:var(--te-mute)}
[data-tool=typst_document_editor] .te-refform{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:12px}
[data-tool=typst_document_editor] .te-refform .te-wide{grid-column:1/-1}
[data-tool=typst_document_editor] .te-refform input,[data-tool=typst_document_editor] .te-refform select{width:100%}
@media (max-width:820px){[data-tool=typst_document_editor] .te-refform{grid-template-columns:1fr}}
