:root {
  --ink: #1b1b1e;
  --paper: #ededef;
  --panel: #fffdf7;
  --mint: #ffedd5;
  --mint-strong: #c2410c;
  --coral: #c2410c;
  --line: #cdcdd1;
  --muted: #676772;
  --shadow: 0 22px 60px rgba(27,27,30, 0.12);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); }
body { margin: 0; color: var(--ink); font-family: "DM Sans", sans-serif; background: var(--paper); min-height: 100vh; }
button, input { font: inherit; }
button { color: inherit; }

.topbar { height: 78px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(24px, 5vw, 72px); border-bottom: 1px solid var(--line); }
.brand { display: flex; gap: 11px; align-items: center; color: var(--ink); text-decoration: none; font-family: Manrope, sans-serif; font-weight: 800; font-size: 1.23rem; letter-spacing: -0.04em; }
.brand-mark { display: flex; align-items: end; gap: 2px; width: 24px; height: 24px; padding: 4px; border: 2px solid var(--ink); border-radius: 5px; transform: rotate(-3deg); }
.brand-mark span { display: block; width: 4px; background: var(--ink); border-radius: 1px; }
.brand-mark span:nth-child(1) { height: 7px; }.brand-mark span:nth-child(2) { height: 13px; }.brand-mark span:nth-child(3) { height: 10px; }
.privacy-pill { display: flex; align-items: center; gap: 8px; font-size: .83rem; font-weight: 600; padding: 9px 13px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.42); }
.lock-icon { width: 10px; height: 9px; border: 1.8px solid var(--ink); border-radius: 2px; position: relative; margin-top: 3px; }
.lock-icon::before { content: ""; position: absolute; width: 6px; height: 6px; border: 1.8px solid var(--ink); border-bottom: 0; border-radius: 6px 6px 0 0; left: 0; top: -6px; }

main { min-height: calc(100vh - 142px); display: grid; grid-template-columns: minmax(290px, .72fr) minmax(500px, 1.28fr); gap: clamp(40px, 7vw, 112px); align-items: center; max-width: 1380px; margin: 0 auto; padding: clamp(44px, 6vw, 88px) clamp(24px, 5vw, 72px); }
.intro { align-self: center; }
.eyebrow { font-family: Manrope, sans-serif; font-size: .76rem; font-weight: 800; letter-spacing: .16em; margin: 0 0 24px; display: flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 26px; height: 3px; background: var(--coral); }
h1 { font-family: Manrope, sans-serif; font-size: clamp(3.3rem, 6vw, 6.6rem); line-height: .88; letter-spacing: -.075em; margin: 0; font-weight: 800; }
h1 em { color: var(--coral); font-style: normal; position: relative; }
h1 em::after { content: ""; position: absolute; left: 3px; right: -5px; bottom: -7px; height: 6px; background: var(--mint-strong); transform: rotate(-1deg); }
.intro-copy { font-size: 1.08rem; line-height: 1.65; max-width: 480px; color: #4e4e57; margin: 35px 0; }
.format-list { display: flex; flex-wrap: wrap; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); max-width: 500px; }
.format-list span { display: flex; flex-direction: column; flex: 1; min-width: 80px; padding: 16px 12px 14px 0; }
.format-list b { font-family: Manrope, sans-serif; font-size: .82rem; }
.format-list small { color: var(--muted); margin-top: 3px; font-size: .72rem; }

.workspace { background: var(--panel); border: 1px solid var(--ink); border-radius: 22px; padding: 10px; box-shadow: var(--shadow), 8px 8px 0 var(--mint); max-width: 760px; width: 100%; }
.tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; background: #e7e7ea; padding: 4px; border-radius: 13px; }
.tab { border: 0; background: transparent; border-radius: 9px; padding: 10px 8px; cursor: pointer; font-weight: 600; font-size: .86rem; transition: background .18s ease, transform .18s ease; }
.tab:hover { transform: translateY(-1px); }
.tab.active { background: var(--ink); color: white; }
.drop-zone { margin: 10px 0; min-height: 255px; border: 1.5px dashed #aeaeb5; border-radius: 15px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 28px; cursor: pointer; background: #f6f6f7; transition: background .2s, border-color .2s, transform .2s; outline: none; }
.drop-zone:hover, .drop-zone:focus-visible, .drop-zone.dragging { background: #fff7ed; border-color: #9a3412; transform: translateY(-1px); }
.upload-icon { width: 54px; height: 54px; display: grid; place-items: center; background: var(--mint); border: 1px solid var(--ink); border-radius: 14px; transform: rotate(-4deg); margin-bottom: 17px; }
.upload-icon svg { width: 30px; stroke: var(--ink); stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; transform: rotate(4deg); }
.drop-zone h2 { margin: 0; font-family: Manrope, sans-serif; font-size: 1.22rem; letter-spacing: -.02em; }
.drop-zone p { margin: 8px 0 16px; color: var(--muted); font-size: .92rem; }
.drop-zone p span { color: var(--ink); font-weight: 700; text-decoration: underline; text-decoration-color: var(--coral); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.drop-zone small { color: #7b7b87; font-size: .74rem; }
.settings { padding: 16px 18px 14px; border: 1px solid #dadade; border-radius: 13px; }
.setting-copy { display: flex; justify-content: space-between; align-items: center; }
.setting-copy label { font-size: .84rem; font-weight: 700; }
.setting-copy span { font-size: .73rem; font-weight: 700; background: var(--mint); padding: 4px 9px; border-radius: 999px; }
#quality { width: 100%; accent-color: var(--coral); margin: 15px 0 5px; cursor: pointer; }
.range-labels { display: flex; justify-content: space-between; color: #797985; font-size: .68rem; }
.workspace-footer { display: flex; justify-content: space-between; align-items: center; padding: 12px 8px 4px; font-size: .7rem; color: var(--muted); }
.workspace-footer span:first-child { display: flex; align-items: center; gap: 6px; }
.workspace-footer i { width: 7px; height: 7px; background: #27ae60; border-radius: 50%; box-shadow: 0 0 0 3px #ffedd5; }

.queue { display: grid; gap: 8px; }
.queue:not(:empty) { margin-top: 10px; }
.file-card { display: grid; grid-template-columns: 43px minmax(0, 1fr) auto 40px; align-items: center; gap: 11px; padding: 11px; border: 1px solid var(--line); border-radius: 12px; background: white; animation: arrive .26s ease both; }
@keyframes arrive { from { opacity: 0; transform: translateY(5px); } }
.file-badge { width: 40px; height: 40px; border-radius: 9px; display: grid; place-items: center; background: #ebebed; font-family: Manrope, sans-serif; font-weight: 800; font-size: .64rem; }
.file-info { min-width: 0; }
.file-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .82rem; }
.file-meta, .new-size { display: block; color: var(--muted); font-size: .68rem; margin-top: 2px; }
.progress-track { height: 3px; overflow: hidden; background: #e5e5e7; border-radius: 2px; margin-top: 7px; }
.progress-bar { width: 0; height: 100%; background: var(--coral); transition: width .35s ease; }
.file-result { text-align: right; min-width: 65px; }
.saving { font-size: .8rem; color: #168446; }
.download-btn { width: 38px; height: 38px; border: 1px solid var(--ink); background: var(--mint); border-radius: 9px; display: none; place-items: center; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.download-btn:hover { transform: translateY(-2px); box-shadow: 0 3px 0 var(--ink); }
.download-btn svg { width: 19px; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.file-card.done .download-btn { display: grid; }
.file-card.done .progress-track { display: none; }
.file-error { color: #b33727; font-size: .69rem; margin: 5px 0 0; display: none; }
.file-card.error .file-error { display: block; }
.file-card.error .progress-track { display: none; }

footer { min-height: 64px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(24px, 5vw, 72px); color: var(--muted); font-size: .72rem; }
footer span { color: var(--coral); padding: 0 5px; }

@media (max-width: 900px) {
  main { grid-template-columns: 1fr; gap: 42px; padding-top: 52px; }
  .intro { text-align: center; }
  .eyebrow { justify-content: center; }
  .intro-copy, .format-list { margin-left: auto; margin-right: auto; }
  .workspace { margin: 0 auto; }
}
@media (max-width: 560px) {
  .topbar { height: 68px; padding: 0 18px; }
  .privacy-pill { font-size: 0; padding: 9px 11px; }
  main { padding: 38px 16px 54px; }
  h1 { font-size: clamp(3rem, 17vw, 4.8rem); }
  .intro-copy { font-size: 1rem; }
  .workspace { border-radius: 17px; box-shadow: 5px 5px 0 var(--mint); }
  .drop-zone { min-height: 230px; padding: 22px 14px; }
  .file-card { grid-template-columns: 39px minmax(0,1fr) 38px; }
  .file-result { grid-column: 2; text-align: left; display: flex; gap: 7px; align-items: baseline; }
  .download-btn { grid-column: 3; grid-row: 1 / span 2; }
  footer { padding: 18px; text-align: center; justify-content: center; }
  footer p:last-child { display: none; }
}

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

/* Clearpress options */
.cp-options{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:14px;margin:18px 0 8px;padding:16px;border:1px solid rgba(122,122,134,.25);border-radius:14px}
.cp-opt label{display:block;font-size:13px;font-weight:700;margin-bottom:6px}
.cp-opt small{font-weight:500;opacity:.65;font-size:11px}
.cp-opt select,.cp-opt input{width:100%;padding:9px 10px;border-radius:9px;border:1px solid rgba(122,122,134,.35);background:transparent;color:inherit;font:inherit}
.cp-unit{display:flex;align-items:center;gap:8px}.cp-unit b{font-size:12px;opacity:.7}

.file-badge.has-thumb { background-size: cover; background-position: center; border: 1px solid #ceced2; }
.save-all { display: block; width: 100%; margin-top: 12px; padding: 14px 18px; border: 0; border-radius: 12px; background: var(--coral); color: #ffffff; font: 800 .95rem "DM Sans", sans-serif; cursor: pointer; }
.save-all:hover { background: #303036; }
.save-all[hidden] { display: none; }
.save-all:disabled { opacity: .6; cursor: progress; }
