:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --text: #172033;
  --muted: #657087;
  --border: #dfe5ef;
  --border-strong: #c8d1df;
  --accent: #6657e8;
  --accent-dark: #5142cf;
  --accent-soft: #eeecff;
  --success: #18794e;
  --danger: #b42318;
  --danger-soft: #fff3f2;
  --shadow: 0 22px 70px rgba(31, 42, 68, .09);
  --radius: 22px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  min-width: 320px;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button { color: inherit; }
[hidden] { display: none !important; }

.global-drop-overlay {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  color: white;
  background: rgba(14, 20, 35, .82);
  backdrop-filter: blur(5px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .16s ease, visibility .16s ease;
}

body.global-drag-active .global-drop-overlay {
  opacity: 1;
  visibility: visible;
}

body.tray-confirm-open,
body.tray-metadata-open { overflow: hidden; }

.tray-confirm-modal {
  position: fixed;
  z-index: 1100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(14, 20, 35, .58);
  backdrop-filter: blur(5px);
}

.tray-confirm-dialog {
  width: min(420px, 100%);
  max-height: calc(100dvh - 40px);
  overflow: auto;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 20px;
  background: white;
  box-shadow: 0 24px 80px rgba(15, 23, 42, .28);
}

.tray-confirm-dialog:focus { outline: none; }

.tray-confirm-dialog h2 {
  margin: 0;
  font-size: 23px;
  line-height: 1.2;
  letter-spacing: -.025em;
}

.tray-confirm-dialog p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.tray-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 22px;
}

.tray-confirm-actions button {
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: white;
  cursor: pointer;
  font-weight: 780;
}

.tray-confirm-actions button:hover { background: var(--surface-soft); }

.tray-confirm-actions .tray-confirm-accept {
  color: white;
  border-color: var(--danger);
  background: var(--danger);
}

.tray-confirm-actions .tray-confirm-accept:hover { background: #941f17; }

@media (max-height: 420px) {
  .tray-confirm-modal { padding: 12px; }
  .tray-confirm-dialog {
    max-height: calc(100dvh - 24px);
    padding: 16px;
    border-radius: 16px;
  }
  .tray-confirm-dialog h2 { font-size: 20px; }
  .tray-confirm-dialog p { margin-top: 6px; font-size: 13px; }
  .tray-confirm-actions { margin-top: 12px; }
  .tray-confirm-actions button { min-height: 40px; }
}

.global-drop-card {
  display: grid;
  justify-items: center;
  width: min(560px, 100%);
  padding: 54px 28px;
  border: 2px dashed rgba(255, 255, 255, .72);
  border-radius: 28px;
  background: rgba(102, 87, 232, .24);
  text-align: center;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .3);
}

.global-drop-card > span {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin-bottom: 18px;
  border-radius: 22px;
  color: var(--accent);
  background: white;
  font-size: 40px;
  font-weight: 800;
}

.global-drop-card strong {
  font-size: clamp(26px, 5vw, 40px);
  letter-spacing: -.035em;
}

.global-drop-card small {
  margin-top: 8px;
  color: rgba(255, 255, 255, .78);
  font-size: 15px;
}

:focus-visible {
  outline: 3px solid rgba(102, 87, 232, .34);
  outline-offset: 3px;
}

::selection { color: #241b70; background: #dcd8ff; }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 9px 13px;
  border-radius: 10px;
  color: white;
  background: var(--text);
  transform: translateY(-160%);
}

.skip-link:focus { transform: none; }

.site-header,
.site-footer,
main {
  width: min(1080px, calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  min-height: 76px;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 790;
  letter-spacing: -.025em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px 11px 11px 4px;
  color: white;
  background: linear-gradient(145deg, #786af0, #5546d7);
  box-shadow: 0 7px 18px rgba(102, 87, 232, .25);
  font-size: 17px;
  font-weight: 850;
}

.site-header nav {
  display: flex;
  align-items: center;
  gap: 25px;
  margin-left: auto;
  color: #515d73;
  font-size: 14px;
}

.site-header nav a,
.site-footer nav a {
  text-decoration: none;
}

.site-header nav a:hover,
.site-footer nav a:hover { color: var(--accent); }

.language-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--accent);
  background: var(--surface);
  font-size: 12px;
  font-weight: 820;
  text-decoration: none;
}

.language-switch:hover { border-color: #afa6fb; background: var(--accent-soft); }

main { padding-bottom: 42px; }

.hero {
  max-width: 760px;
  margin: 64px auto 30px;
  text-align: center;
}

.home-hero { margin-top: 72px; }

.hero h1,
.hero h2,
.section-heading h2,
.seo-content h2,
.legal-content h2 {
  margin-top: 0;
  letter-spacing: -.045em;
}

.hero h1 {
  margin-bottom: 14px;
  font-size: clamp(40px, 8vw, 66px);
  line-height: .98;
}

.hero > p:last-child {
  max-width: 680px;
  margin: 0 auto;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 20px);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 820;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.compact-hero {
  max-width: 700px;
  margin-top: 48px;
  margin-bottom: 58px;
}

.compact-hero h1,
.tool-hero h1 {
  font-size: clamp(36px, 6vw, 56px);
}

.processor {
  width: min(1180px, 100%);
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

body.processor-active .home-hero {
  display: none;
}

body.processor-active main {
  width: min(1240px, calc(100% - 24px));
}

body.processor-active .processor {
  margin-top: 8px;
}

.drop-zone {
  position: relative;
  display: grid;
  justify-items: center;
  min-height: 335px;
  padding: 50px 26px 42px;
  border: 2px dashed #cfd5ea;
  border-radius: 23px;
  margin: 10px;
  text-align: center;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.drop-zone.drag-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: scale(.995);
}

.drop-zone input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-symbol {
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  margin-bottom: 18px;
  border-radius: 20px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 34px;
  font-weight: 520;
}

.drop-zone > strong {
  font-size: clamp(21px, 3vw, 26px);
  letter-spacing: -.03em;
}

.drop-zone > span:not(.upload-symbol) {
  margin: 5px 0 12px;
  color: #8a93a6;
  font-size: 13px;
}

.drop-zone > small {
  margin-top: 16px;
  color: var(--muted);
  font-size: 13px;
}

.paste-shortcut {
  display: inline-flex;
  min-height: 34px;
  margin-top: 14px;
  padding: 5px 7px 5px 11px;
  align-items: center;
  gap: 9px;
  color: #59657a;
  border: 1px solid #dde2ec;
  border-radius: 11px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 5px 16px rgba(42, 51, 72, .06);
  font-size: 11px;
  font-weight: 720;
  line-height: 1;
}

.shortcut-keys { display: inline-flex; align-items: center; gap: 3px; }
.shortcut-keys b { color: #929aad; font-size: 9px; font-weight: 760; }
.shortcut-keys kbd {
  display: grid;
  min-width: 23px;
  height: 22px;
  padding: 0 5px;
  place-items: center;
  color: #4f46a5;
  border: 1px solid #d8d4ee;
  border-bottom-width: 2px;
  border-radius: 6px;
  background: linear-gradient(#fff, #f5f3ff);
  box-shadow: 0 1px 0 #fff inset;
  font: 750 10px/1 ui-sans-serif, system-ui, sans-serif;
}

.paste-shortcut-compact {
  min-height: 32px;
  margin: 0;
  padding-block: 4px;
  box-shadow: none;
}

.primary-button,
.text-button,
.selected-heading button,
.error-panel button {
  border: 0;
  cursor: pointer;
}

.primary-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 13px;
  color: white;
  background: var(--accent);
  box-shadow: 0 10px 25px rgba(102, 87, 232, .22);
  font-size: 15px;
  font-weight: 760;
  text-decoration: none;
  transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
}

.primary-button:hover {
  background: var(--accent-dark);
  box-shadow: 0 12px 28px rgba(102, 87, 232, .28);
  transform: translateY(-1px);
}

.primary-button:active { transform: translateY(0); }
.primary-button:disabled { opacity: .58; cursor: wait; transform: none; }

.selected-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 360px);
  align-items: start;
  gap: 12px 16px;
  padding: 16px;
}

.selected-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 14px;
  grid-column: 1 / -1;
  margin-bottom: 0;
  color: var(--text);
}

.selected-heading > div:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
}

.selected-heading span {
  font-size: 17px;
  font-weight: 720;
  letter-spacing: -.02em;
}

.selected-heading small {
  padding: 3px 7px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 12px;
}

.selected-heading-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.selected-heading button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: #334059;
  background: white;
  font-size: 13px;
  font-weight: 760;
}

.selected-heading button:hover {
  border-color: var(--border-strong);
  background: var(--surface-soft);
}

.selected-heading button[data-change] {
  color: white;
  border-color: var(--accent);
  background: var(--accent);
}

.file-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, 200px);
  justify-content: start;
  grid-column: 1 / -1;
  gap: 12px;
  overflow: visible;
  margin: 0;
  padding: 1px 2px 7px;
  list-style: none;
}

.file-list li {
  position: relative;
  width: 200px;
  height: 304px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.file-list li::before {
  content: none;
}

.tray-card {
  display: grid;
  grid-template-rows: 184px minmax(0, 1fr);
  align-items: start;
  width: 100%;
  height: 100%;
  overflow: hidden;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: white;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 7px 18px rgba(31, 42, 68, .05);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.tray-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 10px 24px rgba(31, 42, 68, .08);
  transform: translateY(-1px);
}

.tray-item-active .tray-card {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(102, 87, 232, .16), 0 10px 24px rgba(31, 42, 68, .08);
}

.tray-file-preview,
.active-preview-media {
  --preview-aspect-ratio: 16 / 9;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(45deg, #eef2f8 25%, transparent 25% 75%, #eef2f8 75%) 0 0 / 18px 18px,
    linear-gradient(45deg, #eef2f8 25%, transparent 25% 75%, #eef2f8 75%) 9px 9px / 18px 18px,
    #f8fafc;
}

.tray-file-preview {
  width: 100%;
  height: 184px;
  padding: 4px;
  border-radius: 10px;
}

.tray-file-preview img,
.tray-file-preview object,
.active-preview-media object {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  border: 0;
  object-fit: contain;
}

.tray-file-preview img {
  border-radius: 7px;
}

.active-preview-media img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  border: 0;
  object-fit: contain;
}

.active-preview-media:not(.crop-preview-media) {
  padding: 4px;
}

.active-preview-media:not(.crop-preview-media) img {
  border-radius: 7px;
}

.tray-file-preview object,
.active-preview-media object {
  pointer-events: none;
  background: white;
}

.preview-fallback {
  display: grid;
  place-items: center;
  width: 54px;
  height: 42px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  color: #47536a;
  background: white;
  font-size: 12px;
  font-weight: 820;
}

.preview-loader {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(248, 250, 252, .88);
}

.preview-loader::after {
  content: "";
  width: 24px;
  height: 24px;
  border: 2px solid #d8ddea;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .72s linear infinite;
}

.tray-file-preview .preview-loader::after {
  width: 18px;
  height: 18px;
}

.tray-file-copy {
  display: grid;
  align-content: start;
  gap: 6px;
  min-width: 0;
  height: 100%;
  padding: 11px 4px 2px;
}

.tray-select-mark {
  position: absolute;
  z-index: 4;
  top: 16px;
  left: 16px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: white;
  background: white;
  font-size: 17px;
  font-weight: 800;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(31, 42, 68, .14);
}

.tray-item-active .tray-select-mark {
  border-color: var(--accent);
  background: var(--accent);
}

.tray-file-remove {
  position: absolute;
  z-index: 4;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(207, 213, 224, .9);
  border-radius: 8px;
  color: #667085;
  background: rgba(255, 255, 255, .92);
  font-size: 20px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(31, 42, 68, .14);
}

.tray-file-remove:hover,
.tray-file-remove:focus-visible {
  color: #8b1f32;
  background: #fff5f6;
}

.tray-file-metadata {
  position: absolute;
  z-index: 4;
  top: 50px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(207, 213, 224, .9);
  border-radius: 8px;
  color: #59657a;
  background: rgba(255, 255, 255, .92);
  font-family: Georgia, serif;
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(31, 42, 68, .14);
}

.tray-file-metadata:hover,
.tray-file-metadata:focus-visible {
  color: var(--accent);
  border-color: rgba(102, 87, 232, .45);
  background: #f7f5ff;
}

.tray-metadata-modal {
  position: fixed;
  z-index: 1150;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(14, 20, 35, .62);
  backdrop-filter: blur(5px);
}

.tray-metadata-dialog {
  width: min(720px, 100%);
  max-height: calc(100dvh - 40px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 20px;
  background: white;
  box-shadow: 0 24px 80px rgba(15, 23, 42, .3);
}

.tray-metadata-dialog:focus { outline: none; }

.tray-metadata-dialog > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--border);
}

.tray-metadata-dialog h2 { margin: 0; font-size: 22px; line-height: 1.2; }
.tray-metadata-dialog header small {
  display: block;
  max-width: 560px;
  margin-top: 5px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tray-metadata-close {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 9px;
  color: #667085;
  background: white;
  font-size: 23px;
  cursor: pointer;
}

.tray-metadata-body {
  display: grid;
  gap: 14px;
  max-height: calc(100dvh - 150px);
  overflow: auto;
  padding: 18px 22px 24px;
}

.tray-metadata-group { overflow: hidden; border: 1px solid var(--border); border-radius: 13px; }
.tray-metadata-group h3 {
  margin: 0;
  padding: 10px 13px;
  color: #29344a;
  background: var(--surface-soft);
  font-size: 14px;
}
.tray-metadata-group dl { margin: 0; }
.tray-metadata-group dl > div {
  display: grid;
  grid-template-columns: minmax(150px, .7fr) minmax(0, 1.3fr);
  gap: 14px;
  padding: 10px 13px;
  border-top: 1px solid #edf0f5;
}
.tray-metadata-group dt { color: #445067; font-size: 12px; font-weight: 760; }
.tray-metadata-group dt small { display: block; margin-top: 2px; color: #8992a3; font-weight: 500; }
.tray-metadata-group dd { min-width: 0; margin: 0; overflow-wrap: anywhere; color: #202a3d; font-size: 12px; }
.tray-metadata-message { margin: 8px 0; color: var(--muted); text-align: center; }
.tray-metadata-error { color: var(--danger); }

.tray-c2pa-manifest { padding: 13px; border-top: 1px solid var(--border); background: #fbfcff; }
.tray-c2pa-summary { display: grid; gap: 12px; }
.tray-c2pa-status {
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  color: #4c586d;
  background: #eef1f6;
  font-size: 12px;
  font-weight: 780;
}
.tray-c2pa-status.is-valid { color: #08704d; background: #e8f8f1; }
.tray-c2pa-status.is-invalid { color: #a13b3b; background: #fff0f0; }
.tray-c2pa-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}
.tray-metadata-group .tray-c2pa-facts > div {
  display: block;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #e3e7ee;
  border-radius: 9px;
  background: white;
}
.tray-c2pa-facts dt { color: #697489; font-size: 11px; font-weight: 700; line-height: 1.35; }
.tray-c2pa-facts dd {
  min-width: 0;
  margin: 5px 0 0;
  color: #202a3d;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: break-word;
  word-break: normal;
}
.tray-c2pa-list h4 { margin: 0 0 6px; color: #29344a; font-size: 12px; }
.tray-c2pa-list ul { display: grid; gap: 5px; margin: 0; padding-left: 20px; color: #354158; font-size: 12px; }
.tray-c2pa-trust-note { margin: 0; padding: 9px 10px; border-radius: 8px; color: #626e82; background: #f0f3f8; font-size: 11px; }
.tray-c2pa-technical { margin-top: 13px; border-top: 1px solid #e2e6ed; padding-top: 10px; }
.tray-c2pa-technical > summary { color: #445067; cursor: pointer; font-size: 12px; font-weight: 750; }
.tray-manifest-node { margin: 5px 0 5px 10px; font-size: 12px; }
.tray-manifest-node > summary {
  padding: 5px 7px;
  border-radius: 6px;
  color: #3f4c64;
  background: #f0f3f8;
  cursor: pointer;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  overflow-wrap: anywhere;
}
.tray-manifest-node > div { padding-left: 7px; border-left: 1px solid #dce2ec; }
.tray-manifest-value {
  display: grid;
  grid-template-columns: minmax(130px, .65fr) minmax(0, 1.35fr);
  gap: 10px;
  margin: 4px 0 4px 10px;
  padding: 5px 7px;
  border-radius: 6px;
  background: white;
  font-size: 11px;
}
.tray-manifest-value strong {
  color: #59657a;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  overflow-wrap: anywhere;
}
.tray-manifest-value span { min-width: 0; color: #202a3d; overflow-wrap: anywhere; white-space: pre-wrap; }

@media (max-width: 560px) {
  .tray-metadata-modal { padding: 10px; }
  .tray-metadata-dialog { max-height: calc(100dvh - 20px); border-radius: 15px; }
  .tray-metadata-dialog > header { padding: 15px 15px 12px; }
  .tray-metadata-body { max-height: calc(100dvh - 115px); padding: 12px 15px 17px; }
  .tray-metadata-group dl > div { grid-template-columns: 1fr; gap: 4px; }
  .tray-c2pa-facts { grid-template-columns: 1fr; }
  .tray-manifest-value { grid-template-columns: 1fr; gap: 3px; }
}

.tray-summary {
  grid-column: 1 / -1;
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.tray-file-name {
  min-width: 0;
  min-height: 34px;
  display: -webkit-box;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 13px;
  line-height: 1.3;
  font-weight: 680;
}

.tray-file-size {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tray-file-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 23px;
  margin-top: auto;
}

.tray-file-badges {
  display: flex;
  justify-content: center;
  width: 100%;
  min-width: 0;
}

.tray-file-badges-planned {
  display: flex;
  gap: 4px;
}

.tray-file-badges-planned[data-count="3"] {
  gap: 3px;
}

.tray-file-badges-planned[data-count="3"] .tray-file-plan {
  padding-inline: 5px;
  font-size: 9px;
}

.tray-file-status,
.tray-file-plan,
.tray-file-result,
.tray-file-no-edits {
  min-width: 0;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 10px;
  line-height: 1.2;
  font-style: normal;
  font-weight: 780;
  white-space: nowrap;
  text-align: center;
}

.tray-file-no-edits {
  color: #7a8498;
  background: #f1f3f7;
}

.tray-file-result {
  color: #147454;
  background: #e8f8f1;
}

.tray-file-status {
  color: #755d0b;
  background: #fff4c7;
}

.tray-file-plan {
  flex: 0 1 auto;
  overflow: hidden;
  color: #22577a;
  background: #e5f4ff;
  text-overflow: ellipsis;
}

.tray-item-compatible .tray-file-status {
  color: #1f6a47;
  background: #def7e9;
}

.tray-item-invalid .tray-file-status,
.tray-item-too_large .tray-file-status {
  color: #8b1f32;
  background: #ffe1e6;
}

.tray-item-invalid .tray-card,
.tray-item-too_large .tray-card,
.tray-item-unsupported .tray-card {
  background: #fff9fa;
}

.active-file-preview {
  display: grid;
  grid-column: 1;
  grid-row: span 3;
  align-self: start;
  align-content: start;
  gap: 8px;
  width: min(100%, 620px);
  min-width: 0;
  margin-top: 0;
  padding: 0;
}

.active-preview-media {
  aspect-ratio: var(--preview-aspect-ratio);
  height: auto;
  min-height: 180px;
  max-height: min(70vh, 720px);
  border: 1px solid var(--border);
  border-radius: 8px;
  background-color: #f3f5f9;
}

.active-preview-media.is-updating::after {
  content: "";
  position: absolute;
  z-index: 3;
  top: 10px;
  right: 10px;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, .72);
  border-top-color: var(--accent);
  border-radius: 50%;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 2px 10px rgba(31, 42, 68, .16);
  animation: spin .72s linear infinite;
}

.active-preview-media.crop-preview-media {
  height: auto;
  min-height: 240px;
  max-height: min(74vh, 760px);
  border-radius: 8px 8px 0 0;
  background: #111827;
  touch-action: none;
}

.crop-preview-media .preview-loader {
  background: #111827;
}

.crop-preview-media .preview-loader::after {
  border-color: rgba(255, 255, 255, .34);
  border-top-color: white;
}

.crop-preview-media img {
  user-select: none;
  -webkit-user-drag: none;
}

.active-preview-details {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 0 2px;
}

.active-preview-details .eyebrow {
  display: none;
}

.active-preview-details h2 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 15px;
  line-height: 1.2;
  letter-spacing: -.015em;
}

.active-preview-details > p:not(.eyebrow) {
  flex: 0 0 auto;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.active-preview-plans {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 0;
}

.active-preview-plans span,
.active-preview-plans button {
  padding: 5px 9px;
  border: 0;
  border-radius: 999px;
  color: #22577a;
  background: #e5f4ff;
  font-size: 11px;
  font-weight: 780;
}

.active-preview-plans button {
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.crop-preview-media.is-updating::after { right: auto; left: 12px; }

.inline-download {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 9px;
  color: white;
  background: var(--accent);
  font-size: 12px;
  font-weight: 760;
  text-decoration: none;
}

.home-actions {
  grid-column: 2;
  margin-top: 0;
}

.home-actions > strong {
  display: block;
  margin-bottom: 9px;
  font-size: 14px;
}

.home-options {
  scroll-margin-top: 6rem;
  grid-column: 2;
  margin-top: 0;
  padding: 0;
}

.selected-panel,
.home-actions {
  scroll-margin-top: 6rem;
}

.home-options > strong { display: block; font-size: 14px; }
.home-options .quality-option { margin-top: 12px; background: white; }

.option-size-comparison {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: white;
}

.option-size-comparison span { display: grid; gap: 2px; }
.option-size-comparison span:last-child { text-align: right; }
.option-size-comparison small { color: var(--muted); font-size: 11px; }
.option-size-comparison strong { font-size: 15px; }
.option-size-comparison b { color: #9ca5b7; }

.option-size-caption {
  margin: 7px 2px 0;
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}

[data-home-action-list] {
  display: grid;
  gap: 11px;
}

.file-inspection {
  grid-column: 2;
  display: grid;
  gap: 2px;
  align-self: start;
  margin-top: 0;
  padding: 12px 13px;
  border: 1px solid #c9e6d6;
  border-radius: 13px;
  color: var(--success);
  background: #f3fbf6;
}

.file-inspection > span { color: #35664f; font-size: 13px; }

.metadata-found {
  display: grid;
  gap: 2px;
  margin-top: 8px;
  padding-top: 9px;
  border-top: 1px solid #d8eee1;
}

.metadata-found small { font-weight: 760; }
.metadata-found span { color: #35664f; font-size: 13px; }

.home-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 44px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  background: white;
  cursor: pointer;
  font-size: 13px;
  font-weight: 720;
  line-height: 1.25;
  text-align: left;
}

.home-action::after { content: "→"; color: var(--accent); }
.home-action:hover { border-color: #afa6fb; background: #fbfaff; }

.workflow-action-group {
  display: grid;
  gap: 7px;
}

.workflow-action-group > strong {
  color: #4d586d;
  font-size: 12px;
  font-weight: 780;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.home-action-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.workflow-action {
  position: relative;
  justify-content: flex-start;
  gap: 9px;
  min-height: 54px;
  padding: 9px;
}

.workflow-action::after { content: none; }

.workflow-action > input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
}

.workflow-action-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
  transition: color .15s ease, background .15s ease;
}

.workflow-action-caption {
  min-width: 0;
  overflow-wrap: anywhere;
}

.workflow-action-export .workflow-action-icon {
  color: #0f6b58;
  background: #e4f7f0;
}

.workflow-action > input:checked + .workflow-action-icon {
  color: white;
  background: var(--accent);
}

.workflow-action:has(input:checked) {
  border-color: #9b90f6;
  background: var(--accent-soft);
  box-shadow: 0 0 0 2px rgba(102, 87, 232, .12);
}

.workflow-action-export:has(input:checked) {
  border-color: #23a679;
  background: #eefbf5;
  box-shadow: 0 0 0 2px rgba(35, 166, 121, .12);
}

.workflow-action-export > input:checked + .workflow-action-icon {
  background: #16815f;
}

.workflow-action:has(input:focus-visible) {
  outline: 3px solid rgba(102, 87, 232, .34);
  outline-offset: 3px;
}

.workflow-limit-message {
  grid-column: 1 / -1;
  margin: 2px 0 0;
  color: var(--danger);
  font-size: 12px;
}

.workflow-heading {
  display: grid;
  gap: 3px;
}

.workflow-heading > strong { font-size: 15px; }
.workflow-heading > span { color: var(--muted); font-size: 12px; }

.workflow-option-group {
  margin-top: 14px;
}

.workflow-option-group > strong {
  grid-column: 1 / -1;
  font-size: 13px;
}

.crop-options {
  display: grid;
  gap: 12px;
}

.crop-options-heading {
  display: grid;
  gap: 8px;
}

.crop-options-heading > strong {
  font-size: 13px;
}

.crop-ratio-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.crop-ratio-presets-below-image {
  overflow-x: auto;
  flex-wrap: nowrap;
  justify-content: safe center;
  margin-top: -8px;
  padding: 11px 14px 13px;
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  background:
    radial-gradient(circle at 50% -80%, rgba(112, 96, 255, .32), transparent 58%),
    linear-gradient(180deg, #151d2c 0%, #0d1421 100%);
  box-shadow: inset 0 1px rgba(255, 255, 255, .06), 0 12px 24px rgba(15, 23, 42, .12);
  scrollbar-width: thin;
  scrollbar-color: #566078 transparent;
}

.crop-ratio-presets.crop-ratio-presets-below-image button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 7px 10px;
  color: #dce2ee;
  border-color: rgba(148, 163, 184, .34);
  border-radius: 10px;
  background: rgba(255, 255, 255, .055);
  box-shadow: inset 0 1px rgba(255, 255, 255, .06);
  transition: color .15s ease, border-color .15s ease, background .15s ease, transform .15s ease;
}

.crop-ratio-presets.crop-ratio-presets-below-image button:hover {
  color: white;
  border-color: rgba(151, 139, 255, .82);
  background: rgba(112, 96, 255, .18);
  transform: translateY(-1px);
}

.crop-ratio-presets-below-image button::before {
  content: "";
  width: 12px;
  height: 9px;
  box-sizing: border-box;
  border: 1.5px solid currentColor;
  border-radius: 2px;
  opacity: .86;
}

.crop-ratio-presets-below-image button[data-crop-ratio=""]::before {
  border-style: dashed;
}

.crop-ratio-presets-below-image button[data-crop-ratio="1"]::before { width: 10px; height: 10px; }
.crop-ratio-presets-below-image button[data-crop-ratio=".75"]::before,
.crop-ratio-presets-below-image button[data-crop-ratio=".6666666667"]::before,
.crop-ratio-presets-below-image button[data-crop-ratio=".5625"]::before,
.crop-ratio-presets-below-image button[data-crop-ratio=".8"]::before { width: 8px; height: 11px; }
.crop-ratio-presets-below-image button[data-crop-ratio="1.5"]::before { width: 13px; height: 9px; }
.crop-ratio-presets-below-image button[data-crop-ratio="1.7777777778"]::before { width: 14px; height: 8px; }

.crop-ratio-presets.crop-ratio-presets-below-image button[aria-pressed="true"] {
  border-color: #8173ff;
  background: linear-gradient(135deg, #7868f7 0%, #5b49e8 100%);
  box-shadow: 0 7px 18px rgba(91, 73, 232, .34), inset 0 1px rgba(255, 255, 255, .2);
}

.crop-ratio-presets button {
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: #4d586d;
  background: white;
  cursor: pointer;
  font-size: 11px;
  font-weight: 760;
  line-height: 1;
}

.crop-ratio-presets button:hover {
  border-color: #afa6fb;
  background: #fbfaff;
}

.crop-ratio-presets button[aria-pressed="true"] {
  color: white;
  border-color: var(--accent);
  background: var(--accent);
}

.crop-ratio-presets button:focus-visible {
  outline: 3px solid rgba(102, 87, 232, .3);
  outline-offset: 2px;
}

.crop-box {
  position: absolute;
  min-width: 22px;
  min-height: 22px;
  border: 2px solid white;
  border-radius: 8px;
  background:
    linear-gradient(rgba(255, 255, 255, .38), rgba(255, 255, 255, .38)) 33.333% 0 / 1px 100% no-repeat,
    linear-gradient(rgba(255, 255, 255, .38), rgba(255, 255, 255, .38)) 66.666% 0 / 1px 100% no-repeat,
    linear-gradient(90deg, rgba(255, 255, 255, .38), rgba(255, 255, 255, .38)) 0 33.333% / 100% 1px no-repeat,
    linear-gradient(90deg, rgba(255, 255, 255, .38), rgba(255, 255, 255, .38)) 0 66.666% / 100% 1px no-repeat;
  box-shadow: 0 0 0 999px rgba(10, 15, 27, .55), 0 10px 28px rgba(0, 0, 0, .35);
  cursor: move;
  touch-action: none;
}

.crop-box [data-crop-handle] {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid white;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
}

.crop-box [data-crop-handle="nw"] { top: -10px; left: -10px; cursor: nwse-resize; }
.crop-box [data-crop-handle="n"] { top: -10px; left: calc(50% - 9px); cursor: ns-resize; }
.crop-box [data-crop-handle="ne"] { top: -10px; right: -10px; cursor: nesw-resize; }
.crop-box [data-crop-handle="e"] { top: calc(50% - 9px); right: -10px; cursor: ew-resize; }
.crop-box [data-crop-handle="se"] { right: -10px; bottom: -10px; cursor: nwse-resize; }
.crop-box [data-crop-handle="s"] { bottom: -10px; left: calc(50% - 9px); cursor: ns-resize; }
.crop-box [data-crop-handle="sw"] { bottom: -10px; left: -10px; cursor: nesw-resize; }
.crop-box [data-crop-handle="w"] { top: calc(50% - 9px); left: -10px; cursor: ew-resize; }

.crop-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.crop-fields label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 720;
}

.crop-fields input[type="number"] {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: white;
}

.tool-options {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface-soft);
}

.compression-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.compression-options legend {
  grid-column: 1 / -1;
  margin-bottom: 8px;
  padding: 0;
  font-size: 14px;
  font-weight: 760;
}

.compression-options label { position: relative; }
.compression-options input { position: absolute; opacity: 0; }

.compression-options label span {
  display: grid;
  gap: 2px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: white;
  cursor: pointer;
}

.compression-options label small { color: var(--muted); }

.compression-options input:checked + span {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.resize-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.resize-options > label:not(.check-option) {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 720;
}

.resize-options input[type="number"] {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: white;
}

.check-option {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.check-option input { width: 17px; height: 17px; accent-color: var(--accent); }

.quality-option {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-soft);
  font-size: 14px;
  font-weight: 720;
}

.quality-option input { accent-color: var(--accent); }
.quality-option output { min-width: 28px; color: var(--accent); text-align: right; }

.option-hint {
  margin: 9px 1px 0;
  color: var(--muted);
  font-size: 12px;
}

.metadata-note {
  display: grid;
  gap: 4px;
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid #c9e6d6;
  border-radius: 13px;
  color: var(--success);
  background: #f3fbf6;
  font-size: 13px;
}

.process-button { width: 100%; margin-top: 20px; }

.progress-panel,
.result-panel,
.error-panel {
  min-height: 330px;
  padding: 52px 28px;
  text-align: center;
}

.progress-panel,
.result-panel {
  display: grid;
  place-items: center;
  align-content: center;
}

.progress-panel strong,
.result-panel h2,
.error-panel strong {
  margin-top: 16px;
  font-size: 25px;
  letter-spacing: -.03em;
}

.progress-panel > span:last-child,
.error-panel > span { color: var(--muted); }

.spinner {
  width: 46px;
  height: 46px;
  border: 4px solid #ddd9ff;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .75s linear infinite;
}

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

.done-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  color: white;
  background: var(--success);
  font-size: 28px;
  font-weight: 800;
}

.result-panel .eyebrow { margin: 15px 0 5px; color: var(--success); }
.result-panel h2 { margin: 0; }

.result-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 23px;
  margin: 24px 0;
}

.result-stats span { display: grid; gap: 2px; }
.result-stats small { color: var(--muted); font-size: 12px; }
.result-stats strong { font-size: 19px; }
.result-stats b { color: #9ca5b7; }

.metadata-result {
  margin: -8px 0 20px;
  color: var(--success);
  font-size: 13px;
}

.result-details {
  margin: -10px 0 18px;
  color: var(--muted);
  font-size: 14px;
}

.size-notice {
  max-width: 560px;
  margin: -6px 0 18px;
  padding: 10px 13px;
  border-radius: 10px;
  color: #8a4b08;
  background: #fff7e8;
  font-size: 13px;
}

.download-button { min-width: min(280px, 100%); }

.text-button {
  margin-top: 13px;
  padding: 8px 12px;
  color: var(--accent);
  background: none;
  font-size: 14px;
  font-weight: 720;
}

.error-panel {
  display: grid;
  place-items: center;
  align-content: center;
  background: var(--danger-soft);
}

.error-panel strong { color: var(--danger); }

.error-panel button {
  margin-top: 20px;
  padding: 11px 17px;
  border-radius: 11px;
  color: white;
  background: var(--danger);
  font-weight: 720;
}

.trust-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 26px;
  margin: 20px auto 0;
  color: var(--muted);
  font-size: 13px;
}

.trust-line span::first-letter { color: var(--success); }

.tool-section { margin-top: 92px; }

.section-heading {
  display: flex;
  align-items: end;
  gap: 25px;
  margin-bottom: 23px;
}

.section-heading h2 {
  margin-bottom: 6px;
  font-size: clamp(27px, 4vw, 36px);
  line-height: 1.1;
}

.section-heading p:last-child {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
}

.section-heading > a {
  flex: 0 0 auto;
  margin: 0 0 4px auto;
  color: var(--accent);
  font-size: 14px;
  font-weight: 720;
  text-decoration: none;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.tool-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  min-height: 112px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: var(--surface);
  text-decoration: none;
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.tool-card:hover {
  border-color: #bbb4f3;
  box-shadow: 0 13px 34px rgba(38, 47, 73, .08);
  transform: translateY(-2px);
}

.tool-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 14px;
  font-weight: 850;
}

.tool-card > span:nth-child(2) { display: grid; gap: 4px; min-width: 0; }
.tool-card strong { font-size: 15px; letter-spacing: -.015em; }
.tool-card small {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-arrow { color: #a1a9b8; }

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px 24px;
  min-height: 150px;
  margin-top: 40px;
  padding: 36px 0;
  border-top: 1px solid var(--border);
}

.site-footer nav { display: flex; gap: 23px; color: var(--muted); font-size: 14px; }
.site-footer > p { grid-column: 1 / -1; margin: 0; color: #8a93a5; font-size: 12px; }
.footer-brand .brand-mark { width: 31px; height: 31px; border-radius: 10px 10px 10px 4px; font-size: 14px; }

.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
  color: var(--muted);
  font-size: 13px;
}

.breadcrumbs a { text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); }
.tool-hero { margin-top: 42px; }

.seo-content,
.legal-content {
  width: min(820px, 100%);
  margin: 92px auto 0;
}

.seo-content > section,
.legal-content > section {
  padding: 39px 0;
  border-bottom: 1px solid var(--border);
}

.seo-content h2,
.legal-content h2 {
  margin-bottom: 18px;
  font-size: clamp(25px, 4vw, 32px);
}

.seo-content p,
.legal-content p { color: #566176; }

.use-cases {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.use-cases li {
  position: relative;
  padding: 14px 16px 14px 43px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: white;
}

.use-cases li::before {
  content: "✓";
  position: absolute;
  left: 16px;
  top: 14px;
  color: var(--success);
  font-weight: 800;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li {
  min-height: 160px;
  padding: 17px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: white;
}

.steps li > span {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  margin-bottom: 20px;
  border-radius: 9px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 13px;
  font-weight: 820;
}

.steps p { margin: 5px 0 0; font-size: 13px; }

.faq-list { display: grid; gap: 10px; }

.faq-list details {
  border: 1px solid var(--border);
  border-radius: 13px;
  background: white;
}

.faq-list summary {
  position: relative;
  padding: 16px 48px 16px 17px;
  cursor: pointer;
  font-weight: 720;
  list-style: none;
}

.faq-list summary::-webkit-details-marker { display: none; }

.faq-list summary::after {
  content: "+";
  position: absolute;
  right: 17px;
  top: 12px;
  color: var(--accent);
  font-size: 24px;
  font-weight: 420;
}

.faq-list details[open] summary::after { content: "−"; }
.faq-list details p { margin: 0; padding: 0 17px 18px; }
.related-tools { margin-top: 65px; }
.legal-page { min-height: 640px; }
.legal-content { margin-top: 30px; }
.legal-content > section:last-child { border-bottom: 0; }

/* Keep the whole editor usable without a second screenful on older desktop
   displays. The regular spacious cards remain available on tall screens and
   the mobile layout below stays touch-friendly. */
@media (min-width: 851px) and (max-height: 1000px) {
  .site-header {
    min-height: 64px;
  }

  body.processor-active main {
    width: min(1240px, calc(100% - 16px));
    padding-bottom: 24px;
  }

  body.processor-active .processor {
    margin-top: 4px;
  }

  .selected-panel {
    gap: 10px 14px;
    padding: 12px;
  }

  .selected-heading span {
    font-size: 16px;
  }

  .selected-heading button {
    min-height: 34px;
  }

  .file-list {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding-bottom: 5px;
    scrollbar-width: thin;
  }

  .file-list li {
    flex: 0 0 184px;
    width: 184px;
    height: 104px;
  }

  .tray-card {
    grid-template-columns: 82px minmax(0, 1fr);
    grid-template-rows: 1fr;
    gap: 8px;
    padding: 7px;
  }

  .tray-file-preview {
    width: 82px;
    height: 88px;
    padding: 3px;
    border-radius: 8px;
  }

  .tray-file-copy {
    gap: 3px;
    padding: 3px 1px 1px 0;
  }

  .tray-file-name {
    min-height: 31px;
    font-size: 12px;
    line-height: 1.28;
  }

  .tray-file-size {
    font-size: 10px;
  }

  .tray-file-footer {
    justify-content: flex-start;
    min-height: 18px;
  }

  .tray-file-badges {
    justify-content: flex-start;
  }

  .tray-file-status,
  .tray-file-plan,
  .tray-file-no-edits {
    padding: 3px 5px;
    font-size: 9px;
  }

  .tray-file-badges-planned .tray-file-plan,
  .tray-file-badges-planned[data-count="3"] .tray-file-plan {
    flex: 0 0 20px;
    display: grid;
    place-items: center;
    width: 20px;
    height: 18px;
    overflow: visible;
    padding: 0;
    font-size: 0;
  }

  .tray-file-badges-planned .tray-file-plan::before {
    content: attr(data-compact-label);
    font-size: 9px;
    line-height: 1;
  }

  .tray-select-mark {
    top: 12px;
    left: 12px;
    width: 23px;
    height: 23px;
    border-radius: 6px;
    font-size: 14px;
  }

  .tray-file-remove {
    top: auto;
    right: 10px;
    bottom: 10px;
    width: 22px;
    height: 22px;
    border: 0;
    box-shadow: none;
    font-size: 17px;
  }

  .active-file-preview {
    width: 100%;
  }

  .active-preview-media,
  .active-preview-media.crop-preview-media {
    aspect-ratio: auto;
    height: clamp(260px, calc(100dvh - 350px), 560px);
    min-height: 0;
    max-height: none;
  }

  .active-preview-details {
    gap: 7px 10px;
  }

  .active-preview-details h2 {
    font-size: 14px;
  }

  .file-inspection {
    padding: 9px 11px;
  }

  .home-actions > strong {
    margin-bottom: 6px;
    font-size: 13px;
  }

  [data-home-action-list] {
    gap: 8px;
  }

  .workflow-action-group {
    gap: 5px;
  }

  .workflow-action {
    min-height: 46px;
    padding: 6px 8px;
  }

  .workflow-action-icon {
    width: 28px;
    height: 28px;
  }

  .trust-line {
    margin-top: 12px;
  }
}

@media (max-width: 850px) {
  body.processor-active main { width: min(100% - 16px, 760px); }
  .selected-panel { grid-template-columns: 1fr; }
  .active-file-preview,
  .file-inspection,
  .home-actions,
  .home-options {
    grid-column: 1;
  }
  .active-file-preview { grid-row: auto; width: 100%; }
  .active-preview-media { min-height: 170px; max-height: min(68vh, 620px); }
  .active-preview-media.crop-preview-media { min-height: 220px; max-height: min(72vh, 680px); }
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: 1fr; }
  .steps li { min-height: 0; }
}

@media (max-width: 620px) {
  .site-header { min-height: 64px; }
  .site-header nav { gap: 14px; }
  .site-header nav a:nth-child(2),
  .site-header nav a:nth-child(3) { display: none; }
  .hero { margin-top: 42px; }
  .home-hero { margin-top: 55px; }
  .hero h1 { font-size: clamp(39px, 13vw, 54px); }
  .processor { border-radius: 22px; }
  .drop-zone { min-height: 300px; padding-inline: 18px; }
  .selected-panel { padding: 12px; }
  .selected-heading { align-items: start; }
  .selected-heading-actions { justify-content: flex-start; }
  .file-list {
    grid-template-columns: repeat(auto-fill, 200px);
    justify-content: center;
  }
  .active-file-preview { padding: 0; }
  .active-preview-media { min-height: 150px; max-height: min(66vh, 560px); }
  .active-preview-media.crop-preview-media { min-height: 210px; max-height: min(70vh, 620px); }
  .active-preview-details > p:not(.eyebrow) { white-space: normal; }
	  .home-action-buttons { grid-template-columns: 1fr; }
  .compression-options { grid-template-columns: 1fr; }
  .crop-fields { grid-template-columns: 1fr 1fr; }
  .resize-options { grid-template-columns: 1fr; }
  .check-option { grid-column: auto; }
  .quality-option { grid-template-columns: 1fr auto; }
  .quality-option input { grid-column: 1 / -1; grid-row: 2; }
  .trust-line { display: grid; justify-content: center; }
  .tool-section { margin-top: 68px; }
  .section-heading { align-items: start; }
  .section-heading > a { display: none; }
  .tool-grid { grid-template-columns: 1fr; }
  .tool-card { min-height: 96px; }
  .result-stats { gap: 15px; }
  .site-footer { grid-template-columns: 1fr; }
  .site-footer nav { flex-wrap: wrap; }
  .site-footer > p { grid-column: auto; }
  .seo-content { margin-top: 70px; }
  .seo-content > section { padding: 31px 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
  .spinner,
  .preview-loader::after,
  .active-preview-media.is-updating::after,
  .crop-preview-media .preview-loader::after { animation-duration: 1.6s; }
}

/* Image workspace ---------------------------------------------------------
   PDF utilities intentionally keep the legacy processor layout. */

.processor[data-image-editor] {
  --editor-sidebar-width: 390px;
  overflow: visible;
  border-color: #d7deea;
  border-radius: 24px;
  background: #edf1f7;
  box-shadow: 0 28px 90px rgba(25, 35, 58, .12);
}

.processor[data-image-editor] .drop-zone {
  min-height: 390px;
  border-color: #cbd4e2;
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 0%, rgba(102, 87, 232, .12), transparent 48%),
    linear-gradient(180deg, #ffffff 0%, #f9faff 100%);
}

.processor[data-image-editor] .drop-zone > strong {
  margin-top: 2px;
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.1;
  letter-spacing: -.035em;
}

.processor[data-image-editor] .drop-zone > span:not(.upload-symbol) {
  color: var(--muted);
  font-size: 13px;
}

.processor[data-image-editor] .upload-symbol {
  width: 72px;
  height: 72px;
  border: 1px solid #d9d5ff;
  border-radius: 22px;
  background: linear-gradient(145deg, #f3f1ff, #e8e5ff);
  box-shadow: 0 13px 30px rgba(102, 87, 232, .13);
  font-size: 28px;
}

.drop-format-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
}

.drop-format-list span {
  padding: 5px 9px;
  border: 1px solid #dfe3ee;
  border-radius: 999px;
  color: #687287;
  background: rgba(255, 255, 255, .78);
  font-size: 10px;
  font-weight: 820;
  letter-spacing: .035em;
}

.processor[data-image-editor] .selected-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(350px, var(--editor-sidebar-width));
  grid-template-areas:
    "heading heading"
    "summary summary"
    "tray tray"
    "stage sidebar";
  align-items: start;
  gap: 12px 16px;
  padding: 14px;
}

.processor[data-image-editor] .selected-heading {
  grid-area: heading;
  min-height: 48px;
  padding: 6px 7px 6px 12px;
  border: 1px solid #dde3ed;
  border-radius: 15px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 8px 22px rgba(31, 42, 68, .045);
}

.processor[data-image-editor] .selected-heading span {
  font-size: 16px;
  font-weight: 800;
}

.processor[data-image-editor] .selected-heading small {
  color: #536078;
  background: #eef1f6;
  font-weight: 720;
}

.processor[data-image-editor] .selected-heading button {
  min-height: 36px;
  border-radius: 9px;
  box-shadow: none;
}

.processor[data-image-editor] .selected-heading button[data-change]::before {
  content: "+";
  margin-right: 6px;
  font-size: 17px;
  font-weight: 500;
}

.processor[data-image-editor] .tray-summary {
  grid-area: summary;
  margin: -2px 4px 0;
}

.processor[data-image-editor] .file-list {
  grid-area: tray;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  margin: 0;
  padding: 2px 2px 8px;
  overscroll-behavior-inline: contain;
  scroll-snap-type: inline proximity;
  scrollbar-width: thin;
  scrollbar-color: #b7bfcd transparent;
}

.processor[data-image-editor] .file-list li {
  flex: 0 0 194px;
  width: 194px;
  height: 100px;
  scroll-snap-align: start;
}

.processor[data-image-editor] .tray-card {
  grid-template-columns: 78px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) 16px;
  grid-template-areas:
    "preview badges"
    "name name";
  gap: 9px;
  row-gap: 4px;
  padding: 7px;
  border-radius: 13px;
  box-shadow: 0 5px 16px rgba(31, 42, 68, .055);
}

.processor[data-image-editor] .tray-card:hover {
  transform: none;
  box-shadow: 0 8px 20px rgba(31, 42, 68, .085);
}

.processor[data-image-editor] .tray-item-active .tray-card {
  border-color: #7568ec;
  box-shadow: 0 0 0 2px rgba(102, 87, 232, .14), 0 8px 20px rgba(31, 42, 68, .075);
}

.processor[data-image-editor] .tray-file-preview {
  grid-area: preview;
  width: 78px;
  height: 100%;
  min-height: 0;
  padding: 3px;
  border-radius: 9px;
}

.processor[data-image-editor] .tray-file-preview .preview-fallback {
  width: 100%;
  height: 100%;
  overflow: hidden;
  padding: 4px;
  border: 0;
  background: transparent;
  font-size: 9px;
  line-height: 1.2;
  text-align: center;
}

.processor[data-image-editor] .tray-file-copy {
  grid-area: badges;
  display: flex;
  align-items: center;
  min-height: 0;
  padding: 4px 28px 2px 0;
}

.processor[data-image-editor] .tray-file-name {
  grid-area: name;
  display: block;
  width: 100%;
  min-height: 0;
  padding: 0 2px;
  font-size: 12px;
  line-height: 16px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.processor[data-image-editor] .tray-file-footer,
.processor[data-image-editor] .tray-file-badges {
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
}

.processor[data-image-editor] .tray-file-status,
.processor[data-image-editor] .tray-file-plan,
.processor[data-image-editor] .tray-file-result,
.processor[data-image-editor] .tray-file-no-edits {
  padding: 3px 6px;
  font-size: 9px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.processor[data-image-editor] .tray-file-badges-planned .tray-file-plan {
  flex: 0 1 auto;
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
}

.processor[data-image-editor] .tray-file-badges-planned .tray-file-plan::before {
  content: none;
}

.processor[data-image-editor] .tray-file-badges-planned[data-count="2"],
.processor[data-image-editor] .tray-file-badges-planned[data-count="3"] {
  flex-direction: column;
  align-items: stretch;
  gap: 3px;
}

.processor[data-image-editor] .tray-file-badges-planned[data-count="2"] .tray-file-plan,
.processor[data-image-editor] .tray-file-badges-planned[data-count="3"] .tray-file-plan {
  width: 100%;
  padding-block: 2px;
}

.processor[data-image-editor] .tray-select-mark {
  top: 12px;
  left: 12px;
  width: 23px;
  height: 23px;
  border-radius: 7px;
  font-size: 14px;
}

.processor[data-image-editor] .tray-file-remove {
  top: 10px;
  right: 10px;
  width: 23px;
  height: 23px;
  border: 0;
  border-radius: 7px;
  font-size: 17px;
}

.processor[data-image-editor] .tray-file-metadata {
  top: 38px;
  right: 10px;
  width: 23px;
  height: 23px;
  border: 0;
  border-radius: 7px;
  font-size: 14px;
}

.editor-stage {
  grid-area: stage;
  min-width: 0;
  padding: 10px;
  border: 1px solid #dce2ec;
  border-radius: 18px;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 12px 35px rgba(31, 42, 68, .06);
}

.processor[data-image-editor] .active-file-preview {
  display: grid;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
}

.processor[data-image-editor] .active-preview-media {
  width: 100%;
  min-height: 360px;
  max-height: min(69vh, 720px);
  border-color: #d7deea;
  border-radius: 12px;
}

.processor[data-image-editor] .active-preview-media.crop-preview-media {
  min-height: 410px;
  max-height: min(72vh, 760px);
  border-radius: 12px 12px 0 0;
}

.processor[data-image-editor] .crop-ratio-presets-below-image {
  border-radius: 0 0 12px 12px;
}

.processor[data-image-editor] .active-preview-details {
  min-height: 42px;
  padding: 8px 3px 1px;
}

.processor[data-image-editor] .active-preview-details h2 {
  max-width: min(70%, 520px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.editor-sidebar {
  grid-area: sidebar;
  position: sticky;
  top: 12px;
  display: grid;
  align-content: start;
  padding: 16px;
  border: 1px solid #dbe1eb;
  border-radius: 18px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 14px 40px rgba(31, 42, 68, .075);
}

.editor-sidebar-header {
  display: grid;
  gap: 3px;
  margin-bottom: 15px;
  padding-bottom: 13px;
  border-bottom: 1px solid #e6e9f0;
}

.editor-sidebar-header span {
  color: #7b8496;
  font-size: 10px;
  font-weight: 820;
  letter-spacing: .085em;
  text-transform: uppercase;
}

.editor-sidebar-header strong {
  font-size: 18px;
  letter-spacing: -.025em;
}

.editor-sidebar-status {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid #dedafc;
  border-radius: 13px;
  color: #4d44a7;
  background: linear-gradient(145deg, #f7f5ff, #f0eeff);
}

.editor-sidebar-status strong {
  font-size: 14px;
  letter-spacing: -.015em;
}

.editor-sidebar-status span {
  color: #6f6999;
  font-size: 11px;
  line-height: 1.45;
}

.editor-inline-notice {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid #f0c4bf;
  border-radius: 12px;
  color: #8d2f27;
  background: #fff6f5;
}

.editor-inline-notice > span {
  font-size: 11px;
  line-height: 1.45;
}

.editor-inline-notice > div {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
}

.editor-inline-notice button {
  min-height: 36px;
  padding: 5px 9px;
  border: 1px solid #e5aaa4;
  border-radius: 8px;
  color: #7f2b24;
  background: white;
  cursor: pointer;
  font-size: 10px;
  font-weight: 780;
}

.editor-inline-notice .editor-inline-retry {
  color: white;
  border-color: #a33a31;
  background: #a33a31;
}

.processor[data-image-editor] .home-actions,
.processor[data-image-editor] .home-options,
.processor[data-image-editor] .file-inspection,
.processor[data-image-editor] .tool-options,
.processor[data-image-editor] .process-button {
  grid-column: auto;
}

.processor[data-image-editor] .home-actions > strong {
  margin: 0;
  font-size: 18px;
  letter-spacing: -.025em;
}

.workflow-panel-meta {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 14px;
}

.workflow-panel-meta p {
  max-width: 235px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.workflow-panel-meta span {
  flex: 0 0 auto;
  padding: 4px 7px;
  border-radius: 999px;
  color: #5146bc;
  background: #eeecff;
  font-size: 10px;
  font-weight: 820;
}

.processor[data-image-editor] [data-home-action-list] {
  gap: 13px;
}

.processor[data-image-editor] .workflow-action-group {
  gap: 7px;
}

.processor[data-image-editor] .workflow-action-group + .workflow-action-group {
  padding-top: 12px;
  border-top: 1px solid #eceef3;
}

.processor[data-image-editor] .workflow-action-group > strong {
  color: #697386;
  font-size: 10px;
  letter-spacing: .075em;
}

.processor[data-image-editor] .home-action-buttons {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.processor[data-image-editor] .home-action {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 9px;
  min-height: 72px;
  padding: 9px;
  border-color: #e0e4ec;
  border-radius: 12px;
  box-shadow: 0 2px 7px rgba(31, 42, 68, .025);
}

.processor[data-image-editor] .home-action:hover {
  border-color: #b9b0fa;
  background: #fbfaff;
}

.processor[data-image-editor] .home-action::after { content: none; }

.processor[data-image-editor] .workflow-action-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  font-size: 10px;
}

.workflow-action-copy {
  display: grid;
  align-content: center;
  gap: 2px;
  min-width: 0;
}

.workflow-action-copy strong {
  overflow: hidden;
  font-size: 12px;
  line-height: 1.2;
  text-overflow: ellipsis;
}

.workflow-action-copy small {
  display: -webkit-box;
  overflow: hidden;
  color: #7a8395;
  font-size: 9px;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.workflow-action-copy em {
  width: max-content;
  margin-top: 2px;
  padding: 2px 5px;
  border-radius: 999px;
  color: #187250;
  background: #def6e9;
  font-size: 8px;
  font-style: normal;
  font-weight: 820;
}

.workflow-action-check {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1px solid #d5dae4;
  border-radius: 6px;
  color: transparent;
  background: white;
  font-size: 10px;
  font-weight: 850;
}

.processor[data-image-editor] .workflow-action:has(input:checked) {
  border-color: #9589f5;
  background: linear-gradient(145deg, #f5f3ff, #eeecff);
  box-shadow: 0 0 0 2px rgba(102, 87, 232, .1);
}

.processor[data-image-editor] .workflow-action:has(input:focus-visible) {
  outline: 3px solid rgba(102, 87, 232, .34);
  outline-offset: 2px;
}

.processor[data-image-editor] .workflow-action:has(input:checked) .workflow-action-check {
  border-color: var(--accent);
  color: white;
  background: var(--accent);
}

.processor[data-image-editor] .workflow-action-export:has(input:checked) {
  border-color: #3bad87;
  background: linear-gradient(145deg, #f0fcf7, #e8f8f1);
  box-shadow: 0 0 0 2px rgba(35, 166, 121, .1);
}

.processor[data-image-editor] .workflow-action-export:has(input:checked) .workflow-action-icon,
.processor[data-image-editor] .workflow-action-export:has(input:checked) .workflow-action-check {
  border-color: #16815f;
  color: white;
  background: #16815f;
}

.processor[data-image-editor] .workflow-action-original .workflow-action-icon {
  color: #586276;
  background: #eef1f5;
}

.processor[data-image-editor] .standalone-action {
  grid-template-columns: 42px minmax(0, 1fr);
  width: 100%;
}

.processor[data-image-editor] .workflow-limit-message {
  padding: 8px 10px;
  border-radius: 9px;
  background: #fff1f0;
}

.processor[data-image-editor] .home-options {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #e8ebf1;
}

.processor[data-image-editor] .workflow-heading {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 9px;
  margin-bottom: 10px;
}

.processor[data-image-editor] .workflow-heading > strong {
  font-size: 15px;
}

.processor[data-image-editor] .workflow-heading > span {
  grid-column: 1 / -1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-clear {
  padding: 3px 6px;
  border: 0;
  border-radius: 7px;
  color: #7568da;
  background: #f1efff;
  cursor: pointer;
  font-size: 10px;
  font-weight: 780;
}

.processor[data-image-editor] .workflow-option-group,
.processor[data-image-editor] .tool-options,
.processor[data-image-editor] .quality-option {
  margin-top: 9px;
  padding: 11px;
  border-color: #e0e4ec;
  border-radius: 13px;
  background: #f7f8fb;
}

.processor[data-image-editor] .crop-options {
  gap: 10px;
}

.processor[data-image-editor] .crop-fields {
  gap: 7px;
}

.processor[data-image-editor] .crop-fields label,
.processor[data-image-editor] .resize-options > label:not(.check-option) {
  gap: 4px;
  font-size: 11px;
}

.processor[data-image-editor] .crop-fields input[type="number"],
.processor[data-image-editor] .resize-options input[type="number"] {
  height: 38px;
  border-color: #d5dbe6;
  border-radius: 9px;
}

.processor[data-image-editor] .resize-options {
  gap: 8px;
}

.processor[data-image-editor] .check-option {
  font-size: 11px;
}

.resize-presets {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid #e3e6ed;
}

.resize-presets > small {
  color: #737d90;
  font-size: 10px;
  font-weight: 760;
}

.resize-presets > div {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}

.resize-presets button {
  min-height: 30px;
  padding: 4px;
  border: 1px solid #d7dce6;
  border-radius: 8px;
  color: #596478;
  background: white;
  cursor: pointer;
  font-size: 10px;
  font-weight: 760;
}

.resize-presets button:hover {
  border-color: #a9a0f5;
  color: var(--accent);
}

.processor[data-image-editor] .quality-option {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  font-size: 11px;
}

.processor[data-image-editor] .quality-option input {
  grid-column: auto;
  min-width: 0;
  width: 100%;
}

.processor[data-image-editor] .compression-options {
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.processor[data-image-editor] .compression-options legend {
  margin-bottom: 4px;
  font-size: 12px;
}

.processor[data-image-editor] .compression-options label span {
  min-height: 58px;
  align-content: center;
  padding: 8px;
  border-radius: 9px;
}

.processor[data-image-editor] .compression-options label strong {
  font-size: 10px;
}

.processor[data-image-editor] .compression-options label small {
  font-size: 8px;
}

.processor[data-image-editor] .compression-options-lossless {
  display: grid;
  grid-template-columns: 1fr;
}

.lossless-option {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid #bfe2d1;
  border-radius: 10px;
  color: #176747;
  background: #eefaf4;
}

.lossless-option strong { font-size: 12px; }
.lossless-option small { color: #39765f; font-size: 10px; line-height: 1.4; }

.processor[data-image-editor] .option-hint {
  margin: 7px 2px 0;
  font-size: 10px;
  line-height: 1.45;
}

.workflow-footer {
  position: sticky;
  z-index: 5;
  bottom: -16px;
  margin: 14px -16px -16px;
  padding: 12px 16px 16px;
  border-top: 1px solid #dfe3eb;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 -12px 28px rgba(31, 42, 68, .07);
  backdrop-filter: blur(10px);
}

.processor[data-image-editor] .workflow-footer .option-size-comparison {
  margin: 0;
  padding: 9px 10px;
  border-radius: 11px;
  background: #f7f8fb;
}

.processor[data-image-editor] .workflow-footer .option-size-caption {
  min-height: 15px;
  margin: 5px 1px 0;
  text-align: left;
}

.processor[data-image-editor] .workflow-footer .process-button {
  margin-top: 9px;
}

.processor[data-image-editor] .editor-sidebar > .process-button {
  position: sticky;
  bottom: -16px;
  margin: 16px -16px -16px;
  width: calc(100% + 32px);
  padding: 14px 16px 16px;
  border: 16px solid white;
  border-top-width: 1px;
  border-radius: 0 0 18px 18px;
  box-shadow: 0 -10px 24px rgba(31, 42, 68, .06);
}

.processor[data-image-editor] .file-inspection {
  margin: 0 0 12px;
  padding: 10px 11px;
}

@media (max-width: 980px) {
  .processor[data-image-editor] .selected-panel {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "heading"
      "summary"
      "tray"
      "stage"
      "sidebar";
  }

  .processor[data-image-editor] .editor-sidebar {
    position: static;
    max-height: none;
  }

  .processor[data-image-editor] .active-preview-media {
    min-height: 300px;
    max-height: min(68vh, 680px);
  }

  .processor[data-image-editor] .active-preview-media.crop-preview-media {
    min-height: 340px;
    max-height: min(72vh, 720px);
  }

  .workflow-footer,
  .processor[data-image-editor] .editor-sidebar > .process-button {
    position: static;
  }
}

/* One-screen image workspace ------------------------------------------------
   The SEO page returns when the editor is reset. PDF tools keep their legacy
   document flow and never receive processor-active from hub.js. */

body.processor-active main.tool-page {
  width: min(1240px, calc(100% - 24px));
  padding-bottom: 8px;
}

body.processor-active .tool-page > .breadcrumbs,
body.processor-active .tool-page > .tool-hero,
body.processor-active main > .trust-line,
body.processor-active .tool-page > .seo-content,
body.processor-active .tool-page > .related-tools,
body.processor-active > .site-footer {
  display: none;
}

.processor[data-image-editor] .editor-sidebar {
  max-height: none;
  overflow: visible;
}

.processor[data-image-editor] .home-actions {
  position: relative;
}

.workflow-tools-toggle {
  display: none;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid #d9d5ff;
  border-radius: 8px;
  color: #594dcc;
  background: #f2f0ff;
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.processor[data-image-editor] .editor-sidebar-has-settings .workflow-tools-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.processor[data-image-editor] .editor-sidebar-has-settings .workflow-panel-meta {
  align-items: center;
  margin: 4px 0 8px;
}

.processor[data-image-editor] .editor-sidebar-has-settings .workflow-panel-meta p {
  display: none;
}

.processor[data-image-editor] .editor-sidebar-has-settings .home-actions > strong {
  display: none;
}

.processor[data-image-editor] .editor-sidebar-has-settings [data-home-action-list] {
  display: none;
}

.processor[data-image-editor] .editor-tool-picker-open .home-actions {
  z-index: 20;
}

.processor[data-image-editor] .editor-tool-picker-open [data-home-action-list] {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  left: 0;
  display: grid;
  padding: 12px;
  border: 1px solid #d9d5f5;
  border-radius: 13px;
  background: rgba(255, 255, 255, .985);
  box-shadow: 0 20px 50px rgba(31, 42, 68, .2);
  backdrop-filter: blur(14px);
}

.processor[data-image-editor] .workflow-footer {
  position: static;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(128px, .75fr);
  grid-template-areas:
    "comparison action"
    "caption caption";
  align-items: stretch;
  gap: 5px 8px;
  margin: 10px 0 0;
  padding: 9px 0 0;
  border-top: 1px solid #e3e6ed;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.processor[data-image-editor] .workflow-footer .option-size-comparison {
  grid-area: comparison;
  min-height: 56px;
  padding: 7px 9px;
}

.processor[data-image-editor] .workflow-footer .option-size-comparison small {
  font-size: 9px;
}

.processor[data-image-editor] .workflow-footer .option-size-comparison strong {
  font-size: 13px;
}

.processor[data-image-editor] .workflow-footer .option-size-comparison strong.is-estimate {
  color: #5146bc;
}

.processor[data-image-editor] .workflow-footer .option-size-caption {
  grid-area: caption;
  min-height: 12px;
  margin: 0 1px;
  font-size: 9px;
  line-height: 1.35;
  text-align: left;
}

.processor[data-image-editor] .workflow-footer .process-button {
  grid-area: action;
  height: 100%;
  min-height: 56px;
  margin: 0;
  padding: 8px 10px;
  line-height: 1.2;
}

.processor[data-image-editor] .workflow-footer .process-button-download,
.processor[data-image-editor] .selected-heading .tray-download-all {
  color: white;
  border-color: #16815f;
  background: #16815f;
}

.processor[data-image-editor] .selected-heading .tray-download-all:hover {
  color: white;
  border-color: #116c50;
  background: #116c50;
}

.processor[data-image-editor] .editor-sidebar > .process-button {
  position: static;
  bottom: auto;
  width: 100%;
  margin: 12px 0 0;
  padding: 12px 14px;
  border: 0;
  border-radius: 11px;
  box-shadow: none;
}

.processor[data-image-editor] .editor-sidebar-has-settings .home-options {
  margin-top: 8px;
  padding-top: 8px;
}

.processor[data-image-editor] .compression-options label span {
  min-height: 46px;
  padding: 6px;
}

@media (max-width: 980px) {
  .processor[data-image-editor] .editor-tool-picker-open [data-home-action-list] {
    position: static;
    margin-top: 8px;
    box-shadow: 0 12px 32px rgba(31, 42, 68, .12);
  }
}

/* 1366×768 and 1280×720 are the product breakpoint, not an edge case. */
@media (min-width: 821px) and (max-height: 820px) {
  body.processor-active .site-header {
    min-height: 48px;
  }

  body.processor-active main,
  body.processor-active main.tool-page {
    width: min(1240px, calc(100% - 12px));
    padding-bottom: 4px;
  }

  body.processor-active .processor[data-image-editor] {
    --editor-sidebar-width: clamp(330px, 34vw, 370px);
    height: calc(100dvh - 56px);
    margin-top: 4px;
    border-radius: 18px;
  }

  .processor[data-image-editor] .selected-panel {
    height: 100%;
    grid-template-columns: minmax(0, 1fr) minmax(320px, var(--editor-sidebar-width));
    grid-template-rows: 38px auto 82px minmax(0, 1fr);
    grid-template-areas:
      "heading heading"
      "summary summary"
      "tray tray"
      "stage sidebar";
    align-items: stretch;
    gap: 6px 10px;
    padding: 8px;
  }

  .processor[data-image-editor] .selected-heading {
    min-height: 38px;
    padding: 3px 5px 3px 9px;
    border-radius: 11px;
  }

  .processor[data-image-editor] .selected-heading span {
    font-size: 14px;
  }

  .processor[data-image-editor] .selected-heading button {
    min-height: 30px;
    padding: 4px 8px;
    font-size: 9px;
  }

  .processor[data-image-editor] .tray-summary {
    margin: 0 3px;
    font-size: 9px;
    line-height: 1.2;
  }

  .processor[data-image-editor] .file-list {
    gap: 6px;
    padding: 1px 1px 3px;
  }

  .processor[data-image-editor] .file-list li {
    flex-basis: 174px;
    width: 174px;
    height: 78px;
  }

  .processor[data-image-editor] .tray-card {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 6px;
    padding: 4px;
    border-radius: 9px;
  }

  .processor[data-image-editor] .tray-file-preview {
    width: 56px;
    height: 100%;
    padding: 2px;
    border-radius: 7px;
  }

  .processor[data-image-editor] .tray-file-copy {
    padding: 2px 22px 0 0;
  }

  .processor[data-image-editor] .tray-file-name {
    min-height: 14px;
    overflow: hidden;
    font-size: 10px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .processor[data-image-editor] .tray-file-footer,
  .processor[data-image-editor] .tray-file-badges {
    min-height: 14px;
  }

  .processor[data-image-editor] .tray-file-status,
  .processor[data-image-editor] .tray-file-plan,
  .processor[data-image-editor] .tray-file-result,
  .processor[data-image-editor] .tray-file-no-edits {
    padding: 2px 4px;
    font-size: 8px;
  }

  .processor[data-image-editor] .tray-select-mark,
  .processor[data-image-editor] .tray-file-remove,
  .processor[data-image-editor] .tray-file-metadata {
    top: 6px;
    width: 19px;
    height: 19px;
    border-radius: 6px;
    font-size: 12px;
  }

  .processor[data-image-editor] .tray-select-mark { left: 6px; }
  .processor[data-image-editor] .tray-file-remove { right: 6px; }
  .processor[data-image-editor] .tray-file-metadata { top: 29px; right: 6px; }

  .processor[data-image-editor] .editor-stage,
  .processor[data-image-editor] .editor-sidebar {
    height: 100%;
    min-height: 0;
  }

  .processor[data-image-editor] .editor-stage {
    padding: 5px;
    border-radius: 12px;
  }

  .processor[data-image-editor] .active-file-preview {
    grid-template-rows: minmax(0, 1fr) auto auto;
    height: 100%;
  }

  .processor[data-image-editor] .active-preview-media,
  .processor[data-image-editor] .active-preview-media.crop-preview-media {
    height: 100%;
    min-height: 0;
    max-height: none;
    border-radius: 8px 8px 0 0;
  }

  .processor[data-image-editor] .crop-ratio-presets-below-image {
    min-height: 38px;
    margin-top: 0;
    padding: 4px 7px 5px;
  }

  .processor[data-image-editor] .crop-ratio-presets.crop-ratio-presets-below-image button {
    min-height: 29px;
    padding: 4px 7px;
    border-radius: 7px;
    font-size: 9px;
  }

  .processor[data-image-editor] .active-preview-details {
    min-height: 30px;
    padding: 4px 3px 0;
  }

  .processor[data-image-editor] .active-preview-details .eyebrow {
    display: none;
  }

  .processor[data-image-editor] .active-preview-details h2 {
    font-size: 11px;
  }

  .processor[data-image-editor] .active-preview-details > p:not(.eyebrow) {
    font-size: 8px;
  }

  .processor[data-image-editor] .editor-sidebar {
    position: relative;
    top: auto;
    align-content: start;
    padding: 9px;
    border-radius: 12px;
  }

  .processor[data-image-editor] .editor-sidebar-header {
    gap: 1px;
    margin-bottom: 7px;
    padding-bottom: 6px;
  }

  .processor[data-image-editor] .editor-sidebar-header strong {
    font-size: 14px;
  }

  .processor[data-image-editor] .home-actions > strong {
    font-size: 13px;
  }

  .processor[data-image-editor] .workflow-panel-meta {
    align-items: center;
    margin: 2px 0 6px;
  }

  .processor[data-image-editor] .workflow-panel-meta p {
    max-width: 190px;
    font-size: 8px;
    line-height: 1.25;
  }

  .processor[data-image-editor] .workflow-panel-meta span {
    padding: 3px 5px;
    font-size: 8px;
  }

  .processor[data-image-editor] [data-home-action-list] {
    gap: 4px;
  }

  .processor[data-image-editor] .workflow-action-group {
    grid-template-columns: 50px minmax(0, 1fr);
    align-items: center;
    gap: 5px;
  }

  .processor[data-image-editor] .workflow-action-group + .workflow-action-group {
    padding-top: 4px;
  }

  .processor[data-image-editor] .workflow-action-group > strong {
    font-size: 7px;
    line-height: 1.2;
  }

  .processor[data-image-editor] .home-action-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
  }

  .processor[data-image-editor] .home-action {
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 4px;
    min-height: 40px;
    padding: 4px;
    border-radius: 8px;
  }

  .processor[data-image-editor] .workflow-action-icon {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    font-size: 7px;
  }

  .processor[data-image-editor] .workflow-action-copy small,
  .processor[data-image-editor] .workflow-action-copy em {
    display: none;
  }

  .processor[data-image-editor] .workflow-action-copy strong {
    font-size: 8px;
    line-height: 1.1;
    white-space: normal;
  }

  .processor[data-image-editor] .workflow-action-check {
    display: none;
  }

  .processor[data-image-editor] .editor-tool-picker-open [data-home-action-list] {
    position: absolute;
    margin-top: 0;
    padding: 8px;
  }

  .processor[data-image-editor] .home-options,
  .processor[data-image-editor] .editor-sidebar-has-settings .home-options {
    margin-top: 5px;
    padding-top: 5px;
  }

  .processor[data-image-editor] .workflow-heading {
    gap: 1px 6px;
    margin-bottom: 3px;
  }

  .processor[data-image-editor] .workflow-heading > strong {
    font-size: 12px;
  }

  .processor[data-image-editor] .workflow-heading > span {
    font-size: 8px;
  }

  .processor[data-image-editor] .workflow-option-group,
  .processor[data-image-editor] .tool-options,
  .processor[data-image-editor] .quality-option {
    margin-top: 4px;
    padding: 6px;
    border-radius: 8px;
  }

  .processor[data-image-editor] .crop-options {
    gap: 4px;
  }

  .processor[data-image-editor] .crop-options-heading > strong,
  .processor[data-image-editor] .resize-options > strong,
  .processor[data-image-editor] .compression-options legend {
    font-size: 9px;
  }

  .processor[data-image-editor] .crop-fields {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
  }

  .processor[data-image-editor] .crop-fields label,
  .processor[data-image-editor] .resize-options > label:not(.check-option) {
    gap: 2px;
    font-size: 8px;
  }

  .processor[data-image-editor] .crop-fields input[type="number"],
  .processor[data-image-editor] .resize-options input[type="number"] {
    height: 29px;
    padding: 0 6px;
    border-radius: 6px;
    font-size: 10px;
  }

  .processor[data-image-editor] .resize-options {
    grid-template-columns: 1fr 1fr;
    gap: 4px 6px;
  }

  .processor[data-image-editor] .check-option {
    gap: 5px;
    font-size: 8px;
  }

  .processor[data-image-editor] .check-option input {
    width: 13px;
    height: 13px;
  }

  .processor[data-image-editor] .resize-presets {
    display: none;
  }

  .processor[data-image-editor] .quality-option {
    gap: 4px;
    font-size: 9px;
  }

  .processor[data-image-editor] .compression-options {
    gap: 4px;
  }

  .processor[data-image-editor] .compression-options legend {
    margin-bottom: 1px;
  }

  .processor[data-image-editor] .compression-options label span {
    min-height: 36px;
    padding: 4px;
    border-radius: 6px;
  }

  .processor[data-image-editor] .compression-options label strong {
    font-size: 8px;
  }

  .processor[data-image-editor] .compression-options label small {
    display: none;
  }

  .processor[data-image-editor] .compression-options-lossless {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 6px;
  }

  .processor[data-image-editor] .compression-options-lossless legend {
    margin: 0;
    white-space: nowrap;
  }

  .processor[data-image-editor] .compression-options-lossless .lossless-option {
    padding: 5px 7px;
    border-radius: 6px;
  }

  .processor[data-image-editor] .compression-options-lossless .lossless-option small {
    display: none;
  }

  .processor[data-image-editor] .option-hint {
    margin: 3px 1px 0;
    overflow: hidden;
    font-size: 8px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .processor[data-image-editor] .editor-inline-notice {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px;
    margin-bottom: 5px;
    padding: 5px 6px;
    border-radius: 7px;
  }

  .processor[data-image-editor] .editor-inline-notice > span {
    overflow: hidden;
    font-size: 8px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .processor[data-image-editor] .editor-inline-notice > div {
    gap: 4px;
  }

  .processor[data-image-editor] .editor-inline-notice button {
    min-height: 27px;
    padding: 3px 6px;
    font-size: 8px;
  }

  .processor[data-image-editor] .workflow-footer {
    grid-template-columns: minmax(0, 1.25fr) minmax(118px, .75fr);
    gap: 3px 6px;
    margin-top: 5px;
    padding-top: 5px;
  }

  .processor[data-image-editor] .workflow-footer .option-size-comparison,
  .processor[data-image-editor] .workflow-footer .process-button {
    min-height: 47px;
  }

  .processor[data-image-editor] .workflow-footer .option-size-comparison {
    gap: 5px;
    padding: 4px 7px;
    border-radius: 7px;
  }

  .processor[data-image-editor] .workflow-footer .option-size-comparison strong {
    font-size: 11px;
  }

  .processor[data-image-editor] .workflow-footer .option-size-caption {
    min-height: 10px;
    font-size: 7px;
  }

  .processor[data-image-editor] .workflow-footer .process-button {
    padding: 6px 8px;
    font-size: 10px;
  }

  .processor[data-image-editor] .editor-sidebar > .process-button {
    min-height: 42px;
    margin-top: 7px;
    padding: 8px 10px;
  }
}

@media (max-width: 620px) {
  .processor[data-image-editor] {
    width: calc(100% + 8px);
    margin-left: -4px;
    border-radius: 18px;
  }

  .processor[data-image-editor] .drop-zone {
    min-height: 340px;
    margin: 7px;
    border-radius: 14px;
  }

  .processor[data-image-editor] .selected-panel {
    gap: 9px;
    padding: 8px;
  }

  .processor[data-image-editor] .selected-heading {
    align-items: center;
    padding-left: 10px;
  }

  .processor[data-image-editor] .selected-heading-actions {
    justify-content: flex-end;
  }

  .processor[data-image-editor] .selected-heading button {
    min-height: 34px;
    padding-inline: 9px;
    font-size: 11px;
  }

  .processor[data-image-editor] .file-list {
    justify-content: flex-start;
  }

  .processor[data-image-editor] .file-list li {
    flex-basis: 196px;
    width: 196px;
    height: 92px;
  }

  .processor[data-image-editor] .tray-card {
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 7px;
    padding: 6px;
  }

  .processor[data-image-editor] .tray-file-preview {
    width: 68px;
    height: 100%;
  }

  .editor-stage { padding: 6px; border-radius: 14px; }

  .processor[data-image-editor] .active-preview-media {
    min-height: 230px;
    border-radius: 9px;
  }

  .processor[data-image-editor] .active-preview-media.crop-preview-media {
    min-height: 280px;
    border-radius: 9px 9px 0 0;
  }

  .processor[data-image-editor] .active-preview-details h2 {
    max-width: 100%;
    white-space: normal;
  }

  .processor[data-image-editor] .editor-sidebar {
    padding: 12px;
    border-radius: 14px;
  }

  .processor[data-image-editor] .home-action-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .processor[data-image-editor] .home-action {
    grid-template-columns: 34px minmax(0, 1fr) 16px;
    min-height: 62px;
    padding: 7px;
  }

  .processor[data-image-editor] .workflow-action-icon {
    width: 34px;
    height: 34px;
  }

  .processor[data-image-editor] .workflow-action-copy small,
  .processor[data-image-editor] .workflow-action-copy em {
    display: none;
  }

  .processor[data-image-editor] .workflow-action-copy strong {
    font-size: 11px;
    white-space: normal;
  }

  .processor[data-image-editor] .compression-options {
    grid-template-columns: 1fr;
  }

  .workflow-footer {
    margin: 12px -12px -12px;
    padding: 11px 12px 12px;
  }

  .processor[data-image-editor] .editor-sidebar > .process-button {
    margin: 14px -12px -12px;
    width: calc(100% + 24px);
    border-width: 12px;
    border-top-width: 1px;
  }
}

/* Keyboard-only clipboard hints are not useful in the installed PWA or on
   touch/mobile layouts. Clipboard paste handling itself remains available. */
@media (max-width: 620px),
       (hover: none) and (pointer: coarse),
       (display-mode: standalone) {
  .paste-shortcut {
    display: none;
  }
}
