/* Author-facing workflow chrome. The manuscript's source typography is untouched. */
.author-workflow, .author-review, .author-steps, .author-finish, .author-small-dialog {
  font-family: var(--font-ui, system-ui, sans-serif);
  font-size: 16px;
}
.author-steps { display:flex; gap:6px; align-items:center; justify-content:center; flex:1 1 auto; min-width:0; padding:0; color:var(--muted); font-size:13px; }
.author-steps > span { display:inline-flex; align-items:center; gap:5px; white-space:nowrap; padding:6px 9px; border:1px solid var(--line); border-radius:99px; }
.author-steps b { font:inherit; }
.author-steps [aria-current] { color:var(--accent); font-weight:800; background:color-mix(in srgb, var(--accent) 10%, var(--surface)); border-color:var(--accent); }
.author-appbar-actions { margin-left: 0; flex-wrap: nowrap; }
.author-appbar-actions .save-state { white-space: nowrap; font-size: 13px; }
.author-appbar-actions .author-next { background: var(--accent); color: var(--surface, white); border-color: var(--accent); font-weight: 800; }
.author-workflow { flex: 1 1 auto; overflow: auto; padding: clamp(24px, 6vw, 80px); color: var(--text); }
.author-choice-heading, .author-guided-heading { max-width: 900px; margin: 0 auto 30px; }
.author-choice-heading h2, .author-guided-heading h2 { margin: 0 0 12px; font-size: 30px; }
.author-choice-heading p, .author-guided-heading p { color: var(--muted); margin: 0; line-height: 1.7; }
.author-choices { max-width: 900px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.author-choices button { min-height: 260px; display: flex; flex-direction: column; align-items: flex-start; gap: 18px; padding: 30px; text-align: left; color: var(--text); background: var(--surface, white); border: 1px solid var(--line); border-radius: 18px; font: inherit; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.author-choices button:hover, .author-choices button:focus-visible { border-color: var(--accent); box-shadow: 0 5px 20px #0001; }
.author-choices button > span:first-child { color: var(--accent); font-size: 30px; }
.author-choices strong { font-size: 25px; }
.author-choices b { margin-top: auto; color: var(--accent); }
.author-choices span { line-height: 1.7; }
.author-subtle { color: var(--muted); font-size: 14px; line-height: 1.7; max-width: 900px; margin: 18px auto; }
.author-guided-heading > span { display: block; color: var(--accent); font-size: 14px; margin-bottom: 14px; }
.author-guided-actions { display: flex; flex-wrap: wrap; gap: 12px; max-width: 900px; margin: 28px auto; }
.author-ai-option { display: flex; align-items: center; gap: 10px; max-width: 900px; margin: 20px auto 0; }
.author-ai-option input { width: 20px; height: 20px; accent-color: var(--accent); }
.author-result { max-width: 900px; margin: 20px auto; padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.author-result strong { font-size: 20px; }
.author-result p { line-height: 1.7; }
.author-workflow [role="status"] { max-width: 900px; margin: 18px auto; min-height: 24px; color: var(--accent); }
.author-review { width:min(720px, calc(100vw - 32px)); max-width:none; max-height:calc(100dvh - 40px); min-height:0; overflow:auto; color:var(--text); background:var(--surface); border:1px solid var(--line); border-radius:16px; padding:24px; }
.author-review:not([open]) { display:none; }
.author-review[open] { display:block; }
.author-review::backdrop { background:#14101b99; backdrop-filter:blur(3px); }
.author-review header { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.author-review h2 { margin: 0; font-size: 21px; }
.author-review header p { margin: 0; color: var(--muted); font-size: 14px; }
.author-review header button { margin-left: auto; }
.author-review button { font: inherit; font-size: 14px; cursor: pointer; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--text); padding: 8px 10px; }
.author-review button[aria-pressed="true"] { color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); border-color: var(--accent); }
.author-review button:disabled { opacity: .5; cursor: default; }
.author-review-list { padding: 8px 0; }
.author-review-list section { padding: 15px 0; border-bottom: 1px solid var(--line); }
.author-review-list .author-review-card-heading { display:flex; gap:12px; align-items:center; }
.author-review-list section small { color: var(--muted); font-size: 12px; }
.author-review-list section strong { font-size: 15px; overflow-wrap: anywhere; }
.author-review-item-actions { display: flex; gap: 8px; margin-top: 10px; }
.author-alt-label { display: grid; gap: 5px; margin: 10px 0; font-size: 13px; }
.author-alt-label input { min-width: 0; width: 100%; padding: 8px; font: inherit; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--text); }
.author-review-blockers { display: grid; gap: 7px; margin: 12px 0; font-size: 14px; }
.author-review-blockers button { text-align: left; line-height: 1.5; }
.author-final-artifact { display: grid; gap: 12px; margin-top: 14px; }
.author-final-artifact label { display: flex; gap: 7px; line-height: 1.6; font-size: 14px; }
.author-final-artifact input { accent-color: var(--accent); width: 18px; height: 18px; flex: 0 0 auto; margin-top: 3px; }
.author-final-artifact .button { background: var(--accent); color: var(--surface); }
.author-publication-link { color: var(--muted); font-size: 13px; margin-top: 18px; text-decoration: underline; }
.author-small-dialog { width: min(480px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); overflow: auto; padding: 26px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface, white); color: var(--text); }
.author-small-dialog::backdrop { background: #0006; }
.author-small-dialog h2 { margin: 0 0 20px; font-size: 24px; }
.author-small-dialog label { display: grid; gap: 9px; margin: 16px 0; }
.author-small-dialog input { width: 100%; font: inherit; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); }
.author-small-dialog footer { display: flex; justify-content: flex-end; gap: 12px; margin-top: 24px; }
[data-author-recovery-list] { display: grid; gap: 10px; margin-bottom: 20px; }
[data-author-recovery-list] button { font: inherit; cursor: pointer; padding: 12px; text-align: left; }
body.studio-shell .studio-appbar .appbar-chrome, body.studio-shell .editor-breadcrumb .badge,
body.studio-shell .editor-extraction-summary, body.studio-shell [data-source-document-summary],
body.studio-shell [data-editor-range], body.studio-shell .analysis-notice-button,
body.studio-shell [data-reader-profile-summary], body.studio-shell .chapter-tree small { display: none !important; }
body.studio-shell .editor-zoom-toolbar > span { display: none; }
body.studio-shell[data-author-mode="guided"][data-author-stage="body"] [data-tune-start],
body.publishing-app.studio-shell[data-page="project"][data-author-stage="choice"] .author-tools-menu { display: none; }
[data-author-workflow][hidden], .author-review[hidden], .studio-workspace[hidden] { display: none !important; }
@media (max-width: 1023px) {
  .author-appbar-actions { gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
  .author-appbar-actions .save-state { flex: 1 0 100%; text-align: right; }
  .author-appbar-actions .tool-btn { font-size: 13px; padding: 7px 9px; }
  .author-appbar-actions .studio-tune-start { display: none; }
  .author-steps { gap:4px; font-size:12px; }
  .author-steps > span { padding:5px 7px; }
  .author-workflow { padding: 26px 18px; }
  .author-choice-heading h2, .author-guided-heading h2 { font-size: 25px; }
  .author-choices { gap: 14px; }
  .author-choices button { min-height: 220px; padding: 22px; }
  .author-choices strong { font-size: 22px; }
}
@media (max-width: 540px) {
  .author-choices { grid-template-columns: 1fr; }
  .author-choices button { min-height: 190px; gap: 10px; }
  .author-choices button > span:first-child { font-size: 23px; }
  body.publishing-app.studio-shell[data-page="project"] .studio-appbar { align-items: flex-start; gap: 6px; }
  body.studio-shell .project-app-title h1 { max-width: 120px; }
  body.studio-shell .project-app-meta { max-width: 130px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
}
@media (prefers-reduced-motion: reduce) { .author-choices button { transition: none; } }
/* These stages already provide their own navigation. */
body.studio-shell[data-author-stage="choice"] .studio-stage-switch,
body.studio-shell[data-author-mode="guided"][data-author-stage="body"] .studio-stage-switch { display: none !important; }
@media (max-width: 540px) {
  body.studio-shell .project-app-title h1 { max-width: 180px; font-size: 16px; }
}

.author-choice-heading h2, .author-guided-heading h2 { color: var(--text); }
.author-guided-actions button, .author-result button { padding: 10px 16px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.author-guided-actions .button-primary { background: var(--accent); color: var(--surface); border-color: var(--accent); }

/* Final review keeps the live preview beside the editor; only the contents rail is hidden. */
body.publishing-app.studio-shell[data-page="project"]:is([data-author-stage="review"], [data-author-stage="complete"]) .pane-nav,
body.publishing-app.studio-shell[data-page="project"]:is([data-author-stage="review"], [data-author-stage="complete"]) .pane-resizer[data-resize="nav"] { display:none !important; }
@media (min-width:1024px) {
  body.publishing-app.studio-shell[data-page="project"]:is([data-author-stage="review"], [data-author-stage="complete"]) .studio-workspace { display:grid; grid-template-columns:minmax(0,1fr) 8px var(--proof-width); }
  body.publishing-app.studio-shell[data-page="project"]:is([data-author-stage="review"], [data-author-stage="complete"])[data-proof-collapsed="true"] .studio-workspace { grid-template-columns:minmax(0,1fr) 0 64px; }
  body.publishing-app.studio-shell[data-page="project"]:is([data-author-stage="review"], [data-author-stage="complete"]) .pane-edit { grid-column:1; }
  body.publishing-app.studio-shell[data-page="project"]:is([data-author-stage="review"], [data-author-stage="complete"]) .pane-resizer[data-resize="proof"] { grid-column:2; }
  body.publishing-app.studio-shell[data-page="project"]:is([data-author-stage="review"], [data-author-stage="complete"]) .pane-proof { grid-column:3; }
}
@media (max-width:1023px) {
  body.publishing-app.studio-shell[data-page="project"]:is([data-author-stage="review"], [data-author-stage="complete"]) .studio-stage-switch { grid-template-columns:repeat(2,1fr); }
  body.publishing-app.studio-shell[data-page="project"]:is([data-author-stage="review"], [data-author-stage="complete"]) [data-mobile-workspace="nav"] { display:none; }
}

/* Author UI headings and controls use the same sans-serif as the site chrome. */
body.publishing-app.studio-shell[data-page="project"]
:is(.studio-appbar, .author-workflow, .author-finish, dialog, .studio-tune-review)
:is(h1, h2, h3, h4, h5, h6, button, input, select, textarea, summary):not(:is([data-reader-overflow-body], .reader-prose, .reader-page, .studio-html-editor) *) {
  font-family: var(--font-ui, system-ui, sans-serif);
}
body.publishing-app.studio-shell[data-page="project"]
:is(.author-workflow, .author-finish, dialog) :is(h1, h2, h3, h4, h5, h6):not(:is([data-reader-overflow-body], .reader-prose, .reader-page) *) {
  font-style: normal;
}

/* Purpose-based tools; hover and keyboard focus share the same guide. */
body.publishing-app.studio-shell[data-page="project"] .author-tool { position:relative; flex:0 0 42px; display:grid; place-items:center; gap:1px; width:42px; min-height:46px; padding:4px 3px; border:1px solid transparent; border-radius:10px; background:transparent; color:var(--text); cursor:pointer; }
body.publishing-app.studio-shell[data-page="project"] .author-tool:hover,
body.publishing-app.studio-shell[data-page="project"] .author-tool:focus-visible { border-color:var(--line); background:var(--surface); }
.author-tool svg { width:20px; height:20px; pointer-events:none; }
.author-tool-badge { padding:1px 5px; border-radius:5px; background:var(--surface-muted, var(--surface)); color:var(--muted); font:600 11px/1.35 var(--font-ui); white-space:nowrap; pointer-events:none; }
.author-tool[aria-busy="true"] .author-tool-badge { color:var(--accent); }
.author-tool::after { position:absolute; z-index:120; top:calc(100% + 7px); right:0; width:max-content; max-width:min(280px, calc(100vw - 32px)); padding:9px 12px; border:1px solid var(--line); border-radius:9px; background:var(--surface); color:var(--text); box-shadow:0 4px 20px #0002; font:400 13px/1.6 var(--font-ui); text-align:left; white-space:normal; pointer-events:none; content:attr(data-guide); opacity:0; visibility:hidden; }
.author-tool:hover::after, .author-tool:focus-visible::after { opacity:1; visibility:visible; }
.author-tool[hidden], .author-finish[hidden], .author-next[hidden] { display:none !important; }
.author-finish { flex:0 0 auto; display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:8px 24px; margin:10px 12px 0; padding:16px 22px; border:1px solid color-mix(in srgb, var(--accent) 24%, var(--line)); border-radius:14px; background:var(--surface); color:var(--text); }
.author-finish-kicker { font-size:11px; font-weight:700; color:var(--accent); }
.author-finish h2 { margin:3px 0 5px; font-size:20px; line-height:1.35; letter-spacing:-.025em; }
.author-finish p { margin:0; color:var(--muted); font-size:13px; line-height:1.5; }
.author-finish > button { flex:0 0 auto; min-height:44px; padding:11px 18px; border:1px solid var(--accent); border-radius:10px; background:var(--accent); color:var(--surface); font:700 15px/1.35 var(--font-ui); cursor:pointer; }
.author-finish button:disabled { opacity:.55; cursor:wait; }
.author-finish [role="status"]:empty { display:none; }
.author-finish [role="status"] { flex-basis:100%; color:var(--accent); }
.author-review header { align-items:flex-start; flex-wrap:nowrap; }
.author-review header div { flex:1; }
.author-review header h2 { font-size:23px; margin-bottom:6px; }
.author-review header button { min-width:38px; min-height:38px; }
.author-review-stages { display:flex; gap:8px; list-style:none; margin:18px 0 12px; padding:0; color:var(--muted); font-size:12px; }
.author-review-stages li { flex:1; padding-bottom:8px; border-bottom:2px solid var(--line); text-align:center; }
.author-review-stages [aria-current] { color:var(--accent); border-color:var(--accent); font-weight:700; }
.author-review-progress { display:flex; gap:12px; align-items:center; font-size:12px; color:var(--muted); }
.author-review-progress progress { flex:1; width:100%; height:6px; accent-color:var(--accent); }
.author-review .author-review-card { margin:12px 0; padding:16px; border:1px solid var(--line); border-radius:12px; background:var(--surface); }
.author-review-card h3 { margin:0 0 3px; font-size:16px; line-height:1.4; }
.author-review-symbol { display:grid; place-items:center; flex:0 0 36px; height:36px; border-radius:9px; background:var(--surface-muted, var(--surface)); color:var(--accent); font-size:20px; }
.author-review-state { margin-left:auto; flex:0 0 auto; color:var(--muted); font-size:11px; }
.author-review-card.is-checked .author-review-symbol { color:var(--success, var(--accent)); }
.author-review-excerpt { margin:12px 0 8px; padding:10px 12px; border-left:3px solid var(--line); background:var(--surface-muted, var(--surface)); color:var(--text); font-size:13px; line-height:1.6; overflow-wrap:anywhere; }
.author-review-hint { margin:10px 0; color:var(--muted); font-size:13px; line-height:1.6; }
.author-review-notes { margin:8px 0; padding-left:18px; color:var(--accent); font-size:12px; line-height:1.65; }
.author-review-item-actions { justify-content:flex-end; }
.author-review-item-actions button:last-child:not(:first-child), .author-review .author-insert { background:var(--accent); border-color:var(--accent); color:var(--surface); }
.author-review .is-checked .author-review-item-actions { margin-top:5px; }
.author-review .is-checked .author-review-item-actions button { padding:3px 0; border:0; color:var(--muted); font-size:12px; }
.author-final-artifact { padding:16px; border-radius:12px; background:var(--surface-muted, var(--surface)); }
.author-final-artifact h3 { margin:0; font-size:17px; }
.author-final-artifact p { margin:0; color:var(--muted); font-size:13px; line-height:1.6; }
.author-storage header { display:flex; gap:10px; align-items:flex-start; }
.author-storage h2 { margin:0 0 8px; font-size:23px; }
.author-storage p { color:var(--muted); font-size:13px; line-height:1.6; }
.author-storage header button { margin-left:auto; }
.author-storage button { padding:9px 12px; border:1px solid var(--line); border-radius:9px; background:var(--surface); color:var(--text); font:inherit; cursor:pointer; }
.author-storage-options { display:grid; gap:10px; margin:20px 0; }
.author-storage-options button { display:grid; gap:6px; padding:16px; text-align:left; }
.author-storage-options strong { font-size:15px; }
.author-storage-options span { font-size:13px; color:var(--muted); line-height:1.5; }
@media (max-width: 540px) {
  .author-finish { margin:8px 8px 0; padding:12px 14px; gap:10px; }
  .author-finish h2 { font-size:18px; }
  .author-finish > button { width:100%; font-size:14px; }
  .author-finish p { font-size:12px; }
  .author-review .author-review-card { padding:12px; }
  .author-review-card h3 { font-size:14px; }
  .author-review-state { font-size:10px; }
  .author-review-symbol { flex-basis:28px; height:28px; font-size:18px; }
  .author-review-list .author-review-card-heading { gap:8px; }
  body.publishing-app.studio-shell[data-page="project"] .author-tool { flex-basis:36px; width:36px; }
}

.author-review .author-check-row { display:flex; align-items:center; gap:10px; width:100%; margin:6px 0; padding:10px 12px; border-radius:9px; text-align:left; }
.author-check-row > span:nth-child(2) { display:grid; gap:3px; min-width:0; }
.author-check-row strong { font-size:13px; overflow-wrap:anywhere; }
.author-check-row small { font-size:11px; color:var(--muted); }
.author-row-symbol { flex:0 0 20px; color:var(--muted); }
.author-check-row.is-checked .author-row-symbol { color:var(--success, var(--accent)); }
.author-row-state { margin-left:auto; flex:0 0 auto; color:var(--muted); font-size:11px; }
.author-review .author-check-row:hover { border-color:var(--accent); }
.author-review-excerpt { max-height:4.8em; overflow:hidden; }

@media (max-width:540px) {
  body.publishing-app.studio-shell[data-page="project"] .author-appbar-actions .save-state { min-width:0; max-width:100px; overflow:hidden; text-overflow:ellipsis; }
  .author-tool::after { position:fixed; top:148px; left:12px; right:12px; width:auto; max-width:none; }
}

/* A single studio header owns branding, progress, and grouped manuscript tools. */
body.publishing-app.studio-shell[data-page="project"] .studio-appbar {
  display:flex; flex-wrap:nowrap; align-items:center; gap:18px; min-height:64px;
  padding:8px 18px; overflow:visible;
}
body.publishing-app.studio-shell[data-page="project"] .appbar-id { display:flex; align-items:center; flex:1 1 auto; gap:14px; min-width:0; overflow:visible; }
body.publishing-app.studio-shell[data-page="project"] .studio-appbar .brand { flex:0 0 auto; width:auto; }
body.publishing-app.studio-shell[data-page="project"] .studio-appbar .brand-logo.rm-brand-logo { width:134px; height:auto; max-height:44px; object-fit:contain; }
body.studio-shell .studio-appbar .studio-back { display:inline-flex; align-items:center; justify-content:center; width:auto; min-width:64px; min-height:36px; padding:6px 12px; border:1px solid var(--line); border-radius:8px; font:600 13px/1.3 var(--font-ui); white-space:nowrap; }
body.studio-shell .studio-appbar .project-app-title,
.author-steps .sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
body.studio-shell .author-steps { flex:0 0 auto; gap:6px; font-size:13px; }
body.studio-shell .author-tools-menu { position:relative; flex:0 0 auto; border-left:1px solid var(--line); padding-left:14px; }
body.studio-shell .author-tools-menu > summary { display:none; list-style:none; cursor:pointer; font:600 13px/1.3 var(--font-ui); }
body.publishing-app.studio-shell[data-page="project"] .author-appbar-actions { display:flex; width:auto; flex-wrap:nowrap; gap:3px; }

.asset-alignment { display:flex; flex-wrap:wrap; align-items:center; gap:5px; margin:8px 0; font:12px/1.5 var(--font-ui); }
.asset-alignment > span { margin-right:auto; color:var(--muted); }
.asset-alignment > button { padding:6px 9px; border:1px solid var(--line); border-radius:6px; background:var(--surface); color:var(--text); font:inherit; cursor:pointer; }
.asset-alignment > button[aria-pressed="true"] { color:var(--accent); border-color:var(--accent); background:color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.bookmark-image-editor:focus-visible { outline:2px solid var(--accent); outline-offset:4px; }
@media (max-width:760px) {
  body.publishing-app.studio-shell[data-page="project"] .studio-appbar { gap:8px; padding:6px 10px; min-height:56px; }
  body.publishing-app.studio-shell[data-page="project"] .appbar-id { gap:8px; }
  body.publishing-app.studio-shell[data-page="project"] .studio-appbar .brand-logo.rm-brand-logo { width:80px; }
  body.studio-shell .studio-appbar .studio-back { min-width:52px; min-height:36px; padding:6px 8px; font-size:12px; }
  body.studio-shell .author-steps { gap:3px; }
  body.studio-shell .author-steps > span { padding:5px 8px; }
  body.studio-shell .author-steps > span > span { display:none; }
  body.studio-shell .author-tools-menu { padding-left:7px; }
  body.studio-shell .author-tools-menu > summary { display:flex; align-items:center; min-height:36px; padding:6px; border:1px solid var(--line); border-radius:8px; }
  body.publishing-app.studio-shell[data-page="project"] .author-appbar-actions { position:absolute; z-index:130; right:0; top:calc(100% + 8px); padding:8px; gap:5px; border:1px solid var(--line); border-radius:12px; background:var(--surface); box-shadow:0 6px 24px #0002; }
  .author-tool::after { top:120px; }
}

/* Completion and persistence share the header; notices overlay instead of adding rows. */
body.studio-shell[data-studio-header-integrated="true"] .studio-shell-main { height:100dvh; }
body.publishing-app.studio-shell[data-page="project"] .studio-appbar { gap:12px; }
.author-header-progress { flex:0 0 auto; min-width:0; }
body.studio-shell .author-header-progress .author-finish { display:flex; margin:0; padding:0; border:0; border-radius:0; background:transparent; }
body.studio-shell .author-header-progress .author-finish > div { display:none; }
body.studio-shell .author-header-progress .author-finish > button { box-sizing:border-box; width:auto; max-width:160px; min-height:36px; padding:8px 12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:13px; }
body.studio-shell .author-save { display:inline-flex; align-items:center; justify-content:center; flex:0 0 auto; gap:6px; min-height:36px; padding:7px 10px; border:1px solid var(--line); border-radius:8px; color:var(--text); background:var(--surface); font:600 13px/1.3 var(--font-ui); white-space:nowrap; cursor:pointer; }
body.studio-shell .author-save:disabled { opacity:.6; cursor:wait; }
body.studio-shell :is(.studio-save-error, .studio-backup-status, .author-finish [role="status"]) { position:fixed; z-index:180; top:76px; right:16px; width:max-content; max-width:min(340px, calc(100vw - 32px)); margin:0; padding:12px 16px; border:1px solid var(--line); border-radius:10px; box-shadow:0 6px 24px #0002; background:var(--surface); color:var(--text); font:13px/1.6 var(--font-ui); text-align:left; }
body.studio-shell .studio-save-error { border-color:var(--danger, #b42318); }
body.studio-shell .toast-region { top:76px; right:16px; bottom:auto; left:auto; width:min(340px, calc(100vw - 32px)); }
body.studio-shell :is(.studio-save-error, .studio-backup-status, .author-finish [role="status"]):empty { display:none; }
@media (max-width:1100px) {
  body.studio-shell .author-tools-menu > summary { display:flex; align-items:center; min-height:36px; padding:6px; border:1px solid var(--line); border-radius:8px; }
  body.publishing-app.studio-shell[data-page="project"] .author-appbar-actions { position:absolute; z-index:130; right:0; top:calc(100% + 8px); padding:8px; gap:5px; border:1px solid var(--line); border-radius:12px; background:var(--surface); box-shadow:0 6px 24px #0002; }
}
@media (max-width:760px) {
  body.publishing-app.studio-shell[data-page="project"] .studio-appbar { gap:4px; padding:6px 8px; }
  body.publishing-app.studio-shell[data-page="project"] .studio-appbar .appbar-id { gap:6px; }
  body.publishing-app.studio-shell[data-page="project"] .studio-appbar .brand { width:80px; }
  body.publishing-app.studio-shell[data-page="project"] .studio-appbar .brand-logo.rm-brand-logo { width:80px; }
  body.studio-shell .studio-appbar .studio-back { min-width:44px; padding:6px; }
  body.studio-shell .author-steps { display:none; }
  body.studio-shell .author-save { width:34px; min-width:34px; padding:6px; }
  body.studio-shell .author-save > span { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
  body.studio-shell .author-header-progress .author-finish > button { max-width:88px; padding:8px; font-size:12px; }
  body.studio-shell .author-tools-menu { padding-left:0; border-left:0; }
  body.studio-shell :is(.studio-save-error, .studio-backup-status, .author-finish [role="status"]) { top:64px; }
  body.studio-shell .toast-region { top:64px; }
}

/* Mobile retains a visible current stage without adding a header row. */
.author-mobile-stage { display:none; }
@media (max-width:760px) {
  body.studio-shell .author-mobile-stage { display:inline-flex; align-items:center; justify-content:center; flex:0 0 auto; min-width:38px; min-height:36px; padding:6px; border:1px solid var(--line); border-radius:8px; background:var(--surface); color:var(--accent); font:750 13px/1.3 var(--font-ui); cursor:pointer; }
  body.studio-shell .author-mobile-stage:focus-visible { outline:3px solid var(--accent); outline-offset:2px; }
}

/* A short overview replaces the per-object approval queue. */
.author-body-summary { flex:0 0 auto; max-height:45vh; overflow:auto; padding:18px 26px; border-bottom:1px solid var(--line); background:var(--surface); color:var(--text); font-family:var(--font-ui); }
.author-body-summary[hidden] { display:none !important; }
.author-result-summary { width:min(900px,100%); margin:18px auto; }
.author-result-graph { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); list-style:none; padding:0; margin:0 0 18px; gap:14px; }
.author-result-graph li { position:relative; padding:18px; min-width:0; border:1px solid var(--line); border-radius:14px; background:var(--surface); }
.author-result-icon { display:grid; place-items:center; width:36px; height:36px; color:var(--accent); border:1px solid var(--line); border-radius:50%; font:700 22px/1 var(--font-ui); }
.author-result-graph h3 { margin:12px 0 8px; font:650 17px/1.5 var(--font-ui); }
.author-result-graph strong { display:block; font:700 20px/1.5 var(--font-ui); overflow-wrap:anywhere; }
.author-result-graph small { display:block; margin-top:6px; color:var(--muted); font:15px/1.5 var(--font-ui); }
.author-result-graph [data-result="complete"] { border-color:var(--accent); }
.author-result-graph [data-result="review"] .author-result-icon { color:var(--warning,#a26515); }
.author-result-graph li::after { content:""; display:block; margin-top:12px; height:4px; background:var(--line); border-radius:4px; }
.author-result-graph [data-result="complete"]::after { background:var(--accent); animation:rm-author-connect .4s ease-out; }
.author-summary-note,.author-summary-attention p { font:16px/1.6 var(--font-ui); }
.author-summary-attention { padding:16px; border:1px solid var(--line); border-radius:12px; }
.author-summary-attention button,.author-result-summary > button { font:650 16px/1.5 var(--font-ui); min-height:44px; padding:10px 16px; cursor:pointer; }
.author-body-summary [data-author-body-status]:empty,.author-result-summary [data-author-body-status]:empty { display:none; }
@media(max-width:650px) { .author-body-summary { max-height:44vh; padding:14px 16px; } .author-result-graph { gap:8px; } .author-result-graph li { padding:10px; } .author-result-graph h3 { font-size:14px; } .author-result-graph strong { font-size:16px; } .author-result-graph small { font-size:13px; } }
@media(prefers-reduced-motion:reduce) { .author-result-graph li::after { animation:none !important; } }
.author-body-summary .author-result-summary { margin:0 auto; }
.author-body-summary .author-result-graph { margin-bottom:10px; }
.author-body-summary .author-result-graph li { display:grid; grid-template-columns:28px minmax(0,1fr); gap:3px 9px; padding:12px; }
.author-body-summary .author-result-icon { grid-row:span 3; width:28px; height:28px; font-size:19px; }
.author-body-summary .author-result-graph h3 { margin:0; font-size:15px; }
.author-body-summary .author-result-graph strong { grid-column:2; font-size:18px; }
.author-body-summary .author-result-graph small { grid-column:2; margin:0; font-size:14px; }
.author-body-summary .author-result-graph li::after { grid-column:1 / -1; margin-top:6px; }
.author-body-summary .author-summary-note { margin:8px 0; font-size:15px; }
@media(max-width:650px) { .author-body-summary .author-result-graph li { display:flex; flex-direction:column; gap:3px; padding:9px; } .author-body-summary .author-result-graph h3 { font-size:13px; } .author-body-summary .author-result-graph strong { font-size:15px; } .author-body-summary .author-result-graph small { font-size:12px; } }
.author-result-graph [data-result="complete"]::after { background:var(--success,#315d50); }
.author-result-graph [data-result="complete"] .author-result-icon { color:var(--success,#315d50); }
.author-result-graph [data-result="complete"] { border-color:var(--success,#315d50); }
.author-result-graph strong { word-break:keep-all; overflow-wrap:normal; }
