:root {
  color-scheme: light;
  font: 16px/1.4 "Segoe UI Variable", "Segoe UI", Inter, system-ui, sans-serif;
  --ink: #242424;
  --muted: #606060;
  --accent: #2457c5;
  --line: #e1e1e1;
  --panel: #f7f7f7;
  --paper-width: 794px;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); }
button, select, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button, select { touch-action: manipulation; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.app { display: grid; grid-template-rows: auto auto auto minmax(0, 1fr) auto; height: 100dvh; }

.home {
  min-height: 100dvh;
  display: grid;
  grid-template: 68px 1fr / clamp(206px, 22vw, 266px) minmax(0, 1fr);
  background: #ededed;
}
.home-header {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-inline: clamp(18px, 3.4vw, 48px);
  background: #333;
  border-bottom: 1px solid #494949;
}
.suite-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid #929292;
  border-radius: 8px;
  color: white;
  font-size: .875rem;
  font-weight: 650;
  text-decoration: none;
}
.suite-link:hover { background: #4b4b4b; }
.home-sidebar {
  display: flex;
  flex-direction: column;
  gap: 32px;
  justify-content: space-between;
  background: #303030;
  color: #f5f5f5;
  border-right: 1px solid #4b4b4b;
  padding: 30px 15px 22px;
}
.home-commands { display: grid; gap: 9px; }
.home-command {
  display: flex;
  width: 100%;
  min-height: 66px;
  align-items: center;
  gap: 10px;
  padding: 8px 9px;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: inherit;
}
.home-command:hover, .home-command-new { border-color: #565656; background: #404040; }
.home-command-new:hover { background: #4b4b4b; }
.home-command strong, .home-command small { display: block; }
.home-command strong { font-size: .875rem; }
.home-command small { color: #d2d2d2; font-size: .8125rem; margin-top: 2px; }
.home-icon { width: 36px; height: 36px; border-radius: 8px; background: #404040; display: inline-grid; place-items: center; flex: none; }
.home-command-new .home-icon, .home-command:hover .home-icon { background: #555; }
.file-icon, .folder-icon, .clock-icon, .search-icon { position: relative; display: inline-block; flex: none; }
.file-icon { width: 13px; height: 17px; border: 1.5px solid; border-radius: 2px; }
.file-icon::before { content: ""; position: absolute; width: 5px; height: 5px; top: -1px; right: -1px; border: solid; border-width: 0 0 1.5px 1.5px; }
.file-icon::after { position: absolute; left: 2px; bottom: 2px; }
.file-plus::after { content: "+"; font: 700 12px/10px sans-serif; }
.file-text::after { content: ""; width: 6px; height: 4px; border-block: 1px solid; bottom: 3px; }
.folder-icon { width: 16px; height: 12px; border: 1.5px solid; border-radius: 2px; }
.folder-icon::before { content: ""; position: absolute; width: 7px; height: 3px; top: -4px; left: -1px; border: solid; border-width: 1.5px 1.5px 0; border-radius: 2px 2px 0 0; }
.clock-icon { width: 15px; height: 15px; border: 1.5px solid; border-radius: 50%; }
.clock-icon::after { content: ""; position: absolute; width: 4px; height: 5px; left: 5px; top: 2px; border: solid; border-width: 0 0 1.5px 1.5px; }
.search-icon { width: 12px; height: 12px; border: 1.4px solid; border-radius: 50%; }
.search-icon::after { content: ""; position: absolute; width: 6px; border-top: 1.4px solid; bottom: -2px; right: -4px; rotate: 45deg; }
.home-storage { display: grid; gap: 4px; border-top: 1px solid #4b4b4b; padding: 13px 6px 0; font-size: .8125rem; }
.home-storage span { color: #d2d2d2; }
.home-content { align-self: start; padding: clamp(28px, 4.6vw, 58px) clamp(25px, 5.2vw, 76px); }
.home-content > h1 { margin: 0 0 22px; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.06; font-weight: 750; letter-spacing: -.045em; }
.recent-card { border: 1px solid #cecece; border-radius: 16px; background: #fff; box-shadow: 0 5px 16px #00000005; }
.recent-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px clamp(12px, 2vw, 25px); border-bottom: 1px solid var(--line); }
.recent-header h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: .9375rem; }
.recent-header h2 .clock-icon { width: 14px; height: 14px; color: #515151; }
.recent-search { display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 220px; padding: 0 8px; background: #f7f7f7; border: 1px solid #cecece; border-radius: 7px; color: #606060; }
.recent-search:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.recent-search input { width: 100%; min-width: 0; height: 32px; padding: 0 2px; background: transparent; border: 0; outline: 0; font-size: .875rem; }
.recent-empty { display: grid; justify-items: center; align-content: center; min-height: 210px; padding: 20px; color: #383838; text-align: center; }
.recent-empty .home-icon { width: 43px; height: 43px; margin-bottom: 12px; border: 1px solid #d4d4d4; background: #e7e7e7; }
.recent-empty strong { font-size: .9375rem; }
.recent-empty p { margin: 4px 0 0; color: var(--muted); font-size: .875rem; }
.recent-documents:not(:empty) { display: grid; padding: 7px 12px; }
.recent-document { display: flex; align-items: center; justify-content: space-between; text-align: left; gap: 12px; min-height: 43px; padding: 7px 12px; border: 0; border-radius: 6px; background: white; }
.recent-document:hover { background: #f0f0f0; }
.recent-name { overflow-wrap: anywhere; font-size: .875rem; font-weight: 650; }
.recent-date { flex: none; font-size: .8125rem; color: var(--muted); }
.home-sidebar :focus-visible, .home-header :focus-visible, .topbar :focus-visible, .menu-bar :focus-visible { outline-color: #8db3ff; }

.topbar {
  min-height: 44px;
  display: flex;
  gap: 13px;
  align-items: center;
  background: #333333;
  color: #f5f5f5;
  padding: 0 22px;
  border-bottom: 1px solid #494949;
}
.brand { display: flex; flex: none; gap: 7px; align-items: center; color: #fff; font-size: .875rem; font-weight: 700; white-space: nowrap; }
.brand img { object-fit: contain; }
.brand > div span, .brand > span span { color: #8db3ff; }
.brand-button { background: transparent; border: 0; border-radius: 5px; padding: 0; }
.quick-tools { display: flex; gap: 2px; }
.quick-tools button { display: grid; place-items: center; width: 28px; height: 28px; background: transparent; border: 0; border-radius: 5px; }
.quick-tools button:hover, .brand-button:hover { background: #4b4b4b; }
.title-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-inline-start: 11px;
  border-inline-start: 1px solid #515151;
  min-width: 0;
  flex: 1;
}
.document-title { border: 1px solid transparent; background: transparent; border-radius: 6px; padding: 6px 7px; min-width: 50px; width: min(19ch, 100%); font-size: .875rem; font-weight: 650; }
.document-title:hover, .document-title:focus { border-color: #777777; }
.save-status { flex: none; font-size: .8125rem; color: #dddddd; }
.save-status::before { content: "·"; margin-inline-end: 6px; color: #dddddd; }
.top-actions { display: flex; align-items: center; gap: 6px; }
.top-actions { gap: 12px; flex: none; }
.header-button, .primary, .secondary { border: 0; border-radius: 7px; padding: 8px 12px; font-size: .875rem; font-weight: 650; }
.header-button { display: flex; align-items: center; gap: 7px; background: transparent; }
.header-button:hover, .header-button[aria-expanded="true"] { background: #4b4b4b; }
.primary { background: var(--accent); color: #ffffff; }
.primary:hover { background: #1747ac; }
.primary:disabled { cursor: wait; opacity: .65; }
.secondary { background: #f0f0f0; }
.secondary:hover { background: #e7e7e7; }
.download-icon { display: inline-block; font-size: 1.1rem; line-height: 1; margin-right: 3px; }
#commentBadge { padding: 1px 5px; border-radius: 5px; background: #515151; color: #f5f5f5; }

.menu-bar { display: flex; align-items: end; gap: 5px; padding: 4px 17px 0; color: #f5f5f5; background: #333; }
.ribbon-tabs { display: flex; align-items: end; gap: 2px; }
.ribbon-tabs button {
  padding: 6px 14px;
  border: 0;
  border-radius: 6px 6px 0 0;
  background: transparent;
  color: inherit;
  font-size: .875rem;
  font-weight: 650;
  white-space: nowrap;
}
.ribbon-tabs button:hover { background: #515151; }
.ribbon-tabs button[aria-selected="true"] { background: #fff; color: #1747ac; box-shadow: inset 0 3px #608ce4; }
.toolbar {
  display: flex;
  align-items: stretch;
  min-width: 0;
  min-height: 112px;
  overflow-x: auto;
  scrollbar-width: thin;
  padding: 8px 14px 5px;
  background: #fff;
  border-bottom: 1px solid #cdcdcd;
}
.ribbon-group {
  display: grid;
  grid-template-rows: minmax(73px, 1fr) auto;
  flex: none;
  padding: 0 11px;
  border-right: 1px solid var(--line);
}
.ribbon-group:first-child { padding-inline-start: 3px; }
.ribbon-group:last-child { border-right: 0; }
.ribbon-home { padding-inline: 9px; }
#editorShell[data-active-tab="tab-home"] { grid-template-columns: minmax(0, 1fr); }
.ribbon-home .ribbon-group { padding-inline: 7px; }
.ribbon-home .ribbon-group:first-child { padding-inline-start: 0; }
.ribbon-home .ribbon-group:last-child { padding-inline-end: 0; }
.ribbon-body { display: flex; align-items: center; gap: 5px; }
.ribbon-actions { gap: 7px; }
.ribbon-rows, .ribbon-stack { display: flex; flex-direction: column; align-items: start; justify-content: center; gap: 3px; }
.ribbon-row { display: flex; align-items: center; gap: 2px; }
.ribbon-caption { align-self: end; text-align: center; color: var(--muted); font-size: .75rem; line-height: 16px; white-space: nowrap; }
.ribbon-group-foot { position: relative; display: grid; place-items: center; min-height: 16px; padding-inline: 12px; }
.ribbon-launch {
  position: absolute;
  inset: auto -3px -1px auto;
  padding: 0;
  width: 14px;
  height: 14px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #52617b;
  font-size: .625rem;
  line-height: 1;
}
.ribbon-launch:hover { background: #edf2fb; color: var(--accent); }
.ribbon-action, .ribbon-label-button, .tool {
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
}
.ribbon-action:hover, .ribbon-label-button:hover, .tool:hover { background: #edf2fb; border-color: #d8e3f7; }
.ribbon-action[aria-pressed="true"], .ribbon-label-button[aria-pressed="true"], .tool[aria-pressed="true"] { background: #e4edfd; border-color: #c4d4f2; color: #1747ac; }
.ribbon-action {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  min-width: 55px;
  min-height: 63px;
  padding: 5px 8px;
  font-size: .875rem;
  line-height: 1.2;
  white-space: nowrap;
}
.ribbon-action > :first-child { color: #2855a7; }
.ribbon-symbol { font-size: 1.35rem; line-height: 19px; }
.ribbon-label-button { display: flex; align-items: center; gap: 7px; min-height: 23px; padding: 2px 6px; white-space: nowrap; font-size: .875rem; }
.ribbon-label-button > span { display: inline-grid; width: 14px; height: 14px; place-items: center; color: #4a6084; }
.ribbon-label-button > .search-icon { width: 11px; height: 11px; margin: 0 3px 0 0; }
.clipboard-tools { gap: 1px; }
.clipboard-tools .ribbon-label-button { padding-inline: 3px; }
.paste-stack { align-items: center; gap: 0; }
.paste-stack .ribbon-action { min-width: 46px; min-height: 48px; padding-inline: 4px; gap: 4px; }
.paste-stack .split-picker { width: 39px; height: 17px; }
.brush-icon::before { content: ""; width: 9px; height: 4px; border: 1px solid; border-radius: 2px; transform: rotate(-36deg); }
.brush-icon::after { content: ""; width: 1.5px; height: 6px; background: currentColor; transform: translate(-1px, -3px) rotate(43deg); }
.clipboard-icon, .copy-icon { position: relative; display: inline-block; width: 14px; height: 17px; border: 1.5px solid; border-radius: 2px; }
.clipboard-icon::before { content: ""; position: absolute; width: 8px; height: 4px; top: -3px; left: 1.5px; border: 1.5px solid; border-radius: 2px; background: #fff; }
.ribbon-label-button > .copy-icon { width: 10px; height: 11px; margin: 0 3px 0 1px; }
.copy-icon::before { content: ""; position: absolute; width: 8px; height: 9px; inset: -4px auto auto -4px; border: solid; border-width: 1px 0 0 1px; border-radius: 2px 0 0; }
.tool { display: grid; width: 27px; height: 29px; padding: 0; place-items: center; }
.ribbon-home .tool { width: 24px; height: 27px; }
.ribbon-home .tool.highlight-tool { width: 15px; }
.type-icon { font: 1rem/1 Georgia, serif; }
.ribbon-split { display: flex; align-items: center; }
.split-picker {
  position: relative;
  display: inline-grid;
  place-content: center;
  width: 14px;
  height: 26px;
  border: 1px solid transparent;
  border-radius: 5px;
  color: #4a6084;
  font-size: .875rem;
  line-height: 1;
}
.split-picker:hover, .split-picker:focus-within { background: #edf2fb; border-color: #d8e3f7; }
.split-picker:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.split-picker select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  appearance: none;
  opacity: 0;
  cursor: pointer;
}
.icon-picker { width: 34px; font-weight: 650; }
.icon-picker small { margin-inline-start: 2px; font-weight: 400; }
.text-effect-picker { color: #2457c5; }
.text-effect-picker > span { text-shadow: 0 0 1px #2457c5; }
.grow-font, .shrink-font, .clear-format { grid-auto-flow: column; font-size: .875rem; }
.grow-font sup, .shrink-font sup { color: var(--accent); font-size: .675rem; }
.clear-format span { color: var(--accent); font-size: .625rem; }
.sort-tool { grid-auto-flow: column; align-items: center; justify-content: center; gap: 1px; font-size: .625rem; line-height: .8; }
.sort-tool span + span { color: var(--accent); font-size: .9rem; }
.marks-tool { font-size: 1.05rem; }
.addins-icon { position: relative; width: 20px; height: 20px; border: 1px solid #2855a7; border-radius: 4px; }
.addins-icon::before, .addins-icon::after { content: ""; position: absolute; background: #2855a7; }
.addins-icon::before { width: 1px; height: 100%; left: 50%; }
.addins-icon::after { width: 100%; height: 1px; top: 50%; }
.editing-group .ribbon-label-button { padding-inline: 3px; }
.color-tool { position: relative; padding: 0 0 5px; font-family: Georgia, serif; cursor: pointer; }
.color-tool input { position: absolute; width: 19px; height: 8px; padding: 0; border: 0; bottom: 1px; left: 3px; cursor: pointer; background: transparent; }
.color-tool input::-webkit-color-swatch-wrapper { padding: 0; }
.color-tool input::-webkit-color-swatch { border: 1px solid #0002; border-radius: 2px; }
.highlight-controls { display: flex; align-items: center; gap: 1px; }
.highlight-controls mark { padding: 0 1px; border-radius: 2px; background: #fff59d; font-size: .8125rem; }
.highlight-tool { width: 15px; padding: 0; }
.highlight-tool input { position: static; width: 12px; height: 13px; }
.font-color-tool { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.clear-format { color: #4a6084; font-size: .875rem; }
select { border: 1px solid var(--line); border-radius: 6px; background-color: #fff; padding: 5px 6px; font-size: .875rem; }
.toolbar select { min-height: 28px; padding-block: 3px; }
.toolbar select:hover { background-color: #f7f9fc; }
#fontFamily { width: 102px; }
#fontSize { width: 48px; height: 28px; padding-inline: 5px 0; border: 1px solid var(--line); border-radius: 5px; font-size: .875rem; }
.styles-group { flex: 1 1 0; min-width: 174px; }
.styles-body { min-width: 0; gap: 2px; }
.style-gallery {
  display: flex;
  gap: 3px;
  flex: 1 1 0;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px;
}
.style-tile {
  flex: 0 0 auto;
  min-width: 71px;
  min-height: 45px;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: white;
  font: .8125rem Georgia, serif;
  white-space: nowrap;
}
.style-tile[data-home-style="Title"] { font-size: 1.25rem; letter-spacing: -.03em; }
.style-tile[data-home-style="Subtitle"] { color: #565d68; font-size: 1rem; }
.style-tile[data-home-style^="Heading"] { color: #2457c5; font-size: 1rem; }
.style-tile:is([data-home-style="Quote"], [data-home-style="IntenseQuote"]) { font-style: italic; }
.style-tile[data-home-style="IntenseQuote"] { color: #2457c5; text-decoration: underline; }
.style-tile:hover, .style-tile[aria-pressed="true"] { border-color: #a1b6df; background: #edf2fb; }
.gallery-controls { display: grid; flex: none; }
.gallery-controls button { width: 18px; height: 17px; padding: 0; border: 1px solid var(--line); border-radius: 3px; background: #fff; color: #465876; line-height: 1; }
.gallery-controls button:hover { background: #edf2fb; }
.gallery-controls button:disabled { color: #a0a4aa; cursor: default; background: #f7f7f7; }
.styles-dialog { width: min(690px, calc(100% - 32px)); }
.style-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 125px), 1fr)); gap: 5px; }
.style-grid .style-tile { min-width: 0; white-space: normal; }
.dialog-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 10px; }
.dialog-fields select { width: 100%; min-height: 37px; }
.dialog-fields input[type="color"] { min-height: 37px; }
.font-checks { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
.font-checks input { width: auto; }
.clipboard-history { display: grid; gap: 4px; max-height: min(270px, 45vh); overflow-y: auto; }
.clipboard-history button { padding: 7px; text-align: left; overflow-wrap: anywhere; }
.zoom-control { display: grid; gap: 4px; margin-inline: 8px; text-align: center; font-size: .875rem; }
.bubble-icon, .image-icon { width: 15px; height: 12px; border: 1.5px solid currentColor; border-radius: 3px; position: relative; display: inline-block; }
.bubble-icon::after { content: ""; position: absolute; width: 4px; height: 4px; bottom: -3px; left: 2px; border: solid currentColor; border-width: 0 0 1.5px 1.5px; rotate: -32deg; }
.image-icon::after { content: ""; position: absolute; width: 7px; height: 6px; bottom: 0; left: 3px; border: solid currentColor; border-width: 1.5px 0 0 1.5px; rotate: 45deg; }
.link-icon { display: inline-block; width: 15px; height: 7px; border: 1.5px solid currentColor; border-radius: 6px; rotate: -38deg; }
.link-icon::after { content: ""; display: block; width: 8px; margin: 2px auto 0; border-top: 1px solid currentColor; }
.lines-icon { width: 16px; height: 12px; border-block: 1.5px solid; position: relative; }
.lines-icon::after { content: ""; position: absolute; top: calc(50% - .75px); left: 0; width: 10px; border-top: 1.5px solid; }
.lines-icon.centered::after { left: 3px; }
.lines-icon.right::after { left: 6px; }
.lines-icon.justified::after { width: 100%; }

.workspace { display: grid; grid-template-columns: 208px minmax(0, 1fr); min-height: 0; }
.workspace.comments-open { grid-template-columns: 208px minmax(0, 1fr) 300px; }
.navigator, .comments-panel { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--panel); }
.navigator { justify-content: space-between; border-inline-end: 1px solid var(--line); }
.navigator-top { overflow: auto; min-height: 0; }
.rail-tabs { display: flex; gap: 4px; padding: 8px 10px; justify-content: space-between; border-bottom: 1px solid var(--line); }
.rail-tabs button { padding: 6px 11px; background: transparent; border: 0; border-radius: 6px; color: var(--muted); font-size: .875rem; font-weight: 650; }
.rail-tabs button:hover { background: #ededed; }
.rail-tabs button.active, .rail-tabs button[aria-pressed="true"] { background: #e7e7e7; color: #242424; }
.pages-panel { padding: 12px; display: grid; gap: 8px; }
.page-preview { display: grid; gap: 9px; place-items: center; width: 100%; padding: 10px; border: 1px solid #cecece; border-radius: 9px; background: #e7e7e7; color: #373737; font-size: .875rem; }
.mini-paper {
  display: grid;
  align-content: start;
  gap: 6px;
  width: 93px;
  aspect-ratio: 210 / 297;
  background: #fff;
  box-shadow: 0 2px 8px #22222220;
  outline: 1px solid #777;
  border-radius: 2px;
  padding: 16px 12px;
}
.mini-paper b, .mini-paper i { height: 2px; background: #d9d9d9; border-radius: 2px; }
.mini-paper b { width: 75%; height: 7px; background: #767676; margin-bottom: 6px; }
.mini-paper i:nth-child(4), .mini-paper i:last-child { width: 71%; }
.page-preview[data-blank] .mini-paper > * { visibility: hidden; }
.page-preview:hover { background: #dddddd; }
.page-preview:hover .mini-paper { outline-color: #515151; }
.mini-label { border-radius: 4px; background: #dcdcdc; padding: 1px 7px; color: #353535; font-size: .8125rem; }
.outline-panel { padding: 2px 12px 12px; }
.outline-entry { display: block; width: 100%; border: 0; background: transparent; border-radius: 5px; text-align: left; padding: 6px; font-size: .875rem; overflow-wrap: anywhere; }
.outline-entry:hover { background: #e7e7e7; }
.outline-entry { padding-inline-start: calc(6px + var(--outline-offset, 0px)); }
.outline-empty { color: var(--muted); font-size: .875rem; padding: 0 5px; }
.library { border-top: 1px solid var(--line); padding: 14px 12px 16px; display: grid; gap: 9px; }
.library label { font-size: .875rem; color: var(--muted); font-weight: 650; }
.library select { width: 100%; }
.library button { font-size: .875rem; color: var(--accent); border: 1px solid #cecece; background: transparent; border-radius: 6px; padding: 6px 7px; font-weight: 650; }
.library button:hover { background: #e7e7e7; }
.add-page {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid #a8badd;
  border-radius: 50%;
  background: white;
  color: var(--accent);
  font-size: 1.4rem;
  line-height: 1;
}
.add-page:hover { border-color: var(--accent); background: #edf2fb; }
.page-add-rail { margin: 0 auto 13px; }
.page-add-mobile { display: none; }

.canvas {
  --side-pad: clamp(16px, 4vw, 52px);
  overflow: auto;
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: 15px var(--side-pad) 34px;
  background: #ededed;
  scrollbar-color: #bdbdbd transparent;
}
.ruler {
  width: min(100%, var(--paper-width));
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1px 7.5% 9px;
  margin-bottom: 12px;
  min-height: 29px;
  flex: none;
  border-bottom: 1px solid #cecece;
  color: #606060;
  font-size: .75rem;
  font-variant-numeric: tabular-nums;
}
.paper {
  position: relative;
  --paper-height: 1123px;
  --paper-padding: 66px;
  --paper-gutter: clamp(21px, 7vw, 92px);
  --page-gap: 24px;
  width: min(100%, var(--paper-width));
  flex: none;
  min-height: var(--paper-height);
  padding: var(--paper-top, var(--paper-padding)) var(--paper-right, var(--paper-gutter)) var(--paper-bottom, var(--paper-padding)) var(--paper-left, var(--paper-gutter));
  background: var(--document-paper, white);
  border: 1px solid #cecece;
  box-shadow: 0 10px 35px #24242412, 0 2px 6px #2424240c;
  color: #242424;
}
#editor { position: relative; display: flow-root; width: 100%; min-height: calc(var(--paper-height) - var(--paper-top, var(--paper-padding)) - var(--paper-bottom, var(--paper-padding)) - 2px); outline: none; font: 12pt/1.62 var(--document-font, Georgia), serif; overflow-wrap: anywhere; }
#editor :is(h1, h2, h3) { line-height: 1.14; font-weight: 650; margin: 1.05em 0 .55em; }
#editor h1 { font-size: clamp(2.1rem, 4.1vw, 3.45rem); letter-spacing: -.053em; }
#editor h2 { font-size: 1.55rem; letter-spacing: -.028em; }
#editor h3 { font-size: 1.25rem; }
#editor p { margin: .7em 0 1em; }
#editor .doc-eyebrow { color: #2457c5; font: 730 .8125rem/1.25 Inter, "Segoe UI", system-ui, sans-serif; letter-spacing: .14em; margin: 0 0 22px; }
#editor .doc-eyebrow + h1 { margin: 0 0 18px; }
#editor .lead { font-size: 1.22rem; line-height: 1.5; color: #4e4e4e; }
#editor .doc-divider { width: 46px; height: 3px; background: #2457c5; margin: 28px 0 27px; }
#editor :is(ul, ol) { padding-inline-start: 26px; margin: 1em 0; }
#editor li { padding-inline-start: 3px; margin-bottom: .28em; }
#editor li::marker { color: #555555; }
#editor blockquote { margin: 26px 0; padding: 13px 16px; border-inline-start: 3px solid #7190d4; background: #f1f4f9; font-style: italic; }
#editor img { max-width: 100%; height: auto; }
#editor a { color: #2457c5; }
#editor .page-break {
  position: relative;
  --break-start: calc(var(--page-fill, 0px) + var(--paper-bottom, var(--paper-padding)));
  --break-end: calc(var(--break-start) + var(--page-gap));
  height: calc(var(--break-end) + var(--paper-top, var(--paper-padding)));
  margin: 0 calc(-1 * var(--paper-right, var(--paper-gutter)) - 1px) 0 calc(-1 * var(--paper-left, var(--paper-gutter)) - 1px);
  border: 0;
}
#editor .page-break::after { content: ""; position: absolute; inset: var(--break-start) 0 auto; height: var(--page-gap); background: var(--canvas-surface, #ededed); border-block: 1px solid #cecece; pointer-events: none; }

.comments-panel { border-inline-start: 1px solid var(--line); padding: 16px; }
.comments-panel header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.comments-panel h2 { font-size: 1.1rem; margin: 0; }
.comments-panel header button { border: 0; background: transparent; font-size: 1.5rem; border-radius: 6px; line-height: 1; }
.comments-panel header button:hover { background: #ededed; }
.local-note, .comments-empty, #commentContext { color: var(--muted); font-size: .875rem; }
.comments-list { overflow: auto; flex: 1; }
.comment-card { font-size: .875rem; background: white; border: 1px solid var(--line); padding: 10px; margin-bottom: 9px; border-radius: 8px; overflow-wrap: anywhere; }
.comment-card p { margin: 6px 0; }
.comment-card blockquote { margin: 6px 0; padding-inline-start: 7px; border-inline-start: 2px solid #a7b9db; color: var(--muted); }
.comment-meta { color: var(--muted); font-size: .8125rem; }
.comment-resolve { border-radius: 4px; border: 0; background: #f0f0f0; padding: 4px 6px; color: var(--accent); }
.comment-compose { display: grid; gap: 8px; }
.comment-compose p { margin: 0; }
.comment-compose textarea { width: 100%; padding: 8px; resize: vertical; border: 1px solid #cecece; border-radius: 7px; font-size: .875rem; }
.comment-compose .primary { justify-self: end; }
.statusbar { min-height: 35px; display: flex; gap: 11px; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); background: #ffffff; padding: 2px 17px; color: var(--muted); font-size: .8125rem; }
.statusbar div { display: flex; align-items: center; gap: 10px; }
.statusbar span + span::before { content: "·"; margin-inline-end: 10px; }
.statusbar button { border: 0; border-radius: 5px; padding: 4px 7px; background: transparent; color: var(--ink); white-space: nowrap; }
.statusbar button:hover { background: #ededed; }
.focus-mode .navigator { display: none; }
.focus-mode .workspace { grid-template-columns: minmax(0, 1fr); }
.focus-mode .workspace.comments-open { grid-template-columns: minmax(0, 1fr) 300px; }

dialog { padding: 22px; width: min(410px, calc(100% - 32px)); border: 1px solid var(--line); border-radius: 12px; color: var(--ink); box-shadow: 0 14px 55px #22222244; }
dialog::backdrop { background: #22222275; }
dialog h2 { margin: 0 0 11px; font-size: 1.2rem; }
dialog p { margin: 0 0 15px; color: var(--muted); }
dialog label { display: block; margin-top: 9px; font-size: .875rem; }
dialog input { width: 100%; border: 1px solid #cecece; border-radius: 6px; padding: 7px; }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 17px; }
#findModal { position: fixed; inset: 146px 14px auto auto; z-index: 10; margin: 0; }
#findStatus { min-height: 1.4em; margin: 10px 0 0; }
.toast { position: fixed; z-index: 8; bottom: 48px; right: 17px; max-width: min(350px, calc(100% - 34px)); padding: 10px 14px; border-radius: 7px; background: #333333; color: #f7f7f7; box-shadow: 0 5px 15px #22222233; font-size: .875rem; }

@media (max-width: 1050px) {
  .workspace, .workspace.comments-open { grid-template-columns: 165px minmax(0, 1fr); }
  .rail-tabs { padding-inline: 6px; justify-content: center; }
  .comments-panel { position: absolute; z-index: 2; top: 0; bottom: 0; right: 0; width: min(315px, 100%); box-shadow: -8px 0 25px #22222216; }
  .workspace { position: relative; }
  .focus-mode .workspace.comments-open { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 650px) {
  .home { grid-template: 58px auto 1fr / minmax(0, 1fr); }
  .home-sidebar { grid-row: 2; border-right: 0; padding: 10px; }
  .home-commands { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
  .home-command { min-height: 58px; padding: 6px; gap: 6px; }
  .home-storage { display: none; }
  .home-content { padding-inline: 15px; }
  .home-content > h1 { margin-bottom: 14px; }
  .recent-search { width: 55%; }
  .topbar { min-height: 60px; gap: 8px; padding-inline: 10px; }
  .brand { gap: 5px; }
  .top-actions .button-label, .desktop-label, .language, .quick-tools { display: none; }
  .ribbon-tabs button { padding-inline: 9px; }
  .title-row { align-items: flex-start; flex-direction: column; gap: 0; padding-inline-start: 3px; }
  .document-title { font-size: .875rem; padding-block: 1px; }
  .save-status { max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .75rem; padding-left: 7px; }
  .top-actions { gap: 3px; }
  .header-button, .top-actions .primary { padding: 7px 8px; }
  .menu-bar, .toolbar { padding-inline: 8px; }
  .workspace, .workspace.comments-open { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .navigator { border-inline-end: 0; border-bottom: 1px solid var(--line); }
  .navigator-top { display: none; }
  .library { grid-template-columns: auto minmax(0, 1fr); align-items: center; border-top: 0; padding: 5px 10px; }
  .library button { display: none; }
  .focus-mode .workspace { grid-template-rows: minmax(0, 1fr); }
  .canvas { padding-inline: 10px; }
  .paper { --paper-height: 840px; --paper-padding: 37px; }
  .page-add-mobile { display: grid; margin-top: 14px; }
  #findModal { inset: 5px 0 auto; margin-inline: auto; }
  .statusbar { padding-inline: 7px; font-size: .75rem; gap: 5px; }
  .statusbar div { gap: 4px; }
  .statusbar span + span::before { margin-inline-end: 4px; }
}
@media print {
  @page { size: A4; margin: 22mm; }
  body, .app:not([hidden]), .workspace, .canvas { display: block !important; height: auto; overflow: visible; padding: 0; background: white; }
  .home, .topbar, .menu-bar, .toolbar, .navigator, .comments-panel, .ruler, .add-page, .statusbar, .toast, dialog { display: none !important; }
  .paper { width: auto; min-height: 0; padding: 0; border: 0; box-shadow: none; zoom: 1 !important; }
  #editor { min-height: 0; }
  #editor .page-break { break-after: page; border: 0; height: 0; margin: 0; background: none; }
  #editor .page-break::after { display: none; }
}
