/* Authorial, quiet chrome: the manuscript's title leads, frequent actions second, menus last.
   The header is a plane over the page (one low, wide shadow), not a bevelled block. */
.legacy-recovery{max-width:520px;width:calc(100% - 48px);padding:28px;background:#f6efe2;color:#302719;border:1px solid #b09a78;border-radius:10px;box-sizing:border-box;font:14px/1.6 Inter,sans-serif}
.legacy-recovery::backdrop{background:#17130dcc}.legacy-recovery h2{font:24px Lora,Georgia,serif}.legacy-recovery-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:22px}.legacy-recovery button{padding:12px;border:1px solid #877155;border-radius:5px;background:#ede1cc;color:#302719;cursor:pointer}.legacy-recovery button:focus-visible{outline:3px solid #91672f;outline-offset:3px}
.author-header{--header-ink:#e9dfd1;--header-muted:#aaa093;--header-rule:#504438;--header-shadow:rgba(0,0,0,.38);display:grid;grid-template-columns:auto minmax(120px,1fr) auto;align-items:center;column-gap:24px;padding:0 24px;min-height:76px;height:auto;background:#201e1a;color:var(--header-ink);border-bottom:0;box-shadow:0 1px 0 var(--header-rule),0 10px 28px var(--header-shadow);position:relative;z-index:45;font-family:Inter,sans-serif}
.author-brand,.author-brand>a,.author-actions,.manuscript-context,.manuscript-metrics,.document-meta{display:flex;align-items:center}
.author-brand{gap:10px}.author-brand>a{color:inherit;text-decoration:none;line-height:0}
.author-header #new-btn{color:var(--header-muted);padding:8px 4px;font-size:12px}
.author-header .tb-btn,.header-menu summary{font:500 12px Inter,sans-serif;line-height:1.2;min-height:40px;padding:10px 13px;border:1px solid transparent;border-radius:6px;background:transparent;color:var(--header-ink);white-space:nowrap;cursor:pointer;text-decoration:none;transition:background .15s,border-color .15s,color .15s}
.author-header .tb-btn:hover{background:#39332b;border-color:#5c4d3e}
/* The document: eyebrow, title, then the meta line that used to be a whole second row. */
.author-document{min-width:0;align-self:center;padding:10px 0}
.document-eyebrow{font-size:9px;letter-spacing:1.5px;color:var(--header-muted);display:block;margin-bottom:3px}
.author-header #top-filename{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-family:Lora,Georgia,serif;font-size:20px;line-height:1.15;font-weight:500;letter-spacing:-.2px;color:var(--header-ink)}
.document-meta{gap:8px;margin-top:4px;font-size:10.5px;color:var(--header-muted);min-width:0;flex-wrap:wrap}
.manuscript-context,.manuscript-metrics{gap:8px;min-width:0}.manuscript-context label{white-space:nowrap}
.author-header .genre-override{width:auto;max-width:150px;min-width:70px;padding:2px 18px 2px 0;background:transparent;border:0;color:var(--header-ink);font:600 10.5px Inter,sans-serif;cursor:pointer}
.author-header .genre-override option,.author-header .genre-override optgroup{background:#29251f;color:#e9dfd1}
.author-header .status-pill{background:transparent;border:0;padding:0;color:var(--header-muted);font-size:10.5px}
.metadata-dot{color:#776655}.manuscript-metrics b{font-weight:600;color:var(--header-ink)}.health-indicator{white-space:nowrap}
/* Actions: one filled, one outlined, menus as text. */
.author-actions{gap:6px;justify-self:end}
.author-header #save-btn{background:#d1ae80;color:#241d14;border-color:#d1ae80;font-weight:600;min-width:62px}.author-header #save-btn:hover{background:#e1c39e}
.author-header #intel-open{border-color:#6a5945}
#save-state{font-size:10px;color:var(--header-muted);max-width:100px;text-align:right;line-height:1.4;margin-right:8px}
#save-state[data-state="error"],#save-state[data-state="dirty"]{color:#e7bd86}
.header-menu{position:relative}.header-menu summary{list-style:none;display:flex;gap:6px;align-items:center;color:var(--header-muted);padding:10px 8px}.header-menu summary::-webkit-details-marker{display:none}
.header-menu summary:hover{color:var(--header-ink);background:transparent}
.header-menu[open]>summary{color:var(--header-ink);background:#39332b;border-color:#6a5945}
.header-menu-panel{position:absolute;right:0;top:calc(100% + 8px);width:248px;background:#29251f;border:1px solid #63513e;border-radius:9px;padding:8px;box-shadow:0 16px 40px #0006;z-index:60}
.menu-label{display:block;padding:9px 10px;color:#b7a48e;font-size:9px;letter-spacing:1.5px}
.header-menu-panel a,.header-menu-panel .tb-btn{display:flex;width:100%;align-items:center;text-align:left;padding:12px 10px;font-size:12px;min-height:44px;color:#e9dfd1;text-decoration:none;box-sizing:border-box;border-radius:5px}
.header-menu-panel a:hover{background:#39332b}.header-menu-panel #signout-btn{border-top:1px solid #514436;border-radius:0;margin-top:5px}
.author-header :is(button,a,summary,select):focus-visible{outline:2px solid #e8bd81;outline-offset:3px}
[data-editor-theme="light"] .author-header{--header-ink:#33291f;--header-muted:#746655;--header-rule:#d2c3af;--header-shadow:rgba(60,45,25,.18);background:#f0e8db}
[data-editor-theme="light"] .author-header .tb-btn:hover{background:#e4d7c4}
[data-editor-theme="light"] .header-menu[open]>summary{background:#e4d7c4}
[data-editor-theme="light"] .header-menu-panel :is(.tb-btn,a){color:#e9dfd1}
.center-toolbar{gap:8px;padding:10px 16px;min-height:54px;flex-wrap:wrap}.center-toolbar .fmt-btn{min-width:30px;min-height:32px}.center-toolbar .fmt-right{margin-left:auto}
.ms-page.parchment::after{content:attr(data-pagination);display:block;text-align:center;font:11px Inter,sans-serif;color:#827563;margin-top:36px;pointer-events:none;user-select:none}
@media(max-width:1200px){.author-header{column-gap:16px;padding:0 18px}#save-state{display:none}.author-header #top-filename{font-size:18px}}
@media(max-width:800px){.author-header{grid-template-columns:auto minmax(0,1fr);grid-template-rows:auto auto;column-gap:14px;padding:0 14px;min-height:0}.author-document{padding:8px 0}.author-actions{grid-column:1/-1;justify-self:stretch;justify-content:flex-end;box-shadow:0 -1px 0 #363028;padding:4px 0}.author-actions>[data-slot="save"]{margin-right:auto}.document-meta{gap:5px}.author-header .status-pill,.health-indicator{display:none}.author-header #top-filename{font-size:15px}.author-header .tb-btn,.header-menu summary{min-height:42px;padding:10px;font-size:11px}.author-header #new-btn{font-size:11px}.document-eyebrow{font-size:8px}.author-header .genre-override{max-width:92px;min-width:0}.manuscript-context{flex-wrap:wrap}.center-toolbar{padding:8px;gap:4px}.center-toolbar .fmt-right{margin-left:0;justify-content:flex-start}.header-menu-panel{position:fixed;top:auto;right:14px;margin-top:8px;max-width:calc(100vw - 28px)}}
@media(prefers-reduced-motion:reduce){.author-header *{transition:none!important}}
