/* Task-first composition, within the existing March paper / ink / blue world. */
body.march-unified[data-theme="write"] .desk-shell .write-form { display:block; }
body.march-unified[data-theme="write"] .desk-shell::before,body.march-unified[data-theme="write"] .desk-shell::after { display:none; }
body.march-unified[data-theme="write"] .desk-copy h1 { max-width:14ch;font-size:clamp(42px,6.5vw,88px);line-height:1.12;letter-spacing:-.025em; }
body.march-unified[data-theme="write"] .desk-copy p { max-width:58ch;font:18px/1.8 var(--march-body); }
body.march-unified[data-theme="write"] .trial-availability { max-width:75ch;margin:0 0 20px;font:15px/1.8 var(--march-body);color:var(--march-red); }
body.march-unified[data-theme="write"] .desk-shell .write-inputs { display:grid;grid-template-columns:1fr;gap:20px;min-width:0; }
body.march-unified[data-theme="write"] .desk-shell .write-field { min-width:0; }
body.march-unified[data-theme="write"] .desk-shell .write-field label { color:var(--march-ink);font:600 16px/1.6 var(--march-body);letter-spacing:0; }
body.march-unified[data-theme="write"] .desk-shell .write-field label span,.write-context summary span { margin-left:8px;color:var(--march-dim);font:400 13px/1.6 var(--march-body);letter-spacing:0; }
body.march-unified[data-theme="write"] .desk-shell .write-field :is(input,textarea,select) { box-sizing:border-box;width:100%;min-width:0;max-width:100%;padding:14px;color:var(--march-ink);background:transparent;border:1px solid var(--march-line);font:16px/1.7 var(--march-body);border-radius:0;caret-color:var(--march-blue); }
body.march-unified[data-theme="write"] .desk-shell #portalIdea { min-height:156px; }
body.march-unified[data-theme="write"] .desk-shell #portalEvidence { min-height:132px; }
body.march-unified[data-theme="write"] .desk-shell .write-field :is(input,textarea)::placeholder { color:var(--march-dim);opacity:1; }
body.march-unified[data-theme="write"] .desk-shell .write-field small { margin-top:8px;font:14px/1.7 var(--march-body);color:var(--march-dim); }
.write-input-actions { display:flex;align-items:center;flex-wrap:wrap;gap:12px 24px; }
.write-input-actions button { min-height:44px;padding:8px 0;border:0;background:transparent;color:var(--march-blue);font:16px/1.6 var(--march-body);text-decoration:underline;text-underline-offset:5px;cursor:pointer; }
.write-input-actions button:disabled { opacity:.55;cursor:not-allowed; }
.write-input-actions span { max-width:65ch;color:var(--march-dim);font:14px/1.7 var(--march-body); }
.write-context { min-width:0; }
.write-context summary { min-height:48px;padding:10px 0;color:var(--march-blue);font:600 16px/1.7 var(--march-body);cursor:pointer;list-style-position:inside; }
.write-context-fields { display:grid;grid-template-columns:1fr 1fr;gap:22px 18px;padding:16px 0 4px; }
.write-materials>.write-field { padding:14px 0 0; }
.write-handoff { margin-top:36px;padding:24px 0 8px;border-top:1px solid var(--march-line); }
.write-handoff>summary { min-height:48px;padding:8px 0;color:var(--march-blue);font:600 18px/1.6 var(--march-body);cursor:pointer;list-style-position:inside; }
.write-handoff>p { max-width:65ch;margin:12px 0 24px;color:var(--march-dim);font:16px/1.8 var(--march-body); }
.write-handoff>.write-field { margin:0 0 24px;max-width:70ch; }
.write-handoff .write-results { margin-top:28px; }
.write-handoff .write-output.is-empty { display:none; }
.write-handoff .write-output { max-width:78ch; }
body.march-unified[data-theme="write"] .desk-shell .write-state { padding-bottom:18px; }
body.march-unified[data-theme="write"] .desk-shell .write-state span { font:14px/1.6 var(--march-body);letter-spacing:0;color:var(--march-dim); }
body.march-unified[data-theme="write"] .desk-shell .write-presets { margin-bottom:28px; }
body.march-unified[data-theme="write"] .desk-shell .write-presets span,body.march-unified[data-theme="write"] .desk-shell .write-presets button { font:14px/1.6 var(--march-body);letter-spacing:0; }
body.march-unified[data-theme="write"] .desk-shell .write-results { min-width:0;align-self:start; }
body.march-unified[data-theme="write"] .desk-shell .write-result-actions { margin-top:20px; }
body.march-unified[data-theme="write"] .desk-shell .write-output.is-empty + .write-result-actions { display:none; }
body.march-unified[data-theme="write"] .desk-shell .write-result-actions button { min-height:44px;max-width:100%;padding:12px 20px;border:1px solid var(--march-blue);background:transparent;color:var(--march-blue);font:600 16px/1.6 var(--march-body);border-radius:0;cursor:pointer; }
body.march-unified[data-theme="write"] .desk-shell .write-result-actions button:disabled { opacity:.55;cursor:not-allowed; }
body.march-unified[data-theme="write"] .desk-shell .write-result-actions button:hover:not(:disabled) { color:var(--march-paper);background:var(--march-blue); }
body.march-unified[data-theme="write"] .desk-shell .write-result-actions button:focus-visible { outline:2px solid var(--march-blue);outline-offset:4px; }
body.march-unified[data-theme="write"] .desk-shell .write-output { min-height:0;padding:0;border:0;border-left:0;box-shadow:none;background:transparent; }
body.march-unified[data-theme="write"] .desk-shell .write-output.is-empty { border:0!important;background:transparent!important; }
body.march-unified[data-theme="write"] .desk-shell .work-sheet-empty { min-height:0;padding:24px 0;text-align:left;place-content:start; }
body.march-unified[data-theme="write"] .desk-shell .work-sheet-empty strong { font:600 24px/1.4 var(--march-body);text-wrap:balance; }
body.march-unified[data-theme="write"] .desk-shell .work-sheet-empty span { margin-top:16px;max-width:32ch;font:16px/1.8 var(--march-body);color:var(--march-dim); }
body.march-unified[data-theme="write"] .desk-shell .work-sheet { background:transparent;color:var(--march-ink); }
body.march-unified[data-theme="write"] .desk-shell .work-sheet-head { display:block;padding:0 0 22px;border-bottom:1px solid var(--march-line); }
body.march-unified[data-theme="write"] .desk-shell .work-sheet-head strong { display:block;text-align:left;margin:0;font:700 28px/1.35 var(--march-body);letter-spacing:0;text-wrap:balance; }
body.march-unified[data-theme="write"] .desk-shell .work-sheet-head span { display:block;margin-top:10px;color:var(--march-red);font:14px/1.7 var(--march-body);letter-spacing:0; }
body.march-unified[data-theme="write"] .desk-shell .work-sheet-facts { display:block;margin:0; }
body.march-unified[data-theme="write"] .desk-shell .work-sheet-facts>div { padding:18px 0;border-right:0;border-bottom:1px solid var(--march-line); }
body.march-unified[data-theme="write"] .desk-shell .work-sheet-facts dt { font:500 14px/1.7 var(--march-body);letter-spacing:0;color:var(--march-dim); }
body.march-unified[data-theme="write"] .desk-shell .work-sheet-facts dd { margin:7px 0 0;font:16px/1.8 var(--march-body);color:var(--march-ink);white-space:pre-wrap;overflow-wrap:anywhere; }
body.march-unified[data-theme="write"] .desk-shell .work-sheet-direction,body.march-unified[data-theme="write"] .desk-shell .work-sheet-evidence { display:block;padding:18px 0;background:transparent;border:0;border-bottom:1px solid var(--march-line); }
body.march-unified[data-theme="write"] .desk-shell .work-sheet-direction p,body.march-unified[data-theme="write"] .desk-shell .work-sheet-evidence p { margin:0;font:16px/1.8 var(--march-body);color:var(--march-ink);white-space:pre-wrap;overflow-wrap:anywhere; }
body.march-unified[data-theme="write"] .desk-shell .work-sheet-evidence summary,body.march-unified[data-theme="write"] .desk-shell .work-sheet-prompt summary { min-height:44px;padding:10px 0;font:600 16px/1.7 var(--march-body);color:var(--march-blue);cursor:pointer;list-style-position:inside; }
body.march-unified[data-theme="write"] .desk-shell .work-sheet-prompt { padding:16px 0 0; }
body.march-unified[data-theme="write"] .desk-shell .work-sheet-prompt pre { max-height:560px;padding:16px;color:var(--march-ink);background:rgba(32,31,28,.035);font:15px/1.8 var(--march-body);white-space:pre-wrap;overflow-wrap:anywhere; }
body.march-unified[data-theme="write"] .desk-shell .write-actions { margin-top:0;gap:12px; }
body.march-unified[data-theme="write"] .desk-shell .write-tip,body.march-unified[data-theme="write"] .desk-shell .write-count { font:14px/1.7 var(--march-body);color:var(--march-dim); }
.write-tool-routes { display:flex;flex-wrap:wrap;gap:16px 30px;margin-top:28px; }
.write-tool-routes a { display:inline-block;padding:8px 0;min-height:44px;font:16px/1.7 var(--march-body);color:var(--march-blue);text-underline-offset:5px; }
.write-tool-routes [hidden] { display:none!important; }
.write-context :is(input,summary):focus-visible,.write-tool-routes a:focus-visible,.work-sheet :is(summary,a):focus-visible { outline:2px solid var(--march-blue);outline-offset:4px; }
body.march-unified[data-theme="write"] .write-method p { max-width:68ch;font:16px/1.8 var(--march-body);color:var(--march-ink); }
@media(max-width:900px) { body.march-unified[data-theme="write"] .desk-shell .write-results { padding-top:24px;border-top:1px solid var(--march-line); } }
@media(max-width:520px) { .write-context-fields { grid-template-columns:1fr; }.write-tool-routes { display:block; }.write-tool-routes a { display:block; }body.march-unified[data-theme="write"] .desk-shell .write-field :is(input,textarea,select) { padding:12px; } }

/* Keep the usable local handoff visible after the shared task fields. */
body.march-unified[data-theme="write"] .write-continue-row { display:flex;align-items:center;flex-wrap:wrap;gap:8px 20px;margin:16px 0 4px; }
body.march-unified[data-theme="write"] .write-continue { display:inline-flex;align-items:center;min-height:44px;padding:8px 0;color:var(--march-blue);font:600 16px/1.6 var(--march-body);text-decoration:underline;text-underline-offset:5px; }
body.march-unified[data-theme="write"] .write-continue-row>span { color:var(--march-dim);font:14px/1.7 var(--march-body); }
body.march-unified[data-theme="write"] .write-continue:focus-visible { outline:2px solid var(--march-blue);outline-offset:4px; }
body.march-unified[data-theme="write"] #worksheetTools { scroll-margin-top:110px; }

/* Deep links must clear the fixed navigation; trial detail stays optional. */
body.march-unified[data-theme="write"] #write-desk { scroll-margin-top:110px; }
.write-trial-notes { margin:10px 0; }
.write-trial-notes summary { min-height:44px;padding:10px 0;color:var(--march-blue);font:500 14px/1.7 var(--march-body);cursor:pointer;list-style-position:inside; }
.write-trial-notes p { color:var(--march-dim);font:14px/1.8 var(--march-body); }
.write-trial-notes summary:focus-visible { outline:2px solid var(--march-blue);outline-offset:4px; }
