:root {
  color-scheme: light;
  --paper: #f5f3ef;
  --white: #fff;
  --ink: #26262c;
  --muted: #68616f;
  --line: #e3e0dc;
  --accent: #7356b2;
  --accent-soft: #eee8f7;
  --accent-dark: #584187;
  --workspace: #e9e6e1;
  --danger: #b34141;
  --radius: 12px;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  color: inherit;
}
button:disabled {
  opacity: 0.35;
  cursor: default;
}
button:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #af96d9;
  outline-offset: 3px;
}
button {
  border: 0;
  background: none;
}
a {
  color: inherit;
  text-decoration: none;
}
[hidden] {
  display: none !important;
}
.app-shell {
  min-height: 100dvh;
}
.app-header {
  height: 84px;
  padding: 0 36px;
  display: flex;
  align-items: center;
  gap: 28px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: relative;
  z-index: 10;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
}
.brand-mark {
  width: 37px;
  height: 37px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  letter-spacing: -3px;
  font-weight: 600;
  padding-right: 4px;
}
.brand-mark span {
  font-size: 15px;
  align-self: flex-end;
  margin-bottom: 6px;
  margin-left: -1px;
  color: var(--accent);
}
.brand-text {
  font-size: 16px;
  letter-spacing: -0.45px;
  font-weight: 650;
}
.brand-text small {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--muted);
  font-weight: 500;
  margin-top: 5px;
}
.header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-left: auto;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  min-height: 42px;
  border-radius: 8px;
  padding: 0 18px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition:
    background 0.15s,
    transform 0.15s;
}
.button.primary {
  background: var(--ink);
  color: #fff;
}
.button.primary:hover {
  background: #44404c;
}
.button.secondary {
  background: transparent;
  border: 1px solid #cfcbc6;
}
.button.secondary:hover {
  background: #ece8e3;
}
.button.accent {
  background: var(--accent);
  color: #fff;
}
.button.danger {
  background: var(--danger);
  color: white;
}
.icon-button {
  height: 32px;
  min-width: 32px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
  font-weight: 400;
}
.icon-button:hover {
  background: #e6e1dc;
}
.icon-button svg,
.tool-button svg {
  width: 18px;
  height: 18px;
}
.header-actions > .icon-button {
  font-size: 14px;
  width: 30px;
  min-width: 30px;
  height: 30px;
  border: 1px solid #d7d2cb;
  border-radius: 50%;
  margin-right: 8px;
}
.document-heading {
  border-left: 1px solid #d6d1cb;
  padding-left: 27px;
  min-width: 0;
  max-width: 38vw;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.document-name {
  font-size: 12px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.document-state {
  font-size: 10px;
  color: var(--muted);
}
.welcome {
  max-width: 1456px;
  margin: auto;
  padding: 36px 70px 0;
}
.welcome-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 1.6px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 9px;
}
.status-dot {
  width: 6px;
  height: 6px;
  background: #827764;
  border-radius: 50%;
  display: inline-block;
  flex: none;
}
.welcome-index {
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--muted);
}
.welcome-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10%;
  align-items: center;
  padding: 50px 0 55px;
}
.welcome-copy h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(48px, 5.4vw, 80px);
  font-weight: 400;
  letter-spacing: -4px;
  line-height: 1.07;
  margin: 0 0 25px;
}
.welcome-copy h1 > span {
  font-style: italic;
  color: var(--accent);
}
.welcome-copy > p {
  font-size: 13px;
  line-height: 1.85;
  max-width: 345px;
  color: #6c6a70;
  margin: 0 0 24px;
}
.welcome-points {
  display: flex;
  gap: 10px 20px;
  flex-wrap: wrap;
  font-size: 10px;
  color: #68666d;
  line-height: 1.5;
  max-width: 400px;
}
.welcome-points > span:before {
  content: "✓";
  color: var(--accent);
  margin-right: 6px;
}
.quiet-link {
  display: inline-block;
  font-size: 10px;
  color: #6e6476;
  margin-top: 33px;
}
.quiet-link:hover {
  color: var(--accent);
}
.start-panel {
  max-width: 468px;
  width: 100%;
  justify-self: end;
}
.dropzone {
  border: 1px dashed #b9b1c2;
  border-radius: 16px;
  padding: 32px 22px 25px;
  background: #f9f7f4;
  text-align: center;
  cursor: pointer;
  transition:
    background 0.2s,
    border-color 0.2s;
}
.dropzone:hover,
.dropzone.drag-over {
  background: #eee8f7;
  border-color: var(--accent);
}
.pdf-stack {
  position: relative;
  width: 108px;
  height: 105px;
  margin: 0 auto 20px;
}
.stack-sheet {
  position: absolute;
  width: 69px;
  height: 87px;
  border: 1px solid #d4cddf;
  border-radius: 5px;
  background: #f4f0f8;
  left: 15px;
  top: 10px;
  transform: rotate(-12deg);
}
.stack-sheet.front {
  left: 30px;
  top: 3px;
  transform: rotate(7deg);
  background: #fff;
  padding: 14px;
  text-align: left;
  box-shadow: 3px 6px 15px #39304410;
}
.stack-sheet span {
  font-size: 10px;
  letter-spacing: 1px;
  font-weight: 700;
  color: var(--accent);
}
.stack-sheet i {
  display: block;
  height: 2px;
  background: #e4dee9;
  margin-top: 7px;
}
.stack-sheet i:nth-of-type(2) {
  width: 80%;
}
.stack-sheet b {
  position: absolute;
  right: -9px;
  bottom: -5px;
  width: 28px;
  height: 28px;
  background: #dfd3ee;
  border: 3px solid #f9f7f4;
  border-radius: 50%;
  font-size: 16px;
  text-align: center;
  color: var(--accent);
  font-weight: 400;
  display: grid;
  place-items: center;
}
.dropzone h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
  font-weight: 400;
  letter-spacing: -0.8px;
  line-height: 1.25;
  margin: 0 0 12px;
}
.dropzone p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
  margin: 0 0 22px;
}
.dropzone .button {
  min-width: 200px;
}
.dropzone small {
  display: block;
  font-size: 9px;
  color: #6e6476;
  margin-top: 16px;
}
.start-alternatives {
  margin-top: 13px;
  border-top: 1px solid var(--line);
}
.start-alternatives > button {
  display: flex;
  align-items: center;
  gap: 13px;
  text-align: left;
  padding: 16px 4px;
  width: 100%;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}
.start-alternatives > button:hover {
  color: var(--accent);
}
.start-alternatives small {
  display: block;
  font-size: 9px;
  color: var(--muted);
  margin-top: 4px;
}
.start-alternatives > button > span:last-child {
  margin-left: auto;
  font-size: 17px;
}
.alternative-icon {
  width: 28px;
  height: 28px;
  border: 1px solid #d5cfdc;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 18px;
  color: #6e6476;
}
.restore-button {
  width: 100%;
  background: var(--accent-soft);
  font-size: 11px;
  text-align: left;
  padding: 14px 16px;
  border-radius: 8px;
  margin-top: 14px;
  color: var(--accent-dark);
}
.restore-button > span {
  float: right;
}
.capabilities {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6%;
  border-top: 1px solid var(--line);
  padding: 26px 0 32px;
}
.capabilities > div {
  position: relative;
  padding-left: 28px;
}
.capabilities > div > span {
  position: absolute;
  left: 0;
  top: 3px;
  font-size: 9px;
  color: #6e6476;
  font-family: ui-monospace, monospace;
}
.capabilities h3 {
  font-size: 11px;
  font-weight: 600;
  margin: 0 0 9px;
}
.capabilities p {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
  max-width: 240px;
}
.welcome-footer {
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 19px 0 23px;
  font-size: 9px;
  color: #6e6476;
}
.welcome-footer > div {
  display: flex;
  gap: 25px;
}
.welcome-footer button {
  font-size: 9px;
  color: inherit;
  padding: 0;
}
.welcome-footer a:hover,
.welcome-footer button:hover {
  color: var(--accent);
}
body.document-open {
  overflow: hidden;
}
.document-open .app-header {
  height: 66px;
  padding: 0 22px;
}
.document-open .brand-text {
  font-size: 14px;
}
.document-open .brand-text small {
  font-size: 8px;
}
.document-open .brand-mark {
  width: 31px;
  height: 31px;
  font-size: 22px;
}
.document-open .brand-mark span {
  margin-bottom: 3px;
  font-size: 13px;
}
.editor {
  height: calc(100dvh - 66px);
  display: flex;
  flex-direction: column;
}
.modebar {
  display: flex;
  padding: 0 23px;
  gap: 25px;
  min-height: 46px;
  align-items: stretch;
  border-bottom: 1px solid var(--line);
  background: #fbfaf8;
  overflow-x: auto;
  scrollbar-width: none;
}
.modebar > button {
  position: relative;
  padding: 0 3px;
  font-size: 11px;
  white-space: nowrap;
  color: var(--muted);
}
.modebar > button.active {
  color: var(--ink);
  font-weight: 600;
}
.modebar > button.active:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
}
.toolstrip {
  height: 51px;
  flex: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 0 16px;
  background: #fbfaf8;
  gap: 15px;
}
.tool-buttons {
  display: flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.tool-button {
  height: 34px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 7px;
  border-radius: 6px;
  font-size: 10px;
  white-space: nowrap;
  color: #625d68;
}
.tool-button:hover {
  background: #eeebe7;
}
.tool-button.active {
  background: var(--accent-soft);
  color: var(--accent-dark);
}
.tool-button.danger {
  color: var(--danger);
}
.history-buttons {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: none;
}
.history-buttons .icon-button {
  font-size: 20px;
  color: #6e6476;
}
.toolbar-divider {
  width: 1px;
  height: 18px;
  background: var(--line);
  margin: 0 7px;
}
.editor-body {
  display: flex;
  flex: 1;
  min-height: 0;
}
.sidebar {
  width: 188px;
  flex: none;
  background: #f8f6f2;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
.sidebar-title,
.inspector-title {
  min-height: 55px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sidebar-title h2,
.inspector-title h2 {
  font-size: 11px;
  font-weight: 600;
  margin: 0;
}
.sidebar-title h2 > span {
  color: #6e6476;
  font-size: 10px;
  margin-left: 7px;
  font-weight: 400;
}
.sidebar-title .icon-button {
  font-size: 17px;
  color: var(--muted);
}
.sidebar-view {
  display: flex;
  gap: 6px;
  padding: 0 14px 15px;
}
.sidebar-view > button {
  font-size: 9px;
  color: var(--muted);
  padding: 7px 9px;
  border-radius: 5px;
}
.sidebar-view > button.active {
  background: #eae5df;
  color: var(--ink);
}
.thumbnails {
  flex: 1;
  overflow: auto;
  padding: 0 30px 20px;
  scrollbar-width: thin;
}
.thumbnail {
  display: block;
  width: 100%;
  text-align: center;
  margin: 0 0 18px;
  padding: 0;
  position: relative;
}
.thumbnail-frame {
  position: relative;
  background: white;
  box-shadow: 0 2px 7px #352c2c0c;
  border: 1px solid #dcd7d1;
  border-radius: 2px;
  min-height: 145px;
  display: grid;
  place-items: center;
  overflow: hidden;
  transition: box-shadow 0.15s;
}
.thumbnail-frame img {
  width: 100%;
  display: block;
  pointer-events: none;
}
.thumbnail.active .thumbnail-frame {
  border-color: var(--accent);
  outline: 2px solid #c5b4df;
  outline-offset: 2px;
}
.thumbnail.dragging {
  opacity: 0.4;
}
.thumbnail.drop-target .thumbnail-frame {
  outline: 3px solid #bca4dc;
}
.thumbnail-label {
  font-size: 9px;
  display: block;
  margin-top: 10px;
  color: #6e6476;
}
.thumbnail.active .thumbnail-label {
  color: var(--accent);
  font-weight: 600;
}
.thumbnail-menu {
  position: absolute;
  right: 5px;
  top: 5px;
  background: #ffffffeb;
  border: 1px solid var(--line);
  border-radius: 5px;
  width: 24px;
  height: 24px;
  display: none;
  place-items: center;
  font-size: 17px;
  box-shadow: 0 1px 4px #0001;
}
.thumbnail:hover .thumbnail-menu,
.thumbnail.active .thumbnail-menu {
  display: grid;
}
.sidebar-bottom {
  font-size: 8px;
  border-top: 1px solid var(--line);
  padding: 16px;
  display: flex;
  gap: 7px;
  align-items: center;
  color: #6e6476;
}
.sidebar-bottom .status-dot {
  background: #8c9674;
  width: 5px;
  height: 5px;
}
.workspace {
  flex: 1;
  min-width: 0;
  position: relative;
  background: var(--workspace);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.workspace-top {
  height: 42px;
  flex: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 23px;
  font-size: 9px;
  color: #6e6476;
}
.text-button {
  font-size: 9px;
  color: #6e6476;
}
.text-button:hover {
  color: var(--accent);
}
.page-scroll {
  overflow: auto;
  flex: 1;
  padding: 6px 38px 85px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  scrollbar-width: thin;
}
.page-stage {
  position: relative;
  background: #fff;
  flex: none;
  box-shadow: 0 7px 24px #2e25321a;
  line-height: 0;
}
.page-stage > img {
  display: block;
  width: 100%;
  height: 100%;
  user-select: none;
}
.page-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  touch-action: none;
}
.page-overlay .text-hit {
  fill: transparent;
  cursor: text;
}
.page-overlay .text-hit:hover {
  fill: #b896dd24;
  stroke: #9476b0;
  stroke-width: 0.7;
}
.page-overlay .annotation-hit {
  fill: transparent;
  cursor: pointer;
}
.page-overlay .annotation-hit:hover {
  stroke: #9270b9;
  stroke-width: 1;
  stroke-dasharray: 3 2;
}
.page-overlay .selection-outline {
  fill: #aa81d719;
  stroke: #8260ad;
  stroke-width: 1;
  stroke-dasharray: 4 2;
  pointer-events: none;
}
.page-overlay .search-match {
  fill: #f3cb4870;
  pointer-events: none;
}
.page-overlay .gesture-preview {
  stroke: #7654a6;
  fill: #af86d428;
  stroke-width: 1.5;
  pointer-events: none;
}
.page-overlay .form-widget {
  background: transparent;
}
.page-overlay foreignObject {
  overflow: visible;
}
.pdf-form-field {
  height: 100%;
  width: 100%;
  padding: 1px 3px;
  font-size: 12px;
  line-height: 1.4;
  background: #e4d8f55a;
  color: #28222e;
  border: 1px solid #ab89cb;
  outline: none;
  resize: none;
  font-family: Helvetica, Arial, sans-serif;
}
.pdf-form-field:focus {
  background: #eee2ff;
  border-color: #674593;
}
.document-controls {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #ddd5e0;
  border-radius: 8px;
  background: #fbfaf9ed;
  box-shadow: 0 3px 12px #35213f0c;
  padding: 0 8px;
  backdrop-filter: blur(12px);
  white-space: nowrap;
}
.page-navigation,
.zoom-controls {
  display: flex;
  align-items: center;
  gap: 3px;
}
.document-controls .icon-button {
  font-size: 19px;
  min-width: 25px;
  height: 26px;
  color: #6e6476;
}
.page-navigation input {
  width: 28px;
  border: 0;
  background: none;
  text-align: center;
  font-size: 10px;
  padding: 0;
  color: #473b52;
  -moz-appearance: textfield;
}
.page-navigation input::-webkit-inner-spin-button {
  display: none;
}
.page-navigation > span {
  font-size: 9px;
  color: #6e6476;
}
.controls-divider {
  height: 14px;
  width: 1px;
  background: #ded7e2;
  margin: 0 3px;
}
.zoom-value {
  font-size: 10px;
  width: 42px;
  color: #63566d;
}
.inspector {
  width: 228px;
  flex: none;
  background: #fcfbf9;
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
.inspector-title {
  min-height: 55px;
  border-bottom: 1px solid var(--line);
  padding: 0 18px;
}
.inspector-title .icon-button {
  font-size: 18px;
  color: #6e6476;
}
.inspector-content {
  padding: 19px 18px;
  overflow: auto;
  flex: 1;
  scrollbar-width: thin;
}
.inspector-content h3 {
  font-size: 10px;
  margin: 24px 0 12px;
}
.inspector-content h3:first-child {
  margin-top: 0;
}
.inspector-content p {
  font-size: 10px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0 0 16px;
}
.inspector-content .button {
  width: 100%;
  min-height: 35px;
  font-size: 10px;
  padding: 0 10px;
  margin-top: 9px;
}
.field {
  display: block;
  margin: 0 0 15px;
  font-size: 9px;
  color: #776a83;
}
.field > span {
  display: block;
  margin-bottom: 7px;
}
.field input:not([type="checkbox"]):not([type="color"]):not([type="range"]),
.field select,
.field textarea {
  display: block;
  width: 100%;
  border: 1px solid #ded6e4;
  border-radius: 5px;
  background: #fff;
  min-height: 33px;
  padding: 7px 9px;
  font-size: 11px;
  color: #493952;
  outline: none;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: #ae90ca;
}
.field textarea {
  resize: vertical;
  line-height: 1.5;
  min-height: 78px;
}
.field input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}
.field input[type="color"] {
  width: 100%;
  height: 34px;
  border: 1px solid #ded6e4;
  border-radius: 5px;
  background: white;
  padding: 4px;
}
.field-row {
  display: flex;
  gap: 9px;
}
.field-row > .field {
  flex: 1;
  min-width: 0;
}
.check-field {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 11px;
  line-height: 1.5;
  margin-bottom: 12px;
  color: #6c6078;
}
.check-field input {
  accent-color: var(--accent);
  margin-top: 3px;
  flex: none;
}
.color-swatches {
  display: flex;
  gap: 7px;
  margin: 0 0 17px;
}
.color-swatches button {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--swatch);
  border: 3px solid white;
  box-shadow: 0 0 0 1px #ddd2e5;
}
.color-swatches button.active {
  box-shadow: 0 0 0 2px var(--accent);
}
.inspector-divider {
  height: 1px;
  background: var(--line);
  margin: 20px 0;
}
.document-detail {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  margin: 0 0 12px;
  color: #6e6476;
  gap: 9px;
}
.document-detail strong {
  color: #685971;
  font-weight: 500;
  text-align: right;
  overflow-wrap: anywhere;
}
.inspector-footer {
  border-top: 1px solid var(--line);
  padding: 17px;
  display: flex;
  gap: 9px;
  align-items: center;
}
.local-icon {
  color: #6e6476;
  font-size: 18px;
}
.inspector-footer p {
  font-size: 8px;
  line-height: 1.7;
  color: #6e6476;
  margin: 0;
}
.inspector-footer strong {
  font-weight: 400;
  color: #6e6476;
}
.search-input {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0 12px 13px;
  border: 1px solid #d9d1e0;
  border-radius: 6px;
  background: white;
  padding: 7px;
}
.search-input > span {
  font-size: 17px;
  color: #6e6476;
}
.search-input > input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: none;
  font-size: 10px;
  outline: none;
}
.search-results {
  padding: 0 12px;
  overflow: auto;
  max-height: calc(100dvh - 310px);
}
.search-results button {
  font-size: 10px;
  text-align: left;
  display: block;
  width: 100%;
  padding: 11px 9px;
  border-bottom: 1px solid #e2dbe7;
}
.search-results button:hover {
  background: var(--accent-soft);
}
.search-results small {
  display: block;
  color: #6e6476;
  margin-top: 4px;
  font-size: 9px;
}
.search-results p {
  font-size: 10px;
  color: #6e6476;
  line-height: 1.7;
  padding: 5px;
}
.working-overlay {
  position: absolute;
  inset: 42px 0 0;
  background: #ebe7e1d9;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  backdrop-filter: blur(3px);
}
.working-overlay > p {
  font-size: 11px;
  color: #726578;
}
.spinner {
  width: 27px;
  height: 27px;
  border: 2px solid #d4c4e0;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 70;
  background: #29252eee;
  color: white;
  box-shadow: 0 5px 30px #24112d2b;
  padding: 12px 20px;
  border-radius: 8px;
  max-width: min(560px, 90vw);
  font-size: 11px;
  line-height: 1.6;
  backdrop-filter: blur(10px);
}
.toast.error {
  background: #8c3636;
}
.modal {
  border: 1px solid #ded6e2;
  background: #fbfaf8;
  border-radius: 16px;
  padding: 0;
  width: min(550px, calc(100vw - 28px));
  max-height: 88dvh;
  color: var(--ink);
  box-shadow: 0 25px 100px #27133b33;
}
.modal::backdrop {
  background: #322b3b60;
  backdrop-filter: blur(4px);
}
.modal-shell {
  margin: 0;
}
.modal-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 23px 27px 18px;
  border-bottom: 1px solid var(--line);
}
.modal-heading h2 {
  margin: 0;
  font-family: Georgia, serif;
  font-size: 25px;
  font-weight: 400;
  letter-spacing: -0.6px;
}
.modal-heading .icon-button {
  color: #6e6476;
}
.modal-body {
  padding: 24px 27px;
  overflow: auto;
  max-height: 65dvh;
}
.modal-body > p {
  font-size: 12px;
  color: #6e6476;
  line-height: 1.8;
  margin: 0 0 19px;
}
.modal-body .field {
  font-size: 10px;
}
.modal-body .field input,
.modal-body .field select,
.modal-body .field textarea {
  font-size: 12px;
}
.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 17px 27px;
  border-top: 1px solid var(--line);
}
.modal-actions .button {
  min-height: 37px;
}
.modal-note {
  font-size: 10px !important;
  color: #6e6476 !important;
  background: #efe8f5;
  border-radius: 8px;
  padding: 12px !important;
  line-height: 1.7 !important;
}
.shortcut-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 13px;
  font-size: 11px;
  color: #796486;
}
.shortcut-grid kbd {
  font:
    10px ui-monospace,
    monospace;
  background: #eee8f3;
  border-radius: 4px;
  padding: 4px 7px;
  color: #725480;
}
.modal-tabs {
  display: flex;
  gap: 5px;
  border-bottom: 1px solid var(--line);
  margin: 0 0 20px;
  padding-bottom: 10px;
}
.modal-tabs > button {
  font-size: 11px;
  border-radius: 6px;
  padding: 7px 12px;
}
.modal-tabs > button.active {
  background: var(--accent-soft);
  color: var(--accent-dark);
}
.signature-canvas {
  width: 100%;
  height: 160px;
  background: white;
  border: 1px dashed #baa8c8;
  border-radius: 8px;
  touch-action: none;
}
.signature-preview {
  width: 100%;
  height: 120px;
  object-fit: contain;
  background: white;
  border: 1px solid #e6dfeb;
  border-radius: 8px;
}
.page-grid-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.page-grid-options > button {
  padding: 15px;
  border: 1px solid #ded6e5;
  border-radius: 8px;
  font-size: 11px;
  text-align: left;
}
.page-grid-options > button:hover {
  background: var(--accent-soft);
}
.page-grid-options > button.danger {
  color: var(--danger);
}
.empty-page {
  padding: 100px 20px;
  color: #6e6476;
  font-size: 13px;
}
.warning-box {
  border: 1px solid #e1bbbb;
  background: #fbebeb;
  border-radius: 8px;
  padding: 13px;
  font-size: 11px;
  color: #954a4a;
  line-height: 1.7;
}
.page-overlay.select-tool {
  cursor: default;
}
.page-overlay.annotation-tool {
  cursor: crosshair;
}
.page-overlay.text-tool {
  cursor: text;
}
@media (min-width: 1600px) {
  .sidebar {
    width: 220px;
  }
  .thumbnails {
    padding-inline: 43px;
  }
  .inspector {
    width: 264px;
  }
  .app-header {
    padding-inline: 40px;
  }
  .workspace-top {
    padding-inline: 38px;
  }
  .welcome {
    padding-top: 50px;
  }
  .welcome-layout {
    padding-top: 80px;
    padding-bottom: 80px;
  }
}
@media (max-width: 1050px) {
  .welcome {
    padding-inline: 40px;
  }
  .welcome-layout {
    gap: 7%;
    padding-top: 45px;
  }
  .welcome-copy h1 {
    font-size: 60px;
  }
  .inspector {
    width: 205px;
  }
  .sidebar {
    width: 160px;
  }
  .thumbnails {
    padding-inline: 23px;
  }
  .tool-button {
    padding-inline: 8px;
  }
  .modebar {
    gap: 20px;
  }
  .document-heading {
    max-width: 30vw;
  }
  .page-scroll {
    padding-inline: 25px;
  }
  .workspace-top {
    padding-inline: 17px;
  }
}
@media (max-width: 800px) {
  .welcome {
    padding-inline: 28px;
  }
  .app-header {
    padding-inline: 23px;
    height: 75px;
  }
  .welcome-copy h1 {
    font-size: 48px;
    letter-spacing: -2.5px;
  }
  .welcome-layout {
    gap: 8%;
    padding-top: 40px;
  }
  .welcome-copy > p {
    font-size: 12px;
  }
  .dropzone {
    padding: 25px 16px 20px;
  }
  .dropzone h2 {
    font-size: 24px;
  }
  .pdf-stack {
    transform: scale(0.85);
    margin-bottom: 7px;
  }
  .capabilities {
    gap: 4%;
  }
  .welcome-points {
    font-size: 9px;
  }
  .document-open .app-header {
    padding: 0 15px;
    gap: 15px;
  }
  .document-heading {
    padding-left: 15px;
  }
  .document-open .header-actions {
    gap: 5px;
  }
  .header-actions > .icon-button {
    margin-right: 2px;
  }
  .document-open .button {
    padding-inline: 12px;
    gap: 8px;
    min-height: 35px;
    font-size: 10px;
  }
  .inspector {
    position: absolute;
    right: 0;
    top: 163px;
    bottom: 0;
    z-index: 12;
    width: 240px;
    box-shadow: -8px 0 30px #3022381a;
  }
  .modebar {
    padding-inline: 16px;
    gap: 20px;
  }
  .toolstrip {
    padding-inline: 10px;
    gap: 5px;
  }
  .history-buttons #inspector-toggle,
  .history-buttons #sidebar-toggle {
    display: none;
  }
  .sidebar {
    width: 146px;
  }
  .thumbnails {
    padding-inline: 23px;
  }
  .workspace-top {
    font-size: 8px;
  }
  .page-scroll {
    padding-inline: 20px;
  }
  .tool-button {
    font-size: 9px;
    gap: 5px;
    padding: 0 7px;
  }
  .history-buttons .icon-button {
    min-width: 26px;
  }
}
@media (max-width: 620px) {
  .app-header {
    height: 70px;
    padding: 0 19px;
  }
  .brand-text {
    font-size: 13px;
  }
  .brand-text small {
    font-size: 8px;
    letter-spacing: 1.2px;
  }
  .brand-mark {
    width: 32px;
    height: 32px;
    font-size: 23px;
  }
  .brand-mark span {
    margin-bottom: 4px;
    font-size: 13px;
  }
  .header-actions .button {
    min-height: 36px;
    padding-inline: 13px;
    font-size: 10px;
  }
  .header-actions > .icon-button {
    display: none;
  }
  .welcome {
    padding: 25px 23px 0;
  }
  .welcome-index {
    display: none;
  }
  .eyebrow {
    font-size: 8px;
    letter-spacing: 1px;
  }
  .welcome-layout {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 34px 0;
  }
  .welcome-copy h1 {
    font-size: 58px;
    line-height: 1.05;
    letter-spacing: -3px;
    margin-bottom: 21px;
  }
  .welcome-copy h1 br:first-child {
    display: none;
  }
  .welcome-copy > p {
    max-width: 350px;
    font-size: 12px;
    line-height: 1.75;
  }
  .welcome-copy > .quiet-link {
    display: none;
  }
  .welcome-points {
    gap: 7px 17px;
  }
  .start-panel {
    justify-self: stretch;
    max-width: none;
  }
  .dropzone {
    padding: 27px 20px 24px;
  }
  .dropzone h2 br {
    display: none;
  }
  .pdf-stack {
    height: 91px;
    margin-bottom: 10px;
  }
  .dropzone p {
    font-size: 11px;
  }
  .start-alternatives > button {
    padding-block: 15px;
  }
  .capabilities {
    grid-template-columns: 1fr;
    gap: 22px;
    padding-block: 26px;
  }
  .capabilities > div {
    padding-left: 28px;
  }
  .capabilities h3 {
    font-size: 12px;
    margin-bottom: 5px;
  }
  .capabilities p {
    max-width: none;
    font-size: 11px;
  }
  .welcome-footer {
    font-size: 8px;
    flex-direction: column;
    gap: 13px;
  }
  .welcome-footer > div {
    gap: 19px;
  }
  .welcome-footer button {
    font-size: 8px;
  }
  .document-open .app-header {
    height: 59px;
    padding-inline: 12px;
    gap: 8px;
  }
  .document-open .brand {
    gap: 7px;
  }
  .document-open .brand-mark {
    width: 27px;
    height: 27px;
    font-size: 20px;
  }
  .document-open .brand-text {
    font-size: 11px;
  }
  .document-open .brand-text small {
    font-size: 6px;
    letter-spacing: 0.7px;
  }
  .document-heading {
    border: 0;
    padding-left: 8px;
    max-width: 28vw;
  }
  .document-name {
    font-size: 9px;
  }
  .document-state {
    font-size: 7px;
  }
  .document-open .header-actions .secondary {
    display: none;
  }
  .document-open .header-actions .button {
    font-size: 9px;
    padding: 0 10px;
    min-height: 31px;
    gap: 4px;
  }
  .editor {
    height: calc(100dvh - 59px);
  }
  .modebar {
    min-height: 42px;
    padding: 0 12px;
    gap: 19px;
  }
  .modebar > button {
    font-size: 10px;
  }
  .toolstrip {
    height: 45px;
    padding: 0 7px;
  }
  .history-buttons {
    gap: 0;
  }
  .history-buttons .toolbar-divider {
    display: none;
  }
  .history-buttons .icon-button {
    min-width: 25px;
    font-size: 17px;
  }
  .history-buttons #sidebar-toggle {
    display: inline-flex;
  }
  .tool-button {
    padding-inline: 7px;
    font-size: 9px;
  }
  .tool-button svg {
    width: 15px;
    height: 15px;
  }
  .sidebar {
    position: absolute;
    left: 0;
    top: 146px;
    bottom: 0;
    z-index: 11;
    width: 155px;
    box-shadow: 5px 0 25px #3223391f;
  }
  .inspector {
    top: 146px;
    width: 220px;
  }
  .workspace-top {
    height: 36px;
    padding-inline: 14px;
    gap: 10px;
  }
  .workspace-top > span {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 70%;
  }
  .page-scroll {
    padding: 3px 15px 77px;
  }
  .document-controls {
    bottom: 16px;
  }
  .working-overlay {
    inset: 36px 0 0;
  }
  .modal-heading {
    padding: 20px 21px 15px;
  }
  .modal-heading h2 {
    font-size: 22px;
  }
  .modal-body {
    padding: 20px 21px;
  }
  .modal-actions {
    padding: 15px 21px;
  }
  .toast {
    font-size: 10px;
    padding: 11px 16px;
  }
  .inspector-title {
    min-height: 45px;
  }
  .inspector-content {
    padding-top: 15px;
  }
}

.welcome-copy,
.start-panel {
  min-width: 0;
}
.welcome-layout {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.modebar,
.toolstrip {
  max-width: 100%;
  min-width: 0;
}
@media (max-width: 620px) {
  .welcome-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .welcome-copy h1 {
    font-size: clamp(46px, 14.8vw, 58px);
  }
  .editor-body {
    min-width: 0;
  }
}
.toast {
  pointer-events: none;
}
.document-open .toast {
  bottom: 78px;
}
.page-overlay [role="button"]:focus-visible {
  stroke: #7356b2;
  stroke-width: 2;
  fill: #af86d430;
  outline: none;
}
@media (max-width: 620px) {
  .document-open .toast {
    bottom: 68px;
  }
}
.page-overlay .selection-frame {
  fill: #b68ad914;
  stroke: #7356b2;
  cursor: move;
}
.page-overlay .resize-handle {
  fill: white;
  stroke: #7356b2;
}
.resize-nw,
.resize-se {
  cursor: nwse-resize;
}
.resize-ne,
.resize-sw {
  cursor: nesw-resize;
}
.resize-n,
.resize-s {
  cursor: ns-resize;
}
.resize-e,
.resize-w {
  cursor: ew-resize;
}
.pdf-form-field:read-only {
  background: #e5e1e455;
  color: #6e6476;
}
.pdf-form-field:disabled {
  cursor: default;
  opacity: 0.8;
}
.welcome-status {
  display: block;
  margin-top: 16px;
  padding: 10px 12px;
  border-radius: 6px;
  background: #eee8f7;
  color: #584187;
  font-size: 10px;
  line-height: 1.6;
}
.dropzone[aria-disabled="true"] {
  cursor: progress;
}
.sidebar-view {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.5fr);
  gap: 2px;
  padding-inline: 12px;
}
.sidebar-view > button {
  font-size: 8px;
  padding: 7px 2px;
}
.bookmarks {
  flex: 1;
  overflow: auto;
  padding: 0 12px 20px;
  scrollbar-width: thin;
}
.bookmarks ol {
  list-style: none;
  margin: 0;
  padding: 0;
}
.bookmarks ol ol {
  padding-left: 11px;
  border-left: 1px solid #ddd4e3;
  margin-left: 5px;
}
.bookmarks button {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  font-size: 10px;
  line-height: 1.5;
  text-align: left;
  padding: 9px 6px;
  width: 100%;
  border-radius: 5px;
}
.bookmarks button:hover {
  background: #eee8f7;
  color: #584187;
}
.bookmarks button > span {
  overflow-wrap: anywhere;
}
.bookmarks small {
  font-size: 8px;
  color: #6e6476;
  flex: none;
  padding-top: 2px;
}
.bookmarks > p {
  font-size: 10px;
  line-height: 1.7;
  color: #6e6476;
  margin: 6px;
}
