.pdf-editor {
  --editor-accent:var(--navy);
  padding:0;
  color:var(--ink);
}

.editor-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  margin-bottom:28px;
}

.editor-heading h1 {
  font-size:clamp(2rem,4vw,3rem);
  letter-spacing:-.04em;
  margin:10px 0;
}

.editor-heading p {
  color:var(--muted);
}

.editor-eyebrow {
  font-size:.72rem;
  font-weight:700;
  letter-spacing:.15em;
  color:var(--editor-accent);
}

.editor-private {
  padding:10px 16px;
  background:#eaf0f8;
  border-radius:24px;
  color:var(--editor-accent);
  font-size:.8rem;
  white-space:nowrap;
}

.editor-upload {
  background:#fff;
  border:1px dashed #a4b8d1;
  border-radius:12px;
  padding:24px;
  display:flex;
  align-items:center;
  gap:28px;
  margin-bottom:16px;
}

.editor-upload label {
  min-width:250px;
}

.editor-upload label span {
  display:block;
  font-size:.85rem;
  color:var(--muted);
  margin-top:4px;
}

.editor-upload input {
  max-width:480px;
}

.editor-toolbar {
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
  padding:16px 0;
}

.editor-toolbar span {
  display:inline-block;
  padding:0 12px;
}

.editor-grid {
  display:grid;
  grid-template-columns:minmax(0,1fr) 340px;
  gap:20px;
}

.editor-preview {
  background:#e9eef5;
  border-radius:12px;
  padding:20px;
  overflow:auto;
  align-self:start;
  min-height:320px;
  text-align:center;
}

.editor-preview canvas {
  max-width:100%;
  height:auto;
  background:white;
  box-shadow:0 4px 20px #10284618;
}

.editor-panel {
  padding:22px;
  border:1px solid var(--line);
  border-radius:12px;
}

.editor-panel h2 {
  font-size:1.05rem;
  font-weight:700;
}

.editor-panel p {
  color:var(--muted);
  line-height:1.6;
}

.editor-actions {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}

#editor-progress {
  width:100%;
  accent-color:var(--editor-accent);
}

.editor-text-actions { display:flex; flex-wrap:wrap; gap:8px; }
.editor-page { position:relative; display:inline-block; max-width:100%; container-type:inline-size; width:100%; }
.editor-page canvas { display:block; width:100%; }
#editor-fragments { position:absolute; inset:0; pointer-events:none; text-align:left; }
.editor-text-target, .editor-inline-input {
  position:absolute; pointer-events:auto; box-sizing:border-box; margin:0; padding:0;
  border:0; border-radius:0; font-family:Helvetica,Arial,sans-serif; line-height:1.2;
  text-align:left; min-width:8px;
}
.editor-text-target { background:transparent; color:transparent!important; cursor:text; white-space:pre; }
.editor-text-target:hover, .editor-text-target:focus-visible { outline:1px dashed #2463ad; background:#2463ad12; }
.editor-text-target.is-changed { background:white; color:#102846!important; outline:1px dashed #2463ad; }
.editor-inline-input { z-index:2; background:white; color:#102846!important; outline:2px solid #2463ad; min-width:60px; }

#editor-status[data-error="true"] {
  color:#b02a37;
}

#editor-status {
  overflow-wrap:anywhere;
}

.pdf-editor [hidden] {
  display:none!important;
}

@media(max-width:850px) {
  .editor-grid {
    grid-template-columns:1fr;
  }
  .editor-heading,.editor-upload {
    flex-direction:column;
    align-items:flex-start;
  }
  .editor-toolbar {
    flex-wrap:wrap;
  }
  .editor-panel {
    max-width:100%;
  }
}

@media (max-width: 850px) {
  .editor-upload label {
    min-width: 0;
  }
}
