:root {
  --ink: #171713;
  --paper: #f7f4ec;
  --panel: #fffdf7;
  --blue: #2457f5;
  --lime: #c9f45a;
  --orange: #ff7b54;
  --muted: #68685e;
  --line: #d8d4c8;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 16px; line-height: 1.5; }
button, input, select { font: inherit; }
button, a { touch-action: manipulation; }
a { color: inherit; }
.shell { width: min(1050px, calc(100% - 36px)); margin: auto; }

header { position: sticky; top: 0; z-index: 20; border-bottom: 2px solid var(--ink); background: rgba(247, 244, 236, .94); backdrop-filter: blur(12px); }
.nav { display: flex; align-items: center; justify-content: center; gap: 32px; padding: 14px 0; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; font-size: 20px; font-weight: 900; letter-spacing: -.03em; }
.mark { display: grid; place-items: center; width: 34px; height: 34px; border: 2px solid var(--ink); border-radius: 50% 44% 48% 42%; background: var(--lime); font-size: 15px; transform: rotate(-7deg); }
.navlinks { display: flex; align-items: center; gap: 20px; }
.navlinks a { color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 750; }
.navlinks .pill { padding: 10px 16px; border-radius: 999px; background: var(--ink); color: #fff; }

.hero { display: flex; flex-direction: column; align-items: center; padding: 68px 0 38px; text-align: center; }
.eyebrow, .section-kicker { font-size: 12px; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 9px; border: 2px solid var(--ink); background: var(--orange); transform: rotate(12deg); }
h1 { max-width: 920px; margin: 22px auto 26px; font-size: clamp(58px, 9vw, 105px); font-weight: 950; line-height: .88; letter-spacing: -.075em; }
h1 em { position: relative; color: var(--blue); font-family: Georgia, serif; font-weight: 400; }
h1 em::after { content: ""; position: absolute; right: -2%; bottom: -7px; left: 1%; z-index: -1; height: 12px; border: 2px solid var(--ink); background: var(--lime); transform: rotate(-1deg); }
.dek { max-width: 680px; margin: 0 auto; color: #3f3f38; font-size: clamp(18px, 2vw, 23px); }
.maker-note { display: flex; align-items: center; justify-content: center; gap: 16px; width: min(720px, 100%); margin-top: 30px; padding: 18px 22px; border: 2px solid var(--ink); background: #fff; box-shadow: 6px 6px 0 var(--ink); text-align: left; transform: rotate(-.35deg); }
.maker-note strong { display: block; margin-bottom: 3px; font-size: 17px; }
.maker-note p { margin: 0; color: var(--muted); }
.scribble { flex: 0 0 54px; display: grid; place-items: center; height: 49px; border: 2px solid var(--ink); border-radius: 48% 52% 43% 57%; background: var(--orange); font-family: Georgia, serif; font-style: italic; font-weight: 900; transform: rotate(-8deg); }

.trust-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 25px; margin-bottom: 20px; padding: 14px 18px; border: 2px solid var(--ink); background: var(--lime); font-size: 14px; font-weight: 900; }
.tool { margin: 18px auto 78px; border: 2px solid var(--ink); background: var(--panel); box-shadow: 10px 10px 0 var(--ink); }
.workspace { padding: 28px; }
.dropzone { display: grid; min-height: 330px; place-items: center; padding: 38px; border: 2px dashed var(--ink); border-radius: 20px; background: linear-gradient(135deg, rgba(201, 244, 90, .24), rgba(36, 87, 245, .08)); cursor: pointer; text-align: center; transition: .18s ease; }
.dropzone:hover, .dropzone.drag { background: var(--lime); transform: translateY(-2px); }
.dropzone input { position: absolute; opacity: 0; pointer-events: none; }
.drop-icon { display: grid; width: 92px; height: 72px; margin: 0 auto 20px; place-items: center; border: 2px solid var(--ink); border-radius: 48% 52% 44% 56%; background: var(--blue); color: #fff; box-shadow: 5px 5px 0 var(--ink); font-size: 40px; font-weight: 950; transform: rotate(-4deg); }
.dropzone h2 { margin: 0 0 8px; font-size: 32px; letter-spacing: -.045em; }
.dropzone p { margin: 0 0 20px; color: var(--muted); }
.dropzone .drop-privacy { margin: 16px 0 0; color: var(--ink); font-size: 13px; font-weight: 800; }

.btn { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border: 2px solid var(--ink); border-radius: 999px; background: var(--ink); color: #fff; font-weight: 900; text-decoration: none; cursor: pointer; transition: .15s ease; }
.btn:hover:not(:disabled) { box-shadow: 4px 4px 0 var(--ink); transform: translate(-2px, -2px); }
.btn:disabled { opacity: .42; cursor: not-allowed; }
.btn.blue { background: var(--blue); }
.btn.secondary { background: #fff; color: var(--ink); }

.results { display: none; }
.results.active { display: block; }
.results-head { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-bottom: 22px; text-align: center; }
.results-head h2 { margin: 0; font-size: 38px; letter-spacing: -.05em; }
.summary { color: var(--muted); font-weight: 700; }
.head-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; }
.file-list { display: grid; gap: 13px; }
.file-card { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; gap: 17px; align-items: center; padding: 12px; border: 2px solid var(--ink); border-radius: 16px; background: #fff; }
.thumb { width: 84px; height: 70px; border: 1px solid var(--line); border-radius: 10px; background: #eee; object-fit: cover; }
.file-name { overflow: hidden; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.stats { display: flex; flex-wrap: wrap; gap: 4px 15px; margin-top: 4px; color: var(--muted); font-size: 14px; }
.new-size { color: #285c12; font-weight: 900; }
.status { color: var(--blue); font-size: 13px; font-weight: 850; }
.file-actions { display: flex; gap: 8px; }
.icon-btn { width: 42px; height: 42px; border: 2px solid var(--ink); border-radius: 50%; background: #fff; font-weight: 900; cursor: pointer; }
.icon-btn:hover { background: var(--lime); }

.controls { padding: 34px max(24px, calc((100% - 720px) / 2)); border-top: 2px solid var(--ink); background: #efede5; text-align: center; }
.controls > h2 { margin: 0 0 18px; font-size: 29px; letter-spacing: -.04em; }
.mode-tabs { display: flex; justify-content: center; gap: 8px; margin: 0 auto 22px; }
.mode { min-height: 43px; padding: 8px 16px; border: 2px solid var(--ink); border-radius: 999px; background: #fff; font-size: 14px; font-weight: 900; cursor: pointer; }
.mode.active { background: var(--lime); box-shadow: 3px 3px 0 var(--ink); }
.setting-panel { max-width: 560px; min-height: 170px; margin: auto; padding: 22px; border: 2px solid var(--ink); border-radius: 16px; background: #fff; }
.setting-panel.hidden { display: none; }
.setting-panel > label:first-child { display: block; margin-bottom: 10px; font-weight: 900; }
.setting-panel p { margin: 12px 0 0; color: var(--muted); font-size: 14px; }
.number-wrap { display: inline-flex; align-items: center; overflow: hidden; border: 2px solid var(--ink); border-radius: 10px; background: #fff; }
.number-wrap input { width: 130px; padding: 11px 8px 11px 14px; border: 0; outline: 0; background: transparent; text-align: center; font-weight: 900; }
.number-wrap > span, .number-wrap > i { padding: 0 13px 0 4px; color: var(--muted); font-style: normal; font-weight: 800; }
.quick-picks { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; margin-top: 13px; }
.quick-picks button { padding: 6px 12px; border: 1.5px solid var(--ink); border-radius: 999px; background: #fff; font-size: 13px; font-weight: 800; cursor: pointer; }
.quick-picks button.picked { background: #dce4ff; }
.check { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 15px; font-weight: 800; }
.check input { width: 18px; height: 18px; accent-color: var(--blue); }
.dimension-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dimension-grid label { display: flex; flex-direction: column; gap: 7px; font-weight: 900; }
.dimension-grid .number-wrap { width: 100%; }
.dimension-grid .number-wrap input { width: 100%; min-width: 0; }
.output-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 560px; margin: 18px auto; text-align: left; }
.output-row label { display: grid; gap: 7px; font-size: 14px; font-weight: 900; }
.output-row select { width: 100%; min-height: 45px; padding: 9px 11px; border: 2px solid var(--ink); border-radius: 10px; background: #fff; font-weight: 750; }
.output-row input[type="range"] { width: 100%; accent-color: var(--blue); }
.resize-btn { min-width: 200px; background: var(--blue); }
.privacy { max-width: 610px; margin: 18px auto 0; padding-top: 17px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.privacy strong { color: var(--ink); }

.how, .explainer { padding: 35px 0 82px; text-align: center; }
.how h2, .explainer h2, .faq h2 { margin: 12px auto 34px; font-size: clamp(42px, 6vw, 68px); line-height: .96; letter-spacing: -.06em; text-align: center; }
.steps, .guide-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 17px; }
.steps article, .guide-grid article { min-height: 190px; padding: 25px; border: 2px solid var(--ink); background: var(--panel); text-align: center; }
.steps article:nth-child(2) { background: var(--lime); }
.steps article:nth-child(3) { background: #dce4ff; }
.steps b { font-family: Georgia, serif; font-size: 47px; font-style: italic; }
.steps h3, .guide-grid h3 { margin: 15px 0 6px; font-size: 22px; }
.steps p, .guide-grid p { margin: 0; color: #4e4e46; }
.explainer { padding-top: 0; }
.guide-grid article:nth-child(2) { transform: rotate(-.7deg); }
.guide-grid article:nth-child(3) { transform: rotate(.6deg); }
.faq { padding: 68px 0; border-top: 2px solid var(--ink); }
.faq-grid { display: grid; max-width: 820px; margin: auto; gap: 12px; }
.faq details { padding: 18px 20px; border: 2px solid var(--ink); background: #fff; }
.faq summary { display: flex; justify-content: space-between; gap: 20px; font-weight: 900; cursor: pointer; list-style: none; }
.faq summary::after { content: "+"; font-size: 22px; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 14px 0 2px; color: var(--muted); }

footer { padding: 32px 0; background: var(--ink); color: #fff; }
.footer-inner { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; }
.footer-inner p { margin: 0; color: #bdbdb4; }
.footer-inner a { color: #fff; }
.toast { position: fixed; bottom: 24px; left: 50%; z-index: 30; padding: 12px 18px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 800; opacity: 0; pointer-events: none; transform: translate(-50%, 30px); transition: .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

:focus-visible { outline: 4px solid rgba(36, 87, 245, .35); outline-offset: 3px; }

@media (max-width: 760px) {
  .steps, .guide-grid { grid-template-columns: 1fr; }
  .steps article, .guide-grid article { width: 100%; max-width: 650px; margin: auto; }
}

@media (max-width: 600px) {
  .shell { width: min(100% - 24px, 1050px); }
  .nav { gap: 14px; padding: 10px 0; }
  .navlinks a:not(.pill) { display: none; }
  .hero { padding: 42px 0 31px; }
  h1 { font-size: 55px; }
  .maker-note { align-items: flex-start; padding: 16px; }
  .scribble { flex-basis: 45px; height: 42px; }
  .trust-strip { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .trust-strip span { text-align: center; }
  .tool { margin-bottom: 58px; box-shadow: 6px 6px 0 var(--ink); }
  .workspace, .controls { padding: 16px; }
  .dropzone { min-height: 320px; padding: 22px 14px; }
  .mode-tabs { display: grid; grid-template-columns: 1fr; }
  .mode { width: 100%; }
  .setting-panel { min-height: 0; padding: 18px 14px; }
  .output-row { grid-template-columns: 1fr; }
  .file-card { grid-template-columns: 62px minmax(0, 1fr); }
  .thumb { width: 62px; height: 62px; }
  .file-actions { grid-column: 1 / -1; justify-content: center; }
  .dimension-grid { gap: 8px; }
  .number-wrap input { width: 105px; }
}

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