
/* Everflow Paper Studio v2 presentation layer; browser pagination overrides live below. */
:root{--ps-ui-bg:#f6f7f4;--ps-ui-panel:#fff;--ps-ui-muted:#6d7a72;--ps-ui-ink:#27342d;--ps-ui-border:#dfe5df;--ps-ui-surface:#eff2ed;--ps-ui-accent:#315d4d;--ps-ui-accent-soft:#e8f1e9}
body.editor-page{--tex-chrome:#fff;--tex-chrome-2:#f6f7f5;--tex-chrome-3:#edf1eb;--tex-border:var(--ps-ui-border);--tex-muted:var(--ps-ui-muted);--red:var(--ps-ui-accent);--navigator-w:244px;--editor-w:470px;background:var(--ps-ui-bg)!important;color:var(--ps-ui-ink)}
body.editor-page.dark{--ps-ui-bg:#121916;--ps-ui-panel:#1c2620;--ps-ui-muted:#a9b5ab;--ps-ui-ink:#e8f1e9;--ps-ui-border:#35463b;--ps-ui-surface:#243027;--ps-ui-accent:#94c6a6;--ps-ui-accent-soft:#273b2d}
body.editor-page .texpage-topbar{
  height:60px!important;min-height:60px!important;background:var(--ps-ui-panel)!important;color:var(--ps-ui-ink)!important;
  border-bottom:1px solid var(--ps-ui-border)!important;padding:0 18px!important;gap:14px!important;
  box-shadow:0 2px 12px #263a2d0a!important
}
body.editor-page .texpage-topbar .brand{color:var(--ps-ui-ink)!important;font-size:16px!important;font-weight:750!important}
body.editor-page .texpage-topbar .brand small{color:var(--ps-ui-muted)!important;font-size:10px!important;font-weight:550!important;letter-spacing:0!important}
body.editor-page .texpage-topbar .brand-mark{height:35px!important;width:35px!important;border-radius:11px!important;background:#315d4d!important;color:white!important;font:700 20px Georgia,serif!important}
body.editor-page .texpage-topbar .local-pill{border-color:var(--ps-ui-border)!important;background:var(--ps-ui-surface)!important;color:var(--ps-ui-muted)!important;font-size:11px!important}
body.editor-page .texpage-topbar .save-state{color:var(--ps-ui-muted)!important;font-size:11px!important}
body.editor-page .texpage-topbar .ghost-btn,
body.editor-page .texpage-topbar .icon-text-btn{
  min-height:36px!important;height:36px!important;background:var(--ps-ui-panel)!important;color:var(--ps-ui-ink)!important;
  border:1px solid var(--ps-ui-border)!important;border-radius:10px!important;font-size:12px!important;padding:0 11px!important
}
body.editor-page .texpage-topbar .icon-text-btn{min-width:36px!important;padding:0 7px!important}
body.editor-page .texpage-topbar .ghost-btn:hover,
body.editor-page .texpage-topbar .icon-text-btn:hover{background:var(--ps-ui-accent-soft)!important}
body.editor-page .texpage-topbar #templateButton{background:var(--ps-ui-accent-soft)!important;color:var(--ps-ui-ink)!important;border-color:var(--ps-ui-border)!important;max-width:245px}
body.editor-page .texpage-topbar #templateButtonLabel{font-size:12px!important}
body.editor-page .texpage-topbar .primary-btn{background:#315d4d!important;color:#fff!important;border:1px solid #315d4d!important;border-radius:10px!important;min-height:36px!important}
body.editor-page .template-popover{background:var(--ps-ui-panel)!important;color:var(--ps-ui-ink)!important;border:1px solid var(--ps-ui-border)!important;box-shadow:0 20px 52px #18281b25!important;border-radius:15px!important;z-index:150!important}
body.editor-page .template-popover .template-popover-head{color:var(--ps-ui-ink)!important}
body.editor-page .texpage-workbench{height:calc(100dvh - 60px)!important;background:var(--ps-ui-bg)!important}
body.editor-page .texpage-navigator{background:var(--ps-ui-panel)!important;border-right:1px solid var(--ps-ui-border)!important;color:var(--ps-ui-ink)}
body.editor-page .navigator-head{min-height:72px!important;height:72px!important;padding:12px 15px!important;background:var(--ps-ui-panel)!important;border-color:var(--ps-ui-border)!important}
body.editor-page .navigator-title span{font-size:10px!important;letter-spacing:.13em!important;color:var(--ps-ui-muted)!important}
body.editor-page .navigator-title strong{margin-top:5px!important;font-size:13px!important;color:var(--ps-ui-ink)!important}
body.editor-page .navigator-head>b{background:var(--ps-ui-accent-soft)!important;color:var(--ps-ui-accent)!important;border-radius:8px!important;font-size:12px!important}
body.editor-page .navigator-tabs{background:var(--ps-ui-panel)!important;border-color:var(--ps-ui-border)!important;padding:8px!important;gap:6px!important}
body.editor-page .navigator-tabs button{height:35px!important;font-size:12px!important;color:var(--ps-ui-muted)!important;border-radius:8px!important}
body.editor-page .navigator-tabs button[aria-selected="true"]{background:var(--ps-ui-accent-soft)!important;color:var(--ps-ui-ink)!important;box-shadow:none!important}
body.editor-page .texpage-navigator .order-toolbar{min-height:48px!important;padding:8px 12px!important;background:var(--ps-ui-panel)!important;border-color:var(--ps-ui-border)!important}
body.editor-page .texpage-navigator .order-toolbar strong{font-size:12px!important;color:var(--ps-ui-ink)!important}
body.editor-page .texpage-navigator .order-toolbar-actions .text-btn{min-height:31px!important;font-size:11px!important;padding:0 6px!important;color:var(--ps-ui-accent)!important}
body.editor-page #outlinePanel .order-list{padding:8px!important}
body.editor-page .texpage-navigator .order-item{min-height:52px!important;padding:7px 7px!important;border-radius:9px!important}
body.editor-page .texpage-navigator .order-item:hover{background:var(--ps-ui-surface)!important}
body.editor-page .texpage-navigator .order-item.is-selected{background:var(--ps-ui-accent-soft)!important;box-shadow:inset 3px 0 0 #487d62!important}
body.editor-page .texpage-navigator .order-item.is-multi-selected{background:#faf1e5!important;box-shadow:inset 3px 0 0 #b98d54!important}
body.editor-page .texpage-navigator .order-copy b{font-size:12px!important;color:var(--ps-ui-ink)!important;font-weight:650!important}
body.editor-page .texpage-navigator .order-copy small{font-size:10px!important;color:var(--ps-ui-muted)!important}
body.editor-page .texpage-navigator .order-num{font-size:11px!important;color:var(--ps-ui-accent)!important}
body.editor-page .texpage-navigator .order-controls{opacity:1!important}
body.editor-page .texpage-navigator .order-controls button{height:28px!important;width:26px!important;border-radius:7px!important}
body.editor-page #settingsPanel .paper-settings{padding:17px!important}
body.editor-page #settingsPanel .paper-settings label{font-size:12px!important}
body.editor-page #settingsPanel .paper-settings input{min-height:38px!important;font-size:12px!important;border:1px solid var(--ps-ui-border)!important;border-radius:9px!important;background:var(--ps-ui-panel)!important;color:var(--ps-ui-ink)!important}
body.editor-page .navigator-actions{border-color:var(--ps-ui-border)!important}
body.editor-page .navigator-actions .text-btn{font-size:11px!important}
body.editor-page .pane-resizer{background:var(--ps-ui-border)!important}
body.editor-page .pane-resizer:hover,body.editor-page .pane-resizer.is-dragging{background:#83af8f!important}
body.editor-page .texpage-editor-pane{background:var(--ps-ui-panel)!important;border-right-color:var(--ps-ui-border)!important}
body.editor-page .pane-tabbar{height:48px!important;flex:0 0 48px!important;background:var(--ps-ui-panel)!important;color:var(--ps-ui-ink)!important;border-color:var(--ps-ui-border)!important;align-items:center!important;padding:0 14px!important}
body.editor-page .editor-tab{height:38px!important;max-width:80%!important;background:var(--ps-ui-panel)!important;color:var(--ps-ui-ink)!important;margin:0!important;padding:0 4px!important;border-radius:0!important}
body.editor-page .editor-tab strong{font-size:13px!important}
body.editor-page .tab-dot{background:#63a37a!important;width:7px!important;height:7px!important}
body.editor-page .local-state{font-size:11px!important;color:var(--ps-ui-muted)!important}
body.editor-page .editor-commandbar{min-height:60px!important;padding:10px 17px!important;background:var(--ps-ui-panel)!important;border-color:var(--ps-ui-border)!important}
body.editor-page .editor-commandbar strong{font-size:14px!important;color:var(--ps-ui-ink)!important}
body.editor-page .editor-commandbar span{font-size:10px!important;max-width:270px!important;color:var(--ps-ui-muted)!important}
body.editor-page .editor-command-actions .text-btn{min-height:32px!important;font-size:11px!important;padding:0 9px!important;border:1px solid var(--ps-ui-border)!important;border-radius:8px!important;color:var(--ps-ui-accent)!important}
body.editor-page .texpage-question-editor{background:var(--ps-ui-panel)!important;color:var(--ps-ui-ink)!important;padding:24px 25px 75px!important}
body.editor-page .texpage-question-editor .question-editor-head{top:-24px!important;margin:0 -25px 20px!important;padding:14px 25px!important;background:var(--ps-ui-panel)!important;border-color:var(--ps-ui-border)!important}
body.editor-page .texpage-question-editor .question-editor-head h3{color:var(--ps-ui-ink)!important;font-size:17px!important;letter-spacing:-.025em}
body.editor-page .texpage-question-editor label{color:var(--ps-ui-text,var(--ps-ui-muted))!important;font-size:12px!important;font-weight:650!important;line-height:1.7!important;margin-bottom:18px!important}
body.editor-page .texpage-question-editor input,
body.editor-page .texpage-question-editor select,
body.editor-page .texpage-question-editor textarea{
  border:1px solid var(--ps-ui-border)!important;border-radius:10px!important;
  background:var(--ps-ui-panel)!important;color:var(--ps-ui-ink)!important;
  box-shadow:none!important
}
body.editor-page .texpage-question-editor textarea{
  min-height:250px!important;padding:14px 15px!important;font-family:"SFMono-Regular","Cascadia Code","Consolas","Everflow Song",monospace!important;
  font-size:13px!important;line-height:1.95!important;letter-spacing:0!important
}
body.editor-page .texpage-question-editor input,body.editor-page .texpage-question-editor select{min-height:40px!important;font-size:12px!important}
body.editor-page .texpage-question-editor textarea:focus,
body.editor-page .texpage-question-editor input:focus,
body.editor-page .texpage-question-editor select:focus{
  outline:2px solid #568f6a24!important;border-color:#64987a!important;box-shadow:none!important
}
body.editor-page .texpage-question-editor .option-editor b{color:var(--ps-ui-accent)!important;font-size:12px!important}
body.editor-page .texpage-preview-pane{background:#e9ece7!important}
body.editor-page .preview-toolbar{
  height:52px!important;flex:0 0 52px!important;background:var(--ps-ui-panel)!important;
  border-color:var(--ps-ui-border)!important;color:var(--ps-ui-ink)!important;
  padding:0 13px!important;gap:9px!important
}
body.editor-page .preview-toolbar-left strong{font-size:12px!important;max-width:190px!important;color:var(--ps-ui-ink)!important}
body.editor-page .preview-toolbar .preview-chip{height:26px!important;min-height:26px!important;border-color:var(--ps-ui-border)!important;border-radius:7px!important;background:var(--ps-ui-surface)!important;color:var(--ps-ui-muted)!important;font-size:10px!important}
body.editor-page .viewer-btn,body.editor-page .zoom-indicator{height:34px!important;min-width:32px!important;border-radius:8px!important;color:var(--ps-ui-ink)!important;font-size:13px!important}
body.editor-page .zoom-indicator{min-width:55px!important;font-size:11px!important}
body.editor-page .fit-btn{min-width:47px!important;font-size:11px!important}
body.editor-page .viewer-btn:hover,body.editor-page .zoom-indicator:hover{background:var(--ps-ui-accent-soft)!important}
body.editor-page .page-indicator{font-size:11px!important;min-width:62px!important;color:var(--ps-ui-muted)!important}
body.editor-page .toolbar-divider{background:var(--ps-ui-border)!important}
body.editor-page .preview-toolbar #browserPrintButton{min-height:35px!important;height:35px!important;border-radius:9px!important;padding:0 14px!important;font-size:12px!important;background:#315d4d!important;border-color:#315d4d!important;color:#fff!important}
body.editor-page .preview-toolbar #printButton{min-height:35px!important;height:35px!important;border-radius:9px!important;padding:0 11px!important;font-size:11px!important;background:var(--ps-ui-panel)!important;border-color:var(--ps-ui-border)!important;color:var(--ps-ui-ink)!important}
body.editor-page .preview-status-dot{background:#61a57b!important;width:7px!important;height:7px!important}
body.editor-page .texpage-preview-pane .pdf-status{background:var(--ps-ui-panel)!important;border-color:var(--ps-ui-border)!important;color:var(--ps-ui-muted)!important;font-size:11px!important;padding:9px 14px!important}
body.editor-page .texpage-preview-pane .typst-preview{background:#e9ece7!important;gap:22px!important;padding:30px 22px 64px!important}
body.editor-page.dark .texpage-preview-pane,body.editor-page.dark .texpage-preview-pane .typst-preview{background:#131d17!important}
body.editor-page .texpage-preview-pane .typst-preview > section.typst-page{box-shadow:0 12px 35px #25372a20!important;border:1px solid #d7ded8!important;border-radius:3px!important}
body.editor-page .template-popover .template-option{color:var(--ps-ui-ink)!important}
body.editor-page .template-popover .template-option.is-active{background:var(--ps-ui-accent-soft)!important}
body.editor-page button:focus-visible,body.editor-page a:focus-visible{outline:2px solid #6ba486!important;outline-offset:2px}
@media(min-width:1180px){
  body.editor-page .texpage-workbench{grid-template-columns:var(--navigator-w) 5px minmax(360px,var(--editor-w)) 5px minmax(420px,1fr)!important}
}
@media(min-width:768px) and (max-width:1179px){
  body.editor-page .texpage-workbench{height:calc(100dvh - 60px)!important}
  body.editor-page .texpage-navigator{top:60px!important}
  body.editor-page .workbench-backdrop{inset:60px 0 0!important}
  body.editor-page .preview-toolbar-left strong{max-width:132px!important}
  body.editor-page .texpage-question-editor{padding:20px 17px 50px!important}
  body.editor-page .texpage-question-editor .question-editor-head{top:-20px!important;margin:0 -17px 14px!important;padding:12px 17px!important}
}
@media(max-width:767px){
  body.editor-page .texpage-topbar{
    height:92px!important;min-height:92px!important;
    display:grid!important;grid-template-columns:1fr!important;grid-template-rows:35px 41px!important;
    gap:4px!important;align-content:center!important;padding:5px 9px!important
  }
  body.editor-page .texpage-topbar .editor-brand-wrap{height:35px!important;max-width:100%!important}
  body.editor-page .texpage-topbar .brand>span:last-child{display:block!important;font-size:13px!important}
  body.editor-page .texpage-topbar .brand small{display:none!important}
  body.editor-page .texpage-topbar .editor-top-actions{
    justify-content:flex-start!important;overflow-x:auto!important;overflow-y:visible!important;
    min-height:40px!important;gap:6px!important
  }
  body.editor-page .texpage-topbar .save-state,body.editor-page .texpage-topbar .local-pill,body.editor-page .texpage-topbar .history-actions{display:none!important}
  body.editor-page #saveProjectButton{display:inline-flex!important;flex:0 0 auto!important}
  body.editor-page .texpage-topbar #templateButton{height:36px!important;min-height:36px!important;max-width:180px!important;padding:0 9px!important}
  body.editor-page .texpage-topbar #templateButtonLabel{font-size:11px!important}
  body.editor-page .mobile-mode-switch{display:flex!important;flex:0 0 auto!important}
  body.editor-page .mobile-mode-switch button{height:36px!important;min-height:36px!important;font-size:12px!important}
  body.editor-page .mobile-pdf-btn{height:36px!important;min-height:36px!important;font-size:12px!important}
  body.editor-page .texpage-workbench{height:calc(100dvh - 92px)!important}
  body.editor-page .texpage-navigator{top:92px!important;width:min(330px,90vw)!important}
  body.editor-page .workbench-backdrop{inset:92px 0 0!important}
  body.editor-page .template-popover{top:92px!important;left:8px!important;right:8px!important;max-height:calc(100dvh - 102px)!important}
  body.editor-page .pane-tabbar{height:44px!important;flex-basis:44px!important;padding-inline:12px!important}
  body.editor-page .editor-commandbar{min-height:52px!important;padding:7px 12px!important}
  body.editor-page .editor-commandbar strong{font-size:12px!important}
  body.editor-page .texpage-question-editor{padding:15px 13px calc(74px + env(safe-area-inset-bottom))!important}
  body.editor-page .texpage-question-editor .question-editor-head{top:-15px!important;margin:0 -13px 15px!important;padding:11px 13px!important}
  body.editor-page .texpage-question-editor textarea{min-height:180px!important;font-size:16px!important;line-height:1.8!important}
  body.editor-page .texpage-question-editor input,body.editor-page .texpage-question-editor select{font-size:16px!important}
  body.editor-page .preview-toolbar{height:48px!important;flex-basis:48px!important;padding:0 8px!important}
  body.editor-page .preview-toolbar-left strong{max-width:36vw!important;font-size:11px!important}
  body.editor-page .preview-toolbar-center{background:var(--ps-ui-panel)!important;border:1px solid var(--ps-ui-border)!important;border-radius:13px!important;box-shadow:0 8px 30px #172a1e32!important;padding:5px 7px!important}
  body.editor-page .preview-toolbar #browserPrintButton{min-height:34px!important;height:34px!important;padding:0 11px!important;font-size:11px!important}
  body.editor-page .texpage-preview-pane .typst-preview{padding:10px 6px calc(75px + env(safe-area-inset-bottom))!important;gap:10px!important}
}
@media(prefers-reduced-motion:reduce){body.editor-page *,body.editor-page *:before,body.editor-page *:after{transition:none!important;animation:none!important}}
