/* PixSquish — base.css v3 "Swiss Grid"
 * International Typographic Style: Helvetica, hard 2px rules, red accent,
 * ghost numerals, hover-invert cells, zero radius. Light-first + dark toggle
 * (dark = inverse poster: off-white rules on near-black).
 */
:root {
  --bg: #fafaf8;
  --panel: #ffffff;
  --ink: #0c0c0c;
  --muted: #5a5a56;
  --line: #d9d9d4;
  --bd: #0c0c0c;
  --ghost: #e3e3dd;
  --accent: #e5231b;
  --accent-ink: #ffffff;
  --ok: #0e7a3c;
  --warn: #b06000;
  --danger: #e5231b;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --sans: "Helvetica Neue", Helvetica, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
}
[data-theme="dark"] {
  --bg: #111110;
  --panel: #181817;
  --ink: #f2f2ee;
  --muted: #9c9c94;
  --line: #2e2e2b;
  --bd: #f2f2ee;
  --ghost: #2a2a27;
  --accent: #ff4438;
  --accent-ink: #ffffff;
  --ok: #3dbb72;
  --warn: #f0a04b;
  --danger: #ff4438;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  font-size: 16px;
}
img, canvas, svg { max-width: 100%; }
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--accent); }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.mono { font-family: var(--mono); }

/* ---------- Type utilities ---------- */
.kicker, .field-label, .crumbs, .section-title, .hero-badges span {
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

/* ---------- Header ---------- */
.site-header {
  background: var(--bg);
  border-bottom: 2px solid var(--bd);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
  gap: 16px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 17.5px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.logo svg { display: block; }
.logo .mark-sq { fill: var(--accent); }
.logo .mark-ar { stroke: var(--ink); }
.header-nav { display: flex; align-items: center; gap: 4px; }
.header-nav > a, .nav-drop-btn {
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink);
  padding: 8px 12px;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: var(--sans);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.header-nav > a:hover, .nav-drop-btn:hover { color: var(--accent); }
.nav-drop { position: relative; }
.nav-drop-panel {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 230px;
  background: var(--bg);
  border: 2px solid var(--bd);
  padding: 6px 0;
  z-index: 60;
}
.nav-drop[data-open] .nav-drop-panel { display: block; }
.nav-drop-panel a {
  display: block;
  padding: 9px 16px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.nav-drop-panel a:last-child { border-bottom: 0; }
.nav-drop-panel a:hover { background: var(--ink); color: var(--bg); }
.icon-btn {
  background: none;
  border: 2px solid var(--bd);
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink);
  margin-left: 6px;
}
.icon-btn:hover { background: var(--ink); color: var(--bg); }
[data-theme="light"] .theme-icon-dark { display: none; }
[data-theme="dark"] .theme-icon-light { display: none; }

/* ---------- Breadcrumbs ---------- */
.crumbs {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  padding: 26px 0 0;
}
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.crumbs .sep { margin: 0 8px; color: var(--accent); }
.crumbs .here { color: var(--ink); }

/* ---------- Buttons / controls ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 12px 20px;
  border: 2px solid var(--bd);
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  border-radius: 0;
}
.btn:hover { background: var(--ink); color: var(--bg); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn:disabled { opacity: 0.35; cursor: not-allowed; }
.btn:disabled:hover { background: var(--bg); color: var(--ink); }
.btn-primary:disabled:hover { background: var(--accent); color: var(--accent-ink); }
.btn-sm { padding: 7px 13px; font-size: 11.5px; }
label.field-label, .field-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 8px;
}
input[type="text"], input[type="number"], select, textarea {
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
  background: var(--panel);
  border: 2px solid var(--bd);
  border-radius: 0;
  padding: 9px 12px;
  width: 100%;
}
textarea { font-family: var(--mono); font-size: 13px; line-height: 1.55; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -2px; }
input[type="range"] { width: 100%; accent-color: var(--accent); }
input[type="checkbox"] { accent-color: var(--accent); width: 16px; height: 16px; }

/* ---------- Panels ---------- */
.panel {
  background: var(--panel);
  border: 2px solid var(--bd);
  border-radius: 0;
}
.tool-main { padding: 14px 0 96px; }
.tool-head { margin: 30px 0 40px; max-width: 780px; }
.tool-head h1 {
  font-size: clamp(34px, 5vw, 48px);
  letter-spacing: -0.04em;
  line-height: 1.02;
  margin-bottom: 16px;
  font-weight: 800;
}
.tool-head .lede { color: var(--muted); font-size: 17px; line-height: 1.6; max-width: 640px; }
.privacy-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 20px;
}
.privacy-chip::before { content: ""; width: 24px; height: 2px; background: var(--accent); }
.privacy-chip svg { display: none; }
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  align-items: flex-end;
  padding: 20px 22px;
}
.controls .ctl { min-width: 140px; flex: 0 1 auto; }
.stat { font-family: var(--mono); font-size: 13px; color: var(--muted); line-height: 1.7; }
.stat b { color: var(--ink); font-weight: 700; }
.stat .down { color: var(--ok); }
.stat .up { color: var(--warn); }

/* ---------- Dropzone ---------- */
.dropzone {
  border: 2px solid var(--bd);
  border-radius: 0;
  background: var(--panel);
  padding: 64px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  position: relative;
}
.dropzone:hover, .dropzone.drag { border-color: var(--accent); }
.dropzone.drag { background: color-mix(in srgb, var(--accent) 6%, var(--panel)); }
.dropzone .dz-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  color: var(--accent-ink);
  background: var(--accent);
  margin-bottom: 18px;
}
.dropzone p { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.dropzone .dz-hint {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin-top: 10px;
}
.dropzone input[type="file"] { display: none; }

/* ---------- File result rows ---------- */
.file-rows { margin-top: 28px; display: grid; gap: 0; border: 2px solid var(--bd); }
.file-rows:empty { border: 0; }
.file-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  flex-wrap: wrap;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.file-row:last-child { border-bottom: 0; }
.file-row.panel { border: 0; border-bottom: 1px solid var(--line); }
.file-row .thumb {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border: 1px solid var(--line);
  background:
    conic-gradient(var(--line) 25%, transparent 0 50%, var(--line) 0 75%, transparent 0) 0 0/12px 12px;
  flex: none;
}
.file-row .fname {
  font-size: 14px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 250px;
}
.file-row .fmeta { flex: 1; min-width: 150px; }
.row-actions { margin-top: 20px; display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Compare slider ---------- */
.compare {
  position: relative;
  overflow: hidden;
  border: 2px solid var(--bd);
  background:
    conic-gradient(var(--line) 25%, transparent 0 50%, var(--line) 0 75%, transparent 0) 0 0/16px 16px;
  user-select: none;
}
.compare img { display: block; width: 100%; height: auto; }
.compare .after { position: absolute; inset: 0; overflow: hidden; }
.compare .after img { position: absolute; inset: 0; width: 100%; height: 100%; }
.compare .divider {
  position: absolute;
  top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
  pointer-events: none;
}
.compare .tag {
  position: absolute;
  top: 10px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: var(--ink);
  color: var(--bg);
  padding: 4px 10px;
  pointer-events: none;
}
[data-theme="dark"] .compare .tag { background: #f2f2ee; color: #111110; }
.compare .tag-before { left: 10px; }
.compare .tag-after { right: 10px; }

/* ---------- Tables ---------- */
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
table.data th {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  border-bottom: 2px solid var(--bd);
}
table.data td.mono { font-family: var(--mono); font-size: 13px; }

/* ---------- Home hero ---------- */
.hero {
  position: relative;
  padding: 92px 0 76px;
  border-bottom: 2px solid var(--bd);
  overflow: hidden;
}
.hero::after {
  content: "PX";
  position: absolute;
  right: 2%;
  top: 18px;
  font-size: clamp(140px, 24vw, 300px);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--ghost);
  z-index: 0;
  pointer-events: none;
}
.hero .wrap, .hero-in { position: relative; z-index: 1; }
.hero .eyebrow {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--accent);
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 0;
}
.hero .eyebrow::before { display: none; }
.hero h1 {
  font-size: clamp(40px, 6.6vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.045em;
  max-width: 920px;
  font-weight: 800;
}
.hero h1 .accent { color: var(--accent); }
.hero .sub {
  color: var(--muted);
  font-size: 17.5px;
  line-height: 1.6;
  max-width: 540px;
  margin-top: 30px;
}
.hero-cta { display: flex; gap: 0; flex-wrap: wrap; margin-top: 42px; }
.hero-cta .btn { padding: 15px 28px; font-size: 14px; }
.hero-cta .btn + .btn { margin-left: -2px; }

/* ---------- Marquee strip ---------- */
.strip {
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 11px 0;
}
.strip-in {
  white-space: nowrap;
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  animation: mq 32s linear infinite;
}
@keyframes mq { to { transform: translateX(-33.333%); } }
@media (prefers-reduced-motion: reduce) { .strip-in { animation: none; } }

/* ---------- Home sections ---------- */
.section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.2em;
  margin: 0 0 28px;
  display: flex;
  align-items: baseline;
  gap: 14px;
}
.section-title .idx { color: var(--accent); }
.home-section { padding: 76px 0 0; }
.home-section:last-of-type { padding-bottom: 96px; }
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0;
  border-top: 2px solid var(--bd);
  border-left: 2px solid var(--bd);
}
.tool-card {
  display: block;
  position: relative;
  padding: 28px 24px 62px;
  color: var(--ink);
  background: var(--bg);
  border-right: 2px solid var(--bd);
  border-bottom: 2px solid var(--bd);
  border-radius: 0;
  transition: background 0.15s, color 0.15s;
}
.tool-card.panel { border-top: 0; border-left: 0; }
.tool-card:hover { background: var(--ink); color: var(--bg); }
.tool-card .t-num {
  display: block;
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--ghost);
  transition: color 0.15s;
}
.tool-card:hover .t-num { color: var(--accent); }
.tool-card h3 { font-size: 17.5px; margin: 16px 0 8px; letter-spacing: -0.015em; font-weight: 700; }
.tool-card p { font-size: 13.5px; color: var(--muted); line-height: 1.55; transition: color 0.15s; }
.tool-card:hover p { color: color-mix(in srgb, var(--bg) 70%, var(--ink)); }
.tool-card .t-go {
  position: absolute;
  bottom: 20px;
  right: 22px;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  transition: color 0.15s, transform 0.15s;
}
.tool-card:hover .t-go { color: var(--accent); transform: translateX(4px); }
.guide-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 0;
  border-top: 2px solid var(--bd);
  border-left: 2px solid var(--bd);
}
.guide-item {
  display: block;
  padding: 26px 24px;
  color: var(--ink);
  background: var(--bg);
  border-right: 2px solid var(--bd);
  border-bottom: 2px solid var(--bd);
  border-radius: 0;
  transition: background 0.15s, color 0.15s;
}
.guide-item.panel { border-top: 0; border-left: 0; }
.guide-item:hover { background: var(--ink); color: var(--bg); }
.guide-item .g-kicker {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
}
.guide-item h3 { font-size: 16.5px; margin: 12px 0 8px; letter-spacing: -0.01em; line-height: 1.3; font-weight: 700; }
.guide-item p { font-size: 13.5px; color: var(--muted); transition: color 0.15s; }
.guide-item:hover p { color: color-mix(in srgb, var(--bg) 70%, var(--ink)); }
.home-privacy {
  padding: 38px 0 0;
  border-top: 6px solid var(--accent);
  display: flex;
  gap: 24px;
  align-items: flex-start;
  background: none;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
}
.home-privacy.panel { background: none; border-left: 0; border-right: 0; border-bottom: 0; }
.home-privacy svg { display: none; }
.home-privacy h2 {
  font-size: clamp(24px, 3.2vw, 32px);
  letter-spacing: -0.03em;
  margin-bottom: 12px;
  font-weight: 800;
  max-width: 700px;
}
.home-privacy p { font-size: 16px; color: var(--muted); max-width: 620px; line-height: 1.65; }

/* ---------- Tool doc (spec numbering) ---------- */
.tool-doc { margin-top: 76px; counter-reset: doc; }
.tool-doc h2, .tool-doc p, .tool-doc ul, .tool-doc ol { max-width: 760px; }
.tool-doc h2 {
  counter-increment: doc;
  font-size: 21px;
  margin: 42px 0 14px;
  letter-spacing: -0.02em;
  font-weight: 800;
  display: flex;
  align-items: baseline;
  gap: 14px;
}
.tool-doc h2::before {
  content: counter(doc, decimal-leading-zero);
  font-size: 13px;
  font-weight: 800;
  color: var(--accent);
}
.tool-doc p, .tool-doc li { font-size: 15.5px; color: var(--muted); line-height: 1.7; }
.tool-doc p { margin: 10px 0; }
.tool-doc li { margin: 8px 0 8px 22px; }
.tool-doc strong { color: var(--ink); }
.tool-doc a { color: var(--accent); }
.tool-doc a:hover { text-decoration: underline; }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin-top: 76px; }
.faq h2 {
  font-size: 21px;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  font-weight: 800;
  display: flex;
  align-items: baseline;
  gap: 14px;
}
.faq h2::before {
  content: "FAQ";
  font-size: 13px;
  font-weight: 800;
  color: var(--accent);
}
.faq-item { border: 2px solid var(--bd); background: var(--panel); margin-bottom: -2px; }
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 20px;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  flex: none;
  transition: transform 0.15s;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-a { padding: 0 20px 18px; font-size: 14.5px; color: var(--muted); line-height: 1.65; }
.faq-item .faq-a a { color: var(--accent); }
.faq-item .faq-a a:hover { text-decoration: underline; }

/* ---------- Related ---------- */
.related { margin-top: 76px; }
.related .section-title::after { display: none; }
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 0;
  border-top: 2px solid var(--bd);
  border-left: 2px solid var(--bd);
}
.related-grid .tool-card { padding: 24px 22px 56px; }
.related-grid h3 { margin-top: 0; }

/* ---------- Article ---------- */
.article { max-width: 740px; padding: 20px 0 96px; }
.article h1 {
  font-size: clamp(32px, 5vw, 46px);
  line-height: 1.04;
  letter-spacing: -0.04em;
  margin: 22px 0 16px;
  font-weight: 800;
}
.article .a-meta {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: 40px;
}
.article h2 { font-size: 23px; margin: 44px 0 14px; letter-spacing: -0.025em; font-weight: 800; }
.article h3 { font-size: 18px; margin: 28px 0 10px; font-weight: 700; }
.article p { margin: 14px 0; font-size: 16.5px; line-height: 1.7; }
.article li { margin: 8px 0 8px 24px; font-size: 16px; line-height: 1.65; }
.article table.data { margin: 20px 0; }
.article a { color: var(--accent); }
.article a:hover { text-decoration: underline; }
.article code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 1px 6px;
}
.article blockquote {
  border-left: 4px solid var(--accent);
  padding: 4px 18px;
  margin: 18px 0;
  color: var(--muted);
}

/* ---------- Static pages ---------- */
.page { max-width: 740px; padding: 20px 0 96px; }
.page h1 { font-size: clamp(32px, 5vw, 44px); letter-spacing: -0.04em; margin: 22px 0 22px; font-weight: 800; line-height: 1.04; }
.page h2 { font-size: 21px; margin: 34px 0 12px; letter-spacing: -0.02em; font-weight: 800; }
.page p, .page li { margin: 12px 0; color: var(--muted); font-size: 16px; line-height: 1.7; }
.page li { margin-left: 24px; }
.page strong { color: var(--ink); }
.page a { color: var(--accent); }
.page a:hover { text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 2px solid var(--bd);
  background: var(--bg);
  padding: 56px 0 36px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1.3fr 1fr;
  gap: 32px;
}
.footer-grid h4 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-bottom: 14px;
}
.footer-grid a { display: block; font-size: 14px; font-weight: 550; color: var(--ink); padding: 4px 0; }
.footer-grid a:hover { color: var(--accent); }
.footer-brand p { font-size: 13.5px; color: var(--muted); max-width: 280px; margin-top: 12px; line-height: 1.6; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 44px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

/* ---------- Toast ---------- */
#toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translate(-50%, 12px);
  background: var(--ink);
  color: var(--bg);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 11px 22px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 100;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Crop ---------- */
.crop-stage { position: relative; display: inline-block; max-width: 100%; touch-action: none; }
.crop-stage canvas { display: block; border: 2px solid var(--bd); cursor: crosshair; }
.crop-readout {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  margin-top: 10px;
}

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: 110px 0 130px; }
.notfound .code {
  font-size: clamp(90px, 16vw, 160px);
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.06em;
  line-height: 1;
}
.notfound h1 { font-size: 26px; margin: 18px 0 12px; letter-spacing: -0.03em; font-weight: 800; }
.notfound p { color: var(--muted); margin-bottom: 30px; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero { padding: 68px 0 56px; }
  .hero::after { display: none; }
  .home-privacy { flex-direction: column; gap: 12px; }
}
@media (max-width: 640px) {
  .header-nav > a.hide-m { display: none; }
  .hero { padding: 52px 0 46px; }
  .hero .sub { font-size: 16px; }
  .home-section { padding-top: 56px; }
  .controls { gap: 16px; padding: 16px 18px; }
  .controls .ctl { min-width: 120px; flex: 1 1 40%; }
  .file-row .fname { max-width: 100%; }
  .dropzone { padding: 46px 18px; }
  .tool-doc, .faq, .related { margin-top: 54px; }
  .hero-cta .btn { flex: 1 1 100%; justify-content: center; }
  .hero-cta .btn + .btn { margin-left: 0; margin-top: -2px; }
}

/* ---------- v3.1: draggable compare handle ---------- */
.compare { cursor: ew-resize; touch-action: none; }
.compare .divider { pointer-events: none; margin-left: -1.5px; }
.compare .knob {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  background: var(--accent);
  color: #fff;
  border: 2px solid var(--bd);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 700;
  pointer-events: auto;
  cursor: ew-resize;
  user-select: none;
}
.compare .knob:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ---------- v3.1: centered, larger crop stage ---------- */
.crop-stage { display: block; text-align: center; }
.crop-stage canvas { display: inline-block; }
.crop-readout { text-align: center; }

/* ---------- v3.1: doc figures (before/after examples) ---------- */
.doc-fig { border: 2px solid var(--bd); margin: 28px 0; background: var(--panel); max-width: none; }
.doc-fig img { display: block; width: 100%; }
.doc-fig figcaption {
  border-top: 2px solid var(--bd);
  padding: 11px 14px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  line-height: 1.6;
}
.doc-fig figcaption b { color: var(--accent); }

/* ---------- v3.3: home workflow section ---------- */
.home-workflow {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 0;
  border: 2px solid var(--bd);
  background: var(--panel);
}
.home-workflow > a { display: block; border-right: 2px solid var(--bd); }
.home-workflow img { display: block; width: 100%; height: 100%; object-fit: cover; }
.home-workflow .hw-text { padding: 34px 32px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.home-workflow h3 { font-size: clamp(20px, 2.4vw, 26px); font-weight: 800; letter-spacing: -0.025em; margin-bottom: 12px; }
.home-workflow p { font-size: 15px; color: var(--muted); line-height: 1.65; margin-bottom: 22px; }
@media (max-width: 820px) {
  .home-workflow { grid-template-columns: 1fr; }
  .home-workflow > a { border-right: 0; border-bottom: 2px solid var(--bd); }
}

/* ---------- v3.6: article lead images ---------- */
.a-lead { border: 2px solid var(--bd); margin: 0 0 36px; }
.a-lead img { display: block; width: 100%; height: auto; }
.page .a-lead { margin: 24px 0 32px; }
