:root{color-scheme:light;--ink:#19233c;--muted:#505d75;--line:#dce3f0;--accent:#4135c2;--bg:#f6f8fe;font-family:Inter,system-ui,sans-serif;color:var(--ink);background:var(--bg)}
*{box-sizing:border-box}body{margin:0}a{color:inherit}.shell{width:min(1100px,calc(100% - 36px));margin:auto}
header{background:#fff;border-bottom:1px solid var(--line)}.bar{display:flex;align-items:center;justify-content:space-between;gap:20px;min-height:74px}
.brand{text-decoration:none;font-size:22px;font-weight:850;white-space:nowrap}.brand span,.icon{display:inline-grid;place-items:center;width:40px;height:40px;border-radius:12px;background:#ebe8ff;color:var(--accent)}
nav{display:flex;flex-wrap:wrap;gap:10px 22px}nav a,.back{font-size:.88rem;font-weight:650;text-decoration:none;color:var(--muted)}nav a:hover,.back:hover{color:var(--accent);text-decoration:underline}
.hero{margin:30px 0 22px;padding:clamp(26px,6vw,74px);border:1px solid #dcdef6;border-radius:28px;background:radial-gradient(ellipse at top right,#dbdcff,transparent 67%),linear-gradient(125deg,#eeedff,#e9f6ff)}
h1{font-size:clamp(2.3rem,6.4vw,4.6rem);line-height:1.03;letter-spacing:-.055em;margin:0}h1 em{color:var(--accent);font-style:normal}.hero p,.toolhead p{max-width:520px;font-size:1.07rem;line-height:1.6;color:var(--muted);margin:18px 0 24px}
.button{display:inline-block;background:var(--accent);color:white;border:0;border-radius:12px;padding:13px 18px;text-decoration:none;font:inherit;font-weight:720;cursor:pointer}.button:hover{background:#31289b}.button:disabled{opacity:.6;cursor:wait}.secondary{background:#1a624e}[hidden]{display:none!important}
.grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}.card,.panel{background:white;border:1px solid var(--line);border-radius:20px;padding:20px}.card{display:flex;flex-direction:column;align-items:flex-start;text-decoration:none}.card:hover{border-color:#8277ed}.card h2{font-size:1.13rem;margin:14px 0 3px}.card p,.notes p{color:var(--muted);line-height:1.55}.card p{margin:5px 0 18px}.cta{color:var(--accent);font-weight:700;margin-top:auto}
.toolhead,.panel,.notes{max-width:740px;margin:24px auto}.toolhead h1{font-size:clamp(2rem,6vw,3.6rem);margin-top:16px}.upload{display:grid;gap:6px;place-items:center;padding:20px;text-align:center;border:2px dashed #a99fee;border-radius:13px;background:#f6f4ff;cursor:pointer}.upload span{color:var(--muted);font-size:.9rem}.file{margin-top:12px;max-width:100%}.options{margin:16px 0}.fields{display:flex;gap:12px;flex-wrap:wrap}.fields label{flex:1;min-width:130px}.options label,.field-label{font-weight:650}.field-label{margin-bottom:8px}
.options input,.options select{display:block;width:100%;max-width:320px;border:1px solid #a7b2c8;border-radius:8px;padding:9px;background:#fff;color:var(--ink);font:inherit;margin-top:5px}.notice{color:#574019;background:#fff4d9;padding:12px;border-radius:10px;margin-top:0}.notes h2{font-size:1.15rem}.notes p{margin-top:4px}#status:empty,#order:empty{display:none}#order li{margin:.4rem 0;overflow-wrap:anywhere}#order button{margin-left:.35rem;padding:.25rem .6rem;cursor:pointer}#status{overflow-wrap:anywhere}footer{border-top:1px solid var(--line);margin-top:36px!important;padding:20px 0;display:flex;gap:15px;color:var(--muted);font-size:.9rem}
:focus-visible{outline:3px solid #685ef3;outline-offset:3px}@media(max-width:800px){.grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:540px){.bar{align-items:flex-start;flex-direction:column;padding:12px 0;gap:8px}nav{gap:8px 14px}.grid{grid-template-columns:1fr}.hero{margin-top:20px}}
.formats{display:flex;align-items:center;gap:9px;color:#566380;font-weight:700}.format{position:relative;display:grid;place-items:center;width:54px;height:54px;border-radius:13px;background:var(--badge-bg);color:var(--badge-color)}.format svg{width:24px;height:28px}.format b{position:absolute;top:27px;background:var(--badge-bg);padding:0 2px;font-size:10px;line-height:12px}.format-pdf{--badge-bg:#fff0ee;--badge-color:#a52e34}.format-jpg{--badge-bg:#edf2ff;--badge-color:#364aa1}.format-png{--badge-bg:#e8f7ee;--badge-color:#216545}.format-webp{--badge-bg:#f3ebff;--badge-color:#674098}.toolhead .formats{margin-top:16px}.toolhead h1{margin-top:12px}.card:focus-visible,.card:hover{box-shadow:0 8px 22px #30257c12}.upload:hover{background:#ede9ff}.card p{font-size:.94rem}

/* Compact directory on the home page. */
.home .bar {
  min-height: 56px;
  flex-direction: row;
  align-items: center;
  padding-block: 8px;
}
.home .brand { font-size: 1.13rem; }
.home .brand span { width: 32px; height: 32px; border-radius: 9px; }
.home-intro { margin: 24px 0 16px; }
.home-intro h1 { font-size: clamp(1.65rem, 4vw, 2.45rem); letter-spacing: -.035em; }
.home-intro p { margin: 7px 0 0; color: var(--muted); font-size: .9rem; line-height: 1.45; }
.home .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.home .card {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) 10px;
  align-items: center;
  gap: 10px;
  min-height: 68px;
  padding: 9px 11px;
  border-radius: 13px;
}
.home .card h2 { font-size: .98rem; line-height: 1.25; margin: 0; }
.home .card p { font-size: .82rem; line-height: 1.32; margin: 3px 0 0; }
.home .card-arrow { color: var(--accent); font-size: 1.35rem; }
.home .formats { justify-content: center; gap: 3px; font-size: .72rem; }
.home .format { width: 31px; height: 33px; border-radius: 7px; }
.home .format svg { width: 16px; height: 19px; }
.home .format b { top: 17px; font-size: 8px; line-height: 9px; }

@media (max-width: 900px) {
  .home .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .home .shell { width: calc(100% - 26px); }
  .home-intro { margin-top: 18px; }
  .home .grid { grid-template-columns: 1fr; gap: 8px; }
}

.format-docx{--badge-bg:#eaf2ff;--badge-color:#2054a0}
.format-heic{--badge-bg:#fff0dd;--badge-color:#874511}
.field-help{color:var(--muted);font-size:.88rem}
#page-list{list-style:none;padding:0;display:grid;gap:8px}
#page-list li{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;padding:8px 10px;background:#f6f7fb;border:1px solid var(--line);border-radius:8px}
#page-list li[data-removed]{background:#fff}
.page-actions{display:flex;flex-wrap:wrap;gap:5px}
.page-actions button{min-width:34px;min-height:34px;border:1px solid #a7b2c8;background:white;color:var(--ink);border-radius:6px;cursor:pointer}
.page-actions button:disabled{opacity:.4;cursor:default}
#crop-preview{position:relative;width:fit-content;max-width:100%;touch-action:none;cursor:crosshair;margin-top:12px}
#crop-image{display:block;max-width:100%;max-height:440px;width:auto;height:auto;user-select:none}
#crop-selection{position:absolute;border:2px solid white;outline:1px solid #4132ae;background:#685ef321;pointer-events:none}
.word-render{position:fixed;left:-12000px;top:0;pointer-events:none;background:white}

.upload-thumbnails {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  margin-top: 4px;
}
.upload-thumbnails img {
  display: block;
  width: 64px;
  height: 64px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.upload .file-selection {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.file-selection:empty { display: none; }

/* Keep the browser's file button visible without displaying its filename. */
.upload > input[type="file"] {
  width: min(100%, 14rem);
  margin: 4px 0;
  padding: 3px;
  color: transparent;
  font-size: 0;
  cursor: pointer;
}
.upload > input[type="file"]::file-selector-button {
  width: 100%;
  min-height: 48px;
  margin: 0;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font: 700 1rem system-ui, sans-serif;
  cursor: pointer;
}
.upload > input[type="file"]:focus-visible {
  outline: 3px solid #685ef3;
  outline-offset: 3px;
}

.site-footer { flex-wrap: wrap; align-items: baseline; }
.site-footer nav { gap: 12px 18px; }
.site-footer nav a { min-height: 24px; display: inline-flex; align-items: center; }
.policy-content { line-height: 1.65; overflow-wrap: anywhere; }
.policy-content h2 { font-size: 1.15rem; margin: 1.4em 0 .35em; }
.policy-content h2:first-child { margin-top: 0; }
.policy-content p { margin: 0 0 .85em; }

.brand { display: inline-flex; align-items: center; gap: 8px; }
.brand-logo { display: block; flex: none; }

.format-xlsx { --badge-bg:#e6f5ec; --badge-color:#22694a; }
.format-pptx { --badge-bg:#fff0e4; --badge-color:#954519; }
.home .tool-format { width:43px; font-size:.66rem; font-weight:800; }
#signature { display:block; width:min(100%,480px); border:1px solid var(--line); background:#fff; border-radius:8px; margin:.5rem 0; touch-action:none; }
#recognized { display:block; width:100%; font:inherit; padding:10px; margin-bottom:1rem; }
.options:empty { display:none; }
.options:empty + .button { margin-top:1rem; }

/* White Minimal */
:root {
  --ink: #17233a;
  --muted: #495770;
  --line: #dae0eb;
  --accent: #184bc3;
  --bg: #fff;
  --upload-bg: #eaf1ff;
  --hover: #133d9f;
}
.bar, .home .bar {
  min-height: 56px;
  flex-direction: row;
  align-items: center;
  padding-block: 8px;
}
.brand, .home .brand { font-size: 1.125rem; }
.brand-logo { width: 30px; height: 30px; }
.home-intro { margin: 28px 0 20px; text-align: center; }
.home .card:hover, .home .card:focus-visible {
  border-color: var(--accent);
  background: #f8faff;
  box-shadow: none;
}
.toolhead, .panel, .notes { max-width: 600px; }
.toolhead { text-align: center; position: relative; padding-top: 24px; }
.toolhead .back { display: block; width: fit-content; margin: 0 0 16px; }
.toolhead .formats { justify-content: center; margin-top: 0; }
.toolhead .format { width: 38px; height: 39px; border-radius: 8px; }
.toolhead .format svg { width: 20px; height: 23px; }
.toolhead .format b { top: 20px; font-size: 8px; }
.toolhead h1 { font-size: clamp(1.85rem, 5vw, 3rem); }
.toolhead p { margin: 9px auto 0; font-size: .95rem; }
.panel { border-radius: 14px; }
.panel:not(.policy-content) { border: 0; padding: 0; }
.upload {
  background: var(--upload-bg);
  border: 1px dashed #a6b8dc;
  min-height: 117px;
  cursor: default;
}
.upload:hover { background: #e5eeff; }
.upload > input[type="file"] { order: -1; }
.button { border-radius: 9px; }
.button:hover { background: var(--hover); }
form > button.button, #download { width: 100%; text-align: center; min-height: 46px; }
.options input, .options select { min-height: 44px; max-width: none; }
.options input[type="checkbox"], .options input[type="radio"] { min-height: 0; width: auto; }
.panel textarea { max-width: 100%; }
:focus-visible, .upload > input[type="file"]:focus-visible { outline-color: var(--accent); }
@media (max-width: 540px) {
  .shell { width: calc(100% - 32px); }
  .toolhead { padding-top: 0; margin: 19px auto; }
  .toolhead .back { margin-bottom: 12px; }
}
