:root{--bg:#eef2f5;--panel:#fbfcfd;--panel-strong:#ffffff;--ink:#1f2937;--muted:#667085;--line:#d9e0e7;--accent:#1f8a70;--accent-dark:#176b57;--accent-soft:#e3f4ef;--warn:#c6841d;--shadow:0 18px 46px rgba(31,41,55,0.12);--pro:#315c9b;--pro-soft:#eef4ff;}*{box-sizing:border-box;}body{min-width:320px;margin:0;color:var(--ink);background:linear-gradient(180deg,rgba(255,255,255,0.7),rgba(238,242,245,0.9)),var(--bg);font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;}button,input,select{font:inherit;}button{border:0;}.app-shell{display:grid;min-height:100vh;grid-template-rows:auto 1fr auto;}.topbar{position:sticky;top:0;z-index:20;display:grid;grid-template-columns:auto minmax(180px,1fr) auto;gap:16px;align-items:center;padding:12px clamp(12px,3vw,28px);border-bottom:1px solid var(--line);background:rgba(251,252,253,0.94);backdrop-filter:blur(16px);}.brand{display:inline-flex;min-width:max-content;align-items:center;gap:10px;font-weight:700;}.brand-mark{display:grid;width:34px;height:34px;place-items:center;border-radius:8px;color:#ffffff;background:linear-gradient(135deg,var(--accent),#315c9b);box-shadow:0 8px 18px rgba(31,138,112,0.22);}.brand-name{white-space:nowrap;}.title-wrap{min-width:0;}.document-title{width:100%;height:38px;min-width:0;border:1px solid transparent;border-radius:8px;padding:0 12px;color:var(--ink);background:#f2f6f8;font-weight:650;outline:0;}.document-title:focus{border-color:var(--accent);background:#ffffff;box-shadow:0 0 0 3px rgba(31,138,112,0.16);}.actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px;}.icon-button,.tool-button{display:inline-grid;place-items:center;height:36px;min-width:36px;border:1px solid var(--line);border-radius:8px;color:var(--ink);background:#ffffff;cursor:pointer;transition:background 160ms ease,border-color 160ms ease,color 160ms ease,transform 160ms ease;}.icon-button:hover,.tool-button:hover,.select-control:hover,.color-control:hover{border-color:#aebbc8;background:#f7fafb;}.icon-button:active,.tool-button:active{transform:translateY(1px);}.icon-button:focus-visible,.tool-button:focus-visible,.select-control:focus-visible,.color-control:focus-within{outline:3px solid rgba(31,138,112,0.22);outline-offset:1px;}.icon-button svg,.tool-button svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.9;}.text-button{min-width:48px;padding:0 12px;font-size:0.9rem;font-weight:650;}.pro-button{border-color:#b9ccf0;color:#ffffff;background:var(--pro);}.workspace{display:grid;grid-template-rows:auto auto auto 1fr;min-height:0;}.toolbar{position:static;z-index:10;display:flex;flex-wrap:wrap;gap:8px;align-items:center;padding:10px clamp(12px,3vw,28px);border-bottom:1px solid var(--line);background:rgba(244,247,249,0.94);backdrop-filter:blur(16px);}.tabbar{position:static;z-index:9;display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:space-between;padding:8px clamp(12px,3vw,28px);border-bottom:1px solid var(--line);background:rgba(251,252,253,0.96);backdrop-filter:blur(16px);}.document-tabs,.tab-actions{display:flex;flex-wrap:wrap;gap:6px;align-items:center;}.document-tab,.tab-command{min-height:34px;border:1px solid var(--line);border-radius:8px;padding:0 12px;color:var(--ink);background:#ffffff;font-size:0.9rem;font-weight:700;cursor:pointer;}.document-tab{max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.document-tab.is-active{border-color:rgba(31,138,112,0.46);color:var(--accent-dark);background:var(--accent-soft);}.tab-command.primary{color:#ffffff;border-color:var(--accent);background:var(--accent);}.tab-command.danger{color:#9a3412;border-color:#fed7aa;background:#fff7ed;}.document-tab:hover,.tab-command:hover{border-color:#aebbc8;}.voice-button.is-recording{border-color:#ef4444;color:#b91c1c;background:#fef2f2;}.pro-panel{border-bottom:1px solid var(--line);padding:12px clamp(12px,3vw,28px) 16px;background:#f8fbff;}.pro-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px;}.pro-head div{display:flex;flex-wrap:wrap;align-items:baseline;gap:10px;}.pro-head strong{color:var(--pro);font-size:1.05rem;}.pro-head span{color:var(--muted);font-size:0.9rem;}.pro-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:10px;}.pro-section{border:1px solid #d7e3f7;border-radius:8px;padding:10px;background:#ffffff;}.pro-section h2{margin:0 0 8px;color:#1d3f73;font-size:0.95rem;}.pro-section button{min-height:32px;margin:0 6px 6px 0;border:1px solid #c8d7ef;border-radius:8px;padding:0 9px;color:#243b63;background:var(--pro-soft);font-size:0.86rem;font-weight:700;cursor:pointer;}.pro-section button:hover{border-color:#88a9db;background:#e1ecff;}.pro-output{min-height:40px;margin-top:10px;border:1px solid #d7e3f7;border-radius:8px;padding:10px 12px;color:#344054;background:#ffffff;line-height:1.6;white-space:pre-wrap;}.tool-group{display:flex;min-height:38px;align-items:center;gap:6px;padding-right:8px;border-right:1px solid var(--line);}.tool-group:last-child{border-right:0;}.table-tools{flex-wrap:wrap;}.tool-button.is-active{border-color:rgba(31,138,112,0.42);color:var(--accent-dark);background:var(--accent-soft);}.strong{font-weight:800;}.italic{font-style:italic;font-family:Georgia,serif;}.underline{text-decoration:underline;}.strike{text-decoration:line-through;}.small-text{min-width:44px;padding:0 8px;font-size:0.84rem;font-weight:700;}.select-control{height:36px;max-width:120px;border:1px solid var(--line);border-radius:8px;padding:0 28px 0 10px;color:var(--ink);background:#ffffff;outline:0;}.wide-select{max-width:132px;}.insert-select{max-width:132px;font-weight:700;}.swatches{gap:8px;}.color-control{display:grid;width:36px;height:36px;place-items:center;border:1px solid var(--line);border-radius:8px;background:#ffffff;cursor:pointer;}.color-control input{width:24px;height:24px;border:0;padding:0;background:transparent;cursor:pointer;}.mini-field{display:inline-flex;height:36px;align-items:center;gap:5px;border:1px solid var(--line);border-radius:8px;padding:0 7px;color:var(--muted);background:#ffffff;font-size:0.82rem;font-weight:700;}.mini-field input{width:42px;border:0;padding:0;color:var(--ink);background:transparent;font-weight:700;outline:0;}.workbench{display:grid;grid-template-columns:minmax(208px,264px) minmax(0,1fr);min-height:0;}.workspace.is-outline-hidden .workbench{grid-template-columns:minmax(0,1fr);}.workspace.is-outline-hidden .outliner-panel{display:none;}.outliner-panel{min-height:0;border-right:1px solid var(--line);background:rgba(251,252,253,0.8);overflow:auto;}.outliner-header{position:sticky;top:0;z-index:1;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:14px 14px 8px;background:rgba(251,252,253,0.95);backdrop-filter:blur(10px);}.outliner-header .tool-button{width:30px;height:30px;min-width:30px;}.outline-list{display:grid;gap:3px;list-style:none;margin:0;padding:4px 10px 16px;}.outline-button{display:block;width:100%;border:1px solid transparent;border-radius:8px;padding:8px 10px;color:var(--ink);background:transparent;text-align:left;line-height:1.35;cursor:pointer;}.outline-button:hover,.outline-button.is-current{border-color:rgba(31,138,112,0.24);background:var(--accent-soft);}.outline-button.level-2{padding-left:24px;color:#344054;}.outline-button.level-3{padding-left:40px;color:var(--muted);font-size:0.92rem;}.outline-empty{padding:12px 10px;color:var(--muted);font-size:0.9rem;}.editor-stage{min-height:0;padding:clamp(18px,3.5vw,42px);overflow:auto;}.editor{width:min(100%,820px);min-height:min(1120px,calc(100vh - 206px));margin:0 auto;padding:clamp(28px,5vw,72px);border:1px solid #e4e8ed;border-radius:8px;background:var(--panel-strong);box-shadow:var(--shadow);line-height:1.8;outline:0;}.editor:focus{border-color:rgba(31,138,112,0.45);box-shadow:var(--shadow),0 0 0 4px rgba(31,138,112,0.11);}.editor h1,.editor h2,.editor h3{line-height:1.28;margin:0.7em 0 0.4em;}.editor h1{font-size:2rem;}.editor h2{font-size:1.55rem;}.editor h3{font-size:1.25rem;}.editor p,.editor ul,.editor ol,.editor blockquote{margin:0 0 1em;}.editor blockquote{border-left:4px solid var(--accent);padding:6px 0 6px 16px;color:#3f4a59;background:#f7fbf9;}.editor hr{height:1px;border:0;margin:2rem 0;background:var(--line);}.editor .page-break{display:flex;align-items:center;gap:12px;margin:2rem 0;color:var(--muted);font-size:0.84rem;font-weight:700;letter-spacing:0;user-select:none;}.editor .page-break::before,.editor .page-break::after{content:"";height:1px;flex:1;background:repeating-linear-gradient(90deg,#b9c5d0 0 8px,transparent 8px 14px);}.editor .page-number{display:inline-flex;align-items:center;min-height:1.8em;border:1px solid #c8d2dc;border-radius:8px;padding:0 8px;color:#315c9b;background:#f4f8ff;font-size:0.92em;font-weight:700;white-space:nowrap;}.editor table{width:100%;border-collapse:collapse;table-layout:fixed;margin:1.2rem 0;overflow:hidden;}.editor th,.editor td{min-width:64px;border:1px solid #bfc9d4;padding:8px 10px;vertical-align:top;overflow-wrap:anywhere;word-break:break-word;}.editor th{background:#f1f7f5;font-weight:700;}.editor figure.image-block{margin:1.4rem 0;}.editor figure.image-block img,.editor img{display:block;max-width:100%;height:auto;border-radius:8px;}.editor figure.image-block figcaption{margin-top:6px;color:var(--muted);font-size:0.9rem;text-align:center;}.editor.is-dragging{border-color:var(--accent);box-shadow:var(--shadow),0 0 0 4px rgba(31,138,112,0.16);}.statusbar{display:flex;min-height:38px;align-items:center;justify-content:space-between;gap:12px;padding:8px clamp(12px,3vw,28px);border-top:1px solid var(--line);color:var(--muted);background:var(--panel);font-size:0.88rem;}.sr-only{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;}@media (max-width:760px){.topbar{position:static;grid-template-columns:1fr;gap:10px;}.actions{justify-content:flex-start;}.workbench{grid-template-columns:1fr;}.outliner-panel{max-height:220px;border-right:0;border-bottom:1px solid var(--line);}.tool-group{border-right:0;padding-right:0;}.editor-stage{padding:12px;}.editor{min-height:calc(100vh - 258px);padding:24px 18px;}}@media print{body{background:#ffffff;}.topbar,.toolbar,.tabbar,.pro-panel,.outliner-panel,.statusbar{display:none;}.app-shell,.workspace,.workbench,.editor-stage{display:block;padding:0;}.editor{width:auto;min-height:0;margin:0;padding:0;border:0;box-shadow:none;}.editor .page-break{display:block;height:0;margin:0;overflow:hidden;break-after:page;page-break-after:always;}.editor .page-break::before,.editor .page-break::after{content:none;}.editor .page-number{border:0;padding:0;color:inherit;background:transparent;}}