/* ==========================================================================
   PageSaver PDF tools.

   Design note: these tools compete with sites whose entire model is "upload
   your file to us". The one thing we have that they cannot copy is that
   nothing is uploaded, so the page is built around that claim rather than
   treating it as a badge. Each tool card's artwork is a diagram of its own
   operation drawn as paper sheets, and it performs that operation on hover —
   the illustration does the explaining, so the copy does not have to.

   Type is Oswald 400 (the site's display face, self-hosted at Regular only —
   never set it bold, the synthetic weight is ugly; use tracking for emphasis),
   system sans for reading, and a monospace for claims a sceptic can verify.
   ========================================================================== */

:root {
  --ps-ink:     #12160f;
  --ps-body:    #4b5563;
  --ps-mute:    #8a9199;
  --ps-surface: #f4f6f2;
  --ps-paper:   #ffffff;
  --ps-rule:    #e4e7df;
  --ps-green:   #28a745;
  --ps-green-d: #19692c;
  --ps-green-w: #f2fbf4;

  --ps-display: "Oswald", "Helvetica Neue", sans-serif;
  --ps-text:    "Segoe UI", Roboto, -apple-system, BlinkMacSystemFont, sans-serif;
  --ps-mono:    ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

#ps-tools-main {
  max-width: 1080px;
  /* The site header is position:fixed and emits a 60px spacer plus a <br/>
     before page content. The spacer is load-bearing — without it content
     slides under the nav — but the <br/> is dead space, so absorb just that. */
  margin: -20px auto 0;
  padding: 0 24px 80px;
  font-family: var(--ps-text);
  color: var(--ps-body);
}

/* --------------------------------------------------------------------------
   Hero. The claim is the headline; the mono line underneath is the spec that
   backs it up, in a face that reads as "technical fact" rather than marketing.
   -------------------------------------------------------------------------- */
.ps-hero { padding: 28px 0 44px; border-bottom: 1px solid var(--ps-rule); }

.ps-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--ps-mono);
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ps-green-d);
  margin: 0 0 20px;
}

.ps-product-mark {
  display: block;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
}

.ps-hero h1 {
  font-family: var(--ps-display);
  font-weight: 400;
  font-size: clamp(36px, 5.4vw, 60px);
  line-height: 1.02;
  letter-spacing: -.005em;
  color: var(--ps-ink);
  margin: 0;
  max-width: 16ch;
}
/* The operative half of the claim, kept in the same face so it reads as one
   sentence rather than a highlighted marketing phrase. */
.ps-hero h1 em { font-style: normal; color: var(--ps-green-d); }

.ps-hero .ps-lede {
  font-size: 17px;
  line-height: 1.6;
  max-width: 58ch;
  margin: 20px 0 0;
}

.ps-spec {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  font-family: var(--ps-mono);
  font-size: 12.5px;
  color: var(--ps-ink);
}
.ps-spec li { display: flex; align-items: center; gap: 8px; }
.ps-spec li::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ps-green);
}

/* --------------------------------------------------------------------------
   Tool grid.
   -------------------------------------------------------------------------- */
.ps-tools-section { padding: 40px 0 0; }

.ps-section-label {
  font-family: var(--ps-mono);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ps-mute);
  margin: 0 0 18px;
}

.ps-workflow-feature {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  margin-bottom: 18px;
  padding: 24px 26px 24px 23px;
  border: 1px solid #cfe5d3;
  border-left: 4px solid var(--ps-green);
  background: var(--ps-green-w);
  color: var(--ps-ink);
  text-decoration: none;
  transition: background .18s ease, border-color .18s ease;
}
.ps-workflow-feature:hover,
.ps-workflow-feature:focus-visible {
  background: #e7f6ea;
  border-color: #9bcda5;
  border-left-color: var(--ps-green-d);
  color: var(--ps-ink);
  text-decoration: none;
}
.ps-workflow-feature:focus-visible { outline: 2px solid var(--ps-green); outline-offset: 2px; }
.ps-workflow-feature-art .ps-diagram { width: 92px; height: 68px; }
.ps-workflow-feature-art .sheet { fill: #fff; stroke: var(--ps-ink); }
.ps-workflow-feature-art .mark { stroke: var(--ps-green); }
.ps-workflow-feature-art .fill-mark { fill: var(--ps-green); }
.ps-workflow-feature-copy { display: block; }
.ps-workflow-feature-copy strong {
  display: block;
  margin-bottom: 6px;
  font-family: var(--ps-display);
  font-size: 25px;
  font-weight: 400;
  letter-spacing: .01em;
}
.ps-workflow-feature-copy > span {
  display: block;
  max-width: 62ch;
  color: var(--ps-body);
  font-size: 14.5px;
  line-height: 1.55;
}
.ps-workflow-feature-go {
  font-family: var(--ps-mono);
  font-size: 12px;
  letter-spacing: .07em;
  white-space: nowrap;
  color: var(--ps-green-d);
  transition: transform .18s ease;
}
.ps-workflow-feature:hover .ps-workflow-feature-go { transform: translateX(4px); }

/* Hairlines are drawn by the cards themselves rather than by 1px gaps over a
   tinted container: with the gap trick, a final row that does not fill leaves
   the container colour showing through as a grey slab where cards are missing. */
.ps-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(268px, 1fr));
  gap: 0;
  background: var(--ps-paper);
  border-top: 1px solid var(--ps-rule);
  border-left: 1px solid var(--ps-rule);
}

/* Cards share hairlines rather than floating on shadows — a contact sheet of
   operations, which suits the paper subject better than six drifting tiles. */
.ps-tools-card {
  display: block;
  background: var(--ps-paper);
  padding: 28px 26px 30px;
  text-decoration: none;
  color: inherit;
  /* Each card closes its own right and bottom edge; the container closes top
     and left. Empty cells therefore draw nothing and stay white. */
  border-right: 1px solid var(--ps-rule);
  border-bottom: 1px solid var(--ps-rule);
  transition: background .18s ease;
}
.ps-tools-card:hover,
.ps-tools-card:focus-visible {
  background: var(--ps-green-w);
  text-decoration: none;
  color: inherit;
}
.ps-tools-card:focus-visible { outline: 2px solid var(--ps-green-d); outline-offset: -2px; }

.ps-tools-card h3 {
  font-family: var(--ps-display);
  font-weight: 400;
  font-size: 21px;
  letter-spacing: .01em;
  color: var(--ps-ink);
  margin: 20px 0 8px;
}
.ps-tools-card p { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--ps-body); }

.ps-card-go {
  display: block;
  margin-top: 18px;
  font-family: var(--ps-mono);
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--ps-mute);
  transition: color .18s ease, transform .18s ease;
}
.ps-tools-card:hover .ps-card-go { color: var(--ps-green-d); transform: translateX(3px); }

/* --------------------------------------------------------------------------
   Card diagrams — the signature element.

   Each one is the tool's own operation drawn as sheets of paper, and hovering
   the card performs it. The sheet outlines stay ink; only the part the tool
   acts on turns green, so the eye lands on what changes.
   -------------------------------------------------------------------------- */
.ps-diagram { display: block; width: 76px; height: 56px; overflow: visible; }
.ps-diagram .sheet {
  fill: var(--ps-paper);
  stroke: var(--ps-ink);
  stroke-width: 1.4;
  transition: transform .42s cubic-bezier(.22,.7,.3,1);
}
.ps-diagram .mark {
  stroke: var(--ps-green);
  stroke-width: 1.6;
  fill: none;
  stroke-linecap: round;
}
.ps-diagram .fill-mark { fill: var(--ps-green); stroke: none; }

/* merge — two sheets close on each other */
.ps-tools-card:hover .ps-d-merge .s-a { transform: translateX(7px); }
.ps-tools-card:hover .ps-d-merge .s-b { transform: translateX(-7px); }

/* compress — the paper and its content tighten while the side arrows close */
.ps-d-compress .s-a,
.ps-d-compress .compress-line,
.ps-d-compress .compress-arrow {
  transform-box: view-box;
  transform-origin: 38px 28px;
}
.ps-d-compress .compress-line,
.ps-d-compress .compress-arrow { transition: transform .42s cubic-bezier(.22,.7,.3,1); }
.ps-tools-card:hover .ps-d-compress .s-a { transform: scale(.82, .9); }
.ps-tools-card:hover .ps-d-compress .compress-line { transform: scaleX(.72); }
.ps-tools-card:hover .ps-d-compress .a-l { transform: translateX(5px); }
.ps-tools-card:hover .ps-d-compress .a-r { transform: translateX(-5px); }

/* split — one stack parts into two */
.ps-tools-card:hover .ps-d-split .s-a { transform: translateX(-7px); }
.ps-tools-card:hover .ps-d-split .s-b { transform: translateX(7px); }

/* print split — the wide source resolves into two print sheets */
.ps-d-print-split .print-source,
.ps-d-print-split .print-seam,
.ps-d-print-split .print-arrow,
.ps-d-print-split .print-part {
  transition: opacity .28s ease, transform .42s cubic-bezier(.22,.7,.3,1);
}
.ps-d-print-split .print-part {
  opacity: .42;
  transform: scale(.88);
  transform-origin: center;
}
.ps-tools-card:hover .ps-d-print-split .print-source,
.ps-tools-card:hover .ps-d-print-split .print-seam { opacity: .42; }
.ps-tools-card:hover .ps-d-print-split .print-arrow { transform: translateX(3px); }
.ps-tools-card:hover .ps-d-print-split .print-part { opacity: 1; transform: scale(1); }
.ps-tools-card:hover .ps-d-print-split .print-part-a { transform: translateY(-2px); }
.ps-tools-card:hover .ps-d-print-split .print-part-b { transform: translateY(2px); }

/* rotate — the sheet turns a quarter turn about its own centre */
.ps-d-rotate .s-a { transform-origin: 38px 28px; transform-box: view-box; }
.ps-tools-card:hover .ps-d-rotate .s-a { transform: rotate(90deg); }

/* sign — the signature draws itself */
.ps-d-sign .sig {
  stroke-dasharray: 64;
  stroke-dashoffset: 64;
  transition: stroke-dashoffset .62s ease .05s;
}
.ps-tools-card:hover .ps-d-sign .sig { stroke-dashoffset: 0; }

/* watermark — the band sweeps across the page */
.ps-d-watermark .band {
  opacity: 0;
  transform: translate(-10px, 10px);
  transition: opacity .3s ease, transform .42s cubic-bezier(.22,.7,.3,1);
}
.ps-tools-card:hover .ps-d-watermark .band { opacity: 1; transform: translate(0, 0); }

/* page numbers — the numeral drops into the corner */
.ps-d-pagenum .num {
  opacity: 0;
  transform: translateY(-5px);
  transition: opacity .28s ease .1s, transform .28s ease .1s;
}
.ps-tools-card:hover .ps-d-pagenum .num { opacity: 1; transform: translateY(0); }

/* OCR — the blurred scan resolves into recovered text */
.ps-d-ocr .scan { transition: opacity .34s ease; }
.ps-d-ocr .text { opacity: 0; transition: opacity .34s ease; }
.ps-tools-card:hover .ps-d-ocr .scan { opacity: 0; }
.ps-tools-card:hover .ps-d-ocr .text { opacity: 1; }

/* converter — the image and document trade places */
.ps-d-convert .s-a,
.ps-d-convert .s-b,
.ps-d-convert .convert-image,
.ps-d-convert .convert-sun,
.ps-d-convert .convert-text {
  transform-box: view-box;
  transition: transform .42s cubic-bezier(.22,.7,.3,1);
}
.ps-tools-card:hover .ps-d-convert .s-a,
.ps-tools-card:hover .ps-d-convert .convert-image,
.ps-tools-card:hover .ps-d-convert .convert-sun { transform: translateX(37px); }
.ps-tools-card:hover .ps-d-convert .s-b,
.ps-tools-card:hover .ps-d-convert .convert-text { transform: translateX(-37px); }
.ps-d-convert .convert-arrow { transition: transform .32s ease; transform-origin: center; }
.ps-tools-card:hover .ps-d-convert .convert-arrow { transform: rotate(180deg); }

/* crop — the corner marks close around the retained page window */
.ps-d-crop .crop-corner {
  transform-box: view-box;
  transition: transform .38s cubic-bezier(.22,.7,.3,1);
}
.ps-tools-card:hover .ps-d-crop .c-a { transform: translate(4px, 4px); }
.ps-tools-card:hover .ps-d-crop .c-b { transform: translate(-4px, -4px); }

/* --------------------------------------------------------------------------
   Closing strip. Substantiates the hero claim instead of padding the page.
   -------------------------------------------------------------------------- */
.ps-how { margin-top: 52px; padding-top: 36px; border-top: 1px solid var(--ps-rule); }
.ps-how h2 {
  font-family: var(--ps-display);
  font-weight: 400;
  font-size: 26px;
  color: var(--ps-ink);
  margin: 0 0 24px;
}
.ps-how-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px 40px; }
.ps-how-item p { margin: 0; font-size: 15px; line-height: 1.65; }
.ps-how-item .ps-how-key {
  display: block;
  font-family: var(--ps-mono);
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ps-ink);
  margin-bottom: 8px;
}

/* --------------------------------------------------------------------------
   Tool pages — same vocabulary as the hub.
   -------------------------------------------------------------------------- */
.ps-tool-head { padding: 28px 0 28px; }
.ps-tool-head h1 {
  font-family: var(--ps-display);
  font-weight: 400;
  font-size: clamp(32px, 4.6vw, 46px);
  line-height: 1.08;
  color: var(--ps-ink);
  margin: 0 0 14px;
}
.ps-tool-head .ps-tools-sub { font-size: 16.5px; line-height: 1.6; margin: 0; max-width: 56ch; }

.ps-back {
  display: inline-block;
  font-family: var(--ps-mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ps-mute);
  text-decoration: none;
  margin-bottom: 26px;
}
.ps-back:hover { color: var(--ps-green-d); text-decoration: none; }

.ps-tools-privacy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--ps-mono);
  font-size: 12px;
  color: var(--ps-green-d);
  background: var(--ps-green-w);
  border: 1px solid #cdead6;
  border-radius: 2px;
  padding: 6px 12px;
  margin-bottom: 32px;
}
.ps-tools-privacy::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ps-green);
}

#ps-tools-drop {
  border: 1.5px dashed #c3cbbe;
  border-radius: 3px;
  background: var(--ps-paper);
  padding: 64px 24px;
  text-align: center;
  font-size: 15px;
  color: var(--ps-body);
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease;
}
#ps-tools-drop:hover,
#ps-tools-drop.ps-dragover { border-color: var(--ps-green); background: var(--ps-green-w); }

#ps-tools-filelist { list-style: none; padding: 0; margin: 16px 0 0; }
#ps-tools-filelist li {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--ps-rule);
  background: var(--ps-paper);
  margin-bottom: -1px;
  cursor: grab;
}
#ps-tools-filelist li:active { cursor: grabbing; }
#ps-tools-filelist .ps-file-name {
  flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 14.5px; color: var(--ps-ink);
}
#ps-tools-filelist .ps-file-size { font-family: var(--ps-mono); font-size: 12px; color: var(--ps-mute); }
#ps-tools-filelist button {
  background: none; border: none; color: var(--ps-mute);
  cursor: pointer; font-size: 20px; line-height: 1; padding: 0 4px;
}
#ps-tools-filelist button:hover { color: #b91c1c; }

.ps-tools-options { margin: 28px 0 0; }
.ps-tools-options label {
  display: block; margin-bottom: 8px;
  font-family: var(--ps-mono); font-size: 12px;
  letter-spacing: .06em; text-transform: uppercase; color: var(--ps-ink);
}
.ps-tools-options input[type=text],
.ps-tools-options input[type=number],
.ps-tools-options select {
  padding: 10px 12px;
  border: 1px solid #cfd6cb;
  border-radius: 2px;
  font-size: 14px;
  font-family: var(--ps-text);
  background: var(--ps-paper);
}
.ps-tools-options input:focus-visible,
.ps-tools-options select:focus-visible { outline: 2px solid var(--ps-green); outline-offset: 1px; }

/* Run and download are one decision a step apart, so they share a row and a
   shape. Only the fill tells them apart: the mid green invites the work, the
   deep green marks the finished file. */
.ps-tools-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
}

#ps-tools-run,
.ps-tools-download,
.ps-ocr-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 30px;
  border: 0;
  border-radius: 2px;
  font-family: var(--ps-display);
  font-size: 17px;
  letter-spacing: .04em;
  text-decoration: none;
  cursor: pointer;
  transition: background .16s ease;
}

#ps-tools-run { background: var(--ps-green); color: #fff; }
#ps-tools-run:hover:not(:disabled) { background: var(--ps-green-d); }
#ps-tools-run:disabled { background: #cbd2c7; cursor: not-allowed; }

#ps-tools-run:focus-visible,
.ps-tools-download:focus-visible,
.ps-ocr-download:focus-visible { outline: 2px solid var(--ps-ink); outline-offset: 2px; }

/* The spinner rides in the button's own gap, so the label does not jump. */
#ps-tools-run.is-busy::before {
  content: "";
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, .45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ps-tools-spin .7s linear infinite;
}

@keyframes ps-tools-spin { to { transform: rotate(360deg); } }

#ps-tools-progress {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

#ps-tools-progress[hidden] { display: none; }

.ps-tools-progress-track {
  position: relative;
  flex: 1 1 220px;
  height: 4px;
  overflow: hidden;
  background: var(--ps-rule);
}

.ps-tools-progress-fill {
  width: 0;
  height: 100%;
  background: var(--ps-green);
  transition: width .3s ease;
}

/* Nothing to measure yet: a sweep says the tab is still working. */
#ps-tools-progress.is-indeterminate .ps-tools-progress-fill {
  width: 35%;
  animation: ps-tools-sweep 1.15s ease-in-out infinite;
}

@keyframes ps-tools-sweep {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(320%); }
}

.ps-tools-progress-label {
  flex: 0 0 auto;
  color: var(--ps-mute);
  font-family: var(--ps-mono);
  font-size: 12px;
  letter-spacing: .04em;
}

@media (prefers-reduced-motion: reduce) {
  #ps-tools-run.is-busy::before { animation-duration: 2.4s; }
  #ps-tools-progress.is-indeterminate .ps-tools-progress-fill {
    animation: none;
    width: 100%;
    opacity: .45;
  }
  .ps-tools-progress-fill { transition: none; }
}

#ps-tools-error {
  display: none;
  margin-top: 22px;
  padding: 14px 16px;
  background: #fef4f4;
  border-left: 3px solid #c0392b;
  color: #8f2f22;
  font-size: 14.5px;
  line-height: 1.55;
}
#ps-tools-result { display: none; margin-top: 22px; }
/* Colour and the glyph are all that remain here: geometry and type come from
   the shared rule beside the Run button. */
.ps-tools-download,
.ps-ocr-download { background: var(--ps-green-d); color: #fff; }

.ps-tools-download::before,
.ps-ocr-download::before {
  content: "\2193";
  font-size: 16px;
  line-height: 1;
}

.ps-tools-download:hover,
.ps-tools-download:focus-visible,
.ps-ocr-download:hover,
.ps-ocr-download:focus-visible {
  background: var(--ps-ink);
  color: #fff;
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   PDF/image converter. The mode switch resembles a two-way transfer ticket:
   one crisp choice, followed by only the controls relevant to that direction.
   -------------------------------------------------------------------------- */
.ps-convert-mode {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid #cfd6cb;
  background: var(--ps-surface);
}
.ps-convert-mode label { margin: 0; }
.ps-convert-mode label + label { border-left: 1px solid #cfd6cb; }
.ps-convert-mode input { position: absolute; opacity: 0; pointer-events: none; }
.ps-convert-mode span {
  display: block;
  padding: 16px 18px;
  color: var(--ps-body);
  background: var(--ps-paper);
  cursor: pointer;
  text-align: center;
  transition: color .15s ease, background .15s ease, box-shadow .15s ease;
}
.ps-convert-mode input:checked + span {
  color: var(--ps-green-d);
  background: var(--ps-green-w);
  box-shadow: inset 0 -3px 0 var(--ps-green);
}
.ps-convert-mode input:focus-visible + span {
  outline: 2px solid var(--ps-green);
  outline-offset: -3px;
}
.ps-convert-panel {
  padding: 20px;
  border: 1px solid var(--ps-rule);
  border-top: 0;
  background: var(--ps-paper);
}
.ps-convert-panel[hidden] { display: none; }
.ps-option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
}
.ps-option-grid label { margin: 0; }
.ps-option-grid select { display: block; width: 100%; margin-top: 7px; }
.ps-option-note {
  margin: 15px 0 0;
  color: var(--ps-body);
  font-size: 13.5px;
  line-height: 1.55;
}
.ps-convert-enhancement {
  min-width: 0;
  margin: 22px 0 0;
  padding: 18px;
  border: 1px solid #cfd8cc;
  background:
    linear-gradient(90deg, rgba(40, 167, 69, .055) 1px, transparent 1px),
    linear-gradient(rgba(40, 167, 69, .055) 1px, transparent 1px),
    #f8faf7;
  background-size: 24px 24px;
}
.ps-convert-enhancement legend {
  padding: 0 10px;
  color: var(--ps-green-d);
  background: var(--ps-paper);
  font-family: var(--ps-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.ps-convert-enhancement-controls {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(210px, 1.2fr) minmax(180px, 1fr);
  align-items: end;
  gap: 16px;
}
.ps-convert-enhancement-controls > label { margin: 0; }
.ps-convert-enhancement-controls select {
  display: block;
  width: 100%;
  margin-top: 7px;
}
.ps-convert-enhancement-range {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 48px;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin-top: 7px;
  padding: 0 12px;
  border: 1px solid var(--ps-rule);
  background: var(--ps-paper);
}
.ps-convert-enhancement-range input { width: 100%; accent-color: var(--ps-green); }
.ps-convert-enhancement-range output {
  color: var(--ps-green-d);
  font-family: var(--ps-mono);
  font-size: 12px;
  text-align: right;
}
.ps-convert-enhancement-all {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--ps-rule);
  background: var(--ps-paper);
  cursor: pointer;
}
.ps-convert-enhancement-all[hidden] { display: none; }
.ps-convert-enhancement-all input {
  width: 17px;
  height: 17px;
  margin: 0 10px 0 0;
  accent-color: var(--ps-green);
}
.ps-convert-enhancement-all span {
  color: var(--ps-body);
  font-family: var(--ps-mono);
  font-size: 12px;
  letter-spacing: .02em;
}
.ps-convert-enhancement-warning {
  margin: 14px 0 0;
  padding: 10px 12px;
  border-left: 3px solid #b97812;
  color: #67450f;
  background: #fff7e8;
  font-size: 13px;
  line-height: 1.5;
}
.ps-convert-enhancement-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin-top: 16px;
  border: 1px solid #ccd5c9;
  background: #ccd5c9;
}
.ps-convert-enhancement-preview[hidden] { display: none; }
.ps-convert-enhancement-preview figure {
  min-width: 0;
  margin: 0;
  background: var(--ps-paper);
}
.ps-convert-enhancement-preview figcaption {
  padding: 9px 12px;
  border-bottom: 1px solid var(--ps-rule);
  color: var(--ps-green-d);
  font-family: var(--ps-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.ps-convert-enhancement-preview figure > div {
  display: grid;
  place-items: center;
  min-height: 210px;
  padding: 16px;
  overflow: hidden;
  background: #eef2ec;
}
.ps-convert-enhancement-preview canvas {
  display: block;
  max-width: 100%;
  max-height: 340px;
  width: auto;
  height: auto;
  border: 1px solid #d1d8cf;
  background: #fff;
  box-shadow: 0 10px 24px rgba(17, 29, 19, .12);
}
.ps-convert-result {
  margin: 12px 0 0;
  color: var(--ps-body);
  font-size: 14px;
}
.ps-convert-preview {
  margin-top: 22px;
  border: 1px solid var(--ps-rule);
  background: #f1f4ef;
}
.ps-convert-preview > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 74px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--ps-rule);
  background: var(--ps-paper);
}
.ps-convert-preview-eyebrow {
  display: block;
  margin-bottom: 4px;
  color: var(--ps-green-d);
  font-family: var(--ps-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.ps-convert-preview h2 {
  margin: 0;
  color: var(--ps-ink);
  font-size: clamp(20px, 2vw, 29px);
}
.ps-convert-preview-zoom {
  display: inline-grid;
  grid-template-columns: 42px minmax(70px, auto) 42px;
  align-items: stretch;
  flex: 0 0 auto;
  border: 1px solid var(--ps-rule);
  background: var(--ps-paper);
}
.ps-convert-preview-zoom button {
  min-width: 0;
  height: 38px;
  padding: 0 11px;
  border: 0;
  border-radius: 0;
  color: var(--ps-green-d);
  background: transparent;
  box-shadow: none;
  font-family: var(--ps-mono);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}
.ps-convert-preview-zoom button + button {
  border-left: 1px solid var(--ps-rule);
}
.ps-convert-preview-zoom button:hover:not(:disabled),
.ps-convert-preview-zoom button:focus-visible {
  color: var(--ps-ink);
  background: var(--ps-green-w);
}
.ps-convert-preview-zoom-fit[aria-pressed="true"] {
  color: var(--ps-green-d);
  background: var(--ps-green-w);
}
.ps-convert-preview-zoom button:disabled {
  color: #aab1a8;
  cursor: default;
}
.ps-convert-preview-zoom-fit {
  letter-spacing: .04em;
}
.ps-convert-preview-viewer {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 54px;
  align-items: center;
  gap: 16px;
  min-height: 330px;
  padding: 24px;
}
.ps-convert-preview-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 280px;
  height: min(58vh, 580px);
  overflow: auto;
  overscroll-behavior: contain;
}
.ps-convert-preview-frame.is-zoomed {
  align-items: flex-start;
  justify-content: flex-start;
  padding: 20px;
  box-sizing: border-box;
}
.ps-convert-preview-frame canvas,
.ps-convert-preview-frame img {
  display: block;
  max-width: 100%;
  max-height: 550px;
  width: auto;
  height: auto;
  border: 1px solid #d7ddd3;
  background: #fff;
  box-shadow: 0 16px 38px rgba(17, 29, 19, .13);
}
.ps-convert-preview-frame.is-zoomed canvas,
.ps-convert-preview-frame.is-zoomed img {
  flex: 0 0 auto;
  margin: 0 auto;
}
.ps-convert-preview-arrow {
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid #bcc7b9;
  border-radius: 50%;
  color: var(--ps-green-d);
  background: var(--ps-paper);
  font-family: var(--ps-mono);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.ps-convert-preview-arrow:hover:not(:disabled),
.ps-convert-preview-arrow:focus-visible {
  border-color: var(--ps-green);
  background: var(--ps-green-w);
}
.ps-convert-preview-arrow:disabled {
  opacity: .28;
  cursor: default;
}
.ps-convert-preview-caption {
  min-height: 45px;
  padding: 12px 20px;
  border-top: 1px solid var(--ps-rule);
  color: var(--ps-body);
  background: var(--ps-paper);
  font-family: var(--ps-mono);
  font-size: 12px;
  text-align: center;
}
.ps-convert-preview-busy .ps-convert-preview-frame {
  opacity: .42;
  transition: opacity .15s ease;
}

/* --------------------------------------------------------------------------
   Crop workspace. The selected rectangle stays bright while a large shadow
   masks the discarded area, so the result is legible without extra chrome.
   -------------------------------------------------------------------------- */
.ps-crop-controls {
  border: 1px solid var(--ps-rule);
  padding: 18px;
  background: var(--ps-paper);
}
.ps-crop-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(110px, 1fr));
  gap: 12px;
}
.ps-crop-fields label { margin: 0; }
.ps-crop-fields label span {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 7px;
  color: var(--ps-mute);
}
.ps-crop-fields input { min-width: 0; width: 100%; }
.ps-crop-range { margin-top: 16px !important; }
.ps-crop-range input { display: block; width: min(100%, 300px); margin-top: 7px; }
.ps-crop-page-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 22px 0 10px;
  font-family: var(--ps-mono);
  font-size: 12px;
  color: var(--ps-body);
}
.ps-crop-page-button {
  width: 38px;
  height: 34px;
  border: 1px solid #cfd6cb;
  background: var(--ps-paper);
  color: var(--ps-green-d);
  cursor: pointer;
}
.ps-crop-page-button:disabled { color: #aab1a7; background: #f3f5f1; cursor: default; }
.ps-crop-page-button:focus-visible { outline: 2px solid var(--ps-green); outline-offset: 2px; }
.ps-crop-stage {
  position: relative;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid #cdd5c9;
  background: #dfe4dc;
  box-shadow: 0 8px 24px rgba(18, 22, 15, .1);
  touch-action: none;
}
.ps-crop-canvas { display: block; max-width: 100%; height: auto; }
.ps-crop-box {
  position: absolute;
  box-sizing: border-box;
  border: 2px solid var(--ps-green);
  box-shadow: 0 0 0 9999px rgba(18, 22, 15, .48);
  cursor: move;
  touch-action: none;
}
.ps-crop-box.is-dragging { border-color: #1f8f3b; }
.ps-crop-box:focus-visible { outline: 2px solid #fff; outline-offset: -5px; }
.ps-crop-handle {
  position: absolute;
  width: 15px;
  height: 15px;
  border: 2px solid #fff;
  background: var(--ps-green);
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--ps-green-d);
}
.ps-crop-handle-nw { left: -8px; top: -8px; cursor: nwse-resize; }
.ps-crop-handle-ne { right: -8px; top: -8px; cursor: nesw-resize; }
.ps-crop-handle-sw { left: -8px; bottom: -8px; cursor: nesw-resize; }
.ps-crop-handle-se { right: -8px; bottom: -8px; cursor: nwse-resize; }
.ps-crop-preview-error {
  margin: 22px 0 0;
  padding: 16px;
  border-left: 3px solid #c0392b;
  background: #fef4f4;
  color: #8f2f22;
}

/* --------------------------------------------------------------------------
   Print tiling. The preview keeps the source visible and overlays the planned
   sheet grid so paper size, orientation, ordering, and custom layouts remain
   understandable before processing.
   -------------------------------------------------------------------------- */
.ps-print-split-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--ps-rule);
  background: var(--ps-paper);
}
.ps-print-split-controls label { margin: 0; }
.ps-print-split-controls select,
.ps-print-split-controls input[type="number"] {
  display: block;
  width: 100%;
  margin-top: 8px;
}
.ps-print-split-conditional {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-column: 1 / -1;
  gap: 16px;
  padding: 16px;
  border-left: 3px solid var(--ps-green);
  background: var(--ps-green-bg);
}
.ps-print-split-conditional[hidden] { display: none; }
.ps-print-split-toggle {
  display: flex;
  align-items: center;
  align-self: end;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--ps-rule);
  background: var(--ps-surface);
  cursor: pointer;
}
.ps-print-split-toggle input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 0 10px 0 0;
  accent-color: var(--ps-green);
}
.ps-print-split-controls .ps-option-note {
  grid-column: 1 / -1;
  margin-top: 2px;
}
.ps-print-split-preview {
  margin: 0;
  padding: 18px;
  border: 1px solid var(--ps-rule);
  background:
    linear-gradient(90deg, rgba(31, 157, 69, .04) 1px, transparent 1px),
    linear-gradient(rgba(31, 157, 69, .04) 1px, transparent 1px),
    var(--ps-surface);
  background-size: 22px 22px;
}
.ps-print-split-preview figcaption {
  margin-bottom: 12px;
  color: var(--ps-green-d);
  font: 700 11px/1.2 var(--ps-mono);
  letter-spacing: .09em;
  text-transform: uppercase;
}
.ps-print-split-preview-stage {
  position: relative;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid #c7cec3;
  background: var(--ps-paper);
  box-shadow: 0 12px 30px rgba(18, 32, 23, .1);
}
.ps-print-split-preview-stage canvas {
  display: block;
  max-width: 100%;
  height: auto;
}
.ps-print-split-grid {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}
.ps-print-split-grid-cell {
  position: absolute;
  min-width: 0;
  min-height: 0;
  outline: 1.5px solid var(--ps-green);
  outline-offset: -1px;
  background: rgba(31, 157, 69, .035);
}
.ps-print-split-grid-cell > span {
  position: absolute;
  top: 8px;
  left: 8px;
  max-width: calc(100% - 16px);
  overflow: hidden;
  padding: 5px 8px;
  color: #fff;
  background: var(--ps-green-d);
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 2px;
  font: 700 10px/1 var(--ps-mono);
  letter-spacing: .04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ps-print-split-grid.is-single .ps-print-split-grid-cell { outline-style: dashed; }
.ps-print-split-result {
  margin: 14px 0 0;
  color: var(--ps-body);
  font-size: 14px;
  line-height: 1.55;
}

/* --------------------------------------------------------------------------
   Password protection. The lock is drawn in CSS so the security affordance
   stays crisp and useful without loading a decorative icon library.
   -------------------------------------------------------------------------- */
.ps-security-card {
  overflow: hidden;
  border: 1px solid #cfd8cc;
  background: var(--ps-paper);
}
.ps-security-intro {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  padding: 24px;
  border-top: 4px solid var(--ps-green);
  border-bottom: 1px solid var(--ps-rule);
  background:
    linear-gradient(90deg, rgba(40,169,73,.07), transparent 48%),
    var(--ps-paper);
}
.ps-security-intro h2 {
  margin: 2px 0 5px;
  color: var(--ps-ink);
  font-family: var(--ps-display);
  font-size: clamp(23px, 3vw, 31px);
  font-weight: 400;
}
.ps-security-intro p:not(.ps-security-kicker) {
  max-width: 66ch;
  margin: 0;
  color: var(--ps-body);
  font-size: 14px;
  line-height: 1.55;
}
.ps-security-kicker {
  margin: 0;
  color: var(--ps-green-d);
  font-family: var(--ps-mono);
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.ps-security-lock {
  position: relative;
  display: block;
  width: 54px;
  height: 54px;
  border: 1px solid #bcd3bd;
  border-radius: 50%;
  background: var(--ps-green-w);
}
.ps-security-lock::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 13px;
  width: 16px;
  height: 17px;
  border: 2px solid var(--ps-green-d);
  border-bottom: 0;
  border-radius: 9px 9px 0 0;
}
.ps-security-lock::after {
  content: "";
  position: absolute;
  left: 14px;
  top: 27px;
  width: 26px;
  height: 20px;
  border-radius: 2px;
  background: var(--ps-green-d);
}
.ps-security-lock i {
  position: absolute;
  z-index: 1;
  left: 25px;
  top: 34px;
  width: 4px;
  height: 7px;
  border-radius: 3px;
  background: #fff;
}
.ps-security-unlock .ps-security-lock::before {
  left: 25px;
  transform: rotate(12deg);
  transform-origin: 2px 17px;
}
.ps-security-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 24px;
}
.ps-security-fields-single { grid-template-columns: minmax(260px, 560px); }
.ps-security-field { min-width: 0; }
.ps-password-control { display: flex; min-width: 0; }
.ps-tools-options .ps-password-control input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #cfd6cb;
  border-radius: 2px 0 0 2px;
  background: var(--ps-paper);
  color: var(--ps-ink);
  font: 15px/1.2 var(--ps-text);
}
.ps-password-control button {
  min-width: 72px;
  padding: 0 13px;
  border: 1px solid #cfd6cb;
  border-left: 0;
  border-radius: 0 2px 2px 0;
  background: #f6f8f5;
  color: var(--ps-green-d);
  cursor: pointer;
  font: 11px/1 var(--ps-mono);
  letter-spacing: .04em;
}
.ps-password-control button:hover { background: var(--ps-green-w); }
.ps-tools-options .ps-password-control input[aria-invalid="true"] { border-color: #b04435; }
.ps-security-field-error {
  margin: 7px 0 0;
  color: #9b3529;
  font-size: 12px;
  line-height: 1.4;
}
.ps-password-control input:focus-visible,
.ps-password-control button:focus-visible {
  position: relative;
  z-index: 1;
  outline: 2px solid var(--ps-green);
  outline-offset: 1px;
}
.ps-security-warning {
  margin: 0;
  padding: 15px 24px;
  border-top: 1px solid #eadfca;
  background: #fffbf3;
  color: #735420;
  font-size: 13px;
  line-height: 1.55;
}
.ps-d-protect .lock-loop,
.ps-d-unlock .lock-loop { transform-origin: 38px 31px; transition: transform .24s ease; }
.ps-tools-card:hover .ps-d-protect .lock-loop { transform: translateY(-1px); }
.ps-tools-card:hover .ps-d-unlock .lock-loop { transform: rotate(-13deg) translate(2px, -1px); }

@media (max-width: 640px) {
  .ps-security-intro { grid-template-columns: 48px minmax(0, 1fr); padding: 20px 18px; }
  .ps-security-lock { width: 44px; height: 44px; transform: scale(.82); transform-origin: left center; }
  .ps-security-fields { grid-template-columns: 1fr; padding: 20px 18px; }
  .ps-security-warning { padding: 14px 18px; }
}

/* --------------------------------------------------------------------------
   Analyzer. The report is deliberately tabular and restrained: these are
   measured source bytes and document flags, not an estimated savings pitch.
   -------------------------------------------------------------------------- */
.ps-analyze-status {
  min-height: 22px;
  font-family: var(--ps-mono);
  font-size: 12.5px;
  color: var(--ps-green-d);
}
.ps-analyze-report { margin-top: 28px; }
.ps-analyze-report h2 {
  margin: 34px 0 14px;
  font-family: var(--ps-display);
  font-weight: 400;
  font-size: 24px;
  color: var(--ps-ink);
}
.ps-analyze-report h3 {
  margin: 24px 0 10px;
  font-family: var(--ps-mono);
  font-size: 12px;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ps-ink);
}
.ps-analyze-note {
  max-width: 72ch;
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ps-body);
}
.ps-analyze-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--ps-rule);
  border-left: 1px solid var(--ps-rule);
}
.ps-analyze-summary > div {
  min-width: 0;
  padding: 18px;
  border-right: 1px solid var(--ps-rule);
  border-bottom: 1px solid var(--ps-rule);
  background: var(--ps-paper);
}
.ps-analyze-summary dt {
  min-height: 32px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--ps-mute);
}
.ps-analyze-summary dd {
  margin: 8px 0 0;
  font-family: var(--ps-mono);
  font-size: 19px;
  color: var(--ps-ink);
}
.ps-analyze-table-wrap { overflow-x: auto; }
.ps-analyze-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--ps-paper);
  font-size: 14px;
}
.ps-analyze-table th,
.ps-analyze-table td {
  padding: 11px 14px;
  border: 1px solid var(--ps-rule);
  text-align: left;
}
.ps-analyze-table th { width: 72%; font-weight: 400; color: var(--ps-body); }
.ps-analyze-table td {
  font-family: var(--ps-mono);
  color: var(--ps-ink);
  white-space: nowrap;
}
.ps-analyze-reasons { margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.7; }
.ps-analyze-warning {
  margin: 24px 0 0;
  padding: 14px 16px;
  border-left: 3px solid #b7791f;
  background: #fffaf0;
  color: #7b4d12;
  font-size: 14px;
  line-height: 1.55;
}

/* --------------------------------------------------------------------------
   Inspector and Safe Share. Findings read like a document health record:
   severity is visible, but the interface avoids implying that inspection is
   a security certification. The removal choices remain explicit and editable.
   -------------------------------------------------------------------------- */
.ps-inspect-status {
  min-height: 22px;
  margin: 0;
  color: var(--ps-green-d);
  font-family: var(--ps-mono);
  font-size: 13px;
}
.ps-inspect-report,
.ps-safe-share,
.ps-safe-share-result {
  margin-top: 26px;
  border: 1px solid var(--ps-rule);
  background: var(--ps-paper);
}
.ps-inspect-report-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: start;
  padding: 26px;
  border-top: 4px solid var(--ps-green);
  border-bottom: 1px solid var(--ps-rule);
}
.ps-inspect-eyebrow {
  margin: 0 0 9px;
  color: var(--ps-green-d);
  font-family: var(--ps-mono);
  font-size: 11px;
  letter-spacing: .15em;
  text-transform: uppercase;
}
.ps-inspect-report h2,
.ps-safe-share h2,
.ps-safe-share-result h2 {
  margin: 0;
  color: var(--ps-ink);
  font-family: var(--ps-display);
  font-size: 30px;
  font-weight: 400;
  line-height: 1.15;
}
.ps-inspect-report-head p:last-child,
.ps-safe-share-head > p:last-child,
.ps-safe-share-result > p {
  max-width: 66ch;
  margin: 10px 0 0;
  line-height: 1.6;
}
.ps-inspect-level {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid currentColor;
  color: var(--ps-green-d);
  font-family: var(--ps-mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
}
.ps-inspect-level.is-review { color: #8a5a0a; background: #fffbeb; }
.ps-inspect-level.is-attention,
.ps-inspect-level.is-blocked { color: #991b1b; background: #fff5f5; }
.ps-inspect-findings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-bottom: 1px solid var(--ps-rule);
}
.ps-inspect-finding {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  min-height: 62px;
  padding: 0 20px;
  border-right: 1px solid var(--ps-rule);
  border-bottom: 1px solid var(--ps-rule);
  box-shadow: inset 3px 0 0 #bcc7bd;
}
.ps-inspect-finding:nth-child(2n) { border-right: 0; }
.ps-inspect-finding.is-clear { box-shadow: inset 3px 0 0 var(--ps-green); }
.ps-inspect-finding.is-review { box-shadow: inset 3px 0 0 #d69e2e; }
.ps-inspect-finding.is-attention,
.ps-inspect-finding.is-blocked { box-shadow: inset 3px 0 0 #c53030; }
.ps-inspect-finding strong { color: var(--ps-ink); font-size: 14px; font-weight: 600; }
.ps-inspect-finding span { color: var(--ps-body); font-family: var(--ps-mono); font-size: 14px; }
.ps-inspect-evidence { padding: 18px 24px 22px; }
.ps-inspect-evidence summary {
  cursor: pointer;
  color: var(--ps-ink);
  font-family: var(--ps-mono);
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.ps-inspect-evidence dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 18px 0 0;
  border: 1px solid var(--ps-rule);
}
.ps-inspect-evidence dl > div { padding: 14px; border-right: 1px solid var(--ps-rule); border-bottom: 1px solid var(--ps-rule); }
.ps-inspect-evidence dt { min-height: 34px; color: var(--ps-mute); font-size: 12px; }
.ps-inspect-evidence dd { margin: 5px 0 0; color: var(--ps-ink); font-family: var(--ps-mono); }
.ps-inspect-hash { display: grid; gap: 4px; margin: 16px 0 0; }
.ps-inspect-hash strong { color: var(--ps-body); font-size: 12px; }
.ps-inspect-hash span { overflow-wrap: anywhere; color: var(--ps-ink); font-family: var(--ps-mono); font-size: 12px; }
.ps-inspect-report-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 24px 24px; }
.ps-inspect-report-actions button,
#ps-safe-share-create,
.ps-safe-share-download {
  min-height: 43px;
  padding: 0 17px;
  border: 1px solid var(--ps-green-d);
  border-radius: 0;
  background: transparent;
  color: var(--ps-green-d);
  cursor: pointer;
  font-family: var(--ps-mono);
  font-size: 12px;
  letter-spacing: .06em;
  text-decoration: none;
}
.ps-inspect-report-actions button:hover,
.ps-inspect-report-actions button:focus-visible,
.ps-safe-share-download:hover,
.ps-safe-share-download:focus-visible { background: var(--ps-green-w); }
.ps-safe-share-head,
.ps-safe-share-result { padding: 26px; }
.ps-safe-share fieldset { margin: 0; padding: 0; border: 0; }
.ps-safe-share legend {
  width: 100%;
  box-sizing: border-box;
  padding: 16px 26px;
  border-top: 1px solid var(--ps-rule);
  border-bottom: 1px solid var(--ps-rule);
  color: var(--ps-ink);
  font-family: var(--ps-mono);
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.ps-safe-share fieldset label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  margin: 0;
  padding: 17px 26px;
  border-bottom: 1px solid var(--ps-rule);
  cursor: pointer;
}
.ps-safe-share fieldset label:hover { background: var(--ps-green-w); }
.ps-safe-share input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--ps-green-d); }
.ps-safe-share label span { display: grid; gap: 3px; }
.ps-safe-share label strong { color: var(--ps-ink); font-size: 14px; }
.ps-safe-share label small { max-width: 76ch; color: var(--ps-body); font-size: 13px; line-height: 1.5; }
.ps-safe-share > .ps-analyze-warning { margin: 18px 26px 0; }
#ps-safe-share-create { margin: 22px 26px 0; background: var(--ps-green-d); color: #fff; }
#ps-safe-share-create:hover:not(:disabled) { background: var(--ps-ink); border-color: var(--ps-ink); }
#ps-safe-share-create:disabled { cursor: not-allowed; opacity: .45; }
.ps-safe-share-note { margin: 12px 26px 24px; color: var(--ps-mute); font-size: 12.5px; line-height: 1.55; }
.ps-safe-share-team {
  display: grid;
  grid-template-columns: minmax(150px, .45fr) minmax(180px, .8fr) minmax(280px, 1.7fr);
  gap: 18px;
  align-items: center;
  padding: 20px 26px;
  border-top: 1px solid #cfe0cb;
  background: var(--ps-green-w);
}
.ps-safe-share-team .ps-inspect-eyebrow { margin: 0; }
.ps-safe-share-team strong { color: var(--ps-ink); font-family: var(--ps-display); font-size: 21px; font-weight: 400; }
.ps-safe-share-team span { font-size: 13px; line-height: 1.55; }
.ps-safe-share-result { border-top: 4px solid var(--ps-green); }
.ps-safe-share-result .ps-analyze-summary { margin: 22px 0; }
.ps-safe-share-download { display: inline-flex; align-items: center; background: var(--ps-green-d); color: #fff; }
.ps-safe-share-download:hover,
.ps-safe-share-download:focus-visible { background: var(--ps-ink); border-color: var(--ps-ink); }

.ps-d-inspect .inspect-shield,
.ps-d-inspect .inspect-check { transform-origin: 53px 33px; transition: transform .24s ease, opacity .2s ease; }
.ps-d-inspect .inspect-check { stroke-dasharray: 15; stroke-dashoffset: 15; }
.ps-tools-card:hover .ps-d-inspect .inspect-shield { transform: scale(1.08); }
.ps-tools-card:hover .ps-d-inspect .inspect-check { stroke-dashoffset: 0; }

/* --------------------------------------------------------------------------
   Local PDF editor. This is a compact document workstation rather than a
   stack of form controls: pages, paper, and properties remain visible at the
   same time, with the existing green editorial system acting as selection ink.
   -------------------------------------------------------------------------- */
.ps-edit-app {
  box-sizing: border-box;
  width: min(1400px, calc(100vw - 32px));
  margin-left: 50%;
  transform: translateX(-50%);
  border: 1px solid #d8ded5;
  background: #f8faf7;
}
.ps-edit-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 12px;
  border-bottom: 1px solid #d8ded5;
  background: var(--ps-paper);
}
.ps-edit-tool-group,
.ps-edit-history-group { display: flex; flex-wrap: wrap; gap: 5px; }
.ps-edit-tool-group { flex: 1 1 720px; }
.ps-edit-history-group { flex: 0 0 auto; align-content: flex-start; }
.ps-edit-toolbar button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 2px;
  background: transparent;
  color: var(--ps-body);
  cursor: pointer;
  font-family: var(--ps-mono);
  font-size: 11px;
  letter-spacing: .035em;
}
.ps-edit-toolbar button:hover:not(:disabled) { border-color: #c7d2c5; background: #f5f8f4; color: var(--ps-ink); }
.ps-edit-toolbar button.is-active { border-color: var(--ps-green); background: var(--ps-green-w); color: var(--ps-green-d); }
.ps-edit-toolbar button:focus-visible { outline: 2px solid var(--ps-green); outline-offset: 1px; }
.ps-edit-toolbar button:disabled { cursor: not-allowed; opacity: .4; }
.ps-edit-menu { position: relative; }
.ps-edit-menu-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 112px;
  border-color: #d8ded5 !important;
  background: #fff !important;
}
.ps-edit-menu-trigger span { color: var(--ps-mute); font-size: 9px; }
.ps-edit-menu.has-active .ps-edit-menu-trigger {
  border-color: var(--ps-green) !important;
  background: var(--ps-green-w) !important;
  color: var(--ps-green-d);
}
.ps-edit-menu-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 20;
  display: grid;
  min-width: 210px;
  padding: 6px;
  border: 1px solid #cbd4c8;
  background: #fff;
  box-shadow: 0 12px 28px rgba(24,38,21,.16);
}
.ps-edit-menu-panel[hidden] { display: none !important; }
.ps-edit-menu-panel button {
  width: 100%;
  min-height: 36px;
  text-align: left;
  white-space: nowrap;
}
.ps-edit-menu-panel button + button { border-top: 1px solid #edf0eb; }
.ps-edit-toolbar .ps-edit-ocr-action {
  border-color: #cfe0cb;
  background: var(--ps-green-w);
  color: var(--ps-green-d);
}
.ps-edit-tool-group > .ps-edit-ocr-menu { margin-left: 7px; }
.ps-edit-ocr-menu .ps-edit-menu-panel { min-width: 190px; }
.ps-edit-toolbar .ps-edit-redact-action {
  border-color: #7f1d1d;
  background: #fff5f5;
  color: #8b1f1f;
}
.ps-edit-toolbar .ps-edit-redact-action.is-active { border-color: #7f1d1d; background: #7f1d1d; color: #fff; }
.ps-edit-toolbar .ps-edit-ocr-action[aria-busy="true"] {
  background-image: linear-gradient(90deg, transparent, rgba(40,167,69,.13), transparent);
  background-size: 220% 100%;
  animation: ps-edit-ocr-progress 1.2s linear infinite;
}
@keyframes ps-edit-ocr-progress { to { background-position: -220% 0; } }
.ps-edit-history-group { padding-left: 12px; border-left: 1px solid var(--ps-rule); }
.ps-edit-history-group button:last-child:hover:not(:disabled) { border-color: #c53030; color: #991b1b; }
.ps-edit-beta {
  margin-left: 6px;
  padding: 2px 4px;
  background: #f4ead2;
  color: #7b4d12;
  font-size: 8px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
#ps-edit-image-input { display: none !important; }
.ps-edit-signature-dialog {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  padding: 24px;
  background: rgba(18,22,15,.58);
}
.ps-edit-signature-dialog[hidden] { display: none !important; }
.ps-edit-signature-panel {
  width: min(720px, 100%);
  box-sizing: border-box;
  padding: 24px;
  border: 1px solid #cbd4c8;
  border-top: 4px solid var(--ps-green);
  background: #fff;
  box-shadow: 0 24px 70px rgba(12,22,10,.28);
}
.ps-edit-signature-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.ps-edit-signature-eyebrow {
  margin: 0 0 7px;
  color: var(--ps-green-d);
  font: 10px/1.3 var(--ps-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
}
.ps-edit-signature-head h2 {
  margin: 0 0 18px;
  color: var(--ps-ink);
  font: 400 30px/1.1 var(--ps-display);
}
.ps-edit-signature-close {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--ps-rule);
  background: #fff;
  color: var(--ps-body);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}
#ps-edit-signature-canvas {
  display: block;
  width: 100%;
  height: 220px;
  box-sizing: border-box;
  border: 1px solid #bcc8b9;
  background-color: #fbfcfa;
  background-image: linear-gradient(to bottom, transparent calc(72% - 1px), #dfe5dc 72%, transparent calc(72% + 1px));
  cursor: crosshair;
  touch-action: none;
}
#ps-edit-signature-canvas:focus-visible { outline: 3px solid rgba(40,167,69,.35); outline-offset: 3px; }
.ps-edit-signature-help { margin: 11px 0 0; color: var(--ps-body); font-size: 13px; line-height: 1.5; }
.ps-edit-signature-status { min-height: 20px; margin: 7px 0 0; color: #9a3412; font-size: 12px; }
.ps-edit-signature-save { display: flex; gap: 8px; align-items: center; margin-top: 8px; font-size: 12px; color: var(--ps-body); }
.ps-edit-signature-library { margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--ps-rule); }
.ps-edit-signature-library-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ps-edit-signature-library-head strong { font: 10.5px/1.3 var(--ps-mono); letter-spacing: .07em; text-transform: uppercase; }
.ps-edit-signature-library-head button,
.ps-edit-signature-library-item button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid #cbd4c8;
  background: #fff;
  color: var(--ps-body);
  cursor: pointer;
  font: 10px/1 var(--ps-mono);
}
.ps-edit-signature-library-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 10px; }
.ps-edit-signature-library-list > p { grid-column: 1 / -1; margin: 4px 0; color: var(--ps-mute); font-size: 12px; }
.ps-edit-signature-library-item { display: grid; grid-template-columns: 1fr auto; border: 1px solid var(--ps-rule); background: #fafbf9; }
.ps-edit-signature-library-item img { grid-column: 1 / -1; width: 100%; height: 64px; object-fit: contain; background: transparent; }
.ps-edit-signature-library-item button.is-danger { padding: 0 11px; color: #991b1b; }
.ps-edit-signature-actions { display: grid; grid-template-columns: auto 1fr auto auto; gap: 8px; margin-top: 12px; }
.ps-edit-signature-actions button {
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid #cbd4c8;
  background: #fff;
  color: var(--ps-body);
  cursor: pointer;
  font: 11px/1 var(--ps-mono);
}
.ps-edit-signature-actions button:hover,
.ps-edit-signature-actions button:focus-visible { border-color: var(--ps-green-d); color: var(--ps-green-d); }
.ps-edit-signature-actions .is-primary { border-color: var(--ps-green-d); background: var(--ps-green-d); color: #fff; }
.ps-edit-signature-actions .is-primary:hover,
.ps-edit-signature-actions .is-primary:focus-visible { border-color: var(--ps-ink); background: var(--ps-ink); color: #fff; }
.ps-edit-guidance {
  min-height: 36px;
  margin: 0;
  padding: 9px 16px;
  border-bottom: 1px solid #d8ded5;
  color: var(--ps-green-d);
  font-family: var(--ps-mono);
  font-size: 11.5px;
}
.ps-edit-layout {
  display: grid;
  grid-template-columns: 196px minmax(520px, 1fr) 244px;
  height: clamp(560px, 72vh, 780px);
  min-height: 0;
  overflow: hidden;
}
.ps-edit-pages,
.ps-edit-properties { min-width: 0; min-height: 0; background: var(--ps-paper); overflow: auto; }
.ps-edit-pages { border-right: 1px solid #d8ded5; }
.ps-edit-properties { border-left: 1px solid #d8ded5; }
.ps-edit-panel-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 45px;
  padding: 0 14px;
  border-bottom: 1px solid var(--ps-rule);
  background: rgba(255,255,255,.96);
  color: var(--ps-ink);
  font-family: var(--ps-mono);
  font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.ps-edit-panel-head span { color: var(--ps-mute); font-weight: 400; letter-spacing: 0; text-transform: none; }
.ps-edit-page-actions {
  position: sticky;
  top: 45px;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--ps-rule);
  background: rgba(247,249,245,.97);
}
.ps-edit-page-actions button {
  display: grid;
  min-width: 0;
  min-height: 34px;
  padding: 0;
  place-items: center;
  border: 1px solid #cad3c7;
  background: #fff;
  color: var(--ps-green-d);
  cursor: pointer;
  font-family: var(--ps-mono);
  font-size: 18px;
  line-height: 1;
}
.ps-edit-page-actions button:hover:not(:disabled) {
  border-color: var(--ps-green);
  background: var(--ps-green-w);
}
.ps-edit-page-actions button:focus-visible { outline: 2px solid var(--ps-green); outline-offset: 1px; }
.ps-edit-page-actions button:disabled { cursor: not-allowed; opacity: .34; }
.ps-edit-page-actions button.is-danger { color: #8b332b; }
.ps-edit-page-actions button.is-danger:hover:not(:disabled) { border-color: #c66b61; background: #fff2f0; }
.ps-edit-page-list,
#ps-edit-page-list { margin: 0; padding: 12px; list-style: none; }
#ps-edit-page-list li { position: relative; cursor: grab; }
#ps-edit-page-list li:active { cursor: grabbing; }
#ps-edit-page-list li + li { margin-top: 10px; }
#ps-edit-page-list li.is-dragging { opacity: .38; }
#ps-edit-page-list li.drop-before::before,
#ps-edit-page-list li.drop-after::after {
  position: absolute;
  z-index: 3;
  left: -2px;
  right: -2px;
  height: 3px;
  background: var(--ps-green);
  content: "";
}
#ps-edit-page-list li.drop-before::before { top: -6px; }
#ps-edit-page-list li.drop-after::after { bottom: -6px; }
#ps-edit-page-list button {
  display: grid;
  justify-items: center;
  width: 100%;
  gap: 6px;
  padding: 7px;
  border: 1px solid transparent;
  background: #f3f5f1;
  color: var(--ps-mute);
  cursor: pointer;
  font-family: var(--ps-mono);
  font-size: 10px;
}
#ps-edit-page-list button:hover { border-color: #c8d2c5; }
#ps-edit-page-list button.is-current { border-color: var(--ps-green); background: var(--ps-green-w); color: var(--ps-green-d); }
#ps-edit-page-list button:focus-visible { outline: 2px solid var(--ps-green); outline-offset: 1px; }
#ps-edit-page-list canvas { display: block; max-width: 112px; height: auto; background: #fff; box-shadow: 0 1px 5px rgba(23,35,20,.12); }
#ps-edit-page-list small {
  min-height: 14px;
  color: var(--ps-green-d);
  font-size: 9px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.ps-edit-canvas-panel { display: flex; min-width: 0; min-height: 0; overflow: hidden; background: #e9ede7; }
.ps-edit-stage-scroll {
  display: block;
  min-width: 0;
  min-height: 0;
  width: 100%;
  box-sizing: border-box;
  padding: 28px;
  overflow: auto;
  background-image: linear-gradient(rgba(255,255,255,.34) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.34) 1px, transparent 1px);
  background-size: 24px 24px;
}
.ps-edit-page-stack {
  display: grid;
  width: 100%;
  gap: 34px;
  justify-items: center;
}
.ps-edit-document-page {
  display: grid;
  width: 100%;
  min-width: 0;
  gap: 8px;
  justify-items: center;
  scroll-margin-top: 16px;
}
.ps-edit-document-page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100%, 1080px);
  box-sizing: border-box;
  padding: 0 3px;
  color: #697568;
  font: 10px/1.35 var(--ps-mono);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.ps-edit-document-page-heading small { color: var(--ps-green-d); font: inherit; }
.ps-edit-document-page.is-active .ps-edit-document-page-heading { color: var(--ps-green-d); }
.ps-edit-document-page-preview {
  position: relative;
  display: block;
  width: min(100%, 780px);
  max-width: 100%;
  aspect-ratio: 8.5 / 11;
  min-height: 180px;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #fff;
  box-shadow: 0 7px 22px rgba(28,42,24,.12), 0 0 0 1px rgba(34,54,29,.08);
  cursor: pointer;
}
.ps-edit-document-page-preview::after {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: grid;
  place-items: center;
  color: #7b8779;
  background: linear-gradient(110deg, #f7f9f5 22%, #fff 40%, #f7f9f5 58%);
  background-size: 240% 100%;
  content: "";
  pointer-events: none;
}
.ps-edit-document-page-preview[data-preview-state="ready"]::after { display: none; }
.ps-edit-document-page-preview:hover { box-shadow: 0 10px 28px rgba(28,42,24,.17), 0 0 0 2px rgba(40,167,69,.42); }
.ps-edit-document-page-preview:focus-visible { outline: 3px solid rgba(40,167,69,.55); outline-offset: 4px; }
.ps-edit-document-page-preview canvas { position: absolute; inset: 0; display: block; max-width: 100%; }
.ps-edit-document-page-preview-objects { position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; }
.ps-edit-preview-object {
  position: absolute;
  box-sizing: border-box;
  min-width: 2px;
  min-height: 2px;
  overflow: hidden;
  pointer-events: none;
}
.ps-edit-preview-object.is-text,
.ps-edit-preview-object.is-directText { padding: 1px 2px; white-space: pre-wrap; overflow-wrap: anywhere; }
.ps-edit-preview-object.is-text.is-replacement { background: #fff; }
.ps-edit-preview-object.is-directText { border-bottom: 1px dotted var(--ps-green-d); background: rgba(255,255,255,.88); }
.ps-edit-preview-object.is-redact { background: #000; }
.ps-edit-preview-object.is-comment {
  display: grid;
  width: 16px !important;
  height: 16px !important;
  place-items: center;
  border: 1px solid #b98c09;
  border-radius: 1px;
  color: #654a00;
  background: #f4d84d;
  font: 700 10px/1 var(--ps-mono);
  box-shadow: 0 2px 5px rgba(49,37,0,.16);
}
.ps-edit-preview-object.is-cover { border: 1px dashed #aeb6aa; background: #fff; }
.ps-edit-preview-object.is-highlight { mix-blend-mode: multiply; }
.ps-edit-preview-object.is-rectangle { border-style: solid; background: transparent; }
.ps-edit-preview-object.is-image { background: transparent; }
.ps-edit-preview-object.is-line,
.ps-edit-preview-object.is-arrow { overflow: visible; }
.ps-edit-preview-object > img,
.ps-edit-preview-object > svg { display: block; width: 100%; height: 100%; pointer-events: none; }
.ps-edit-preview-object > img { object-fit: fill; }
.ps-edit-stage {
  position: relative;
  flex: none;
  background: #fff;
  box-shadow: 0 9px 28px rgba(28,42,24,.16), 0 0 0 1px rgba(34,54,29,.08);
  touch-action: none;
}
.ps-edit-document-page.is-active .ps-edit-stage {
  box-shadow: 0 11px 32px rgba(28,42,24,.2), 0 0 0 2px rgba(40,167,69,.48);
}
.ps-edit-stage.is-drawing { cursor: crosshair; }
.ps-edit-stage:focus-visible { outline: 3px solid rgba(40,167,69,.35); outline-offset: 4px; }
#ps-edit-page-canvas { position: absolute; inset: 0; display: block; }
.ps-edit-text-layer,
.ps-edit-overlay { position: absolute; inset: 0; }
.ps-edit-text-layer { z-index: 2; pointer-events: none; }
.ps-edit-overlay { z-index: 3; pointer-events: none; }
.ps-edit-stage.is-replacing .ps-edit-text-layer,
.ps-edit-stage[data-active-tool="select"] .ps-edit-text-layer { pointer-events: auto; }
.ps-edit-text-select {
  position: absolute;
  display: block;
  box-sizing: border-box;
  overflow: visible;
  color: transparent;
  font-family: sans-serif;
  line-height: 1;
  white-space: pre;
  user-select: text;
  -webkit-user-select: text;
  -webkit-text-fill-color: transparent;
  cursor: text;
  transform-origin: left bottom;
}
.ps-edit-text-select::selection { background: rgba(40,167,69,.34); }
.ps-edit-selection-actions {
  position: absolute;
  z-index: 8;
  padding: 4px;
  border: 1px solid #173c20;
  background: #173c20;
  box-shadow: 0 7px 18px rgba(18,35,16,.24);
  pointer-events: auto;
}
.ps-edit-selection-actions[hidden] { display: none !important; }
.ps-edit-selection-actions button {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,.22);
  background: transparent;
  color: #fff;
  cursor: pointer;
  font: 10.5px/1 var(--ps-mono);
  letter-spacing: .04em;
}
.ps-edit-selection-actions button:hover,
.ps-edit-selection-actions button:focus-visible { border-color: #fff; outline: none; }
.ps-edit-text-hit {
  position: absolute;
  min-width: 5px;
  padding: 0;
  border: 1px dashed transparent;
  background: rgba(40,167,69,.03);
  cursor: text;
}
.ps-edit-text-hit:hover,
.ps-edit-text-hit:focus-visible { border-color: var(--ps-green); background: rgba(40,167,69,.14); outline: none; }
.ps-edit-object {
  position: absolute;
  z-index: 1;
  box-sizing: border-box;
  min-width: 8px;
  min-height: 8px;
  overflow: hidden;
  cursor: move;
  user-select: none;
  touch-action: none;
  pointer-events: auto;
}
.ps-edit-object.is-text,
.ps-edit-object.is-directText { padding: 1px 2px; white-space: pre-wrap; overflow-wrap: anywhere; }
.ps-edit-object.is-text.is-replacement { background: #fff; }
.ps-edit-object.is-text.is-pending-replacement { background: transparent; }
.ps-edit-object.is-pending-replacement .ps-edit-object-text-value { display: none; }
.ps-edit-object.is-directText { border-bottom: 1px dotted var(--ps-green-d); background: rgba(255,255,255,.9); }
.ps-edit-object.is-directText,
.ps-edit-object.is-source-edit { overflow: visible; }
.ps-edit-object-text-value { display: block; width: 100%; height: 100%; overflow: hidden; pointer-events: none; }
.ps-edit-object.is-redact { background: #000; }
.ps-edit-object.is-comment {
  display: grid;
  width: 28px !important;
  height: 28px !important;
  place-items: center;
  overflow: visible;
  border: 1px solid #b98c09;
  border-radius: 2px;
  color: #654a00;
  background: #f4d84d;
  box-shadow: 0 3px 8px rgba(49,37,0,.2);
}
.ps-edit-object.is-comment::before {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 8px;
  height: 8px;
  border-bottom: 1px solid #b98c09;
  border-left: 1px solid #b98c09;
  background: #fff6b9;
  content: "";
}
.ps-edit-comment-glyph { margin-top: 3px; font: 700 16px/1 var(--ps-mono); pointer-events: none; }
.ps-edit-comment-popover {
  position: absolute;
  z-index: 12;
  top: -7px;
  left: calc(100% + 12px);
  width: 270px;
  box-sizing: border-box;
  padding: 10px;
  border: 1px solid #c6a32c;
  border-top: 3px solid #d3a900;
  background: #fffdf1;
  box-shadow: 0 13px 30px rgba(35,31,13,.22);
  cursor: default;
  color: var(--ps-ink);
}
.ps-edit-comment-popover.is-left { right: calc(100% + 12px); left: auto; }
.ps-edit-comment-popover.is-above { top: auto; bottom: -7px; }
.ps-edit-comment-popover > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ps-edit-comment-popover strong { font: 10.5px/1.3 var(--ps-mono); letter-spacing: .07em; text-transform: uppercase; }
.ps-edit-comment-popover button {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ps-body);
  cursor: pointer;
  font-size: 20px;
}
.ps-edit-comment-popover button:hover,
.ps-edit-comment-popover button:focus-visible { border-color: #b98c09; outline: none; }
.ps-edit-comment-popover textarea {
  display: block;
  width: 100%;
  min-height: 96px;
  box-sizing: border-box;
  margin-top: 8px;
  padding: 9px 10px;
  border: 1px solid #d8ca91;
  border-radius: 0;
  background: #fff;
  color: var(--ps-ink);
  font: 13px/1.45 var(--ps-text);
  resize: vertical;
}
.ps-edit-comment-popover textarea:focus-visible { outline: 2px solid #d3a900; outline-offset: 1px; }
.ps-edit-inline-text-editor {
  position: absolute;
  z-index: 12;
  top: calc(100% + 9px);
  left: 0;
  width: 310px;
  box-sizing: border-box;
  padding: 10px;
  border: 1px solid #b9ccb5;
  border-top: 3px solid var(--ps-green);
  background: #f8fcf6;
  box-shadow: 0 13px 30px rgba(21,43,18,.22);
  cursor: default;
  color: var(--ps-ink);
  font-size: 13px;
}
.ps-edit-inline-text-editor.is-left { right: 0; left: auto; }
.ps-edit-inline-text-editor.is-above { top: auto; bottom: calc(100% + 9px); }
.ps-edit-inline-text-editor > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ps-edit-inline-text-editor strong { color: var(--ps-green-d); font: 10px/1.3 var(--ps-mono); letter-spacing: .06em; text-transform: uppercase; }
.ps-edit-inline-text-editor button {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ps-body);
  cursor: pointer;
  font-size: 20px;
}
.ps-edit-inline-text-editor button:hover,
.ps-edit-inline-text-editor button:focus-visible { border-color: var(--ps-green); outline: none; }
.ps-edit-inline-text-editor textarea {
  display: block;
  width: 100%;
  min-height: 72px;
  box-sizing: border-box;
  margin-top: 8px;
  padding: 9px 10px;
  border: 1px solid #c7d5c3;
  border-radius: 0;
  background: #fff;
  color: var(--ps-ink);
  font: 13px/1.45 var(--ps-text);
  resize: vertical;
}
.ps-edit-inline-text-editor textarea:focus-visible { outline: 2px solid var(--ps-green); outline-offset: 1px; }
.ps-edit-object.is-cover { border: 1px dashed #aeb6aa; background: #fff; }
.ps-edit-object.is-highlight { mix-blend-mode: multiply; }
.ps-edit-object.is-rectangle { border-style: solid; background: transparent; }
.ps-edit-object.is-image { background: transparent; }
.ps-edit-object.is-line,
.ps-edit-object.is-arrow { overflow: visible; }
.ps-edit-object > img,
.ps-edit-object > svg { display: block; width: 100%; height: 100%; pointer-events: none; }
.ps-edit-object > img { object-fit: fill; }
.ps-edit-object.is-selected:not(.is-line):not(.is-arrow) {
  outline: 2px solid var(--ps-green);
  outline-offset: 1px;
}
.ps-edit-object.is-line.is-selected,
.ps-edit-object.is-arrow.is-selected { outline: 0; }
.ps-edit-resize {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 13px;
  height: 13px;
  border: 2px solid #fff;
  background: var(--ps-green-d);
  box-shadow: 0 0 0 1px var(--ps-green-d);
  cursor: nwse-resize;
}
.ps-edit-vector-handle {
  position: absolute;
  z-index: 3;
  width: 44px;
  min-width: 0;
  height: 44px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
  cursor: crosshair;
  transform: translate(-50%, -50%);
  touch-action: none;
  pointer-events: auto;
}
.ps-edit-vector-handle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 12px;
  height: 12px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--ps-green-d);
  box-shadow: 0 0 0 1px var(--ps-green-d), 0 2px 5px rgba(23,60,32,.2);
  transform: translate(-50%, -50%);
  transition: transform .12s ease, background .12s ease;
}
.ps-edit-vector-handle.is-start::after { border-color: var(--ps-green-d); background: #fff; }
.ps-edit-vector-handle:hover,
.ps-edit-vector-handle:focus-visible { outline: 2px solid rgba(40,167,69,.28); outline-offset: -6px; }
.ps-edit-vector-handle:hover::after,
.ps-edit-vector-handle:focus-visible::after { transform: translate(-50%, -50%) scale(1.18); }
.ps-edit-vector-draft {
  position: absolute;
  z-index: 6;
  overflow: visible;
  pointer-events: none;
}
.ps-edit-vector-draft > svg { display: block; width: 100%; height: 100%; overflow: visible; }
.ps-edit-draft {
  position: absolute;
  z-index: 4;
  box-sizing: border-box;
  border: 2px dashed var(--ps-green-d);
  background: rgba(40,167,69,.09);
  pointer-events: none;
}
.ps-edit-draft.is-highlight { border-color: #b08a00; background: rgba(244,216,77,.34); }
.ps-edit-draft.is-cover,
.ps-edit-draft.is-replace { border-color: #8c6a2d; background: rgba(255,255,255,.86); }
.ps-edit-draft.is-redact { border-color: #7f1d1d; background: rgba(0,0,0,.76); }
.ps-edit-draft.is-comment { border-color: #9a7b06; border-radius: 2px; background: rgba(244,216,77,.78); }
.ps-edit-ink-draft {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.ps-edit-empty-properties { padding: 28px 18px; color: var(--ps-mute); font-size: 13px; line-height: 1.6; }
#ps-edit-property-fields { padding: 16px; }
#ps-edit-property-fields label {
  display: grid;
  gap: 7px;
  margin: 0 0 16px;
  color: var(--ps-ink);
  font-family: var(--ps-mono);
  font-size: 10.5px;
  letter-spacing: .07em;
  text-transform: uppercase;
}
#ps-edit-property-fields label[hidden] { display: none; }
#ps-edit-property-fields textarea,
#ps-edit-property-fields input[type=number] {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 10px;
  border: 1px solid #ccd4c9;
  border-radius: 0;
  background: #fff;
  color: var(--ps-ink);
  font: 13px/1.45 var(--ps-text);
  resize: vertical;
  text-transform: none;
}
#ps-edit-property-fields input[type=color] { width: 100%; height: 38px; padding: 3px; border: 1px solid #ccd4c9; background: #fff; }
#ps-edit-property-fields input[type=range] { width: calc(100% - 42px); accent-color: var(--ps-green-d); }
#ps-edit-property-fields output { float: right; color: var(--ps-body); font-size: 11px; letter-spacing: 0; }
#ps-edit-property-fields textarea:focus-visible,
#ps-edit-property-fields input:focus-visible { outline: 2px solid var(--ps-green); outline-offset: 1px; }
.ps-edit-object-note { margin: 4px 0 0; padding: 11px; border-left: 3px solid #b7791f; background: #fffaf0; color: #7b4d12; font-size: 12px; line-height: 1.5; }
.ps-edit-object-note:empty { display: none; }
.ps-edit-image-note {
  grid-column: 1 / -1;
  margin: 0 0 15px;
  padding: 10px 11px;
  border-left: 3px solid var(--ps-green);
  background: var(--ps-green-w);
  color: var(--ps-body);
  font-size: 11.5px;
  line-height: 1.5;
}
.ps-edit-redaction-warning {
  margin: 0;
  padding: 13px 16px;
  border-top: 1px solid #dfd5be;
  background: #fffaf0;
  color: #6b4a12;
  font-size: 12.5px;
  line-height: 1.55;
}
.ps-edit-result-note { margin: 10px 0 0; color: var(--ps-body); font-size: 13px; }

.ps-d-edit .edit-cursor,
.ps-d-edit .edit-box { transition: transform .22s ease, stroke-dashoffset .25s ease; transform-origin: center; }
.ps-d-edit .edit-box { stroke-dasharray: 36; stroke-dashoffset: 16; }
.ps-tools-card:hover .ps-d-edit .edit-box { stroke-dashoffset: 0; }
.ps-tools-card:hover .ps-d-edit .edit-cursor { transform: translate(3px, -3px); }

.ps-d-smart_redact .smart-redact-hit,
.ps-d-smart_redact .smart-redact-scan {
  transition: fill .24s ease, stroke .24s ease, stroke-dashoffset .3s ease;
}
.ps-d-smart_redact .smart-redact-scan {
  stroke-dasharray: 38;
  stroke-dashoffset: 15;
}
.ps-tools-card:hover .ps-d-smart_redact .smart-redact-hit {
  fill: rgba(181, 54, 45, .18);
  stroke: #b5362d;
}
.ps-tools-card:hover .ps-d-smart_redact .smart-redact-scan {
  stroke: #b5362d;
  stroke-dashoffset: 0;
}

.ps-compress-note {
  max-width: 74ch;
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ps-body);
}
.ps-compress-target {
  max-width: 760px;
  margin: 22px 0 0;
  padding: 18px;
  border: 1px solid #cfe0cb;
  background: #f3f8f1;
}
.ps-compress-target[hidden],
.ps-compress-custom[hidden],
.ps-compress-summary tr[hidden] { display: none; }
.ps-compress-target legend {
  padding: 0 7px;
  font-family: var(--ps-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ps-green-d);
}
.ps-compress-target-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(84px, 1fr));
  gap: 8px;
}
.ps-compress-target-grid label { margin: 0; cursor: pointer; }
.ps-compress-target-grid input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
}
.ps-compress-target-grid span {
  display: block;
  padding: 12px 10px;
  border: 1px solid var(--ps-rule);
  background: var(--ps-paper);
  color: var(--ps-body);
  font-family: var(--ps-mono);
  font-size: 12px;
  text-align: center;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.ps-compress-target-grid input:checked + span {
  border-color: var(--ps-green);
  background: #e5f2e2;
  color: var(--ps-green-d);
  box-shadow: inset 0 -2px 0 var(--ps-green);
}
.ps-compress-target-grid input:focus-visible + span {
  outline: 2px solid var(--ps-green);
  outline-offset: 2px;
}
.ps-compress-custom {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(110px, 180px) 90px;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
}
.ps-compress-custom label { margin: 0; }
.ps-compress-custom input,
.ps-compress-custom select { width: 100%; box-sizing: border-box; }
.ps-compress-result-message.is-target-warning {
  padding: 13px 15px;
  border-left: 3px solid #b7791f;
  background: #fffaf0;
  color: #7b4d12;
}
.ps-compress-progress {
  min-height: 22px;
  margin-top: 22px;
  font-family: var(--ps-mono);
  font-size: 12.5px;
  color: var(--ps-green-d);
}
.ps-compress-cancel {
  margin-top: 8px;
  padding: 8px 15px;
  border: 1px solid var(--ps-rule);
  background: var(--ps-paper);
  color: var(--ps-body);
  font-family: var(--ps-mono);
  font-size: 12px;
  cursor: pointer;
}
.ps-compress-cancel:hover:not(:disabled) { border-color: var(--ps-ink); color: var(--ps-ink); }
.ps-compress-cancel:disabled { cursor: not-allowed; color: var(--ps-mute); }
.ps-compress-summary { margin-top: 34px; }
.ps-compress-summary h2 {
  margin: 0 0 12px;
  font-family: var(--ps-display);
  font-weight: 400;
  font-size: 26px;
  color: var(--ps-ink);
}
.ps-compress-summary h3 {
  margin: 24px 0 10px;
  font-family: var(--ps-mono);
  font-size: 12px;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ps-ink);
}
.ps-compress-result-message { margin: 0 0 18px; font-size: 14.5px; line-height: 1.55; }
.ps-compress-summary .ps-analyze-table-wrap { margin-top: 18px; }
.ps-compress-details {
  margin-top: 18px;
  border-top: 1px solid var(--ps-rule);
  border-bottom: 1px solid var(--ps-rule);
}
.ps-compress-details summary {
  padding: 13px 2px;
  font-family: var(--ps-mono);
  font-size: 12px;
  letter-spacing: .05em;
  color: var(--ps-body);
  cursor: pointer;
}
.ps-compress-details summary:hover { color: var(--ps-ink); }
.ps-compress-details summary:focus-visible { outline: 2px solid var(--ps-green); outline-offset: 2px; }
.ps-compress-details-body { padding: 2px 0 18px; }
.ps-compress-details .ps-analyze-table-wrap { margin-top: 0; }

@media (max-width: 680px) {
  .ps-compress-target-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ps-compress-custom { grid-template-columns: 1fr 86px; }
  .ps-compress-custom label { grid-column: 1 / -1; }
}

/* --------------------------------------------------------------------------
   Workflow recipes and builder. The recipe shelf starts with a real-world
   destination; the numbered production rail below exposes exactly how that
   outcome will be produced.
   -------------------------------------------------------------------------- */
.ps-workflow-mode {
  margin: 0 0 24px;
  padding: 0;
  border: 0;
}
.ps-workflow-mode legend {
  margin: 0 0 10px;
  font-family: var(--ps-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ps-ink);
}
.ps-workflow-mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--ps-rule);
  background: var(--ps-paper);
}
.ps-workflow-mode-grid label { margin: 0; cursor: pointer; }
.ps-workflow-mode-grid label + label { border-left: 1px solid var(--ps-rule); }
.ps-workflow-mode-grid input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
}
.ps-workflow-mode-card {
  position: relative;
  display: grid;
  gap: 7px;
  min-height: 92px;
  padding: 20px 22px 18px 25px;
  box-sizing: border-box;
  color: var(--ps-body);
  transition: background .16s ease, color .16s ease, box-shadow .16s ease;
}
.ps-workflow-mode-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: transparent;
}
.ps-workflow-mode-card strong {
  font-family: var(--ps-display);
  font-size: 22px;
  font-weight: 400;
  color: var(--ps-ink);
}
.ps-workflow-mode-card small { max-width: 56ch; font-size: 13.5px; line-height: 1.5; }
.ps-workflow-mode-title { display: flex; align-items: center; gap: 10px; }
.ps-workflow-mode-title em {
  padding: 3px 7px;
  border: 1px solid var(--ps-green);
  color: var(--ps-green-d);
  font-family: var(--ps-mono);
  font-size: 9px;
  font-style: normal;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.ps-workflow-mode-grid input:checked + .ps-workflow-mode-card {
  background: #eef7ec;
  box-shadow: inset 0 -2px 0 var(--ps-green);
}
.ps-workflow-mode-grid input:checked + .ps-workflow-mode-card::before {
  background: var(--ps-green);
}
.ps-workflow-mode-grid input:focus-visible + .ps-workflow-mode-card {
  outline: 2px solid var(--ps-green);
  outline-offset: -2px;
}
.ps-workflow-mode-grid input:disabled + .ps-workflow-mode-card { cursor: wait; opacity: .68; }
.ps-workflow-mode-status {
  min-height: 20px;
  margin: 9px 0 0;
  color: #8a4f0f;
  font-size: 13px;
  line-height: 1.5;
}
.ps-workflow-recipes {
  margin: 0 0 24px;
  border: 1px solid #cfe0cb;
  border-top: 4px solid var(--ps-green);
  background: #edf5eb;
}
.ps-workflow-recipes-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 30%);
  gap: 28px;
  align-items: end;
  padding: 24px;
}
.ps-workflow-recipes-eyebrow {
  margin: 0 0 8px !important;
  font-family: var(--ps-mono);
  font-size: 10.5px !important;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ps-green-d) !important;
}
.ps-workflow-recipes h2 {
  margin: 0;
  font-family: var(--ps-display);
  font-size: 28px;
  font-weight: 400;
  line-height: 1.2;
  color: var(--ps-ink);
}
.ps-workflow-recipes-head > div > p:last-child {
  max-width: 62ch;
  margin: 9px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ps-body);
}
.ps-workflow-recipes-privacy {
  margin: 0;
  padding: 3px 0 3px 18px;
  border-left: 2px solid var(--ps-green);
  font-family: var(--ps-mono);
  font-size: 11px;
  line-height: 1.55;
  color: var(--ps-green-d);
}
.ps-workflow-template-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0 16px 16px;
  border-top: 1px solid #cfe0cb;
  border-left: 1px solid #cfe0cb;
}
.ps-workflow-template {
  display: flex;
  min-height: 154px;
  padding: 18px 20px;
  flex-direction: column;
  align-items: flex-start;
  border: 0;
  border-right: 1px solid #cfe0cb;
  border-bottom: 1px solid #cfe0cb;
  border-radius: 0;
  background: var(--ps-paper);
  color: var(--ps-body);
  text-align: left;
  cursor: pointer;
  transition: background .16s ease, box-shadow .16s ease;
}
.ps-workflow-template:hover:not(:disabled),
.ps-workflow-template:focus-visible {
  position: relative;
  z-index: 1;
  background: var(--ps-green-w);
  box-shadow: inset 3px 0 0 var(--ps-green);
}
.ps-workflow-template:focus-visible { outline: 2px solid var(--ps-green-d); outline-offset: -2px; }
.ps-workflow-template:disabled { cursor: not-allowed; opacity: .58; }
.ps-workflow-template-count {
  margin-bottom: 7px;
  font-family: var(--ps-mono);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ps-green-d);
}
.ps-workflow-template strong {
  font-family: var(--ps-display);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.25;
  color: var(--ps-ink);
}
.ps-workflow-template-desc {
  display: block;
  margin-top: 7px;
  font-size: 13px;
  line-height: 1.48;
}
.ps-workflow-template-action {
  display: block;
  margin-top: auto;
  padding-top: 14px;
  font-family: var(--ps-mono);
  font-size: 10.5px;
  letter-spacing: .04em;
  color: var(--ps-green-d);
}
.ps-workflow-template-scratch {
  grid-column: 1 / -1;
  min-height: 0;
  background: #f8faf7;
}
.ps-workflow-template-status {
  margin: 0;
  padding: 0 24px 17px;
  font-family: var(--ps-mono);
  font-size: 11.5px;
  color: var(--ps-green-d);
}
.ps-workflow-template-status:empty { display: none; }
.ps-dialog-open { overflow: hidden; }
.ps-workflow-dialog[hidden] { display: none; }
.ps-workflow-dialog {
  position: fixed;
  z-index: 10000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(18, 22, 15, .7);
  backdrop-filter: blur(3px);
}
.ps-workflow-dialog-panel {
  width: min(100%, 460px);
  box-sizing: border-box;
  padding: 28px;
  border: 1px solid #cfe0cb;
  border-top: 4px solid var(--ps-green);
  background: var(--ps-paper);
  box-shadow: 0 24px 80px rgba(10, 16, 9, .35);
  animation: ps-workflow-dialog-in .16s ease-out both;
}
@keyframes ps-workflow-dialog-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.ps-workflow-dialog-eyebrow {
  margin: 0 0 8px;
  font-family: var(--ps-mono);
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ps-green-d);
}
.ps-workflow-dialog h2 {
  margin: 0;
  font-family: var(--ps-display);
  font-size: 28px;
  font-weight: 400;
  line-height: 1.2;
  color: var(--ps-ink);
}
.ps-workflow-dialog-panel > p:not(.ps-workflow-dialog-eyebrow) {
  margin: 12px 0 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ps-body);
}
.ps-workflow-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--ps-rule);
}
.ps-workflow-dialog-actions button {
  padding: 10px 16px;
  border-radius: 2px;
  font-family: var(--ps-mono);
  font-size: 11.5px;
  cursor: pointer;
}
.ps-workflow-dialog-cancel {
  border: 1px solid var(--ps-rule);
  background: var(--ps-paper);
  color: var(--ps-body);
}
.ps-workflow-dialog-cancel:hover { border-color: var(--ps-ink); color: var(--ps-ink); }
.ps-workflow-dialog-replace {
  border: 1px solid var(--ps-green-d);
  background: var(--ps-green-d);
  color: #fff;
}
.ps-workflow-dialog-replace:hover { border-color: var(--ps-ink); background: var(--ps-ink); }
.ps-workflow-dialog-replace.ps-workflow-dialog-danger {
  border-color: #a52a20;
  background: #a52a20;
}
.ps-workflow-dialog-replace.ps-workflow-dialog-danger:hover {
  border-color: #721c16;
  background: #721c16;
}
.ps-workflow-dialog-actions button:focus-visible {
  outline: 2px solid var(--ps-green);
  outline-offset: 2px;
}
.ps-workflow-protect-form .ps-security-fields {
  grid-template-columns: 1fr;
  padding: 20px 0 0;
}
.ps-workflow-protect-form .ps-security-field-error {
  margin-top: 10px;
}
.ps-workflow-protect-form .ps-security-warning {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #eadfca;
}
.ps-workflow-protect-form .ps-security-warning + .ps-security-warning {
  margin-top: 8px;
}
.ps-workflow-protect-form .ps-workflow-dialog-actions {
  margin-top: 18px;
}
.ps-workflow-input-hint {
  max-width: 68ch;
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ps-body);
}
.ps-workflow-builder {
  border: 1px solid var(--ps-rule);
  background: var(--ps-surface);
}
.ps-workflow-addbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding: 18px;
  border-bottom: 1px solid var(--ps-rule);
  background: var(--ps-paper);
}
.ps-workflow-addbar > label {
  margin: 0;
  padding-bottom: 11px;
}
.ps-workflow-add-controls { display: flex; align-items: stretch; gap: 8px; }
.ps-workflow-add-controls select { min-width: 210px; }
#ps-workflow-add {
  padding: 9px 18px;
  border: 1px solid var(--ps-green-d);
  border-radius: 2px;
  background: var(--ps-green-d);
  color: #fff;
  font-family: var(--ps-mono);
  font-size: 12px;
  cursor: pointer;
}
#ps-workflow-add:hover:not(:disabled) { background: var(--ps-ink); border-color: var(--ps-ink); }
#ps-workflow-add:focus-visible { outline: 2px solid var(--ps-ink); outline-offset: 2px; }
.ps-workflow-empty {
  margin: 0;
  padding: 38px 20px;
  text-align: center;
  font-size: 14px;
  color: var(--ps-mute);
}
.ps-workflow-steps {
  position: relative;
  margin: 0;
  padding: 18px;
  list-style: none;
  counter-reset: workflow-step;
}
.ps-workflow-steps::before {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 38px;
  width: 1px;
  background: #cbd3c7;
}
.ps-workflow-step {
  position: relative;
  margin: 0 0 12px 42px;
  padding: 18px;
  border: 1px solid var(--ps-rule);
  border-left: 3px solid var(--ps-green);
  background: var(--ps-paper);
  transition: opacity .15s ease, border-color .15s ease, transform .15s ease;
}
.ps-workflow-step:last-child { margin-bottom: 0; }
.ps-workflow-step::before {
  content: "";
  position: absolute;
  left: -28px;
  top: 25px;
  width: 24px;
  height: 1px;
  background: #cbd3c7;
}
.ps-workflow-step.ps-dragging { opacity: .45; transform: scale(.995); }
.ps-workflow-step-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  cursor: grab;
}
.ps-workflow-step-head:active { cursor: grabbing; }
.ps-workflow-step-actions { cursor: default; }
.ps-workflow-step-number {
  display: block;
  margin-bottom: 3px;
  font-family: var(--ps-mono);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ps-green-d);
}
.ps-workflow-step h3 {
  margin: 0;
  font-family: var(--ps-display);
  font-size: 20px;
  font-weight: 400;
  color: var(--ps-ink);
}
.ps-workflow-step-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.ps-workflow-action {
  padding: 5px 8px;
  border: 1px solid var(--ps-rule);
  border-radius: 2px;
  background: #fff;
  color: var(--ps-body);
  font-family: var(--ps-mono);
  font-size: 10.5px;
  cursor: pointer;
}
.ps-workflow-action:hover:not(:disabled) { border-color: var(--ps-ink); color: var(--ps-ink); }
.ps-workflow-action:disabled { color: #b8beb6; cursor: not-allowed; }
.ps-workflow-remove:hover:not(:disabled) { border-color: #b91c1c; color: #991b1b; }
.ps-workflow-step-desc {
  max-width: 68ch;
  margin: 10px 0 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ps-body);
}
.ps-workflow-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--ps-rule);
}
.ps-workflow-field { position: relative; min-width: 0; }
.ps-workflow-field label { margin-bottom: 6px; }
.ps-workflow-field input:not([type=range]),
.ps-workflow-field select { width: 100%; box-sizing: border-box; }
.ps-workflow-field input[type=range] { width: calc(100% - 48px); }
.ps-workflow-range-value {
  display: inline-block;
  width: 42px;
  margin-left: 6px;
  font-family: var(--ps-mono);
  font-size: 11px;
  text-align: right;
  color: var(--ps-ink);
}
.ps-workflow-step-error {
  margin: 14px 0 0;
  padding: 9px 11px;
  border-left: 3px solid #c0392b;
  background: #fef4f4;
  color: #8f2f22;
  font-size: 13px;
}
.ps-workflow-advice {
  margin: 0;
  padding: 13px 18px;
  border-top: 1px solid #ead9ad;
  background: #fffaf0;
  color: #7b4d12;
  font-size: 13.5px;
  line-height: 1.5;
}
.ps-workflow-library {
  margin-top: 14px;
  border: 1px solid var(--ps-rule);
  background: var(--ps-paper);
}
.ps-workflow-library > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  font-family: var(--ps-mono);
  font-size: 11.5px;
  letter-spacing: .04em;
  color: var(--ps-ink);
  cursor: pointer;
  list-style-position: inside;
}
.ps-workflow-library > summary::before {
  content: "+";
  color: var(--ps-green-d);
  font-size: 16px;
  line-height: 1;
}
.ps-workflow-library[open] > summary::before { content: "−"; }
.ps-workflow-library > summary > span:first-child { margin-right: auto; }
.ps-workflow-library > summary:hover { background: var(--ps-green-w); }
.ps-workflow-library > summary:focus-visible { outline: 2px solid var(--ps-green); outline-offset: 2px; }
.ps-workflow-saved-count {
  display: inline-grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: var(--ps-green-w);
  color: var(--ps-green-d);
}
.ps-workflow-library-body {
  padding: 0 18px 18px;
  border-top: 1px solid var(--ps-rule);
}
.ps-workflow-library-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 35%);
  gap: 24px;
  padding: 16px 0;
}
.ps-workflow-library-intro p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
}
.ps-workflow-library-intro p:last-child {
  padding-left: 14px;
  border-left: 2px solid var(--ps-green);
  font-family: var(--ps-mono);
  font-size: 10.5px;
  color: var(--ps-green-d);
}
.ps-workflow-savebar {
  padding: 15px;
  border: 1px solid var(--ps-rule);
  background: var(--ps-surface);
}
.ps-workflow-savebar > label {
  display: block;
  margin-bottom: 7px;
}
.ps-workflow-savebar > div {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  gap: 8px;
}
.ps-workflow-savebar input[type=text] { width: 100%; box-sizing: border-box; }
.ps-workflow-savebar button,
.ps-workflow-saved-actions button {
  padding: 8px 11px;
  border: 1px solid var(--ps-rule);
  border-radius: 2px;
  background: var(--ps-paper);
  color: var(--ps-body);
  font-family: var(--ps-mono);
  font-size: 10.5px;
  cursor: pointer;
}
#ps-workflow-save,
.ps-workflow-saved-actions .ps-workflow-saved-primary {
  border-color: var(--ps-green-d);
  background: var(--ps-green-d);
  color: #fff;
}
.ps-workflow-savebar button:hover,
.ps-workflow-saved-actions button:hover { border-color: var(--ps-ink); color: var(--ps-ink); }
#ps-workflow-save:hover,
.ps-workflow-saved-actions .ps-workflow-saved-primary:hover {
  border-color: var(--ps-ink);
  background: var(--ps-ink);
  color: #fff;
}
.ps-workflow-savebar button:focus-visible,
.ps-workflow-saved-actions button:focus-visible,
.ps-workflow-saved-identity input:focus-visible {
  outline: 2px solid var(--ps-green);
  outline-offset: 2px;
}
.ps-workflow-library-status {
  margin: 12px 0 0;
  font-family: var(--ps-mono);
  font-size: 11.5px;
  color: var(--ps-green-d);
}
.ps-workflow-library-status:empty { display: none; }
.ps-workflow-library-status.ps-workflow-library-error { color: #991b1b; }
.ps-workflow-saved-empty {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--ps-mute);
}
.ps-workflow-saved-empty[hidden] { display: none; }
.ps-workflow-saved-list { margin: 14px 0 0; padding: 0; list-style: none; }
.ps-workflow-saved-item {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(0, 1.5fr);
  gap: 18px;
  align-items: end;
  padding: 14px 0;
  border-top: 1px solid var(--ps-rule);
}
.ps-workflow-saved-identity { min-width: 0; }
.ps-workflow-saved-name-label {
  display: block;
  margin-bottom: 5px;
  font-size: 10px;
}
.ps-workflow-saved-identity input { width: 100%; box-sizing: border-box; }
.ps-workflow-saved-identity > span {
  display: block;
  margin-top: 5px;
  font-family: var(--ps-mono);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ps-green-d);
}
.ps-workflow-saved-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}
.ps-workflow-saved-actions .ps-workflow-saved-delete:hover {
  border-color: #a52a20;
  color: #8f2018;
}
.ps-workflow-progress {
  min-height: 22px;
  margin-top: 22px;
  font-family: var(--ps-mono);
  font-size: 12.5px;
  color: var(--ps-green-d);
}
#ps-workflow-summary .ps-analyze-table th { width: 48%; }
#ps-workflow-summary-grid.is-batch { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ps-workflow-save-folder {
  margin-top: 18px;
  padding: 10px 15px;
  border: 1px solid var(--ps-green);
  background: var(--ps-paper);
  color: var(--ps-green-d);
  font-family: var(--ps-mono);
  font-size: 12px;
  cursor: pointer;
}
.ps-workflow-save-folder:hover { background: #eef7ec; }
.ps-workflow-save-folder[hidden],
.ps-analyze-summary > div[hidden] { display: none; }
.ps-workflow-folder-status {
  min-height: 20px;
  margin: 9px 0 0;
  color: var(--ps-green-d);
  font-size: 13px;
}
#ps-workflow-run-rows tr.is-success th { border-left: 3px solid var(--ps-green); }
#ps-workflow-run-rows tr.is-error th { border-left: 3px solid #b7791f; }
#ps-workflow-run-rows tr.is-error td { color: #7b4d12; white-space: normal; }

/* --------------------------------------------------------------------------
   Quality floor.
   -------------------------------------------------------------------------- */
@media (max-width: 980px) {
  .ps-edit-layout {
    grid-template-columns: 128px minmax(420px, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    height: clamp(560px, 78vh, 820px);
  }
  .ps-edit-properties {
    grid-column: 1 / -1;
    border-top: 1px solid #d8ded5;
    border-left: 0;
  }
  #ps-edit-property-fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 16px;
  }
  #ps-edit-property-fields[hidden] { display: none; }
  .ps-edit-object-note { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  #ps-tools-main { padding: 0 18px 64px; }
  .ps-hero { padding: 20px 0 32px; }
  .ps-tools-grid { grid-template-columns: 1fr; }
  #ps-tools-drop { padding: 44px 18px; }
  .ps-analyze-summary { grid-template-columns: 1fr; }
  #ps-workflow-summary-grid.is-batch { grid-template-columns: 1fr; }
  .ps-analyze-summary dt { min-height: 0; }
  .ps-workflow-feature { grid-template-columns: auto 1fr; gap: 14px; padding: 20px; }
  .ps-workflow-feature-art .ps-diagram { width: 72px; height: 54px; }
  .ps-workflow-feature-go { grid-column: 2; }
  .ps-workflow-mode-grid { grid-template-columns: 1fr; }
  .ps-workflow-mode-grid label + label {
    border-left: 0;
    border-top: 1px solid var(--ps-rule);
  }
  .ps-workflow-addbar { align-items: stretch; flex-direction: column; gap: 10px; }
  .ps-workflow-recipes-head { grid-template-columns: 1fr; gap: 16px; padding: 20px; }
  .ps-workflow-recipes-privacy { padding-left: 13px; }
  .ps-workflow-template-list { grid-template-columns: 1fr; margin: 0 10px 10px; }
  .ps-workflow-template { min-height: 0; }
  .ps-workflow-template-scratch { grid-column: auto; }
  .ps-workflow-template-status { padding: 4px 20px 15px; }
  .ps-workflow-dialog { place-items: end center; padding: 14px; }
  .ps-workflow-dialog-panel { padding: 22px; }
  .ps-workflow-dialog-actions { flex-direction: column-reverse; }
  .ps-workflow-dialog-actions button { width: 100%; }
  .ps-workflow-library-intro { grid-template-columns: 1fr; gap: 12px; }
  .ps-workflow-savebar > div { grid-template-columns: 1fr; }
  .ps-workflow-saved-item { grid-template-columns: 1fr; align-items: stretch; }
  .ps-workflow-saved-actions { justify-content: flex-start; }
  .ps-workflow-addbar > label { padding-bottom: 0; }
  .ps-workflow-add-controls { flex-direction: column; }
  .ps-workflow-add-controls select { min-width: 0; width: 100%; }
  .ps-workflow-steps { padding: 12px; }
  .ps-workflow-steps::before { display: none; }
  .ps-workflow-step { margin-left: 0; padding: 15px; }
  .ps-workflow-step::before { display: none; }
  .ps-workflow-step-head { flex-direction: column; }
  .ps-workflow-step-actions { justify-content: flex-start; }
  .ps-inspect-report-head { grid-template-columns: 1fr; gap: 14px; padding: 20px; }
  .ps-inspect-findings { grid-template-columns: 1fr; }
  .ps-inspect-finding { border-right: 0; }
  .ps-inspect-evidence { padding: 16px 18px 20px; }
  .ps-inspect-evidence dl { grid-template-columns: 1fr; }
  .ps-inspect-evidence dl > div { border-right: 0; }
  .ps-inspect-report-actions { padding: 0 18px 20px; }
  .ps-inspect-report-actions button { flex: 1 1 100%; }
  .ps-safe-share-head,
  .ps-safe-share-result { padding: 20px; }
  .ps-safe-share fieldset label { padding: 16px 20px; }
  .ps-safe-share > .ps-analyze-warning { margin: 16px 20px 0; }
  #ps-safe-share-create { width: calc(100% - 40px); margin: 20px 20px 0; }
  .ps-safe-share-note { margin: 12px 20px 20px; }
  .ps-safe-share-team { grid-template-columns: 1fr; gap: 8px; padding: 18px 20px; }
  .ps-edit-app { width: calc(100vw - 24px); }
  .ps-edit-toolbar { align-items: stretch; flex-direction: column; }
  .ps-edit-menu { flex: 1 1 auto; }
  .ps-edit-menu-trigger { width: 100%; }
  .ps-edit-menu-panel { right: 0; min-width: 0; }
  .ps-edit-history-group { padding: 8px 0 0; border-left: 0; border-top: 1px solid var(--ps-rule); }
  .ps-edit-layout { display: block; height: auto; overflow: visible; }
  .ps-edit-pages { border-right: 0; border-bottom: 1px solid #d8ded5; overflow-x: auto; }
  .ps-edit-page-actions { position: static; display: flex; width: max-content; min-width: 100%; box-sizing: border-box; }
  .ps-edit-page-actions button { width: 38px; flex: 0 0 38px; }
  #ps-edit-page-list { display: flex; gap: 8px; }
  #ps-edit-page-list li { flex: 0 0 102px; }
  #ps-edit-page-list li + li { margin-top: 0; }
  #ps-edit-page-list li.drop-before::before,
  #ps-edit-page-list li.drop-after::after { top: -2px; bottom: -2px; width: 3px; height: auto; }
  #ps-edit-page-list li.drop-before::before { left: -5px; right: auto; }
  #ps-edit-page-list li.drop-after::after { right: -5px; left: auto; }
  #ps-edit-page-list canvas { max-width: 80px; }
  .ps-edit-stage-scroll { min-height: 480px; max-height: 72vh; padding: 20px; }
  .ps-edit-properties { border-left: 0; border-top: 1px solid #d8ded5; }
  #ps-edit-property-fields { display: block; }
  #ps-edit-property-fields[hidden] { display: none; }
  .ps-edit-signature-dialog { place-items: end center; padding: 12px; }
  .ps-edit-signature-panel { padding: 19px; }
  #ps-edit-signature-canvas { height: 180px; }
  .ps-edit-signature-actions { grid-template-columns: 1fr 1fr; }
  .ps-edit-signature-actions span { display: none; }
  .ps-edit-signature-actions button { width: 100%; }
  .ps-convert-mode { grid-template-columns: 1fr; }
  .ps-convert-mode label + label { border-left: 0; border-top: 1px solid #cfd6cb; }
  .ps-convert-enhancement { padding: 15px; }
  .ps-convert-enhancement-controls { grid-template-columns: 1fr; }
  .ps-convert-enhancement-preview { grid-template-columns: 1fr; }
  .ps-convert-enhancement-preview figure > div { min-height: 170px; }
  .ps-convert-preview > header { align-items: flex-start; flex-direction: column; }
  .ps-convert-preview-zoom { align-self: stretch; grid-template-columns: 42px 1fr 42px; }
  .ps-convert-preview-viewer {
    grid-template-columns: 38px minmax(0, 1fr) 38px;
    gap: 8px;
    min-height: 260px;
    padding: 16px 10px;
  }
  .ps-convert-preview-frame { min-height: 220px; height: min(52vh, 460px); }
  .ps-convert-preview-arrow { width: 36px; height: 36px; }
  .ps-convert-preview-caption { padding-inline: 12px; overflow-wrap: anywhere; }
  .ps-crop-fields { grid-template-columns: 1fr 1fr; }
  .ps-print-split-controls { grid-template-columns: 1fr; padding: 16px; }
  .ps-print-split-conditional { grid-template-columns: 1fr; grid-column: auto; }
  .ps-print-split-controls .ps-option-note { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .ps-edit-toolbar .ps-edit-ocr-action[aria-busy="true"] { animation: none; }
  .ps-workflow-dialog-panel { animation: none; }
  .ps-diagram .sheet,
  .ps-diagram .sig,
  .ps-diagram .band,
  .ps-diagram .num,
  .ps-diagram .compress-line,
  .ps-diagram .compress-arrow,
  .ps-d-print-split .print-source,
  .ps-d-print-split .print-seam,
  .ps-d-print-split .print-arrow,
  .ps-d-print-split .print-part,
  .ps-card-go,
  .ps-tools-card { transition: none !important; }
  /* Diagrams still resolve to their finished state, just without the travel. */
  .ps-d-sign .sig { stroke-dashoffset: 0; }
  .ps-d-watermark .band,
  .ps-d-pagenum .num { opacity: 1; transform: none; }
  .ps-d-ocr .text { opacity: 1; }
  .ps-d-ocr .scan { opacity: 0; }
  .ps-d-inspect .inspect-shield { transform: scale(1.08); }
  .ps-d-inspect .inspect-check { stroke-dashoffset: 0; }
  .ps-d-edit .edit-box { stroke-dashoffset: 0; }
  .ps-d-edit .edit-cursor { transform: translate(3px, -3px); }
  .ps-d-smart_redact .smart-redact-hit {
    fill: rgba(181, 54, 45, .18);
    stroke: #b5362d;
  }
  .ps-d-smart_redact .smart-redact-scan {
    stroke: #b5362d;
    stroke-dashoffset: 0;
  }
  .ps-d-convert .convert-arrow { transform: rotate(180deg); }
  .ps-d-crop .c-a { transform: translate(4px, 4px); }
  .ps-d-crop .c-b { transform: translate(-4px, -4px); }
  .ps-d-print-split .print-part { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   Sign tool. The page preview is the working surface, so it gets the paper
   treatment: a real sheet on the desk surface, with the signature floating
   above it until dropped.
   -------------------------------------------------------------------------- */
.ps-sign-tabs { display: flex; gap: 0; margin-bottom: 14px; }
.ps-sign-tab {
  font-family: var(--ps-mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: none;
  border: 1px solid var(--ps-rule);
  border-right-width: 0;
  color: var(--ps-mute);
  padding: 9px 18px;
  cursor: pointer;
}
.ps-sign-tab:last-child { border-right-width: 1px; }
.ps-sign-tab.active { color: var(--ps-ink); background: var(--ps-green-w); border-color: #cdead6; }
.ps-sign-tab:focus-visible { outline: 2px solid var(--ps-green-d); outline-offset: -2px; }

#ps-sign-canvas {
  border: 1px solid var(--ps-rule);
  background: var(--ps-paper);
  width: 100%;
  max-width: 600px;
  touch-action: none;
  cursor: crosshair;
  display: block;
}

.ps-sign-clear {
  margin-top: 10px;
  font-family: var(--ps-mono);
  font-size: 12px;
  letter-spacing: .06em;
  background: none;
  border: 1px solid var(--ps-rule);
  color: var(--ps-body);
  padding: 7px 14px;
  cursor: pointer;
}
.ps-sign-clear:hover { border-color: var(--ps-ink); color: var(--ps-ink); }

.ps-sign-hint { margin: 22px 0 12px; font-size: 14.5px; color: var(--ps-body); }
.ps-sign-allpages { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; font-size: 14.5px; color: var(--ps-body); cursor: pointer; }
.ps-sign-allpages input { width: 16px; height: 16px; cursor: pointer; }

#ps-sign-preview { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.ps-sign-stage { position: relative; display: inline-block; background: var(--ps-surface); }
.ps-sign-page { display: block; border: 1px solid var(--ps-rule); background: var(--ps-paper); }
.ps-sign-overlay {
  position: absolute;
  cursor: move;
  user-select: none;
  -webkit-user-drag: none;
  outline: 1px dashed var(--ps-green);
  outline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Page previews. Pages are shown as what they are — sheets on a desk — so the
   grid needs no chrome beyond the sheet edge itself.
   -------------------------------------------------------------------------- */
#ps-tools-preview:not(:empty) { margin-top: 28px; }

.ps-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 16px;
  padding: 20px;
  background: var(--ps-surface);
  border: 1px solid var(--ps-rule);
  max-height: 460px;
  overflow-y: auto;
}
/* Merge shows one page per file, so a single scrolling row reads as sequence. */
.ps-thumbs-strip {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  max-height: none;
}
.ps-thumbs-strip .ps-thumb { flex: 0 0 auto; width: 120px; }

.ps-thumb {
  position: relative;
  cursor: pointer;
  text-align: center;
  padding: 6px;
  border: 1px solid transparent;
  transition: border-color .14s ease, background .14s ease;
}
.ps-thumb:hover { border-color: #cdd5c9; background: rgba(255,255,255,.6); }
.ps-thumb:focus-visible { outline: 2px solid var(--ps-green-d); outline-offset: -2px; }

.ps-thumb-inner {
  display: block;
  transition: transform .3s cubic-bezier(.22,.7,.3,1);
  transform-origin: center center;
}
.ps-thumb canvas,
.ps-thumb .ps-preview-page {
  display: block;
  width: 100%;
  height: auto;
  background: var(--ps-paper);
  border: 1px solid var(--ps-rule);
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
}

.ps-thumb-num {
  display: block;
  margin-top: 7px;
  font-family: var(--ps-mono);
  font-size: 11px;
  color: var(--ps-mute);
}

/* Selection is the whole point of the grid, so it must be unmistakable at a
   glance across a page of thumbnails — colour alone is too quiet here. */
.ps-thumb.is-selected { border-color: var(--ps-green); background: var(--ps-green-w); }
.ps-thumb.is-selected canvas { border-color: var(--ps-green); }
.ps-thumb.is-selected .ps-thumb-num { color: var(--ps-green-d); }
.ps-thumb.is-selected::after {
  content: "✓";
  position: absolute;
  top: 10px; right: 10px;
  width: 18px; height: 18px;
  line-height: 18px;
  font-size: 11px;
  color: #fff;
  background: var(--ps-green);
  border-radius: 50%;
}

/* Single-page result preview (watermark, pagenum). */
.ps-preview-page {
  display: block;
  max-width: 100%;
  height: auto;
  background: var(--ps-paper);
  border: 1px solid var(--ps-rule);
  box-shadow: 0 2px 8px rgba(0,0,0,.07);
}
#ps-tools-preview > .ps-preview-page { margin-top: 4px; }

@media (prefers-reduced-motion: reduce) {
  .ps-thumb-inner, .ps-thumb { transition: none !important; }
}

@media (max-width: 640px) {
  .ps-thumbs { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px; padding: 14px; }
}

/* Crawlable guidance below each interactive tool. It also gives people a
   quick, consistent explanation without competing with the primary action. */
.ps-tool-guide {
  margin-top: 72px;
  padding-top: 36px;
  border-top: 1px solid var(--ps-rule);
  color: var(--ps-body);
}
.ps-tool-guide h2 {
  margin: 0 0 12px;
  color: var(--ps-ink);
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.15;
}
.ps-tool-guide-about {
  max-width: 760px;
}
.ps-tool-guide-about--capabilities { max-width: none; }
.ps-tool-guide-description {
  max-width: 760px;
  margin: 0;
  color: var(--ps-mute);
  font-size: 17px;
  line-height: 1.65;
}
.ps-tool-guide-about--capabilities .ps-tool-guide-description { max-width: none; }
.ps-tool-capabilities {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 24px 0 0;
  padding: 0;
  border-top: 1px solid var(--ps-rule);
  border-left: 1px solid var(--ps-rule);
  list-style: none;
  background: transparent;
}
.ps-tool-capabilities li {
  position: relative;
  min-width: 0;
  margin: 0;
  padding: 17px 18px 17px 43px;
  border-right: 1px solid var(--ps-rule);
  border-bottom: 1px solid var(--ps-rule);
  color: var(--ps-body);
  background: var(--ps-paper);
  font-size: 14px;
  line-height: 1.55;
}
.ps-tool-capabilities li::before {
  content: "";
  position: absolute;
  top: 24px;
  left: 20px;
  width: 7px;
  height: 7px;
  background: var(--ps-green);
}
.ps-tool-related {
  margin-top: 36px;
}
.ps-tool-related > div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.ps-tool-related a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border: 1px solid var(--ps-rule);
  color: var(--ps-green-d);
  background: var(--ps-paper);
  font-family: var(--ps-mono);
  font-size: 13px;
  text-decoration: none;
}
.ps-tool-related a:hover,
.ps-tool-related a:focus-visible {
  border-color: var(--ps-green);
  background: var(--ps-green-w);
}

@media (max-width: 760px) {
  .ps-tool-guide { margin-top: 52px; padding-top: 28px; }
  .ps-tool-capabilities { grid-template-columns: 1fr; }
}
@media (min-width: 761px) and (max-width: 1040px) {
  .ps-tool-capabilities { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Social sharing closes the page, after the useful work and supporting copy.
   The buttons retain each network's official colour and familiar icon without
   letting four unrelated brands overpower PixelPDF's own visual language. */
.ps-share {
  display: grid;
  grid-template-columns: minmax(220px, .72fr) minmax(420px, 1.28fr);
  gap: 32px 48px;
  align-items: center;
  margin-top: 56px;
  padding: 28px 30px;
  border: 1px solid var(--ps-rule);
  border-left: 4px solid var(--ps-green);
  background: var(--ps-paper);
}
.ps-share .ps-section-label { margin-bottom: 9px; }
.ps-share h2 {
  margin: 0 0 8px;
  color: var(--ps-ink);
  font-family: var(--ps-display);
  font-size: clamp(23px, 3vw, 29px);
  font-weight: 400;
  line-height: 1.2;
}
.ps-share-copy > p:last-child {
  max-width: 46ch;
  margin: 0;
  color: var(--ps-body);
  font-size: 14px;
  line-height: 1.6;
}
.ps-share-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ps-share-actions li { min-width: 0; }
.ps-share-button {
  --ps-share-color: var(--ps-ink);
  --ps-share-tint: #f3f4f2;
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 48px;
  padding: 7px 12px 7px 8px;
  border: 1px solid var(--ps-rule);
  color: var(--ps-ink);
  background: var(--ps-paper);
  font-family: var(--ps-mono);
  font-size: 12px;
  letter-spacing: .035em;
  text-decoration: none;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.ps-share-button:hover,
.ps-share-button:focus-visible {
  border-color: var(--ps-share-color);
  color: var(--ps-ink);
  background: var(--ps-share-tint);
  text-decoration: none;
  transform: translateY(-1px);
}
.ps-share-button:focus-visible {
  outline: 2px solid var(--ps-share-color);
  outline-offset: 2px;
}
.ps-share-icon {
  display: inline-flex;
  flex: 0 0 34px;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  color: #fff;
  background: var(--ps-share-color);
  font-size: 20px;
  line-height: 1;
}
.ps-share-x { --ps-share-color: #000; --ps-share-tint: #f4f4f4; }
.ps-share-facebook { --ps-share-color: #0866ff; --ps-share-tint: #f2f7ff; }
.ps-share-reddit { --ps-share-color: #ff4500; --ps-share-tint: #fff5f1; }
.ps-share-weibo { --ps-share-color: #e6162d; --ps-share-tint: #fff3f4; }
.ps-share-wechat { --ps-share-color: #07c160; --ps-share-tint: #eef9f2; }

/* WeChat has no web share-composer URL, so its control is a native <details>
   disclosure: the <summary> is one more share button, and opening it reveals a
   server-rendered QR Code of the page link below the whole button row. */
.ps-share-wechat-item { grid-column: 1 / -1; }
.ps-share-wechat-disclosure { min-width: 0; }
.ps-share-wechat-disclosure > summary { list-style: none; cursor: pointer; }
.ps-share-wechat-disclosure > summary::-webkit-details-marker { display: none; }
.ps-share-wechat-chevron {
  margin-left: auto;
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  opacity: .55;
  transform: rotate(45deg);
  transition: transform .16s ease;
}
.ps-share-wechat-disclosure[open] .ps-share-wechat-chevron { transform: rotate(225deg); }
.ps-share-wechat-panel {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-top: 10px;
  padding: 16px;
  border: 1px solid var(--ps-rule);
  background: var(--ps-surface);
}
.ps-share-wechat-qr {
  flex: 0 0 auto;
  width: 160px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--ps-rule);
}
.ps-share-wechat-qr svg { display: block; width: 100%; height: auto; }
.ps-share-wechat-hint {
  margin: 0;
  color: var(--ps-body);
  font-size: 13px;
  line-height: 1.6;
}

@media (max-width: 760px) {
  .ps-share {
    grid-template-columns: 1fr;
    gap: 22px;
    margin-top: 44px;
    padding: 24px;
  }
}
@media (max-width: 430px) {
  .ps-share-actions { grid-template-columns: 1fr; }
  .ps-share-wechat-panel { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .ps-share-button { transition: none; }
  .ps-share-button:hover,
  .ps-share-button:focus-visible { transform: none; }
  .ps-share-wechat-chevron { transition: none; }
}

/* --------------------------------------------------------------------------
   Smart Redact. The workspace reads like an inspection desk: pages on the
   left, evidence in the centre, and an explicit approval ledger on the right.
   Red means "detected"; green means "the user approved this irreversible act".
   -------------------------------------------------------------------------- */
.ps-smart-redact {
  --ps-redact: #b5362d;
  --ps-redact-soft: #fff4f2;
  --ps-redact-ink: #7c231d;
}
.ps-smart-redact-intro {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px 17px;
  border: 1px solid #ead5d1;
  border-left: 3px solid var(--ps-redact);
  background: #fffaf9;
}
.ps-smart-redact-intro p {
  margin: 0;
  color: var(--ps-redact-ink);
  font-size: 14px;
  line-height: 1.55;
}
.ps-smart-redact-pulse {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--ps-redact);
  box-shadow: 0 0 0 5px rgba(181, 54, 45, .10);
}
.ps-smart-redact-controls {
  display: grid;
  grid-template-columns: minmax(190px, .7fr) minmax(360px, 1.8fr) auto;
  gap: 18px;
  align-items: end;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--ps-rule);
  background: var(--ps-paper);
}
.ps-smart-redact-language {
  margin: 0 !important;
}
.ps-smart-redact-language select {
  display: block;
  width: 100%;
  margin-top: 7px;
}
.ps-smart-redact-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.ps-smart-redact-categories legend {
  width: 100%;
  margin: 0 0 2px;
  color: var(--ps-ink);
  font-family: var(--ps-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.ps-tools-options .ps-smart-redact-categories label {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin: 0;
  cursor: pointer;
}
.ps-smart-redact-categories input {
  position: absolute;
  opacity: 0;
}
.ps-smart-redact-categories span {
  display: block;
  padding: 7px 9px;
  border: 1px solid #d4dbd0;
  color: var(--ps-body);
  background: var(--ps-paper);
  font-family: var(--ps-text);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}
.ps-smart-redact-categories input:checked + span {
  border-color: #d59b95;
  color: var(--ps-redact-ink);
  background: var(--ps-redact-soft);
  box-shadow: inset 3px 0 0 var(--ps-redact);
}
.ps-smart-redact-categories input:focus-visible + span {
  outline: 2px solid var(--ps-redact);
  outline-offset: 2px;
}
.ps-smart-redact-find {
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid var(--ps-redact);
  color: #fff;
  background: var(--ps-redact);
  font-family: var(--ps-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  cursor: pointer;
}
.ps-smart-redact-find:hover:not(:disabled) { background: var(--ps-redact-ink); }
.ps-smart-redact-find:disabled { border-color: #cbd2c7; background: #cbd2c7; cursor: not-allowed; }
.ps-smart-redact-progress {
  margin-top: 14px;
}
.ps-smart-redact-progress p {
  min-height: 21px;
  margin: 0 0 7px;
  color: var(--ps-green-d);
  font-family: var(--ps-mono);
  font-size: 12.5px;
}
.ps-smart-redact-progress > span {
  display: block;
  height: 4px;
  overflow: hidden;
  background: #e8ece5;
}
.ps-smart-redact-progress i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--ps-redact), var(--ps-green));
  transition: width .18s linear;
}
.ps-smart-redact-workspace {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr) 270px;
  min-height: 660px;
  margin-top: 22px;
  border: 1px solid var(--ps-rule);
  background: #edf0ea;
}
.ps-smart-redact-workspace[hidden] { display: none; }
.ps-smart-redact-pages,
.ps-smart-redact-review {
  min-width: 0;
  background: var(--ps-paper);
}
.ps-smart-redact-pages { border-right: 1px solid var(--ps-rule); }
.ps-smart-redact-review { border-left: 1px solid var(--ps-rule); }
.ps-smart-redact-panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 50px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--ps-rule);
}
.ps-smart-redact-panel-title strong {
  color: var(--ps-ink);
  font-family: var(--ps-mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.ps-smart-redact-panel-title span {
  color: var(--ps-mute);
  font-family: var(--ps-mono);
  font-size: 11px;
}
.ps-smart-redact-pages ol {
  max-height: 610px;
  margin: 0;
  padding: 10px;
  overflow-y: auto;
  list-style: none;
}
.ps-smart-redact-pages li + li { margin-top: 5px; }
.ps-smart-redact-pages button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 9px;
  border: 1px solid transparent;
  color: var(--ps-body);
  background: transparent;
  font-family: var(--ps-mono);
  cursor: pointer;
}
.ps-smart-redact-pages button em {
  min-width: 19px;
  height: 19px;
  padding: 0 4px;
  border-radius: 10px;
  color: var(--ps-redact-ink);
  background: var(--ps-redact-soft);
  font-size: 10px;
  font-style: normal;
  line-height: 19px;
}
.ps-smart-redact-pages button:hover,
.ps-smart-redact-pages button.is-active {
  border-color: var(--ps-green);
  color: var(--ps-green-d);
  background: var(--ps-green-w);
}
.ps-smart-redact-canvas-panel {
  min-width: 0;
  padding: 18px;
  overflow: auto;
}
.ps-smart-redact-stage {
  position: relative;
  margin: 0 auto;
  background: #fff;
  box-shadow: 0 2px 12px rgba(25, 38, 21, .12);
}
.ps-smart-redact-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.ps-smart-redact-overlay {
  position: absolute;
  inset: 0;
  touch-action: none;
}
.ps-smart-redact-overlay.is-drawing {
  cursor: crosshair;
  background-image:
    linear-gradient(rgba(181, 54, 45, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(181, 54, 45, .045) 1px, transparent 1px);
  background-size: 16px 16px;
}
.ps-smart-redact-box {
  position: absolute;
  min-width: 6px;
  min-height: 6px;
  padding: 0;
  border: 2px solid var(--ps-redact);
  background: rgba(181, 54, 45, .14);
  cursor: pointer;
}
.ps-smart-redact-box::before {
  content: "";
  position: absolute;
  inset: 2px;
  background: repeating-linear-gradient(
    -45deg,
    rgba(181, 54, 45, .22),
    rgba(181, 54, 45, .22) 4px,
    transparent 4px,
    transparent 8px
  );
}
.ps-smart-redact-box:hover { background: rgba(181, 54, 45, .26); }
.ps-smart-redact-box.is-accepted {
  border-color: var(--ps-green);
  background: rgba(40, 167, 69, .18);
}
.ps-smart-redact-box.is-accepted::before {
  background: repeating-linear-gradient(
    -45deg,
    rgba(40, 167, 69, .30),
    rgba(40, 167, 69, .30) 4px,
    transparent 4px,
    transparent 8px
  );
}
.ps-smart-redact-box-delete {
  position: absolute;
  z-index: 2;
  top: -13px;
  right: -13px;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: var(--ps-redact);
  box-shadow: 0 1px 4px rgba(51, 28, 25, .3);
  font: 700 18px/22px var(--ps-text);
  cursor: pointer;
}
.ps-smart-redact-box-delete:hover,
.ps-smart-redact-box-delete:focus-visible {
  background: var(--ps-redact-ink);
  outline: 2px solid rgba(181, 54, 45, .25);
  outline-offset: 2px;
}
.ps-smart-redact-draft {
  position: absolute;
  border: 2px dashed var(--ps-redact);
  background: rgba(181, 54, 45, .13);
  pointer-events: none;
}
.ps-smart-redact-manual {
  display: block;
  margin: 14px auto 0;
  padding: 9px 13px;
  border: 1px solid #cbd3c7;
  color: var(--ps-body);
  background: var(--ps-paper);
  font-family: var(--ps-mono);
  font-size: 11px;
  cursor: pointer;
}
.ps-smart-redact-manual.is-active {
  border-color: var(--ps-redact);
  color: var(--ps-redact-ink);
  background: var(--ps-redact-soft);
}
.ps-smart-redact-manual-help {
  max-width: 520px;
  margin: 9px auto 0;
  color: var(--ps-mute);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}
.ps-smart-redact-review-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 10px;
  border-bottom: 1px solid var(--ps-rule);
}
.ps-smart-redact-review-actions button {
  padding: 8px 7px;
  border: 1px solid #d2d8ce;
  color: var(--ps-body);
  background: var(--ps-paper);
  font-family: var(--ps-mono);
  font-size: 10px;
  cursor: pointer;
}
.ps-smart-redact-review-actions button:hover {
  border-color: var(--ps-green);
  color: var(--ps-green-d);
}
.ps-smart-redact-suggestions {
  max-height: 550px;
  padding: 10px;
  overflow-y: auto;
}
.ps-tools-options .ps-smart-redact-suggestion {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
  margin: 0;
  padding: 11px 9px;
  border: 1px solid transparent;
  cursor: pointer;
  text-transform: none;
}
.ps-smart-redact-suggestion-choice {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 9px;
  min-width: 0;
  cursor: pointer;
}
.ps-tools-options .ps-smart-redact-suggestion + .ps-smart-redact-suggestion {
  border-top-color: var(--ps-rule);
}
.ps-smart-redact-suggestion:hover { background: #fafbf9; }
.ps-smart-redact-suggestion.is-accepted {
  border-color: #b7dfbf;
  background: var(--ps-green-w);
}
.ps-smart-redact-suggestion input {
  margin: 3px 0 0;
  accent-color: var(--ps-green);
}
.ps-smart-redact-suggestion-delete {
  align-self: center;
  padding: 6px 7px;
  border: 1px solid #e0b4af;
  color: var(--ps-redact-ink);
  background: #fff;
  font-family: var(--ps-mono);
  font-size: 9px;
  cursor: pointer;
}
.ps-smart-redact-suggestion-delete:hover,
.ps-smart-redact-suggestion-delete:focus-visible {
  border-color: var(--ps-redact);
  background: var(--ps-redact-soft);
}
.ps-smart-redact-suggestion strong,
.ps-smart-redact-suggestion code,
.ps-smart-redact-suggestion small {
  display: block;
}
.ps-smart-redact-suggestion strong {
  color: var(--ps-ink);
  font-family: var(--ps-text);
  font-size: 12px;
  letter-spacing: 0;
}
.ps-smart-redact-suggestion code {
  max-width: 100%;
  margin-top: 5px;
  overflow: hidden;
  color: var(--ps-redact-ink);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ps-smart-redact-suggestion small {
  margin-top: 5px;
  color: var(--ps-mute);
  font-family: var(--ps-mono);
  font-size: 9px;
  letter-spacing: .04em;
}
.ps-smart-redact-empty {
  margin: 0;
  padding: 20px 8px;
  color: var(--ps-mute);
  font-size: 12px;
  line-height: 1.55;
}
.ps-smart-redact-warning {
  margin: 18px 0 0;
  padding: 13px 15px;
  border: 1px solid #eadfca;
  background: #fffbf3;
  color: #735420;
  font-size: 13px;
  line-height: 1.55;
}
.ps-smart-redact-result,
.ps-smart-redact-verified {
  margin: 12px 0 0;
  color: var(--ps-body);
  font-size: 14px;
}
.ps-smart-redact-verified {
  color: var(--ps-green-d);
  font-family: var(--ps-mono);
  font-size: 12px;
}

@media (max-width: 980px) {
  .ps-smart-redact-controls { grid-template-columns: 1fr 2fr; }
  .ps-smart-redact-find { grid-column: 1 / -1; }
  .ps-smart-redact-workspace { grid-template-columns: 90px minmax(0, 1fr); }
  .ps-smart-redact-review {
    grid-column: 1 / -1;
    border-top: 1px solid var(--ps-rule);
    border-left: 0;
  }
  .ps-smart-redact-suggestions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 340px;
  }
}

@media (max-width: 640px) {
  .ps-smart-redact-controls { grid-template-columns: 1fr; padding: 14px; }
  .ps-smart-redact-find { grid-column: auto; }
  .ps-smart-redact-workspace { display: block; }
  .ps-smart-redact-pages { border-right: 0; border-bottom: 1px solid var(--ps-rule); }
  .ps-smart-redact-pages ol {
    display: flex;
    gap: 6px;
    max-height: none;
    overflow-x: auto;
  }
  .ps-smart-redact-pages li { flex: 0 0 66px; }
  .ps-smart-redact-pages li + li { margin-top: 0; }
  .ps-smart-redact-suggestions { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- Markdown */

.ps-markdown-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.ps-markdown-section {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
  margin: 0;
  padding: 18px;
  border: 1px solid var(--ps-rule);
  background: var(--ps-paper);
}
.ps-markdown-section-output { grid-column: 1 / -1; }
.ps-markdown-section > legend,
.ps-markdown-profile > legend {
  padding: 0 7px;
  font-family: var(--ps-mono);
  font-size: 12px;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ps-mute);
}
.ps-markdown-profile {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}
.ps-markdown-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.ps-markdown-choice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 3px 10px;
  margin: 0;
  padding: 13px 14px;
  border: 1px solid var(--ps-rule);
  background: var(--ps-paper);
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.ps-markdown-choice:hover { border-color: var(--ps-green); }
.ps-markdown-choice:has(input:checked) {
  border-color: var(--ps-green);
  background: var(--ps-green-w);
}
.ps-markdown-choice:focus-within { outline: 2px solid var(--ps-green-d); outline-offset: 2px; }
.ps-markdown-choice input { grid-row: 1 / span 2; align-self: start; margin-top: 3px; }
.ps-markdown-choice-compact { padding: 10px 11px; }
.ps-markdown-option-name { font-size: 14px; line-height: 1.35; color: var(--ps-ink); }
.ps-markdown-option-desc { font-size: 13px; line-height: 1.5; color: var(--ps-body); }
.ps-markdown-ocr {
  border-top: 3px solid var(--ps-green);
}
.ps-markdown-ocr .ps-markdown-option-desc { max-width: 64ch; margin: 0; }
.ps-markdown-language {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 220px);
  align-items: center;
  gap: 10px;
  width: 100%;
  padding-top: 2px;
  font-size: 13px;
  color: var(--ps-body);
}
.ps-markdown-language select {
  width: 100%;
  min-height: 36px;
  padding: 6px 30px 6px 9px;
  border: 1px solid var(--ps-rule);
  border-radius: 0;
  color: var(--ps-ink);
  background: var(--ps-paper);
}
.ps-markdown-language select:disabled { cursor: not-allowed; opacity: .55; }
.ps-markdown-figures { border-top: 3px solid var(--ps-ink); }
.ps-markdown-suboptions {
  gap: 8px;
  margin-top: 1px;
  padding-top: 12px;
  border-top: 1px solid var(--ps-rule);
}
.ps-markdown-suboptions > legend { padding-left: 0; }
.ps-markdown-suboptions[disabled] { opacity: .48; }
.ps-markdown-suboptions[disabled] .ps-markdown-choice { cursor: not-allowed; }
.ps-markdown-toggle {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 0;
  font-size: 14px;
  color: var(--ps-ink);
  cursor: pointer;
}
.ps-markdown-toggle input { flex: 0 0 auto; }
.ps-markdown-secondary-toggle {
  margin-top: 2px;
  padding-top: 12px;
  border-top: 1px solid var(--ps-rule);
  color: var(--ps-body);
}
@media (max-width: 720px) {
  .ps-markdown-options,
  .ps-markdown-choice-grid { grid-template-columns: 1fr; }
  .ps-markdown-section-output { grid-column: auto; }
  .ps-markdown-language { grid-template-columns: 1fr; gap: 6px; }
}
.ps-markdown-summary {
  margin: 0 0 10px;
  font-family: var(--ps-mono);
  font-size: 14px;
  color: var(--ps-ink);
}
.ps-markdown-audit {
  max-width: 76ch;
  margin: 0 0 10px;
  padding: 10px 12px;
  border-left: 3px solid var(--ps-green);
  font-size: 13px;
  line-height: 1.55;
  color: var(--ps-ink);
  background: var(--ps-green-w);
}
.ps-markdown-note {
  max-width: 72ch;
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ps-body);
}
.ps-markdown-note-warn { color: var(--ps-danger, #9c2f24); }
.ps-markdown-preview-title {
  margin: 24px 0 10px;
  font-family: var(--ps-mono);
  font-size: 12px;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ps-ink);
}
.ps-markdown-copy {
  font-family: var(--ps-mono);
  font-size: 13px;
  letter-spacing: .06em;
  color: var(--ps-green-d);
  background: none;
  border: 0;
  border-bottom: 1px solid currentColor;
  padding: 0 0 2px;
  cursor: pointer;
}
.ps-markdown-copy-status {
  margin-left: 12px;
  font-size: 13px;
  color: var(--ps-body);
}
.ps-markdown-preview {
  max-height: 420px;
  margin: 12px 0 14px;
  padding: 16px;
  overflow: auto;
  border: 1px solid var(--ps-rule);
  background: var(--ps-paper);
  font-family: var(--ps-mono);
  font-size: 13px;
  line-height: 1.6;
  color: var(--ps-ink);
  white-space: pre-wrap;
  word-break: break-word;
}
.ps-markdown-tabs {
  display: flex;
  gap: 2px;
  margin: 12px 0 0;
  border-bottom: 1px solid var(--ps-rule);
}
.ps-markdown-tab {
  padding: 8px 14px;
  border: 1px solid transparent;
  border-bottom: 0;
  margin-bottom: -1px;
  background: none;
  font-family: var(--ps-mono);
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ps-mute);
  cursor: pointer;
}
.ps-markdown-tab:hover { color: var(--ps-ink); }
.ps-markdown-tab.is-active {
  border-color: var(--ps-rule);
  background: var(--ps-paper);
  color: var(--ps-ink);
}
.ps-markdown-tab:focus-visible { outline: 2px solid var(--ps-green-d); outline-offset: -2px; }
.ps-markdown-tabs + .ps-markdown-preview { margin-top: 0; }
.ps-markdown-rendered {
  max-height: 420px;
  margin: 0 0 14px;
  padding: 20px 22px;
  overflow: auto;
  border: 1px solid var(--ps-rule);
  border-top: 0;
  background: var(--ps-paper);
  font-size: 15px;
  line-height: 1.65;
  color: var(--ps-ink);
}
.ps-markdown-rendered > :first-child { margin-top: 0; }
.ps-markdown-rendered > :last-child { margin-bottom: 0; }
.ps-markdown-rendered h1,
.ps-markdown-rendered h2,
.ps-markdown-rendered h3,
.ps-markdown-rendered h4,
.ps-markdown-rendered h5,
.ps-markdown-rendered h6 {
  margin: 22px 0 8px;
  font-family: var(--ps-display);
  font-weight: 400;
  line-height: 1.3;
  color: var(--ps-ink);
}
.ps-markdown-rendered h1 { font-size: 25px; }
.ps-markdown-rendered h2 { font-size: 21px; }
.ps-markdown-rendered h3 { font-size: 18px; }
.ps-markdown-rendered h4,
.ps-markdown-rendered h5,
.ps-markdown-rendered h6 { font-size: 16px; }
.ps-markdown-rendered p { margin: 0 0 12px; }
.ps-markdown-rendered ul,
.ps-markdown-rendered ol { margin: 0 0 12px; padding-left: 22px; }
.ps-markdown-rendered li { margin: 0 0 4px; }
.ps-markdown-rendered blockquote {
  margin: 0 0 12px;
  padding: 2px 0 2px 14px;
  border-left: 2px solid var(--ps-rule);
  color: var(--ps-body);
}
.ps-markdown-rendered hr {
  height: 0;
  margin: 18px 0;
  border: 0;
  border-top: 1px solid var(--ps-rule);
}
.ps-markdown-rendered a { color: var(--ps-green-d); }
.ps-markdown-rendered code {
  padding: 1px 5px;
  background: rgba(0, 0, 0, .05);
  font-family: var(--ps-mono);
  font-size: 13px;
}
.ps-markdown-rendered pre.ps-md-code {
  margin: 0 0 12px;
  padding: 12px 14px;
  overflow-x: auto;
  background: rgba(0, 0, 0, .05);
}
.ps-markdown-rendered pre.ps-md-code code { padding: 0; background: none; }
.ps-md-math-inline {
  display: inline-block;
  max-width: 100%;
  vertical-align: middle;
}
.ps-md-math-display {
  max-width: 100%;
  margin: 14px 0;
  padding: 4px 0;
  overflow-x: auto;
  overflow-y: hidden;
  text-align: center;
}
.ps-md-math-source {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.ps-md-table-wrap { margin: 0 0 14px; overflow-x: auto; }
.ps-md-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.ps-md-table th,
.ps-md-table td {
  padding: 8px 11px;
  border: 1px solid var(--ps-rule);
  text-align: left;
  vertical-align: top;
}
.ps-md-table th { background: rgba(0, 0, 0, .03); font-weight: 600; }
.ps-md-table .ps-md-align-center { text-align: center; }
.ps-md-table .ps-md-align-right { text-align: right; }
.ps-md-table .ps-md-align-left { text-align: left; }
.ps-md-page {
  margin: 20px 0 12px;
  padding-top: 8px;
  border-top: 1px dashed var(--ps-rule);
  font-family: var(--ps-mono);
  font-size: 11px;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ps-mute);
}
.ps-md-image {
  display: inline-block;
  padding: 2px 8px;
  border: 1px dashed var(--ps-rule);
  font-size: 13px;
  color: var(--ps-mute);
}
.ps-md-figure {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 0 14px;
  border: 1px solid var(--ps-rule);
  border-radius: 8px;
}
.ps-tools-group + .ps-tools-group { margin-top: 38px; }
.ps-tools-group-title {
  margin: 0 0 14px;
  font-family: var(--ps-display);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.3;
  color: var(--ps-ink);
}
