/* A quieter, editorial workbench. Layout inspired by Tabler and shadcn-admin;
   native components and all original application actions are retained. */
:root {
  --green: #18705a;
  --ink: #172b24;
  --muted: #77837c;
  --line: #e5eae7;
  --canvas: #f6f8f7;
  --surface: #fff;
  --accent-soft: #eaf3ee;
  color: var(--ink);
  background: var(--canvas);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.6;
}
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.topbar { height: 68px; padding: 0 28px; gap: 18px; box-shadow: 0 1px 0 #20382c03; }
.brand { font-size: 21px; letter-spacing: 1px; }
.mark { width: 34px; height: 34px; border-radius: 9px; font-size: 21px; background: var(--green); }
.brand strong { gap: 12px; }
.brand-caption { border: 0; padding-left: 0; font-size: 11px; color: #8c978f; }
.topbar-context { flex: 1; gap: 16px; justify-content: flex-end; min-width: 0; }
.topbar-label { font-size: 11px; letter-spacing: 0; white-space: nowrap; color: #8c968f; }
.topbar .badge { border-color: #dbe9e0; background: #f3f8f4; font-size: 10px; white-space: nowrap; padding: 4px 9px; }
.workspace-heading { position: static; gap: 12px; margin: 0; display: none; }
.workbench-connected .workspace-heading { display: flex; }
.workspace-heading > p { display: none; }
.workspace-heading button { color: #879189; font-size: 11px; min-height: 30px; padding: 4px 7px; }
.quick-switch { display: flex; align-items: center; gap: 40px; justify-content: space-between; width: 230px; min-height: 35px; padding: 6px 11px; margin-right: auto; color: #89928d !important; font-size: 11px; background: #f8faf9 !important; border-color: #ecf0ed !important; font-weight: 400; }
kbd { border: 1px solid #e0e6e1; border-radius: 4px; background: #fff; color: #929a93; padding: 1px 5px; font: 10px system-ui, sans-serif; white-space: nowrap; }
.nav-menu-button { display: none; }
.workbench-connected main { margin-left: 224px; max-width: calc(100% - 224px); padding: 28px 32px 60px; }
.workbench-connected .intro { padding: 0; margin: 0 0 24px; }
.intro .eyebrow { font-size: 9px; color: #9aa59c; letter-spacing: 2px; margin: 0 0 6px; }
.intro h1 { font-size: 27px; font-weight: 700; letter-spacing: -.6px; margin: 0 0 7px; color: #18362b; }
.intro > p:last-child { font-size: 12px; color: #859087; line-height: 1.7; }
.local-preview-notice { padding: 8px 12px; margin-bottom: 20px; background: #f0f5f1; border-color: #e3ece3; color: #7d8d7e; font-size: 10px; line-height: 1.6; }
.workbench-sidebar { top: 68px; width: 224px; padding: 24px 14px 20px; background: #fff; }
.nav-caption { font-size: 10px; letter-spacing: 1px; padding: 0 9px; margin: 0 0 16px; color: #a1aaa3; }
.workbench-links { gap: 6px; }
.workbench-sidebar a { min-height: 43px; padding: 10px 14px; border-radius: 7px; color: #6a7970; gap: 12px; font-size: 13px; }
.workbench-sidebar a > span { width: 19px; height: 19px; opacity: 1; flex: none; display: inline-flex; align-items: center; }
.workbench-sidebar a svg { width: 19px; height: 19px; }
.workbench-sidebar a[aria-current=page] { color: #176b50; background: #edf5ef; box-shadow: none; font-weight: 650; }
.workbench-sidebar a[aria-current=page]::after { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #448c65; margin-left: auto; }
.sidebar-bottom { border-color: #eef1ed; padding-top: 14px; }
.sidebar-identity { margin: 24px 8px 0; padding-top: 16px; border-top: 1px solid #edf1ed; display: flex; align-items: center; gap: 9px; }
.identity-mark { background: #eaf2ed; color: #3c7357; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; font-weight: 600; }
.sidebar-identity strong { display: block; font-size: 11px; font-weight: 600; }
.sidebar-identity small { font-size: 9px; color: #9aa59d; }
.panel { border-radius: 10px; box-shadow: 0 3px 10px #1c382302; border-color: var(--line); }
button { border-radius: 7px; min-height: 38px; font-size: 12px; letter-spacing: 0; }
button.secondary { border-color: #e0e7e2; }
input, select, textarea { border-color: #e0e7e2; border-radius: 7px; font-size: 13px; }
input, select { min-height: 39px; }
input::placeholder { color: #a4ada6; font-weight: 400; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid #99bca8; outline-offset: 3px; }
#creation-view { position: relative; }
#creation-view > .section-title { position: absolute; top: -76px; right: 0; margin: 0; }
#creation-view > p.creation-intro { display: none; margin: 0; }
.creation-overview { display: flex; align-items: center; gap: 22px; border: 1px solid var(--line); background: white; border-radius: 9px; padding: 14px 18px; margin: 0 0 20px; }
.creation-overview > div { display: flex; align-items: baseline; gap: 13px; flex: none; }
.overview-caption { color: #7e8b82; font-size: 11px; }
.creation-overview strong { font-size: 25px; line-height: 1.2; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.creation-overview > p { font-size: 10px; margin: 0; padding-left: 20px; border-left: 1px solid var(--line); }
.creation-overview > button { margin-left: auto; font-size: 11px; white-space: nowrap; }
.creation-layout { grid-template-columns: 260px minmax(0,1fr); gap: 20px; }
.creation-layout > .panel:first-child { top: 86px; max-height: calc(100vh - 108px); padding: 18px 12px 12px; }
.creation-layout > .panel:first-child > h3 { display: flex; justify-content: space-between; align-items: center; padding: 0 6px; font-size: 13px; margin: 0 0 14px; }
.list-caption { font-size: 9px; color: #a1aba3; font-weight: 400; }
#creation-job-filter { margin: 0 0 14px; padding: 8px 11px; background: #fafcfb; font-size: 11px; min-height: 34px; }
#creation-jobs .task { padding: 14px 12px; margin-bottom: 7px; background: white; border-color: #edf0ed; }
#creation-jobs .task[data-selected=true] { background: #f1f7f0; border-color: #d6e5d3; box-shadow: inset 2px 0 #4f8b68; }
#creation-jobs .creation-job-title { font-size: 12px; font-weight: 600; line-height: 1.8; color: #344b3c; }
#creation-jobs .task p { font-size: 10px; line-height: 1.6; }
.job-state { font-size: 9px; padding: 2px 6px; font-weight: 500; }
#creation-jobs progress { opacity: .75; height: 3px; margin-top: 10px; }
#creation-jobs + .page-actions { padding-top: 12px; font-size: 9px; }
#creation-detail { padding: 24px 28px; scroll-margin-top: 86px; }
.manuscript-kicker { display: flex; gap: 10px; justify-content: space-between; align-items: center; font-size: 9px; letter-spacing: 1.3px; color: #98a59a; margin-bottom: 18px; }
.manuscript-save-state { letter-spacing: 0; color: #9ca69e; white-space: nowrap; }
#creation-detail-title { font-size: 19px; line-height: 1.7; letter-spacing: -.2px; margin-bottom: 8px; }
#creation-detail > h3#creation-detail-title { border-top: 0; padding-top: 0; margin-top: 0; }
#creation-progress { font-size: 10px; color: #78a088; }
#creation-progress-bar { height: 4px; margin-bottom: 8px; }
#creation-actions { margin: 12px 0 8px; }
#creation-actions button { font-size: 10px; min-height: 30px; padding: 5px 10px; }
.manuscript-tabs { gap: 5px; margin: 18px 0 14px; padding: 0 0 13px; align-items: center; }
.manuscript-tabs button { font-size: 11px; min-height: 32px; padding: 6px 11px; }
.manuscript-tabs button.text-button { color: #87988b; font-weight: 400; }
#creation-focus { margin-left: auto; }
#creation-copy-status:empty { display: none; }
.manuscript-reading { max-height: none; overflow: visible; background: #fff; padding: 26px 18px 12px; border: 0; border-radius: 0; }
.manuscript-reading > h2 { font-size: 25px; color: #243e2d; font-weight: 700; line-height: 1.65; margin: 0 0 32px; letter-spacing: -.5px; }
.manuscript-reading > h3 { margin: 32px 0 18px; padding-left: 12px; border-left: 3px solid #8db194; font-size: 18px; color: #2d5138; line-height: 1.5; }
.manuscript-reading p, .manuscript-reading li, .manuscript-reading blockquote { font-size: 15px; color: #4b5a4e; line-height: 2.1; }
.manuscript-reading p { margin: 0 0 24px; }
.manuscript-reading ul, .manuscript-reading ol { padding-left: 24px; margin: 12px 0 26px; }
.manuscript-reading li { padding-left: 4px; margin: 9px 0; }
.manuscript-reading strong { color: #294b35; font-weight: 650; }
.manuscript-reading code { font-size: .9em; background: #f2f6f1; padding: 2px 5px; border-radius: 4px; }
.manuscript-reading blockquote { margin: 24px 0; background: #f7faf6; border-left: 3px solid #c8d7c6; padding: 14px 18px; white-space: pre-wrap; }
#creation-editor label { font-size: 11px; }
#creation-result-body { font-size: 14px; background: #fafcf9; border-color: #e7ede6; }
#creation-result-note { padding-top: 12px; border-top: 1px solid #f0f3ee; font-size: 10px; }
.section-number { display: flex; align-items: center; gap: 11px; }
.section-number > span { font-size: 10px; font-variant-numeric: tabular-nums; font-weight: 400; color: #a1b29f; }
.creation-image-slot { background: #fafcf9; border-color: #e8eee5; padding: 15px; border-radius: 8px; }
.creation-candidates button { width: 128px; font-size: 10px; background: white; }
.creation-candidates img { width: 114px; height: 85px; }
.creation-candidates button[data-selected=true] { border-color: #7aa17a; background: #f0f7ed; color: #4b774d; }
#creation-publications .task { background: #f6faf4; border-color: #e0eadb; }
.writing-focus .workbench-sidebar, .writing-focus .creation-layout > .panel:first-child { display: none; }
body.workbench-connected.writing-focus main { max-width: 1040px; margin-inline: auto; }
.writing-focus .creation-layout { grid-template-columns: 1fr; }
.writing-focus .manuscript-reading { max-width: 760px; margin: auto; }
.quick-switch-dialog { width: 520px; padding: 22px; border: 1px solid var(--line); }
.quick-switch-dialog h2 { font-size: 17px; margin: 0; }
.quick-switch-dialog .section-title { margin-bottom: 15px; }
#workbench-switcher-query { margin-bottom: 14px; }
#workbench-switcher-items { display: grid; gap: 5px; max-height: 52vh; overflow: auto; }
#workbench-switcher-items a { text-decoration: none; display: grid; gap: 3px; padding: 12px; border-radius: 7px; color: var(--ink); }
#workbench-switcher-items a:hover, #workbench-switcher-items a:focus-visible { background: #eef5ee; }
#workbench-switcher-items strong { font-size: 13px; }
#workbench-switcher-items small { font-size: 11px; color: var(--muted); }
#workbench-settings > .panel { border-radius: 10px; }
.workbench-page > details.panel > summary { font-size: 14px; }
@media(min-width:1600px) { .workbench-connected main { max-width: 1580px; padding-inline: 42px; }.creation-layout { grid-template-columns: 285px minmax(0,1fr); } }
@media(max-width:1180px) { .topbar-label { display: none; }.quick-switch { width: 200px; }.workbench-connected main { padding-inline: 24px; }.creation-layout { grid-template-columns: 225px minmax(0,1fr); gap: 16px; }#creation-detail { padding: 22px; }.manuscript-reading { padding-inline: 4px; }.manuscript-kicker { font-size: 8px; } }
@media(max-width:900px) { .brand-caption { display: none; }.creation-layout { grid-template-columns: 1fr; }.creation-layout > .panel:first-child { position: static; max-height: 300px; }#creation-jobs { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }.manuscript-save-state { display: none; }.quick-switch { gap: 14px; width: 190px; } }
@media(max-width:650px) {
  .topbar { height: 60px; padding: 0 14px; gap: 10px; }
  .brand { font-size: 19px; }.mark { width: 31px; height: 31px; }
  .topbar-context { gap: 8px; }.topbar .badge { display: none; }
  .quick-switch { min-height: 32px; width: 34px; padding: 5px; margin: 0 0 0 auto; justify-content: center; }
  .quick-switch > span { font-size: 0; }.quick-switch > span::after { content: '⌕'; font-size: 24px; line-height: 1; }.quick-switch kbd { display: none; }
  .workspace-heading button { font-size: 10px; padding-inline: 2px; }.nav-menu-button { display: grid; place-items: center; width: 32px; height: 32px; min-height: 32px; padding: 0; border: 0 !important; background: #f3f7f3 !important; font-size: 17px; flex: none; }
  .workbench-connected main, main { padding: 22px 16px 48px; max-width: none; margin: 0; }
  .workbench-connected .intro { margin-bottom: 20px; padding-right: 80px; }.intro h1 { font-size: 24px; }.intro > p:last-child { font-size: 11px; }.intro .eyebrow { font-size: 8px; }
  .local-preview-notice { font-size: 9px; margin-bottom: 18px; }
  .workbench-sidebar { display: none; position: fixed; left: 10px; top: 70px; bottom: 10px; width: 250px; padding: 22px 14px; background: white; border: 1px solid var(--line); border-radius: 12px; z-index: 45; box-shadow: 0 20px 70px #173e2a26; margin: 0; }
  .workbench-navigation-open .workbench-sidebar { display: flex; }.workbench-navigation-open { overflow: hidden; }
  .workbench-links { display: flex; flex-direction: column; overflow: visible; padding: 0; gap: 7px; }
  .nav-caption { display: block; padding: 0 9px; }.workbench-sidebar a { font-size: 13px; white-space: normal; border: 0; min-height: 44px; padding: 11px 14px; gap: 12px; }.workbench-sidebar a[aria-current=page] { border: 0; }
  .sidebar-bottom { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); }.sidebar-bottom a { width: auto; }.sidebar-identity { display: flex; }
  .nav-dismiss { position: fixed; inset: 60px 0 0; z-index: 40; background: #19382840 !important; border: 0; border-radius: 0; width: 100%; height: calc(100vh - 60px); padding: 0; }
  #creation-view > .section-title { top: -80px; }.creation-intro { display: none; }
  .creation-overview { padding: 12px; margin-bottom: 15px; gap: 12px; flex-wrap: wrap; }.creation-overview strong { font-size: 23px; }.creation-overview > p { flex: 1; min-width: 150px; padding-left: 12px; font-size: 9px; }.creation-overview > button { margin: 0 0 0 auto; min-height: 28px; padding: 2px 5px; font-size: 10px; }
  #creation-jobs { grid-template-columns: 1fr; }.creation-layout > .panel:first-child { max-height: 265px; padding: 14px 11px 10px; }.creation-layout { gap: 0; }#creation-job-filter { min-height: 34px; margin-bottom: 10px; }
  #creation-detail { padding: 20px 16px; scroll-margin-top: 75px; }.manuscript-kicker { margin-bottom: 14px; }#creation-detail-title { font-size: 17px; }
  .manuscript-tabs { flex-wrap: wrap; gap: 4px; }.manuscript-tabs button { font-size: 10px; padding: 5px 8px; min-height: 34px; }#creation-focus { margin-left: auto; }.manuscript-reading { padding: 22px 0 8px; }.manuscript-reading > h2 { font-size: 21px; margin-bottom: 26px; }.manuscript-reading > h3 { font-size: 17px; }.manuscript-reading p, .manuscript-reading li, .manuscript-reading blockquote { font-size: 14px; line-height: 2; }
  .creation-candidates { gap: 8px; }.creation-candidates button { width: 118px; }.creation-candidates img { width: 104px; height: 78px; }
  .quick-switch-dialog { padding: 20px; }.writing-focus .creation-overview { display: none; }
}
@media(prefers-reduced-motion:reduce) { * { scroll-behavior: auto !important; } }
