:root{--bg:#f5f3ed;--surface:#fffefa;--ink:#242929;--dim:#68716f;--line:#dfddd4;--accent:#236e67;--accent-dark:#12574e;--serif:Georgia,'Times New Roman',serif;--sans:Inter,system-ui,-apple-system,'Segoe UI',sans-serif}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:var(--sans);font-size:14px;-webkit-font-smoothing:antialiased}button,input,textarea,select{font:inherit}button{cursor:pointer}button:disabled{opacity:.45;cursor:not-allowed}h1,h2,h3,p{margin:0}h1,h2,h3{font-family:var(--serif);font-weight:500}.app{display:grid;grid-template-columns:240px minmax(0,1fr);min-height:100vh}.sidebar{background:#172321;color:#edf3eb;display:flex;flex-direction:column;gap:14px;padding:24px 14px;min-height:100vh;position:sticky;top:0;height:100vh;overflow:auto}.sidebar-heading{display:flex;gap:10px;align-items:center;padding:6px 8px 14px}.brand-mark{background:#caa871;border-radius:14px;color:#192320;font-family:var(--serif);font-weight:700;font-size:35px;width:70px;height:70px;display:grid;place-items:center}.brand-mark.small{width:36px;height:36px;border-radius:10px;font-size:23px}.brand-name{font-family:var(--serif);letter-spacing:.15em;font-size:21px}.muted{color:var(--dim)}.sidebar .muted{color:#aebbb5}.tiny{font-size:11px}.sidebar-label{font-size:10px;letter-spacing:.16em;color:#91a59f;padding:14px 10px 4px}.sidebar-bottom{margin-top:auto;display:flex;flex-direction:column;gap:6px}.sidebar button{border-radius:9px}.sidebar nav{display:grid;gap:5px}.project-btn{width:100%;text-align:left;line-height:1.35;color:#c8d4cd;border:1px solid transparent;background:transparent;padding:11px 10px}.project-btn:hover{background:#253934}.project-btn.active{background:#294a43;border-color:#477467;color:#fff}.project-btn small{display:block;color:#a8bbb4;font-size:10px;margin-top:3px}.quiet{background:transparent;color:#d4ddd7;padding:9px 12px;border:0;text-align:left}.quiet:hover{background:#263934}.primary{background:var(--accent);color:white;border:1px solid var(--accent);border-radius:9px;padding:10px 16px;font-weight:600}.primary:hover{background:var(--accent-dark)}.sidebar .primary{background:#cfb079;border-color:#cfb079;color:#1b2b25}.wide{width:100%}.outline{background:var(--surface);color:#31584f;border:1px solid #c5d1c9;padding:9px 13px;border-radius:9px}.outline:hover{border-color:var(--accent);background:#f1f8f4}.top{height:85px;background:var(--surface);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:16px clamp(20px,4vw,56px);gap:10px;position:sticky;top:0;z-index:4}.top-title h1{font-size:26px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:min(52vw,650px)}.eyebrow{font-size:10px;font-weight:700;letter-spacing:.17em;color:#7c9690}.status-label{font-size:12px;color:#687d76;white-space:nowrap}.workspace{padding:28px clamp(16px,4vw,56px) 80px;max-width:1650px;margin:auto;display:grid;gap:22px}.card{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:26px;box-shadow:0 2px 12px #26382c08}.section-heading{display:flex;justify-content:space-between;align-items:start;gap:12px;margin-bottom:19px}.section-heading h2{font-size:27px;margin-bottom:5px}.section-heading p{color:var(--dim);font-size:13px;max-width:760px}.pill{border-radius:30px;border:1px solid #d6e1d9;padding:6px 10px;color:#3e7664;background:#f5faf6;font-size:11px;white-space:nowrap}.pill.darker{background:#ebe8e1;color:#60665f;border-color:#ebe8e1}.field-grid{display:grid;grid-template-columns:2fr 1fr 1fr;gap:14px;margin-bottom:17px}label{display:flex;flex-direction:column;gap:6px;font-size:12px;color:#526b64;font-weight:650}input,textarea,select{border:1px solid #d0d5cf;border-radius:9px;color:#283734;background:#fff;outline:none;padding:11px 12px;width:100%}input:focus,textarea:focus,select:focus{border-color:var(--accent);box-shadow:0 0 0 3px #236e671a}textarea{resize:vertical;line-height:1.6;font-family:var(--serif);font-size:16px}select{cursor:pointer}.action-row{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-top:14px}.actions-right{display:flex;gap:7px;justify-content:flex-end;flex-wrap:wrap}.compare-toolbar{display:flex;justify-content:space-between;align-items:end;flex-wrap:wrap;gap:15px;margin-bottom:17px}.compare-toolbar>label{min-width:min(380px,100%)}.models-chooser{display:flex;flex-wrap:wrap;gap:8px}.model-chip{border:1px solid #d1d9d4;background:#fff;color:#66746e;border-radius:30px;padding:7px 10px;font-size:12px}.model-chip.active{background:#e3efea;border-color:#9dc4b3;color:#1f6252}.model-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.model-card{background:#fdfcf7;border:1px solid var(--line);border-radius:11px;display:flex;flex-direction:column;min-height:300px;max-height:510px;overflow:hidden}.model-head{padding:12px 14px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #ebe9e1;gap:8px}.model-head strong{font:600 17px var(--serif)}.model-head button{background:transparent;border:0;color:#397567;font-size:12px}.model-text{font:15px/1.7 var(--serif);white-space:pre-wrap;overflow-y:auto;overflow-wrap:anywhere;padding:15px;flex:1}.model-actions{display:flex;gap:8px;border-top:1px solid #ebe9e1;padding:9px 12px}.model-actions button{font-size:11px;border:1px solid #d2dfd5;border-radius:7px;background:#f6f9f5;padding:7px 9px;color:#386e60}.empty-results{padding:36px;color:var(--dim);background:#f7f6f1;text-align:center;grid-column:1/-1;border-radius:10px;line-height:1.7}.draft-input{width:100%;min-height:320px;background:#fffdf8;font-size:17px;line-height:1.72}.toast{position:fixed;bottom:22px;right:22px;border-radius:10px;padding:13px 18px;background:#182c25;color:white;box-shadow:0 5px 30px #1d332b33;z-index:30;max-width:min(430px,90vw)}.toast[hidden]{display:none}.icon-button{display:none;background:transparent;border:0;color:var(--ink);font-size:20px}.login-page{display:grid;place-items:center;min-height:100vh;padding:24px;background:linear-gradient(135deg,#132a25,#203b32)}.login-card{width:min(410px,100%);border-radius:16px;padding:42px;background:#fefdf9;box-shadow:0 20px 80px #0005;text-align:center}.login-card .brand-mark{margin:auto auto 20px}.login-card h1{font-size:40px;letter-spacing:.09em}.login-card>p{color:var(--dim);margin:4px 0 25px}.login-card form{text-align:left;display:grid;gap:12px}.login-card .primary{width:100%;margin:4px 0}.login-card small{color:var(--dim)}.error-text{color:#a33333!important;margin:12px!important}@media(max-width:1000px){.model-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.field-grid{grid-template-columns:1fr 1fr}.field-grid>label:first-child{grid-column:1/-1}.sidebar{width:218px}.app{grid-template-columns:218px minmax(0,1fr)}}@media(max-width:700px){.app{display:block}.sidebar{position:fixed;left:-260px;top:0;z-index:20;width:250px;transition:left .2s;height:100dvh}.sidebar.open{left:0}.icon-button{display:block}.top{padding:12px 16px;height:70px}.top-title h1{font-size:21px;max-width:55vw}.workspace{padding:13px 12px 75px;gap:14px}.card{padding:15px}.section-heading h2{font-size:24px}.field-grid,.model-grid{grid-template-columns:1fr}.field-grid>label:first-child{grid-column:auto}.model-card{max-height:480px;min-height:200px}.status-label{font-size:10px}.action-row{align-items:stretch}.actions-right{justify-content:flex-start}.actions-right button{font-size:11px}.draft-input{min-height:350px}.top .eyebrow{font-size:9px}}@media(prefers-color-scheme:dark){/* Deliberately keep consistent light manuscript surfaces for reading */}

/* Creative Studio: longer Russian brand and two-letter monogram. */
.brand-name{letter-spacing:.015em;font-size:16px;line-height:1.16;overflow-wrap:normal}.brand-mark{font-size:27px}.brand-mark.small{font-size:15px;letter-spacing:-.07em}.login-card h1{font-size:30px;letter-spacing:.015em;line-height:1.15}

/* Creative Studio writing mode: five authors ABOVE, author's draft BELOW. */
:root{--authors-share:39%}
.pane-height-control{display:none;flex-direction:row;align-items:center;gap:7px;white-space:nowrap;font-size:11px;font-weight:600}
.pane-height-control input{width:115px;padding:0;accent-color:var(--accent);box-shadow:none}
.pane-height-control span{min-width:32px;color:var(--dim);font-variant-numeric:tabular-nums}
.focus-toggle{white-space:nowrap;font-weight:650}
/* Normal reading mode also avoids huge source cards. */
.model-card{max-height:350px}
.compare-focus{height:100dvh;overflow:hidden}
.compare-focus .app{grid-template-columns:minmax(0,1fr);height:100dvh;min-height:0}
.compare-focus .sidebar,.compare-focus .compose{display:none}
.compare-focus .main-area{height:100dvh;min-height:0;min-width:0;display:flex;flex-direction:column;overflow:hidden}
.compare-focus .top{height:61px;min-height:61px;position:relative;padding:7px 19px}
.compare-focus .top-title h1{font-size:22px}
.compare-focus .workspace{flex:1;min-height:0;width:100%;max-width:none;padding:9px 14px 12px;gap:10px;display:grid;grid-template-rows:minmax(0,var(--authors-share)) minmax(0,1fr);overflow:hidden}
.compare-focus .results,.compare-focus .draft{min-height:0;min-width:0;display:flex;flex-direction:column;overflow:hidden;padding:11px 14px}
.compare-focus .results .section-heading,.compare-focus .draft .section-heading{margin:0 0 7px;align-items:center;flex:0 0 auto}
.compare-focus .section-heading h2{font-size:21px;margin:0}
.compare-focus .section-heading p{display:none}
.compare-focus .compare-toolbar{margin:0 0 7px;align-items:center;justify-content:space-between;gap:8px;flex:0 0 auto}
.compare-focus .compare-toolbar>label{min-width:0;flex:1;max-width:460px;flex-direction:row;align-items:center}
.compare-focus .compare-toolbar>label select{min-width:0;flex:1;padding:6px 8px;font-size:12px}
.compare-focus .models-chooser{display:none}
.compare-focus .pane-height-control{display:flex}
.compare-focus .model-grid{flex:1;min-height:0;min-width:0;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}
.compare-focus .model-card{height:100%;min-height:0;max-height:none;min-width:0}
.compare-focus .model-head{padding:6px 9px;flex:0 0 auto}
.compare-focus .model-head strong{font-size:15px}
.compare-focus .model-text{font-size:13.5px;line-height:1.55;padding:9px 10px;min-height:0}
.compare-focus .model-actions{flex:0 0 auto;padding:6px;gap:5px;flex-wrap:wrap}
.compare-focus .model-actions button{font-size:10px;padding:5px 7px}
.compare-focus .draft .draft-input{flex:1;min-height:0;height:100%;width:100%;resize:none;font-size:16px;line-height:1.65;padding:12px 15px}
.compare-focus .draft .action-row{flex:0 0 auto;margin-top:7px;gap:5px}
.compare-focus .draft .actions-right{gap:5px}
.compare-focus .draft .actions-right button{font-size:11px;padding:6px 9px}
@media(max-width:1180px){
 .compare-focus .model-grid{display:flex;min-width:0;overflow-x:auto;scroll-snap-type:x mandatory;overscroll-behavior-x:contain;padding-bottom:7px}
 .compare-focus .model-card{flex:0 0 255px;scroll-snap-align:start}
}
@media(max-width:700px){
 .compare-focus{height:auto;overflow:auto}
 .compare-focus .app,.compare-focus .main-area{height:auto;min-height:100dvh;display:block;overflow:visible}
 .compare-focus .top{height:63px;min-height:63px;padding:8px 10px;position:sticky;top:0}
 .compare-focus .top-title h1{font-size:18px}
 .compare-focus .workspace{display:flex;flex-direction:column;gap:10px;min-height:0;height:auto;overflow:visible;padding:10px 8px 40px}
 .compare-focus .results,.compare-focus .draft{overflow:visible;padding:10px}
 .compare-focus .results .section-heading,.compare-focus .draft .section-heading{margin-bottom:9px}
 .compare-focus .compare-toolbar{align-items:stretch;flex-wrap:wrap}
 .compare-focus .compare-toolbar>label{flex:1 0 100%;max-width:none}
 .compare-focus .pane-height-control{display:none}
 .compare-focus .model-grid{height:35dvh;min-height:230px;flex:0 0 auto;overflow-x:auto}
 .compare-focus .model-card{height:100%;flex:0 0 min(82vw,330px)}
 .compare-focus .draft .draft-input{height:45dvh;min-height:300px;resize:vertical}
 .compare-focus .draft .actions-right button{font-size:11px}
}
@media(max-height:700px) and (min-width:701px){
 .compare-focus .top{height:51px;min-height:51px}
 .compare-focus .section-heading h2{font-size:19px}
 .compare-focus .results,.compare-focus .draft{padding:7px 10px}
 .compare-focus .workspace{padding:6px 10px;gap:7px}
}

/* v4: voice input */
.source-label-row{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px;margin:5px 0 8px}
.source-label-row label{margin:0}.voice-controls{display:flex;gap:7px;flex-wrap:wrap}
.voice-controls button{font-size:12px;padding:8px 10px}
.voice-controls #record-btn{color:#9a3934}.voice-controls #record-btn:focus-visible{outline:2px solid #a33e36}
.voice-panel{margin-top:7px;display:grid;gap:6px}.voice-status{font-size:12px;color:#31584f;min-height:21px;line-height:1.6}
.voice-disclosure{font-size:11px;color:var(--dim);line-height:1.5}
.voice-saved{display:grid;gap:8px}.voice-note{border:1px solid #e0e4db;padding:9px 11px;border-radius:9px;display:grid;grid-template-columns:1fr;gap:5px}
.voice-note audio{width:min(100%,420px);height:34px}.voice-note-buttons{display:flex;gap:10px;align-items:center}.voice-note-buttons a{color:#236e67;font-size:12px}.voice-note-buttons button{padding:4px 9px}
.mobile-model-picker{display:none}
.compare-focus .models-chooser{display:flex;gap:4px}.compare-focus .model-chip{padding:4px 6px;font-size:10px}
@media(max-width:700px){
 .source-label-row{align-items:stretch}.source-label-row label{width:100%}
 .voice-controls{display:grid;grid-template-columns:1fr 1fr;gap:6px}.voice-controls button{min-height:40px}.voice-controls #voice-upload-btn{grid-column:1/-1}
 .compare-focus{height:100dvh;overflow:hidden}
 .compare-focus .app,.compare-focus .main-area{height:100dvh;max-height:100dvh;min-height:0;overflow:hidden}
 .compare-focus .top{height:52px;min-height:52px;max-height:52px;position:relative;z-index:2;padding:6px 10px}
 .compare-focus .workspace{height:calc(100dvh - 52px);min-height:0;max-height:calc(100dvh - 52px);display:grid;grid-template-rows:minmax(0,1fr) minmax(0,1fr);gap:5px;overflow:hidden;padding:6px 6px 8px}
 .compare-focus .results,.compare-focus .draft{min-height:0;height:100%;overflow:hidden;padding:6px 8px;display:flex;flex-direction:column}
 .compare-focus .results .section-heading,.compare-focus .draft .section-heading{margin:0 0 4px;flex:0 0 auto}
 .compare-focus .section-heading h2{font-size:17px}
 .compare-focus .compare-toolbar{gap:3px;align-items:center;flex:0 0 auto;margin-bottom:4px;display:grid;grid-template-columns: minmax(0,1fr) minmax(0,1fr) auto}
 .compare-focus .compare-toolbar>label{flex:initial;min-width:0;max-width:none;display:flex;flex-direction:column;gap:2px;font-size:10px}
 .compare-focus .compare-toolbar>label select{width:100%;max-width:100%;height:33px;min-width:0;font-size:11px;padding:5px 6px}
 .compare-focus .compare-toolbar .mobile-model-picker{display:flex}
 .compare-focus .compare-toolbar .models-chooser,.compare-focus .compare-toolbar .pane-height-control{display:none}
 .compare-focus .focus-toggle{font-size:11px;padding:6px;max-width:86px;white-space:normal}
 .compare-focus .model-grid{display:flex;flex:1;min-height:0;height:auto;overflow:hidden;padding:0}
 .compare-focus .model-card{flex:1 1 100%;min-width:0;width:100%;max-width:none;min-height:0;height:100%}
 .compare-focus .model-head{padding:4px 8px}.compare-focus .model-head strong{font-size:14px}
 .compare-focus .model-text{padding:7px 9px;font-size:13px;line-height:1.5;min-height:0;overflow-y:auto}
 .compare-focus .model-actions{padding:3px 5px;flex:0 0 auto}.compare-focus .model-actions button{font-size:10px;padding:4px 6px}
 .compare-focus .draft .draft-input{height:100%;min-height:0;flex:1;resize:none;padding:8px 10px;font-size:15px;line-height:1.55}
 .compare-focus .draft .action-row{margin-top:4px;gap:3px;align-items:center;flex-wrap:wrap}
 .compare-focus .draft .actions-right{max-height:38px;overflow-x:auto;flex-wrap:nowrap;justify-content:start}
 .compare-focus .draft .actions-right button{flex:0 0 auto;font-size:10px;padding:5px 7px}
}
