@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;450;500;550;600;650;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');
:root {
  color-scheme: light;
  --bg: #f7f8fc;
  --panel: #fff;
  --soft: #f0f2f8;
  --text: #252b3b;
  --muted: #758093;
  --line: #e2e6ef;
  --accent: #e96152;
  --accent-soft: #fff0ed;
  --accent-ink: #c34b3d;
  --shadow: 0 8px 28px #29325206;
  --field: #fff;
  --green: #248568;
  --danger: #bd3939;
  font:
    14px 'DM Sans',
    system-ui,
    sans-serif;
  color: var(--text);
  background: var(--bg);
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #161923;
  --panel: #202531;
  --soft: #282f3d;
  --text: #edf0f7;
  --muted: #a2acc0;
  --line: #343d50;
  --accent: #fa8677;
  --accent-soft: #fa867715;
  --accent-ink: #ffb1a8;
  --shadow: 0 8px 28px #0002;
  --field: #1b202b;
  --green: #85d3b2;
  --danger: #ffaaa2;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  max-width: 100%;
  overflow-x: clip;
}
body {
  background: var(--bg);
  color: var(--text);
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  color: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
[role='button']:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
button {
  transition:
    border-color 0.15s,
    background 0.15s,
    transform 0.15s;
}
button:hover:not(:disabled) {
  filter: brightness(0.97);
}
.sidebar {
  display: none;
}
.app {
  margin: 0;
}
header {
  height: 84px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 4vw;
  gap: 32px;
  position: sticky;
  top: 0;
  z-index: 2;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font: 600 24px 'Space Grotesk';
  letter-spacing: -1.2px;
  flex-shrink: 0;
}
.brand-light {
  font-weight: 400;
}
.brand small {
  display: block;
  font: 8px 'DM Sans';
  letter-spacing: 2.4px;
  color: var(--muted);
  margin-top: 5px;
}
.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: -4px;
  padding-right: 4px;
  width: 39px;
  height: 43px;
  border-radius: 12px;
  font: 700 24px 'Space Grotesk';
  letter-spacing: -4px;
  background: var(--accent);
  color: #fff;
}
.logo span {
  transform: translateY(3px);
}
.top-nav {
  display: flex;
  gap: 24px;
  margin-left: auto;
}
.top-nav button {
  border: 0;
  background: none;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 0;
  white-space: nowrap;
}
.top-nav button:hover {
  color: var(--accent);
}
.theme-toggle {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 10px 14px;
  font-size: 11px;
  white-space: nowrap;
}
.breadcrumb {
  display: none;
}
.header-actions {
  display: flex;
  gap: 14px;
  align-items: center;
}
.local-badge {
  display: none;
}
.icon-button {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel);
  font-size: 15px;
  color: var(--muted);
}
main {
  max-width: 1440px;
  padding: 0 4vw;
  margin: auto;
}
.catalog {
  margin: 0;
  border: 0;
}
.catalog > .catalog-hero {
  list-style: none;
  text-align: center;
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: 62px 20px 29px;
  cursor: default;
}
.catalog > .catalog-hero::-webkit-details-marker {
  display: none;
}
.eyebrow {
  display: block;
  font-size: 10px;
  letter-spacing: 2.3px;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 17px;
}
.catalog > .catalog-hero strong,
.catalog > .catalog-hero h1 {
  margin: 0;
  display: block;
  font: 600 clamp(38px, 4.4vw, 65px) / 1.08 'Space Grotesk';
  letter-spacing: -2.8px;
}
.catalog > .catalog-hero h1 br {
  display: none;
}
.catalog > .catalog-hero h1 em {
  font-style: normal;
  color: var(--accent);
  margin-left: 14px;
}
.catalog-toggle {
  font-size: 14px;
  color: var(--muted);
  margin-top: 22px;
}
.catalog-body {
  padding: 0;
}
.search-label {
  display: none;
}
#tool-search {
  display: block;
  width: min(100%, 510px);
  margin: 0 auto 30px;
  padding: 15px 20px;
  border-radius: 30px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  font-size: 13px;
  color: var(--text);
}
#tool-search::placeholder {
  color: var(--muted);
}
.catalog-tabs {
  display: flex;
  justify-content: center;
  gap: 7px;
  overflow-x: auto;
  padding: 0 2px 28px;
}
.catalog-tabs button {
  padding: 9px 15px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  white-space: nowrap;
  font-size: 11px;
  font-weight: 500;
}
.catalog-tabs button.selected {
  background: var(--text);
  color: var(--panel);
  border-color: var(--text);
}
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.tool-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  min-height: 225px;
  padding: 23px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 13px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.tool-card:hover {
  border-color: #e9a497;
  transform: translateY(-3px);
  box-shadow: 0 10px 27px #e9615210;
}
.tool-icon {
  font: 700 16px 'Space Grotesk';
  width: 45px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  letter-spacing: -0.6px;
  position: relative;
  margin-bottom: 17px;
}
.tool-icon:after {
  content: '';
  position: absolute;
  right: 5px;
  top: 5px;
  width: 7px;
  height: 7px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  opacity: 0.5;
}
.tool-icon.orange {
  background: #fff0e6;
  color: #e17c3c;
}
.tool-icon.red {
  background: #ffebe8;
  color: #e06453;
}
.tool-icon.blue {
  background: #e9f1ff;
  color: #4c80cf;
}
.tool-icon.green {
  background: #e3f5ed;
  color: #2a9c6a;
}
.tool-icon.pink {
  background: #faeaf7;
  color: #bb63ad;
}
.tool-icon.purple {
  background: #efeafd;
  color: #8a6fca;
}
.tool-icon.gray {
  background: #eaeef3;
  color: #6c7d91;
}
[data-theme='dark'] .tool-icon {
  background: #fa867719;
  color: #fa9c8f;
}
[data-theme='dark'] .tool-icon.orange {
  background: #e17c3c19;
  color: #efad7e;
}
[data-theme='dark'] .tool-icon.green {
  background: #2a9c6a19;
  color: #84cba7;
}
[data-theme='dark'] .tool-icon.blue {
  background: #4c80cf19;
  color: #91b9f4;
}
[data-theme='dark'] .tool-icon.pink {
  background: #bb63ad19;
  color: #d79acc;
}
[data-theme='dark'] .tool-icon.purple {
  background: #8a6fca19;
  color: #bda4f0;
}
.tool-card strong {
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.35px;
}
.tool-card p {
  margin: 10px 0 18px;
  font-size: 12px;
  line-height: 1.65;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tool-card small {
  display: flex;
  justify-content: space-between;
  width: 100%;
  font-size: 9px;
  letter-spacing: 0.4px;
  color: var(--muted);
  margin-top: auto;
}
.tool-card small span {
  font-size: 16px;
  color: var(--accent);
}
.catalog-note {
  font-size: 11px;
  line-height: 1.8;
  color: var(--muted);
  text-align: center;
  padding: 19px 10px 30px;
  margin: 0;
}
.no-tools {
  padding: 30px;
  color: var(--muted);
  grid-column: 1/-1;
  text-align: center;
}
.back-button {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 10px 17px;
  margin-top: 28px;
  font-size: 12px;
  color: var(--muted);
}
.heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 205px;
  padding: 25px 0;
}
.heading h1 {
  font: 600 clamp(33px, 4vw, 51px) 'Space Grotesk';
  letter-spacing: -2px;
  margin: 10px 0 12px;
}
.heading h1 span {
  color: var(--accent);
}
.heading p:not(.eyebrow) {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
}
.format-art {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 215px;
  height: 150px;
  position: relative;
  flex-shrink: 0;
}
.tile {
  position: absolute;
  border-radius: 11px;
  padding: 20px 11px;
  width: 70px;
  height: 83px;
  text-align: center;
  font: 600 18px 'Space Grotesk';
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.tile-back {
  background: var(--soft);
  transform: rotate(-12deg) translate(-29px, -5px);
  color: var(--muted);
}
.tile-front {
  background: var(--accent);
  color: #fff;
  transform: rotate(12deg) translate(31px, 5px);
}
.art-arrow {
  position: absolute;
  z-index: 1;
  font-size: 26px;
  color: var(--text);
}
.format-art small {
  position: absolute;
  bottom: 0;
  font-size: 7px;
  letter-spacing: 1.6px;
  color: var(--muted);
}
.workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 22px;
  align-items: start;
}
.files-panel,
.settings-panel {
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.files-panel {
  padding: 25px;
}
.panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 24px;
}
.panel-top > div {
  display: flex;
  align-items: center;
  gap: 10px;
}
.step {
  border: 1px solid var(--line);
  padding: 5px 6px;
  border-radius: 5px;
  font-size: 10px;
  color: var(--accent);
  background: var(--accent-soft);
}
h2 {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
}
.count {
  background: var(--soft);
  font-size: 10px;
  padding: 3px 6px;
  border-radius: 4px;
  color: var(--muted);
}
.text-button {
  padding: 5px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 11px;
}
.dropzone {
  border: 1.5px dashed #e5a69d;
  background: var(--accent-soft);
  border-radius: 10px;
  padding: 37px 14px;
  text-align: center;
  cursor: pointer;
}
.dropzone.dragover {
  border-color: var(--accent);
  background: var(--soft);
}
.upload-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 20px;
  border-radius: 12px;
  background: var(--panel);
  display: grid;
  place-items: center;
  font-size: 32px;
  color: var(--accent);
  box-shadow: var(--shadow);
}
.dropzone h3 {
  font: 500 21px 'Space Grotesk';
  letter-spacing: -0.5px;
  margin: 0 0 12px;
}
.dropzone p {
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 22px;
}
.dropzone p span {
  color: var(--accent-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.dropzone small,
.upload-limit {
  display: block;
  font-size: 10px;
  color: var(--muted);
  line-height: 1.8;
}
.upload-limit {
  margin-top: 7px;
}
.queue-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--muted);
  margin: 30px 0 16px;
}
.queue-heading span:last-child {
  letter-spacing: 0;
}
.empty {
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.empty-lines {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  margin-bottom: 8px;
}
.empty-lines span {
  height: 5px;
  width: 27px;
  border: 1px solid var(--line);
  border-radius: 2px;
}
.empty-lines span:nth-child(2) {
  width: 20px;
}
.empty-lines span:nth-child(3) {
  width: 12px;
}
.empty p {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}
.empty small {
  font-size: 10px;
  color: var(--muted);
}
.queue-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  color: var(--muted);
  font-size: 10px;
}
.tip {
  display: flex;
  gap: 13px;
  padding: 15px;
  background: var(--soft);
  border-radius: 7px;
  margin-top: 25px;
}
.tip > span {
  font-size: 20px;
  color: var(--accent);
}
.tip p {
  font-size: 11px;
  line-height: 1.8;
  margin: 0;
  color: var(--muted);
}
.tip strong {
  display: block;
  color: var(--text);
  font-weight: 500;
}
.settings-panel .panel-top {
  padding: 22px;
  border-bottom: 1px solid var(--line);
  margin: 0;
}
.small-tag {
  font-size: 8px;
  letter-spacing: 1px;
  color: var(--muted);
}
form {
  padding: 20px 22px 0;
}
label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  margin: 0 0 9px;
}
label span {
  float: right;
  font-size: 9px;
}
.format-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}
.format-choice {
  flex: 1;
  min-width: 45px;
  padding: 10px 7px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 10px;
  color: var(--muted);
  font-weight: 600;
}
.format-choice.selected {
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-color: var(--accent);
}
input[type='number'],
input[type='text'],
input:not([type]),
select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--field);
  border-radius: 6px;
  padding: 11px 10px;
  font-size: 12px;
  color: var(--text);
}
input::placeholder {
  color: var(--muted);
}
fieldset {
  border: 0;
  border-top: 1px solid var(--line);
  padding: 19px 0 0;
  margin: 23px 0 0;
  min-width: 0;
}
legend {
  float: left;
  width: 100%;
  margin-bottom: 18px;
  font-size: 9px;
  letter-spacing: 1.6px;
  color: var(--muted);
}
fieldset > div {
  clear: both;
}
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  clear: both;
}
.field-note {
  font-size: 10px;
  line-height: 1.7;
  color: var(--muted);
  margin: 10px 0 0;
}
.range-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 22px;
}
.range-head label {
  margin: 0;
}
.range-head output {
  font-size: 11px;
  color: var(--accent-ink);
}
input[type='range'] {
  width: 100%;
  height: 4px;
  accent-color: var(--accent);
  margin: 17px 0 13px;
}
.range-ends {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: var(--muted);
}
.extra-space {
  margin-top: 22px;
}
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  margin-top: 16px;
}
.check input {
  accent-color: var(--accent);
  margin: 0;
  width: 13px;
  height: 13px;
}
.convert-area {
  border-top: 1px solid var(--line);
  margin: 23px -22px 0;
  padding: 20px 22px;
  background: var(--soft);
  border-radius: 0 0 12px 12px;
}
.primary {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 7px;
  padding: 14px 16px;
  font-size: 13px;
  font-weight: 600;
}
.primary span:last-child {
  font-size: 21px;
  line-height: 1;
}
.convert-area p {
  font-size: 9px;
  line-height: 1.7;
  color: var(--muted);
  text-align: center;
  margin: 12px 0 0;
}
.cancel {
  border: 1px solid var(--line);
  background: var(--panel);
  width: 100%;
  padding: 10px;
  border-radius: 6px;
  font-size: 11px;
  margin-top: 10px;
}
.features {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin: 35px 0;
  padding: 25px 0;
  border-bottom: 1px solid var(--line);
}
.features > div {
  display: flex;
  align-items: center;
  gap: 13px;
}
.features > div > span {
  font-size: 25px;
  color: var(--accent);
}
.features p {
  margin: 0;
}
.features strong {
  font-size: 11px;
  font-weight: 500;
  display: block;
}
.features small {
  font-size: 10px;
  color: var(--muted);
  display: block;
  margin-top: 6px;
}
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding: 25px 0;
  color: var(--muted);
  font-size: 10px;
}
footer > span:first-child {
  letter-spacing: 1px;
  font-weight: 600;
  color: var(--text);
}
footer b {
  font-weight: 400;
  letter-spacing: 0;
  margin-left: 5px;
  color: var(--muted);
}
.file-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.file-icon {
  width: 40px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--soft);
  font-size: 9px;
  font-weight: 600;
  color: var(--accent-ink);
  overflow: hidden;
}
.file-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.file-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 6px;
}
.file-detail {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.8;
}
.file-detail.error {
  color: var(--danger);
}
.file-detail.done {
  color: var(--green);
}
.file-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  max-width: 145px;
  justify-content: flex-end;
}
.file-actions button,
.download {
  border: 1px solid var(--line);
  background: var(--soft);
  padding: 7px 9px;
  border-radius: 5px;
  font-size: 11px;
}
.download {
  color: var(--accent-ink);
}
.progress {
  height: 4px;
  background: var(--soft);
  margin-top: 8px;
  overflow: hidden;
  border-radius: 2px;
}
.progress span {
  display: block;
  height: 100%;
  background: var(--accent);
  transition: width 0.15s;
}
.file-preview {
  grid-column: 1/-1;
}
.file-preview img,
.file-preview video {
  display: block;
  max-height: 200px;
  width: 100%;
  object-fit: contain;
  border-radius: 6px;
  background: var(--soft);
}
.file-preview audio {
  width: 100%;
}
.file-note {
  clear: both;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--soft);
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
}
.pdf-tools-fields {
  clear: both;
}
#pdf-tools-fields > div > label {
  margin-top: 15px;
}
#pdf-only,
#sheet-only {
  clear: both;
}
#pdf-only label:not(:first-child) {
  margin-top: 16px;
}
dialog {
  max-width: 650px;
  width: calc(100% - 32px);
  max-height: 85vh;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  color: var(--text);
  padding: 27px;
  box-shadow: 0 20px 70px #0003;
  font-size: 12px;
  line-height: 1.9;
}
dialog::backdrop {
  background: #131a2b99;
  backdrop-filter: blur(5px);
}
.dialog-top {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
}
.dialog-top h2 {
  font: 500 24px 'Space Grotesk';
}
.dialog-top button {
  flex-shrink: 0;
}
.format-table {
  background: var(--soft);
  padding: 10px 16px;
  border-radius: 8px;
  margin: 20px 0;
}
.format-table strong {
  display: block;
  color: var(--accent-ink);
}
dialog ul {
  padding-left: 18px;
}
dialog li {
  margin: 10px 0;
}
#toast {
  display: none;
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 30px);
  background: var(--text);
  color: var(--panel);
  border: 1px solid var(--line);
  padding: 14px 21px;
  border-radius: 8px;
  box-shadow: 0 8px 30px #0002;
  font-size: 12px;
  line-height: 1.7;
  z-index: 10;
}
.busy .settings-panel fieldset,
.busy .format-options,
.busy .preset-row {
  opacity: 0.5;
  pointer-events: none;
}
@media (min-width: 1600px) {
  .catalog-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
@media (max-width: 1100px) {
  header {
    gap: 20px;
    padding: 0 25px;
  }
  .top-nav {
    gap: 16px;
  }
  .top-nav button {
    font-size: 10px;
  }
  .header-actions {
    gap: 8px;
  }
  .header-actions .local-badge,
  .header-actions #help {
    display: none;
  }
  main {
    padding: 0 25px;
  }
  .catalog-tabs {
    justify-content: flex-start;
  }
  .catalog-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .catalog > .catalog-hero strong,
  .catalog > .catalog-hero h1 {
    margin: 0;
    font-size: 48px;
  }
  .workbench {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
  .catalog > .catalog-hero h1 br {
    display: block;
  }
  .catalog > .catalog-hero h1 em {
    margin-left: 0;
  }
}
@media (max-width: 750px) {
  header {
    height: auto;
    min-height: 78px;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 18px 20px;
    gap: 18px;
  }
  .brand {
    font-size: 22px;
  }
  .logo {
    height: 37px;
    width: 34px;
    font-size: 22px;
  }
  .top-nav {
    order: 3;
    width: 100%;
    overflow: auto;
    gap: 23px;
    margin: 0;
  }
  .top-nav button {
    font-size: 11px;
  }
  .theme-toggle {
    font-size: 10px;
    padding: 9px 12px;
  }
  main {
    padding: 0 19px;
  }
  .catalog > .catalog-hero {
    padding: 42px 0 25px;
  }
  .catalog > .catalog-hero strong,
  .catalog > .catalog-hero h1 {
    margin: 0;
    font-size: 39px;
    letter-spacing: -2px;
  }
  .catalog > .catalog-hero .eyebrow {
    font-size: 8px;
  }
  .catalog-toggle {
    font-size: 12px;
    margin-top: 17px;
  }
  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .tool-card {
    padding: 17px;
    min-height: 220px;
  }
  .tool-card strong {
    font-size: 14px;
  }
  .tool-card p {
    font-size: 11px;
  }
  .tool-icon {
    width: 37px;
    height: 40px;
    font-size: 14px;
    margin-bottom: 16px;
  }
  .catalog-tabs {
    padding-bottom: 20px;
    gap: 6px;
  }
  .catalog-tabs button {
    font-size: 10px;
    padding: 9px 12px;
  }
  #tool-search {
    font-size: 12px;
    margin-bottom: 22px;
  }
  .catalog-note {
    font-size: 10px;
  }
  .workbench {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .heading {
    min-height: 180px;
  }
  .heading h1 {
    font-size: 34px;
    letter-spacing: -1.5px;
  }
  .heading p:not(.eyebrow) {
    font-size: 12px;
  }
  .heading .eyebrow {
    font-size: 7px;
  }
  .format-art {
    width: 100px;
    height: 120px;
  }
  .tile {
    width: 46px;
    height: 59px;
    font-size: 12px;
    padding: 19px 6px;
    border-radius: 8px;
  }
  .tile-back {
    transform: rotate(-12deg) translate(-16px, -5px);
  }
  .tile-front {
    transform: rotate(12deg) translate(18px, 5px);
  }
  .art-arrow {
    font-size: 20px;
  }
  .format-art small {
    display: none;
  }
  .files-panel {
    padding: 20px;
  }
  .dropzone {
    padding: 30px 12px;
  }
  .dropzone h3 {
    font-size: 19px;
  }
  .file-row {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
  }
  .file-icon {
    width: 33px;
    height: 38px;
  }
  .file-actions {
    grid-column: 2;
    justify-content: flex-start;
    max-width: none;
  }
  .file-preview {
    grid-column: 1/-1;
  }
  .features {
    flex-wrap: wrap;
    gap: 20px;
  }
  .features > div > span {
    display: none;
  }
  .features > div {
    width: 45%;
  }
  .features > div:last-child {
    display: none;
  }
  .features small {
    font-size: 9px;
  }
  footer {
    flex-wrap: wrap;
    font-size: 9px;
    gap: 10px;
  }
  footer > span:last-child {
    display: none;
  }
  .back-button {
    margin-top: 22px;
  }
  .queue-heading {
    font-size: 8px;
  }
  .empty {
    min-height: 130px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Header tool directories */
.top-nav .nav-dropdown {
  display: flex;
  align-items: center;
  gap: 7px;
}
.nav-dropdown svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  transition: transform 0.15s;
}
.nav-dropdown[aria-expanded='true'] {
  color: var(--accent);
}
.nav-dropdown[aria-expanded='true'] svg {
  transform: rotate(180deg);
}
.mega-panel {
  position: absolute;
  top: calc(100% + 12px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 50px #17223920;
  z-index: 20;
  padding: 25px;
  max-height: calc(100dvh - 115px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.convert-panel {
  right: 13vw;
  width: 590px;
  max-width: calc(100vw - 40px);
}
.all-panel {
  left: 2vw;
  right: 2vw;
}
.mega-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 2px 21px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.mega-intro strong {
  font: 500 18px 'Space Grotesk';
  letter-spacing: -0.3px;
}
.mega-intro > span {
  font-size: 11px;
  color: var(--muted);
}
.mega-columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 29px 24px;
}
.convert-columns {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 25px;
}
.convert-panel .mega-intro {
  display: block;
}
.convert-panel .mega-intro > span {
  display: block;
  margin-top: 7px;
}
.mega-group {
  min-width: 0;
}
.mega-group h2 {
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  font-weight: 600;
  margin: 0 0 13px;
  padding-left: 8px;
}
.mega-link {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 8px;
  border-radius: 7px;
  font-size: 11px;
  line-height: 1.5;
  min-height: 38px;
}
.mega-link:hover,
.mega-link:focus-visible {
  background: var(--soft);
  color: var(--accent-ink);
}
.mega-icon {
  width: 24px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  flex-shrink: 0;
  font: 600 9px 'Space Grotesk';
  color: var(--accent);
  background: var(--accent-soft);
}
.mega-pdfTools {
  color: #d58439;
  background: #e8a95714;
}
.mega-documents,
.mega-pdf {
  color: #5585c9;
  background: #5585c915;
}
.mega-sheets {
  color: #309c70;
  background: #309c7015;
}
.mega-image,
.mega-imagefiles {
  color: #b965a6;
  background: #b965a615;
}
.mega-gif,
.mega-video,
.mega-audio,
.mega-frame {
  color: #8d6fc1;
  background: #8d6fc115;
}
.mega-more {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 11px 8px 0;
}
.mega-more:hover {
  color: var(--accent);
}
.mega-bottom {
  border-top: 1px solid var(--line);
  padding: 18px 2px 0;
  margin-top: 23px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 10px;
}
.mega-bottom button {
  color: var(--accent-ink);
  font-size: 11px;
  border: 0;
  background: transparent;
  font-weight: 500;
}
[data-theme='dark'] .mega-panel {
  box-shadow: 0 18px 50px #0005;
}
[data-theme='dark'] .mega-icon {
  filter: brightness(1.35);
}
@media (max-width: 1100px) {
  .top-nav {
    gap: 15px;
  }
  .convert-panel {
    right: 5vw;
  }
  .mega-columns {
    gap: 24px 15px;
  }
  .mega-group h2 {
    font-size: 9px;
  }
}
@media (max-width: 750px) {
  header.dropdown-open {
    z-index: 10;
  }
  .top-nav {
    gap: 18px;
  }
  .top-nav button {
    font-size: 10px;
  }
  .mega-panel {
    top: calc(100% + 6px);
    left: 12px;
    right: 12px;
    width: auto;
    max-width: none;
    padding: 19px;
    max-height: calc(100dvh - 150px);
    border-radius: 11px;
  }
  .mega-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 25px 12px;
  }
  .mega-intro {
    display: block;
    padding-bottom: 16px;
    margin-bottom: 18px;
  }
  .mega-intro strong {
    font-size: 18px;
  }
  .mega-intro > span {
    display: block;
    font-size: 10px;
    line-height: 1.7;
    margin-top: 6px;
  }
  .mega-link {
    font-size: 10px;
    padding: 8px 4px;
    gap: 7px;
  }
  .mega-group h2 {
    font-size: 9px;
    line-height: 1.7;
    padding-left: 4px;
  }
  .mega-icon {
    width: 22px;
    height: 24px;
    font-size: 8px;
  }
  .mega-more {
    font-size: 9px;
    padding-left: 4px;
    line-height: 1.7;
  }
  .mega-bottom {
    align-items: flex-start;
    gap: 14px;
  }
  .mega-bottom > span {
    max-width: 45%;
    line-height: 1.7;
  }
  .mega-bottom button {
    font-size: 10px;
  }
  .convert-columns {
    gap: 15px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .nav-dropdown svg {
    transition: none;
  }
}

@media (max-width: 750px) {
  .top-nav {
    flex-wrap: wrap;
    overflow: visible;
    row-gap: 4px;
    column-gap: 18px;
  }
  .mega-panel {
    max-height: calc(100dvh - 190px);
  }
}

/* Separate originals, processing status and finished downloads. */
.job-status {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 21px;
  margin: 24px 0;
  scroll-margin-top: 110px;
}
.job-symbol {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--panel);
  color: var(--accent);
  font-size: 23px;
  font-weight: 600;
}
.job-copy {
  flex: 1;
  min-width: 0;
}
.job-copy h3 {
  font: 600 20px 'Space Grotesk';
  letter-spacing: -0.5px;
  margin: 0 0 9px;
  color: var(--text);
}
.job-copy p {
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
  margin: 0;
}
.job-copy small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 9px;
}
.job-track {
  height: 7px;
  background: var(--panel);
  border-radius: 6px;
  overflow: hidden;
  margin-top: 17px;
}
.job-track span {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 6px;
  transition: width 0.2s;
}
.job-track.indeterminate span {
  animation: processing-track 1.3s ease-in-out infinite;
}
.job-spinner {
  width: 22px;
  height: 22px;
  display: inline-block;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: processing-spin 0.8s linear infinite;
}
.job-success {
  background: #edf8f2;
  border-color: #b4ddc6;
}
.job-success .job-symbol {
  background: #d3eddf;
  color: #228157;
}
.job-success .job-copy h3 {
  color: #176642;
}
.job-partial,
.job-cancelled {
  border-color: #e9d9b1;
  background: #fff9ec;
}
.job-error {
  border-color: #ebc3bd;
  background: var(--accent-soft);
}
[data-theme='dark'] .job-success {
  background: #203a30;
  border-color: #365e4c;
}
[data-theme='dark'] .job-success .job-symbol {
  background: #305745;
  color: #a2e0bd;
}
[data-theme='dark'] .job-success .job-copy h3 {
  color: #a2e0bd;
}
[data-theme='dark'] .job-partial,
[data-theme='dark'] .job-cancelled {
  background: #3c3524;
  border-color: #655638;
}
.status-cancel,
.status-results {
  align-self: center;
  flex-shrink: 0;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  padding: 10px 13px;
  border-radius: 6px;
  font-size: 11px;
}
.status-results {
  border-color: #a2ceb7;
  color: #236e4a;
}
[data-theme='dark'] .status-results {
  color: #a2e0bd;
  border-color: #365e4c;
}
.source-processing {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--accent-ink);
  font-size: 10px;
  margin-top: 7px;
}
.source-processing .job-spinner {
  width: 12px;
  height: 12px;
  border-width: 2px;
}
.originals-note {
  font-size: 10px;
  color: var(--muted);
}
.results-section {
  border-top: 2px solid var(--line);
  margin-top: 30px;
  padding-top: 26px;
  scroll-margin-top: 115px;
}
.results-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}
.results-kicker {
  display: block;
  font-size: 9px;
  letter-spacing: 1.5px;
  color: var(--green);
  margin-bottom: 8px;
  font-weight: 600;
}
.results-heading h2 {
  font: 600 24px 'Space Grotesk';
  letter-spacing: -0.5px;
}
.results-heading h2 > span {
  font: 500 11px 'DM Sans';
  background: var(--soft);
  color: var(--muted);
  border-radius: 5px;
  padding: 4px 7px;
  vertical-align: middle;
  margin-left: 6px;
}
.results-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}
.zip-button {
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--text);
  font-size: 11px;
  padding: 10px 12px;
  border-radius: 6px;
}
.result-card {
  border: 1px solid #b9dac9;
  background: var(--panel);
  border-radius: 11px;
  padding: 22px;
  margin-bottom: 15px;
  box-shadow: var(--shadow);
}
.result-top {
  display: flex;
  gap: 13px;
  align-items: center;
}
.result-check {
  display: grid;
  place-items: center;
  background: #e0f2e8;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  color: #248157;
  font-size: 23px;
  font-weight: 600;
}
.result-main {
  flex: 1;
  min-width: 0;
}
.result-ready {
  font-size: 9px;
  letter-spacing: 1px;
  font-weight: 600;
  color: var(--green);
}
.result-main h3 {
  margin: 7px 0 6px;
  font: 600 18px 'Space Grotesk';
  word-break: break-word;
  letter-spacing: -0.4px;
}
.result-main p {
  font-size: 11px;
  color: var(--muted);
  margin: 0;
}
.result-remove {
  align-self: flex-start;
  border: 0;
  background: transparent;
  font-size: 21px;
  color: var(--muted);
  padding: 0 2px;
}
.result-sources {
  font-size: 11px;
  line-height: 1.8;
  color: var(--muted);
  margin: 15px 0;
  overflow-wrap: anywhere;
}
.result-buttons {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.result-download {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  background: var(--accent);
  color: #fff;
  border-radius: 7px;
  padding: 14px 21px;
  font-size: 13px;
  font-weight: 600;
}
.result-download:hover {
  filter: brightness(0.95);
}
.result-buttons > button {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  padding: 10px 13px;
  font-size: 11px;
}
.result-buttons > span {
  font-size: 10px;
  color: var(--green);
  margin-left: auto;
}
.result-card .file-preview {
  margin-top: 18px;
}
[data-theme='dark'] .result-card {
  border-color: #365e4c;
}
[data-theme='dark'] .result-check {
  background: #305745;
  color: #a2e0bd;
}
@keyframes processing-spin {
  to {
    transform: rotate(360deg);
  }
}
@keyframes processing-track {
  0% {
    transform: translateX(-110%);
  }
  100% {
    transform: translateX(360%);
  }
}
@media (max-width: 750px) {
  .job-status {
    padding: 17px;
    gap: 11px;
    flex-wrap: wrap;
    scroll-margin-top: 180px;
  }
  .job-symbol {
    width: 33px;
    height: 33px;
    font-size: 20px;
  }
  .job-copy h3 {
    font-size: 19px;
  }
  .job-copy p {
    font-size: 11px;
  }
  .status-cancel,
  .status-results {
    margin-left: 44px;
  }
  .results-section {
    scroll-margin-top: 180px;
  }
  .results-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .results-tools {
    justify-content: space-between;
    width: 100%;
  }
  .result-card {
    padding: 17px;
  }
  .result-main h3 {
    font-size: 17px;
  }
  .result-buttons > span {
    margin-left: 0;
    display: block;
    width: 100%;
  }
  .result-download {
    flex: 1;
    justify-content: center;
  }
  .originals-note {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .job-spinner,
  .job-track.indeterminate span {
    animation: none;
  }
  .job-track.indeterminate span {
    width: 100% !important;
    opacity: 0.5;
  }
}
/* PDF editor: a separate, local workspace for additions to the original pages. */
.pdf-editor {
  box-sizing: border-box;
  width: min(1440px, 96vw);
  max-width: none;
  height: 94dvh;
  max-height: 94dvh;
  margin: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 28px 100px #151c3540;
  overflow: hidden;
}
.pdf-editor[open] {
  display: flex;
  flex-direction: column;
}
.pdf-editor::backdrop {
  background: #151c3570;
  backdrop-filter: blur(5px);
}
.editor-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 26px 12px;
}
.editor-eyebrow {
  font-size: 9px;
  letter-spacing: 1.7px;
  color: var(--accent);
  font-weight: 700;
}
.editor-head h2 {
  font: 600 28px 'Space Grotesk';
  margin: 5px 0;
}
.editor-head p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.editor-head > button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: var(--text);
  font-size: 26px;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}
.editor-note {
  margin: 0;
  padding: 0 26px 15px;
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted);
}
.editor-toolbar {
  display: flex;
  gap: 7px;
  align-items: center;
  flex-wrap: wrap;
  padding: 12px 20px;
  border-block: 1px solid var(--line);
  background: var(--soft);
}
.pdf-editor button {
  cursor: pointer;
}
.pdf-editor button:disabled {
  opacity: 0.4;
  cursor: default;
}
.editor-toolbar button,
.editor-page-nav button {
  padding: 9px 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 7px;
  font: 500 12px 'DM Sans';
}
.editor-toolbar [aria-pressed='true'] {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.editor-toolbar-gap {
  flex: 1;
}
.editor-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 0;
  flex: 1;
}
.editor-properties {
  padding: 18px;
  overflow: auto;
  border-right: 1px solid var(--line);
  background: var(--panel);
}
.editor-properties h3 {
  font-size: 12px;
  margin: 0 0 16px;
}
.editor-properties label {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin: 12px 0 6px;
}
.editor-properties input,
.editor-properties textarea {
  box-sizing: border-box;
  width: 100%;
  font: 12px 'DM Sans';
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--text);
  border-radius: 6px;
  padding: 8px;
}
.editor-properties input[type='color'] {
  height: 36px;
  padding: 4px;
  cursor: pointer;
}
.editor-properties textarea {
  resize: vertical;
  min-height: 65px;
}
.editor-hint {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.8;
  margin: 18px 0;
}
.editor-document {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--soft);
}
.editor-page-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
}
.editor-page-nav select {
  padding: 7px;
  max-width: 90px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
}
.editor-scroll {
  padding: 28px;
  overflow: auto;
  flex: 1;
  min-height: 0;
}
.editor-stage {
  position: relative;
  max-width: 100%;
  margin: auto;
  background: white;
  box-shadow: 0 5px 20px #151c3520;
}
.editor-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
}
#editor-overlay {
  position: absolute;
  inset: 0;
  touch-action: none;
}
#editor-overlay:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}
.editor-foot {
  display: flex;
  align-items: center;
  gap: 15px;
  justify-content: space-between;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  background: var(--panel);
}
.editor-foot > span {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}
.editor-foot .primary {
  width: auto;
  padding: 13px 20px;
  font-size: 13px;
  flex-shrink: 0;
}
#editor-layers button {
  display: flex;
  justify-content: space-between;
  gap: 5px;
  width: 100%;
  padding: 9px 8px;
  margin-bottom: 5px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  font-size: 10px;
  text-align: left;
  overflow-wrap: anywhere;
}
#editor-layers button[aria-pressed='true'] {
  border-color: var(--accent);
}
#editor-layers small {
  color: var(--muted);
}
[data-edit-pdf] {
  white-space: nowrap;
  width: auto !important;
  padding: 7px 10px;
  color: var(--accent) !important;
  font-size: 11px !important;
}
@media (max-width: 750px) {
  .pdf-editor {
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
  }
  .editor-head {
    padding: 15px 16px 8px;
  }
  .editor-head h2 {
    font-size: 23px;
  }
  .editor-note {
    padding: 0 16px 10px;
    font-size: 10px;
  }
  .editor-toolbar {
    padding: 8px;
    gap: 5px;
  }
  .editor-toolbar button {
    font-size: 10px;
    padding: 8px;
  }
  .editor-toolbar-gap {
    display: none;
  }
  .editor-layout {
    grid-template-columns: 1fr;
    overflow: auto;
    display: flex;
    flex-direction: column;
  }
  .editor-document {
    order: 0;
    min-height: 340px;
    flex-shrink: 0;
  }
  .editor-properties {
    order: 1;
    border-right: 0;
    border-top: 1px solid var(--line);
    overflow: visible;
  }
  .editor-scroll {
    padding: 16px;
    overflow: visible;
  }
  .editor-properties h3 {
    margin-bottom: 8px;
  }
  .editor-properties label {
    margin-top: 8px;
  }
  .editor-hint {
    margin: 10px 0;
  }
  .editor-foot {
    padding: 12px;
    flex-wrap: wrap;
    gap: 7px;
  }
  .editor-foot > span {
    font-size: 10px;
  }
  .editor-foot .primary {
    width: 100%;
  }
  .editor-page-nav {
    gap: 7px;
  }
  .editor-page-nav button {
    font-size: 10px;
    padding: 8px;
  }
  .file-actions {
    flex-wrap: wrap;
  }
}

.pdf-editor[data-working='true'] #editor-status::before {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: processing-spin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 9px;
}
@media (prefers-reduced-motion: reduce) {
  .pdf-editor[data-working='true'] #editor-status::before {
    animation: none;
  }
}

/* Clear, labelled file actions with room to read and tap. */
.file-list-guide {
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0 0 20px;
}
.queue-heading {
  font-size: 12px;
  gap: 12px;
}
.file-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 16px;
  padding: 24px 0;
  align-items: start;
}
.file-icon {
  width: 56px;
  height: 64px;
  font-size: 12px;
  border-radius: 10px;
}
.file-info {
  min-width: 0;
}
.file-name {
  font-size: 17px;
  line-height: 1.5;
  font-weight: 600;
  white-space: normal;
  overflow-wrap: anywhere;
  text-overflow: clip;
}
.file-detail {
  font-size: 13px;
  line-height: 1.8;
  margin-top: 5px;
}
.file-status {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  margin-top: 9px;
  line-height: 1.6;
  color: var(--text);
  padding: 5px 9px;
  border-radius: 5px;
  background: var(--soft);
}
.file-status.error {
  color: var(--accent-ink);
}
.file-actions {
  grid-column: 2;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-start;
  max-width: none;
  margin-top: 0;
}
.file-actions .file-action,
.result-buttons .file-action {
  width: auto !important;
  height: auto;
  min-height: 44px;
  padding: 11px 16px;
  font-size: 14px !important;
  font-weight: 600;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--panel);
  line-height: 1.4;
}
.file-actions .action-edit {
  color: var(--accent-ink) !important;
  background: var(--accent-soft);
  border-color: var(--accent);
}
.file-action.action-remove {
  color: #af3936 !important;
  border-color: #e6c3bf;
  background: var(--panel);
}
.file-action:hover {
  background: var(--soft);
}
.file-action.action-remove:hover {
  background: var(--accent-soft);
}
.file-action:focus-visible,
.viewer-close:focus-visible,
.viewer-done:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
.file-actions button:disabled {
  opacity: 0.4;
  cursor: default;
}
.file-actions .action-move {
  font-size: 13px !important;
  font-weight: 500;
}
.files-panel .panel-top h2 {
  font-size: 22px;
}
.files-panel .text-button,
.results-tools .text-button {
  font-size: 13px;
  padding: 10px;
  min-height: 44px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.originals-note {
  font-size: 12px;
  line-height: 1.6;
  max-width: 300px;
  text-align: right;
}
.queue-footer {
  gap: 16px;
  align-items: flex-start;
  font-size: 12px;
}
.remove-undo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  background: var(--soft);
  border: 1px solid var(--line);
  padding: 15px;
  border-radius: 9px;
  margin: 12px 0;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.remove-undo button {
  flex-shrink: 0;
  min-height: 44px;
  background: var(--panel);
  border: 1px solid var(--accent);
  color: var(--accent-ink);
  padding: 9px 15px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
}
.result-main h3 {
  font-size: 20px;
}
.result-main p,
.result-sources {
  font-size: 13px;
}
.result-ready {
  font-size: 11px;
}
.result-download {
  min-height: 44px;
  font-size: 15px;
  padding: 13px 20px;
}
.size-comparison {
  display: flex;
  gap: 10px 18px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
  margin: 16px 0;
}
.size-comparison strong {
  font-weight: 600;
  color: var(--text);
}
.result-preserved {
  font-size: 12px;
  color: var(--green);
  margin: 15px 0 0;
}
.result-buttons {
  gap: 10px;
}
.result-buttons > span {
  margin: 0;
}
[data-theme='dark'] .file-action.action-remove {
  color: #ffb7ae !important;
  border-color: #77504d;
}
.files-panel .panel-top {
  gap: 15px;
  align-items: center;
}
.files-panel .panel-top > div {
  flex-wrap: wrap;
}
.files-panel .panel-top > .text-button {
  flex-shrink: 0;
}
/* File viewer shares the app theme; rendered previews stay local. */
.file-viewer {
  box-sizing: border-box;
  width: min(1400px, 96vw);
  max-width: none;
  max-height: 94dvh;
  height: 94dvh;
  margin: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  color: var(--text);
  overflow: hidden;
  box-shadow: 0 25px 90px #151c3540;
}
.file-viewer[open] {
  display: flex;
  flex-direction: column;
}
.file-viewer::backdrop {
  background: #151c3570;
  backdrop-filter: blur(4px);
}
.viewer-head {
  display: flex;
  gap: 20px;
  justify-content: space-between;
  padding: 24px 26px 17px;
}
.viewer-kicker {
  font-size: 10px;
  letter-spacing: 1.4px;
  color: var(--accent-ink);
  font-weight: 600;
}
.viewer-head h2 {
  font: 600 28px 'Space Grotesk';
  margin: 8px 0;
}
.viewer-head p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  overflow-wrap: anywhere;
}
.viewer-close,
.viewer-done {
  align-self: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--soft);
  font-size: 14px;
  padding: 12px 17px;
  min-height: 44px;
  flex-shrink: 0;
}
.viewer-summary {
  display: flex;
  align-items: center;
  gap: 12px 24px;
  padding: 15px 26px;
  background: var(--soft);
  border-block: 1px solid var(--line);
  font-size: 14px;
  flex-wrap: wrap;
}
.viewer-summary strong {
  margin-left: 8px;
  color: var(--text);
}
.viewer-summary b {
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--line);
  padding: 6px 10px;
  border-radius: 5px;
}
.viewer-controls {
  padding: 12px 26px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.viewer-controls label {
  font-size: 13px;
}
.viewer-controls select {
  max-width: 100%;
  min-height: 44px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 7px;
  padding: 10px;
  font-size: 13px;
}
.viewer-controls p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
  line-height: 1.6;
}
.viewer-content {
  min-height: 0;
  flex: 1;
  overflow: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding: 0 26px 24px;
}
.viewer-content.viewer-single {
  grid-template-columns: 1fr;
}
.viewer-pane {
  min-width: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--soft);
  padding: 16px;
}
.viewer-pane h3 {
  font: 600 18px 'Space Grotesk';
  margin: 0 0 7px;
}
.viewer-filename {
  font-size: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
  line-height: 1.6;
  margin: 0 0 16px;
}
.viewer-media {
  min-width: 0;
}
.viewer-media > img {
  display: block;
  max-width: 100%;
  max-height: 55dvh;
  object-fit: contain;
  margin: auto;
  background: white;
}
.viewer-media video {
  width: 100%;
  max-height: 55dvh;
  background: #12151b;
  border-radius: 7px;
}
.viewer-media audio {
  width: 100%;
  margin: 35px 0;
}
.viewer-fallback {
  font-size: 14px;
  line-height: 1.8;
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 7px;
}
.viewer-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  padding: 24px;
}
.viewer-page-nav {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.viewer-page-nav button {
  min-height: 44px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 7px;
  color: var(--text);
  font-size: 13px;
  padding: 9px 12px;
}
.viewer-page-nav button:disabled {
  opacity: 0.4;
}
.viewer-pdf-scroll {
  max-height: 57dvh;
  overflow: auto;
  background: #dce0e8;
  padding: 12px;
  border-radius: 5px;
}
.viewer-pdf-scroll canvas {
  display: block;
  width: 100%;
  height: auto;
  background: white;
  max-width: 950px;
  margin: auto;
}
.viewer-media [data-pdf-status] {
  font-size: 12px;
  color: var(--muted);
}
.viewer-foot {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  padding: 17px 26px;
  border-top: 1px solid var(--line);
}
.viewer-foot > span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.viewer-foot .result-download {
  white-space: nowrap;
}
.image-compare {
  grid-column: 1/-1;
  max-width: 1000px;
  width: 100%;
  margin: auto;
}
.compare-labels {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin: 0 0 12px;
}
.compare-stage {
  --comparison: 50%;
  position: relative;
  height: min(48dvh, 520px);
  min-height: 180px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: repeating-conic-gradient(#e6e7eb 0% 25%, #fff 0% 50%) 0/20px 20px;
}
.compare-stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.compare-result {
  clip-path: inset(0 0 0 var(--comparison));
}
.compare-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--comparison);
  width: 2px;
  background: var(--accent);
  box-shadow: 0 0 0 1px white;
  pointer-events: none;
}
.image-compare > label {
  display: block;
  font-size: 14px;
  margin: 18px 0 6px;
}
.image-compare input {
  width: 100%;
  height: 40px;
  accent-color: var(--accent);
}
.image-compare > p {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}
@media (max-width: 750px) {
  .file-row {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
  }
  .file-icon {
    width: 44px;
    height: 52px;
  }
  .file-name {
    font-size: 16px;
  }
  .file-actions {
    grid-column: 1/-1;
    gap: 8px;
  }
  .file-actions .file-action {
    flex: 1 1 auto;
    padding: 11px 12px;
    font-size: 14px !important;
  }
  .file-detail {
    font-size: 12px;
  }
  .files-panel .panel-top {
    flex-wrap: wrap;
  }
  .files-panel .panel-top h2 {
    font-size: 20px;
  }
  .file-list-guide {
    font-size: 13px;
  }
  .queue-heading {
    font-size: 11px;
    flex-wrap: wrap;
  }
  .originals-note {
    display: block;
    text-align: left;
    max-width: none;
  }
  .queue-footer {
    flex-direction: column;
  }
  .remove-undo {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .result-buttons .file-action {
    flex: 1;
  }
  .file-viewer {
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
  }
  .viewer-head {
    padding: 18px 16px 12px;
    gap: 10px;
  }
  .viewer-head h2 {
    font-size: 23px;
  }
  .viewer-head p {
    font-size: 11px;
  }
  .viewer-kicker {
    font-size: 8px;
  }
  .viewer-close {
    font-size: 12px;
    padding: 10px;
    max-width: 105px;
    flex-shrink: 0;
  }
  .viewer-summary {
    padding: 12px 16px;
    font-size: 12px;
    gap: 8px 12px;
  }
  .viewer-summary strong {
    margin-left: 4px;
  }
  .viewer-controls {
    padding: 12px 16px;
  }
  .viewer-content {
    grid-template-columns: 1fr;
    padding: 0 16px 16px;
    gap: 16px;
  }
  .viewer-pane {
    padding: 13px;
  }
  .viewer-pane h3 {
    font-size: 17px;
  }
  .viewer-foot {
    padding: 12px 16px;
    gap: 10px;
    flex-wrap: wrap;
  }
  .viewer-foot .result-download {
    width: 100%;
    justify-content: center;
  }
  .viewer-foot > span {
    font-size: 11px;
  }
  .viewer-pdf-scroll {
    max-height: 50dvh;
  }
  .viewer-page-nav {
    gap: 7px;
  }
  .viewer-page-nav button {
    font-size: 11px;
    padding: 9px;
  }
  .viewer-done {
    width: 100%;
  }
}

.dropzone h3 {
  font-size: 22px;
  line-height: 1.4;
}
.dropzone p {
  font-size: 14px;
  line-height: 1.7;
}
.upload-limit {
  font-size: 12px;
}
.settings-panel .panel-top h2 {
  font-size: 19px;
}
.settings-panel label {
  font-size: 13px;
}
.settings-panel .primary {
  font-size: 16px;
  min-height: 52px;
}
@media (max-width: 750px) {
  .dropzone h3 {
    font-size: 20px;
  }
  .dropzone p {
    font-size: 13px;
  }
}

.page-organizer {
  box-sizing: border-box;
  width: min(1400px, 96vw);
  height: 94dvh;
  max-height: 94dvh;
  max-width: none;
  margin: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  color: var(--text);
  overflow: hidden;
}
.page-organizer[open] {
  display: flex;
  flex-direction: column;
}
.page-organizer::backdrop {
  background: #151c3570;
  backdrop-filter: blur(4px);
}
.organizer-guide {
  font-size: 14px;
  line-height: 1.8;
  color: var(--muted);
  padding: 0 26px;
  margin: 0 0 15px;
}
.organizer-toolbar {
  padding: 13px 26px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  border-block: 1px solid var(--line);
  background: var(--soft);
}
.organizer-toolbar button,
.thumb-actions button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel);
  color: var(--text);
  padding: 10px 13px;
  font-size: 13px;
}
.organizer-toolbar button[data-remove] {
  color: var(--accent-ink);
}
.organizer-toolbar > span {
  font-size: 12px;
  color: var(--muted);
  margin-left: auto;
}
.organizer-grid {
  padding: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
  align-content: start;
  gap: 18px;
  overflow: auto;
  flex: 1;
  min-height: 0;
  background: var(--soft);
}
.page-thumb {
  border: 2px solid var(--line);
  border-radius: 11px;
  padding: 14px;
  background: var(--panel);
  min-width: 0;
  cursor: grab;
}
.page-thumb.selected {
  border-color: var(--accent);
}
.page-thumb.dragging {
  opacity: 0.4;
}
.page-thumb label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  min-height: 30px;
}
.page-thumb input {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
}
.thumb-sheet {
  height: 230px;
  display: grid;
  place-items: center;
  margin: 12px 0;
  overflow: hidden;
  background: #dfe3ea;
  border-radius: 5px;
}
.thumb-sheet img {
  max-width: 95%;
  max-height: 95%;
  object-fit: contain;
  box-shadow: 0 3px 12px #151c3520;
}
.page-thumb p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}
.thumb-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.thumb-actions button {
  font-size: 11px;
  flex: 1;
  padding: 8px 5px;
}
.page-organizer button:disabled {
  opacity: 0.4;
  cursor: default;
}
.page-organizer .viewer-foot .primary {
  width: auto;
  font-size: 15px;
  padding: 13px 20px;
  min-height: 46px;
}
.page-organizer button:focus-visible,
.page-thumb:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
#preset-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 10px 0;
}
#preset-buttons button {
  min-height: 46px;
  padding: 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font-size: 13px;
  border-radius: 7px;
}
#preset-buttons button[aria-pressed='true'] {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-ink);
}
#preset-note {
  font-size: 12px;
  line-height: 1.8;
}
.error-help,
.file-notice {
  border: 1px solid #e7bfb7;
  border-radius: 9px;
  background: var(--accent-soft);
  padding: 16px;
  margin-top: 15px;
}
.error-help h4,
.file-notice h3 {
  font-size: 16px;
  margin: 0 0 9px;
}
.error-help p,
.file-notice p {
  font-size: 13px;
  line-height: 1.8;
  margin: 0 0 12px;
}
.error-help > div,
.file-notice > div {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}
.error-help button,
.file-notice button {
  min-height: 44px;
  padding: 10px 13px;
  font-size: 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
}
.file-notice {
  margin: 15px 0;
}
.viewer-text {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-height: 350px;
  height: 45dvh;
  resize: vertical;
  padding: 18px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  font-size: 15px;
  line-height: 1.8;
}
.viewer-media > label {
  font-size: 12px;
  color: var(--muted);
}
@media (max-width: 750px) {
  .page-organizer {
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
  }
  .organizer-guide {
    padding: 0 16px;
    font-size: 12px;
  }
  .organizer-toolbar {
    padding: 12px;
    gap: 7px;
  }
  .organizer-toolbar button {
    font-size: 12px;
    flex: 1;
  }
  .organizer-toolbar > span {
    width: 100%;
    margin-left: 0;
  }
  .organizer-grid {
    padding: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .page-thumb {
    padding: 10px;
  }
  .thumb-sheet {
    height: 150px;
  }
  .page-thumb label {
    font-size: 13px;
  }
  .thumb-actions {
    flex-direction: column;
  }
  .page-organizer .viewer-foot .primary {
    width: 100%;
    justify-content: center;
  }
  .viewer-text {
    font-size: 14px;
  }
  .page-organizer .viewer-head h2 {
    font-size: 22px;
  }
}
@media (max-width: 350px) {
  .organizer-grid {
    grid-template-columns: 1fr;
  }
}

.thumb-sheet {
  touch-action: none;
}
.page-thumb.drop-target {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.pdf-text-details {
  margin-top: 12px;
}
.pdf-text-details summary {
  font-size: 13px;
  cursor: pointer;
  min-height: 44px;
  line-height: 1.8;
  padding: 10px 0;
}
.pdf-text-details .viewer-text {
  height: 220px;
  min-height: 160px;
}

@media (max-width: 750px) {
  .organizer-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
  .organizer-toolbar button {
    width: auto;
    min-height: 44px;
  }
  .organizer-toolbar > span {
    grid-column: 1/-1;
  }
}

/* Plans and account */
.upgrade-button {
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 22px;
  padding: 10px 16px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.upgrade-button:hover {
  filter: brightness(1.05);
}
.plan-reason {
  background: var(--accent-soft);
  color: var(--accent-ink);
  border-radius: 8px;
  padding: 10px 14px;
  margin: 14px 0;
  font-weight: 600;
}
.plan-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}
.plan-table th,
.plan-table td {
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
}
.plan-table thead th {
  color: var(--muted);
  font-weight: 600;
}
.plan-table td:last-child {
  color: var(--accent-ink);
  font-weight: 600;
}
.plan-offers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}
.plan-offer {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  text-align: left;
  background: var(--soft);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
}
.plan-offer:hover,
.plan-offer:focus-visible {
  border-color: var(--accent);
}
.plan-offer.featured {
  border: 2px solid var(--accent);
  background: var(--accent-soft);
}
.plan-price {
  font:
    600 24px 'Space Grotesk',
    sans-serif;
}
.plan-offer small,
.plan-fine {
  color: var(--muted);
}
.plan-fine {
  margin-top: 14px;
  font-size: 11px;
}
.signin-form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.signin-form input {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--field);
  color: var(--text);
  font-size: 14px;
}
.signin-status {
  min-height: 1.5em;
  color: var(--muted);
}
.account-plan {
  display: grid;
  background: var(--soft);
  border-radius: 10px;
  padding: 12px 16px;
  margin: 14px 0;
}
.account-plan strong {
  font-size: 16px;
}
.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.account-actions .primary {
  width: auto;
  gap: 14px;
}
.account-actions a.file-action {
  text-decoration: none;
}
@media (max-width: 760px) {
  .upgrade-button {
    padding: 9px 12px;
    font-size: 10px;
  }
}
@media (max-width: 1000px) {
  header {
    height: auto;
    min-height: 78px;
    flex-wrap: wrap;
    justify-content: space-between;
    row-gap: 12px;
    padding-top: 14px;
    padding-bottom: 14px;
  }
  header .top-nav {
    order: 3;
    width: 100%;
    overflow: auto;
    margin: 0;
  }
}
