/* Oddsprig PDF Toolkit — theme and layout.
   Mobile-first, accessible, self-hosted SIL OFL fonts only. Do not load a font CDN.
   Visual tokens follow the live image tools (scan.css / generators.css) and the
   site theme toggle (oddsprig-theme.css). Dark is the default, like Image to
   Barcode; light tokens apply when html[data-oddsprig-theme="light"].
   Scope lives under body.pt-tool so the shared header, Index menu and theme
   toggle keep their own styles.
   The builder should hook the documented classes and IDs in DESIGN.md and
   layout.html. Do not edit builder JS from this file. */

/* -------------------------------------------------------------------------- */
/* Fonts — Source Serif 4 + Source Sans 3, SIL OFL 1.1, latin variable        */
/* -------------------------------------------------------------------------- */

@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("../fonts/source-serif-4-latin-wght-normal.woff2") format("woff2-variations"),
       url("../fonts/source-serif-4-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Source Sans 3";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("../fonts/source-sans-3-latin-wght-normal.woff2") format("woff2-variations"),
       url("../fonts/source-sans-3-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Source Sans 3";
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
  src: url("../fonts/source-sans-3-latin-wght-italic.woff2") format("woff2-variations"),
       url("../fonts/source-sans-3-latin-wght-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* -------------------------------------------------------------------------- */
/* Tokens — dark first (image tools), light via the site theme toggle         */
/* -------------------------------------------------------------------------- */

:root,
html[data-oddsprig-theme="dark"] {
  color-scheme: dark;
  --pt-bg: #152227;
  --pt-panel: #1c2d31;
  --pt-soft: #24383c;
  --pt-ink: #edf2e9;
  --pt-muted: #b9c9c8;
  --pt-line: #38494b;
  --pt-dash: #82998d;
  --pt-lime: #c8e6a0;
  --pt-lime-hover: #ddf1bf;
  --pt-gold: #e5ce8e;
  --pt-focus: #e5ce8e;
  --pt-accent: #c8e6a0;
  --pt-accent-ink: #152227;
  --pt-danger: #f3b98e;
  --pt-ok: #c8e6a0;
  --pt-drag: #31483d;
  --pt-check-a: #3a4c4a;
  --pt-check-b: #2a3b3e;
  --pt-divider: #edf2e9;
  --pt-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --pt-sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  --pt-radius: 15px;
  --pt-radius-sm: 9px;
  --pt-gutter: 16px;
  --pt-content: 1502px;
  --pt-split: 50%;
}

html[data-oddsprig-theme="light"] {
  color-scheme: light;
  --pt-bg: #eeece4;
  --pt-panel: #f4f0e6;
  --pt-soft: #e2ebed;
  --pt-ink: #20383e;
  --pt-muted: #50686c;
  --pt-line: #a1b3af;
  --pt-dash: #6d8979;
  --pt-lime: #256358;
  --pt-lime-hover: #2e7769;
  --pt-gold: #9a5018;
  --pt-focus: #9a5018;
  --pt-accent: #256358;
  --pt-accent-ink: #eeece4;
  --pt-danger: #8a3410;
  --pt-ok: #1c5349;
  --pt-drag: #d3e5da;
  --pt-check-a: #d7ddd4;
  --pt-check-b: #eef1ea;
  --pt-divider: #152227;
}

@media (min-width: 650px) {
  :root,
  html[data-oddsprig-theme="light"],
  html[data-oddsprig-theme="dark"] {
    --pt-gutter: 32px;
  }
}

@media (min-width: 651px) {
  body.pt-tool.oddsprig-shared-shell {
    --pt-gutter: 48px;
  }
}

/* -------------------------------------------------------------------------- */
/* Page base                                                                  */
/* -------------------------------------------------------------------------- */

body.pt-tool {
  margin: 0;
  min-width: 0;
  background: var(--pt-bg);
  color: var(--pt-ink);
  font: 16px/1.55 var(--pt-sans);
  overflow-wrap: break-word;
}

body.pt-tool *,
body.pt-tool *::before,
body.pt-tool *::after { box-sizing: border-box; }

body.pt-tool img,
body.pt-tool svg,
body.pt-tool canvas { max-width: 100%; }

body.pt-tool h1,
body.pt-tool h2,
body.pt-tool h3,
body.pt-tool p { margin: 0; }

body.pt-tool h1,
body.pt-tool h2 {
  font-family: var(--pt-serif);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

body.pt-tool a { color: var(--pt-accent); text-underline-offset: 0.2em; }
body.pt-tool a:hover { color: var(--pt-gold); }

body.pt-tool :focus-visible {
  outline: 3px solid var(--pt-focus);
  outline-offset: 3px;
}

body.pt-tool button,
body.pt-tool .pt-button,
body.pt-tool select,
body.pt-tool textarea,
body.pt-tool input:not([type="range"]):not([type="color"]):not([type="checkbox"]):not([type="radio"]):not([type="file"]) {
  font: inherit;
  color: var(--pt-ink);
  background: var(--pt-soft);
  border: 1px solid var(--pt-line);
  border-radius: var(--pt-radius-sm);
  padding: 8px 12px;
}

body.pt-tool button,
body.pt-tool .pt-button,
body.pt-tool select { cursor: pointer; }

body.pt-tool button,
body.pt-tool .pt-button,
body.pt-tool select,
body.pt-tool input[type="radio"],
body.pt-tool input[type="checkbox"] {
  min-height: 44px;
  touch-action: manipulation;
}

body.pt-tool button:hover:not(:disabled),
body.pt-tool .pt-button:hover {
  border-color: var(--pt-lime);
}

body.pt-tool button:disabled,
body.pt-tool .pt-button[aria-disabled="true"] {
  opacity: 0.45;
  cursor: default;
}

body.pt-tool .pt-primary,
body.pt-tool button.pt-primary {
  background: var(--pt-lime);
  color: var(--pt-accent-ink);
  border-color: var(--pt-lime);
  font-weight: 750;
}

body.pt-tool .pt-primary:hover:not(:disabled) {
  background: var(--pt-lime-hover);
  border-color: var(--pt-lime-hover);
}

body.pt-tool [hidden] { display: none !important; }

.pt-sr,
.pt-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.pt-skip {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 100;
  min-height: 44px;
  padding: 0.6rem 1rem;
  background: var(--pt-lime);
  color: var(--pt-accent-ink);
  font-weight: 650;
  text-decoration: none;
}

.pt-skip:focus { top: 0.5rem; }

/* Shared shell already sizes header/footer; keep main aligned with them. */
body.pt-tool.oddsprig-shared-shell main#main {
  box-sizing: border-box;
  width: calc(100% - var(--pt-gutter));
  max-width: var(--pt-content);
  margin-inline: auto;
  padding: 24px 0 48px;
}

body.pt-tool:not(.oddsprig-shared-shell) main#main {
  width: calc(100% - var(--pt-gutter));
  max-width: var(--pt-content);
  margin-inline: auto;
  padding: 24px 0 48px;
}

/* -------------------------------------------------------------------------- */
/* Intro                                                                      */
/* -------------------------------------------------------------------------- */

.pt-intro { margin-bottom: 16px; padding-block: 4px 4px; }
.pt-intro h1 { font-size: clamp(1.65rem, 3vw, 2.15rem); color: var(--pt-ink); }
.pt-eyebrow {
  margin: 0 0 6px;
  color: var(--pt-gold);
  font-size: 0.69rem;
  font-weight: 650;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.pt-explainer {
  max-width: 85ch;
  margin: 0.4rem 0 0;
  color: var(--pt-muted);
  font-size: 1rem;
  line-height: 1.45;
}
.pt-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}
.pt-trust li {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 4px 10px;
  border: 1px solid var(--pt-line);
  border-radius: 999px;
  background: var(--pt-panel);
  color: var(--pt-ink);
  font-size: 0.8125rem;
  font-weight: 650;
}

/* -------------------------------------------------------------------------- */
/* Workspace                                                                  */
/* -------------------------------------------------------------------------- */

.pt-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.pt-panel {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--pt-line);
  border-radius: var(--pt-radius);
  background: var(--pt-panel);
}

.pt-panel h2 {
  margin: 0 0 12px;
  color: var(--pt-gold);
  font-size: 1.15rem;
}

.pt-help,
.pt-panel .pt-help {
  margin: 10px 0 0;
  color: var(--pt-muted);
  font-size: 14px;
}

/* -------------------------------------------------------------------------- */
/* Drop zone                                                                  */
/* -------------------------------------------------------------------------- */

#pt-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 168px;
  padding: 20px 16px;
  border: 2px dashed var(--pt-dash);
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
  background: var(--pt-bg);
}

#pt-drop:hover,
#pt-drop.is-dragging,
#pt-drop.drag,
#pt-drop[data-state="dragging"] {
  border-color: var(--pt-lime);
  background: var(--pt-drag);
}

#pt-drop strong { font-size: 1.05rem; }
#pt-drop .pt-drop-hint { color: var(--pt-muted); font-size: 14px; }

.pt-drop-actions,
.pt-toolbar-row,
.pt-batch-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.pt-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  position: relative;
}

.pt-button input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
  opacity: 0;
}

.pt-button:focus-within { outline: 3px solid var(--pt-focus); outline-offset: 3px; }

#pt-filename {
  display: block;
  margin-top: 8px;
  color: var(--pt-muted);
  font-size: 14px;
  overflow-wrap: anywhere;
}

#pt-filename:empty { display: none; }

/* -------------------------------------------------------------------------- */
/* Model download + processing progress                                       */
/* -------------------------------------------------------------------------- */

.pt-model {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--pt-line);
}

.pt-model fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.pt-model legend {
  padding: 0;
  margin-bottom: 8px;
  color: var(--pt-gold);
  font-size: 14px;
  font-weight: 650;
}

.pt-model-choice {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.pt-model-choice label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 10px;
  align-items: start;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--pt-line);
  border-radius: var(--pt-radius-sm);
  background: var(--pt-bg);
  cursor: pointer;
}

.pt-model-choice label:has(input:checked) {
  border-color: var(--pt-lime);
  background: var(--pt-drag);
}

.pt-model-choice label:has(input:focus-visible) {
  outline: 3px solid var(--pt-focus);
  outline-offset: 3px;
}

.pt-model-choice input[type="radio"] {
  margin: 4px 0 0;
  width: 1.1rem;
  height: 1.1rem;
  min-height: 0;
  accent-color: var(--pt-lime);
}

.pt-model-choice strong { font-size: 14px; }
.pt-model-choice span {
  grid-column: 2;
  color: var(--pt-muted);
  font-size: 13px;
  line-height: 1.4;
}

#pt-model-status,
#pt-status {
  margin: 10px 0 0;
  color: var(--pt-ok);
  font-size: 14px;
  overflow-wrap: anywhere;
}

#pt-model-status.is-warn,
#pt-status.is-warn,
#pt-error {
  color: var(--pt-danger);
}

#pt-error { margin: 10px 0 0; font-size: 14px; }

.pt-progress,
#pt-model-progress,
#pt-progress {
  display: block;
  width: 100%;
  height: 12px;
  margin-top: 10px;
  accent-color: var(--pt-lime);
  background: var(--pt-soft);
  border: 0;
  border-radius: 999px;
}

.pt-progress-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
  color: var(--pt-muted);
  font-size: 13px;
}

/* -------------------------------------------------------------------------- */
/* Before / after slider                                                      */
/* -------------------------------------------------------------------------- */

.pt-compare-wrap { min-width: 0; }

#pt-compare {
  --pt-split: 50%;
  position: relative;
}

.pt-compare-stage {
  position: relative;
  overflow: hidden;
  min-height: 200px;
  border-radius: 12px;
  background-color: var(--pt-check-b);
  background-image:
    linear-gradient(45deg, var(--pt-check-a) 25%, transparent 25%),
    linear-gradient(-45deg, var(--pt-check-a) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--pt-check-a) 75%),
    linear-gradient(-45deg, transparent 75%, var(--pt-check-a) 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
}

.pt-compare-stage.is-solid { background-image: none; }

#pt-compare-original,
#pt-compare-result {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: top;
}

#pt-compare-result {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  clip-path: inset(0 calc(100% - var(--pt-split)) 0 0);
}

.pt-compare-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pt-split);
  width: 2px;
  margin-left: -1px;
  background: var(--pt-divider);
  box-shadow: 0 0 0 1px rgb(21 34 39 / 0.35);
  pointer-events: none;
}

.pt-compare-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 36px;
  height: 36px;
  border: 2px solid var(--pt-divider);
  border-radius: 50%;
  background: var(--pt-bg);
  transform: translate(-50%, -50%);
}

.pt-compare-labels {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  color: var(--pt-muted);
  font-size: 13px;
  font-weight: 650;
}

#pt-compare-slider {
  display: block;
  width: 100%;
  height: 44px;
  margin: 4px 0 0;
  padding: 0;
  background: transparent;
  cursor: ew-resize;
  accent-color: var(--pt-lime);
  touch-action: pan-y;
}

.pt-compare-empty {
  display: grid;
  place-items: center;
  min-height: 200px;
  padding: 24px 16px;
  color: var(--pt-muted);
  text-align: center;
}

#pt-compare:not([data-ready]) .pt-compare-stage,
#pt-compare:not([data-ready]) .pt-compare-labels,
#pt-compare:not([data-ready]) #pt-compare-slider { display: none; }

#pt-compare[data-ready] .pt-compare-empty { display: none; }

/* Solid preview color (builder sets --pt-preview-bg on #pt-compare). */
#pt-compare[data-bg="color"] .pt-compare-stage {
  background-image: none;
  background-color: var(--pt-preview-bg, #ffffff);
}

/* -------------------------------------------------------------------------- */
/* Editing toolbar                                                            */
/* -------------------------------------------------------------------------- */

#pt-toolbar {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.pt-tool-group {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px;
}

.pt-tool-group[role="toolbar"],
.pt-tool-group[role="radiogroup"] { flex-wrap: wrap; }

.pt-tool-group h3,
.pt-field-label {
  flex: 1 0 100%;
  margin: 0;
  color: var(--pt-muted);
  font-family: var(--pt-sans);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.02em;
}

body.pt-tool .pt-tool-group button[aria-pressed="true"] {
  background: var(--pt-lime);
  color: var(--pt-accent-ink);
  border-color: var(--pt-lime);
}

.pt-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1 1 140px;
}

.pt-field input[type="range"] {
  width: 100%;
  height: 44px;
  margin: 0;
  padding: 0;
  accent-color: var(--pt-lime);
}

.pt-swatch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
}

.pt-swatch input[type="color"] {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--pt-line);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}

.pt-toolbar-export { margin-top: 4px; }

/* -------------------------------------------------------------------------- */
/* Batch grid                                                                 */
/* -------------------------------------------------------------------------- */

#pt-batch-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.pt-batch-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 8px 12px;
  padding: 10px;
  border: 1px solid var(--pt-line);
  border-radius: 12px;
  background: var(--pt-bg);
}

.pt-batch-item.is-active,
.pt-batch-item[aria-current="true"] { border-color: var(--pt-lime); }

.pt-batch-thumb {
  grid-row: 1 / span 2;
  width: 72px;
  height: 72px;
  overflow: hidden;
  border-radius: 8px;
  background-color: var(--pt-check-b);
  background-image:
    linear-gradient(45deg, var(--pt-check-a) 25%, transparent 25%),
    linear-gradient(-45deg, var(--pt-check-a) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--pt-check-a) 75%),
    linear-gradient(-45deg, transparent 75%, var(--pt-check-a) 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}

.pt-batch-thumb img,
.pt-batch-thumb canvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pt-batch-meta { min-width: 0; }
.pt-batch-name {
  display: block;
  font-weight: 650;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.pt-batch-state {
  display: block;
  margin-top: 2px;
  color: var(--pt-muted);
  font-size: 13px;
}
.pt-batch-item[data-state="error"] .pt-batch-state { color: var(--pt-danger); }
.pt-batch-item[data-state="ready"] .pt-batch-state { color: var(--pt-ok); }

.pt-batch-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pt-batch-item-actions button,
.pt-batch-item-actions .pt-button {
  min-height: 44px;
  padding: 6px 10px;
  font-size: 13px;
}

.pt-batch-empty {
  margin: 8px 0 0;
  color: var(--pt-muted);
  font-size: 14px;
}

#pt-batch-list:not(:empty) + .pt-batch-empty { display: none; }

/* -------------------------------------------------------------------------- */
/* Guide, FAQ, footer                                                         */
/* -------------------------------------------------------------------------- */

.pt-guide {
  margin: 1.5rem 0 2rem;
  max-width: 78ch;
}

.pt-guide h2 {
  margin: 1.2rem 0 0.6rem;
  color: var(--pt-gold);
  font-size: 1.35rem;
}

.pt-guide h3 {
  margin: 1rem 0 0.4rem;
  font-family: var(--pt-serif);
  font-size: 1.05rem;
  font-weight: 600;
}

.pt-guide ol,
.pt-guide ul { margin: 0.4rem 0 0.8rem; padding-left: 1.25rem; }
.pt-guide li { margin: 0.4rem 0; }
.pt-guide p { margin: 0.4rem 0 0.8rem; max-width: 78ch; }

.pt-guide details {
  border-bottom: 1px solid var(--pt-line);
  padding: 0.8rem 0;
}

.pt-guide summary {
  cursor: pointer;
  min-height: 44px;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 600;
}

body.pt-tool .pt-page-footer {
  border-top: 1px solid var(--pt-line);
  margin-top: 35px;
  padding-top: 20px;
  font-size: 14px;
  color: var(--pt-muted);
}

body.pt-tool .pt-page-footer p { margin: 0.4rem 0; }

body.pt-tool .pt-page-footer .wordmark,
body.pt-tool .pt-page-footer .footer-main .wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--pt-ink);
  font: 600 1rem/1.5 var(--pt-serif);
  text-decoration: none;
}

/* -------------------------------------------------------------------------- */
/* Wide layout                                                                */
/* -------------------------------------------------------------------------- */

@media (min-width: 851px) {
  .pt-workspace {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 16px 20px;
  }

  .pt-input-panel { grid-column: 1; grid-row: 1 / span 2; }
  .pt-compare-panel {
    grid-column: 2;
    grid-row: 1;
    position: sticky;
    top: 15px;
  }
  .pt-batch-panel { grid-column: 2; grid-row: 2; }

  .pt-model-choice { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

  #pt-batch-list {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }

  .pt-compare-stage { min-height: 280px; }
}

@media (min-width: 1100px) {
  #pt-drop { min-height: 200px; }
}

/* -------------------------------------------------------------------------- */
/* Motion, contrast, print                                                    */
/* -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  #pt-drop,
  body.pt-tool button,
  body.pt-tool .pt-button,
  .pt-batch-item,
  .pt-model-choice label {
    transition: border-color 0.15s ease, background-color 0.15s ease;
  }

  #pt-compare-result,
  .pt-compare-divider {
    transition: clip-path 0.08s linear, left 0.08s linear;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.pt-tool *,
  body.pt-tool *::before,
  body.pt-tool *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@media (forced-colors: active) {
  #pt-drop,
  .pt-panel,
  .pt-batch-item,
  .pt-model-choice label,
  body.pt-tool button,
  body.pt-tool .pt-button {
    border: 2px solid CanvasText;
  }

  body.pt-tool .pt-primary,
  body.pt-tool button[aria-pressed="true"] {
    background: Highlight;
    color: HighlightText;
  }

  .pt-compare-stage,
  .pt-batch-thumb { background: Canvas; }
}

@media print {
  .pt-skip,
  .oddsprig-nav-header,
  .oddsprig-theme-actions,
  .oddsprig-theme-dock,
  #pt-drop,
  .pt-drop-actions,
  .pt-model,
  #pt-toolbar,
  .pt-batch-actions,
  .pt-guide,
  .pt-page-footer,
  #pt-compare-slider,
  .pt-compare-divider { display: none !important; }

  body.pt-tool,
  body.pt-tool .pt-panel {
    background: #fff !important;
    color: #111 !important;
  }

  .pt-workspace { display: block; }
  .pt-compare-panel { position: static; }
  #pt-compare-result {
    position: static;
    clip-path: none;
    height: auto;
  }
  #pt-compare-original { display: none; }
}

@media (max-width: 650px) {
  body.pt-tool.oddsprig-shared-shell main#main,
  body.pt-tool:not(.oddsprig-shared-shell) main#main {
    padding: 16px 0 36px;
  }

  .pt-panel { padding: 16px; }

  .pt-drop-actions button,
  .pt-drop-actions .pt-button,
  .pt-toolbar-export button,
  .pt-toolbar-export .pt-button {
    flex: 1 1 calc(50% - 8px);
    min-width: 0;
  }
}
