:root{--bg:#f4f1ea;--surface:#fffdf8;--text:#1b1916;--muted:#6d665c;--primary:#b0431c;--primary-dark:#8f3415;--accent:#1f5f5b;--line:rgb(27 25 22 / .12);--line-strong:rgb(27 25 22 / .24);--radius:10px;--space-1:4px;--space-2:8px;--space-3:12px;--space-4:16px;--space-5:24px;--space-6:32px;--space-7:48px;--space-8:64px;--space-9:96px;--fs-xs:12px;--fs-sm:14px;--fs-base:17px;--fs-md:20px;--fs-lg:26px;--fs-xl:34px;--fs-2xl:48px;--shadow-1:0 1px 2px rgb(27 25 22 / .06);--shadow-2:0 8px 24px rgb(27 25 22 / .08);--font-head:'Archivo','Helvetica Neue',Arial,sans-serif;--font-body:'IBM Plex Sans','Helvetica Neue',Arial,sans-serif;--font-mono:'IBM Plex Mono',ui-monospace,SFMono-Regular,Menlo,monospace}
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--text);font-family:var(--font-body);font-size:var(--fs-base);line-height:1.6;-webkit-font-smoothing:antialiased}
h1,h2,h3,h4{margin:0 0 var(--space-4);font-family:var(--font-head);font-weight:700;line-height:1.15;letter-spacing:-.015em;text-wrap:balance}
h2,h3{line-height:1.2}
p{margin:0 0 var(--space-4);text-wrap:pretty}
a{color:var(--primary)}
img{display:block;max-width:100%;height:auto}
.wrap{width:100%;max-width:1120px;margin:0 auto;padding-inline:20px}
.skip{position:absolute;left:-9999px}
.skip:focus{left:12px;top:10px;z-index:99;padding:8px 12px;border-radius:6px;background:var(--surface);color:var(--text)}
:focus-visible{outline:2px solid var(--primary);outline-offset:2px}
.faq-item .faq-more{margin:6px 0 0;font-size:15px}
@media (max-width:720px){.hero{padding:var(--space-5) 0 var(--space-5)}.hero .lede{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;font-size:15.5px;line-height:1.45;margin-bottom:12px}.hero-facts{margin:10px 0 14px;gap:6px 18px;font-size:13px}.hero .gauge{display:none}}
.faq-item .faq-more a{font-weight:600}
.size-note a{font-weight:600}
::selection{background:rgb(176 67 28 / .18)}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:48px;padding:0 22px;border:1px solid transparent;border-radius:var(--radius);font:600 15px/1 var(--font-body);text-decoration:none;cursor:pointer;transition:background 160ms ease,color 160ms ease,border-color 160ms ease,transform 160ms ease}
.btn:hover{transform:translateY(-1px)}
.btn-main{background:var(--primary);color:#fffdf8}
.btn-main:hover{background:var(--primary-dark)}
.btn-ghost{border-color:var(--line-strong);background:transparent;color:var(--text)}
.site-head{position:sticky;top:0;z-index:20;background:var(--bg);border-bottom:1px solid var(--line)}
.head-inner{display:flex;align-items:center;justify-content:space-between;gap:16px;height:66px}
.brand{display:inline-flex;align-items:center;gap:10px;color:var(--text);text-decoration:none;font-family:var(--font-head);font-size:19px;font-weight:700;letter-spacing:-.02em}
.brand-mark{width:30px;height:30px;flex:none}
.brand-strong{color:var(--primary)}
.site-nav{display:flex;gap:22px;font-size:14px}
.site-nav a{padding:6px 0;border-bottom:1px solid transparent;color:var(--muted);text-decoration:none;transition:color 160ms ease,border-color 160ms ease}
.site-nav a:hover{color:var(--text);border-color:var(--line-strong)}
.site-foot{margin-top:var(--space-9);padding:var(--space-7) 0 var(--space-6);border-top:1px solid var(--line);font-size:14px;color:var(--muted)}
.foot-inner{display:grid;grid-template-columns:1.6fr 1fr 1fr 1fr;gap:var(--space-5)}
.foot-brand{margin:0;font-family:var(--font-head);font-size:16px;font-weight:700;letter-spacing:-.01em;color:var(--text)}
.foot-note{max-width:34ch;margin:6px 0 0;font-size:13px}
.foot-col h3{margin:0 0 10px;font-family:var(--font-body);font-size:12px;font-weight:600;letter-spacing:.09em;text-transform:uppercase;color:var(--muted)}
.foot-col a{display:block;padding:3px 0;color:var(--text);text-decoration:none;transition:color 160ms ease}
.foot-col a:hover{color:var(--primary)}
.foot-legal{grid-column:1/-1;margin:var(--space-5) 0 0;padding-top:var(--space-4);border-top:1px solid var(--line);font-size:12.5px}
/* hero */
.hero{padding:var(--space-7) 0 var(--space-6)}
.eyebrow{margin:0 0 14px;font-family:var(--font-mono);font-size:12px;font-weight:500;letter-spacing:.12em;text-transform:uppercase;color:var(--primary)}
.hero h1{max-width:22ch;margin:0 0 14px;font-size:var(--fs-2xl)}
.lede{max-width:60ch;margin:0 0 var(--space-5);font-size:19px;color:var(--muted)}
.hero-facts{display:flex;flex-wrap:wrap;gap:8px 28px;margin:0 0 var(--space-5);padding:0;list-style:none;font-size:14px;color:var(--muted)}
.hero-facts strong{color:var(--text);font-family:var(--font-mono);font-weight:600}
.gauge{height:15px;margin:0 0 var(--space-4);border-bottom:1px solid var(--line-strong);background-image:repeating-linear-gradient(to right,rgb(176 67 28 / .5) 0 1px,transparent 1px 12px);background-repeat:repeat-x;background-position:0 0;background-size:auto 9px}
.tool-card{overflow:hidden;background:var(--surface);border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow-2)}
.tool-card-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 18px;border-bottom:1px solid var(--line);background:rgb(27 25 22 / .03)}
.tool-name{font-family:var(--font-head);font-size:15px;font-weight:700;letter-spacing:-.01em}
.tool-badge{flex:none;padding:3px 9px;border:1px solid rgb(31 95 91 / .3);border-radius:999px;font-family:var(--font-mono);font-size:12px;letter-spacing:.08em;text-transform:uppercase;white-space:nowrap;color:var(--accent)}
/* tool ui */
.tf-body{padding:18px}
.tf-drop{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:22px 18px;border:2px dashed var(--line-strong);border-radius:var(--radius);background:var(--bg);text-align:center;cursor:pointer;transition:border-color 160ms ease,background 160ms ease}
.tf-drop:hover,.tf-drop.is-over{border-color:var(--primary);background:#fbf2ec}
.tf-drop svg{width:32px;height:32px;margin-bottom:4px;fill:none;stroke:var(--primary);stroke-width:1.7}
.tf-drop-title{margin:0;font-family:var(--font-head);font-size:18px;font-weight:700;letter-spacing:-.01em}
.tf-drop-sub{margin:0 0 12px;font-size:13.5px;color:var(--muted)}
.tf-btn{display:inline-flex;align-items:center;justify-content:center;height:44px;padding:0 20px;border:1px solid var(--line-strong);border-radius:var(--radius);background:var(--surface);color:var(--text);font:600 14.5px/1 var(--font-body);text-decoration:none;cursor:pointer;transition:background 160ms ease,color 160ms ease,border-color 160ms ease,transform 160ms ease}
.tf-btn:hover{transform:translateY(-1px)}
.tf-btn-main{border-color:var(--primary);background:var(--primary);color:#fffdf8}
.tf-btn-main:hover{background:var(--primary-dark)}
.tf-btn[disabled]{border-color:var(--line-strong);background:#f1eade;color:#5b5348;opacity:1;cursor:not-allowed;transform:none}
/* 未选图时 Choose image 是唯一实心主按钮；选好图后它与 Compress 主次对调 */
#tf-pick{border-color:var(--primary);background:var(--primary);color:#fffdf8}
#tf-pick:hover{background:var(--primary-dark)}
.tf-body:has(.tf-go:not([disabled])) #tf-pick{border-color:var(--line-strong);background:var(--surface);color:var(--text)}
.tf-body:has(.tf-go:not([disabled])) #tf-pick:hover{background:var(--bg);border-color:var(--primary);color:var(--primary)}
/* 出结果后主操作交给 Download compressed image，Compress 退回次要样式 */
.tf-body:has(.tf-result:not([hidden])) .tf-go{border-color:var(--line-strong);background:var(--surface);color:var(--text);height:44px}
.tf-body:has(.tf-result:not([hidden])) .tf-go:hover{background:var(--bg);border-color:var(--primary);color:var(--primary)}
.tf-controls{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:16px}
.tf-field{display:flex;flex-direction:column;gap:6px;font-size:13px;color:var(--muted)}
.tf-field>span{font-weight:600;letter-spacing:.02em}
.tf-input-row{position:relative;display:flex;align-items:center;height:44px;padding:0 44px 0 10px;border:1px solid var(--line-strong);border-radius:8px;background:var(--surface)}
.tf-input-row input{width:100%;padding:0;border:0;background:transparent;color:var(--text);font:600 16px var(--font-mono);outline:none}
.tf-unit{position:absolute;right:12px;top:50%;transform:translateY(-50%);pointer-events:none;font-family:var(--font-mono);font-size:12px;color:var(--muted)}
.tf-select{height:44px;padding:0 10px;border:1px solid var(--line-strong);border-radius:8px;background:var(--surface);color:var(--text);font:15px var(--font-body)}
.tf-go{display:none;width:100%;height:48px;margin-top:16px}
.tf-go:not([disabled]){display:inline-flex;width:100%;height:48px}
.tf-status{min-height:22px;margin-top:10px;font-size:14px;color:var(--muted)}
.tf-status.is-error{color:#a32a14}
.tf-result{margin-top:16px;padding-top:16px;border-top:1px solid var(--line)}
.tf-compare{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.tf-compare figure{margin:0}
.tf-compare img{width:100%;height:170px;object-fit:contain;background:var(--bg);border:1px solid var(--line);border-radius:8px}
.tf-compare figcaption{margin-top:6px;font-family:var(--font-mono);font-size:12.5px;color:var(--muted)}
.tf-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px}
.tf-note{margin:10px 0 0;font-size:13px;color:var(--accent)}
/* sections */
.section{padding:var(--space-8) 0 0}
.section h2{margin:0 0 var(--space-5);font-size:var(--fs-xl)}
.section h3{font-size:18px;margin:0 0 4px}
.steps{display:grid;gap:var(--space-5);margin:0;padding:0;list-style:none}
.steps li{display:grid;grid-template-columns:64px 1fr;gap:18px;padding-bottom:var(--space-5);border-bottom:1px solid var(--line)}
.steps li:last-child{padding-bottom:0;border-bottom:0}
.step-num{font-family:var(--font-mono);font-size:28px;font-weight:600;line-height:1;color:rgb(176 67 28 / .55)}
.steps p{max-width:62ch;margin:0;font-size:15.5px;color:var(--muted)}
.split{display:grid;grid-template-columns:300px 1fr;gap:var(--space-7);align-items:start}
.split-side{position:sticky;top:88px}
.split-side h2{margin:0;font-size:28px}
.split-side p{margin:8px 0 0;font-family:var(--font-mono);font-size:12.5px;letter-spacing:.08em;text-transform:uppercase;color:var(--primary)}
.split-body p:first-child{margin-top:0}
.split-body p{max-width:66ch}
.size-table{width:100%;border-collapse:collapse;font-size:15px}
.size-table th{padding:10px 12px;border-bottom:1px solid var(--line-strong);text-align:left;font-size:12px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.size-table td{padding:12px;border-bottom:1px solid var(--line);vertical-align:top}
.size-table td:first-child{font-family:var(--font-mono);font-weight:600;white-space:nowrap}
.size-table tr:last-child td{border-bottom:0}
.size-note{margin:var(--space-4) 0 0;font-size:15px;color:var(--muted)}
.size-note a{font-weight:600}
.prose li{margin-bottom:6px}
.prose li strong{color:var(--text)}
.prose h2{margin:var(--space-7) 0 var(--space-3);font-size:26px}
.prose h2:first-child{margin-top:0}
.prose h3{margin:var(--space-5) 0 var(--space-2);font-size:19px}
.prose p,.prose li{max-width:70ch;color:#2c2822}
.prose ul,.prose ol{padding-left:22px}
.prose li{margin-bottom:6px}
.prose code{padding:1px 5px;border-radius:4px;background:rgb(27 25 22 / .06);font-family:var(--font-mono);font-size:.92em}
.prose strong{color:var(--text)}
.faq{padding-top:var(--space-6);border-top:1px solid var(--line)}
.faq h2{font-size:var(--fs-lg)}
.faq-item{padding:14px 0;border-bottom:1px solid var(--line)}
.faq-item summary{display:flex;align-items:baseline;justify-content:space-between;gap:16px;cursor:pointer;font-size:16.5px;font-weight:600;list-style:none;transition:color 160ms ease}
.faq-item summary:hover{color:var(--primary)}
.faq-item summary::-webkit-details-marker{display:none}
.faq-item summary::after{content:"+";font-family:var(--font-mono);font-weight:600;color:var(--primary)}
.faq-item[open] summary::after{content:"–"}
.faq-item p{max-width:70ch;margin:10px 0 0;font-size:15.5px;color:var(--muted)}
.doc{max-width:820px;padding-top:var(--space-7)}
.crumbs{margin-bottom:var(--space-4);font-family:var(--font-mono);font-size:13px;color:var(--muted)}
.crumbs a{color:var(--muted);text-decoration:none;transition:color 160ms ease}
.crumbs a:hover{color:var(--primary)}
.doc h1{margin:0 0 var(--space-5);font-size:var(--fs-xl)}
@media (max-width:900px){
  .split{grid-template-columns:1fr;gap:var(--space-4)}
  .split-side{position:static}
  .split-side h2{font-size:24px}
  .hero h1{font-size:38px}
  .foot-inner{grid-template-columns:1fr 1fr}
}
@media (max-width:640px){
  :root{--fs-2xl:32px;--fs-xl:26px}
  body{font-size:16px}
  .head-inner{height:56px}
  .site-nav{gap:14px;font-size:13px}
  .hero{padding:20px 0 24px}
  .eyebrow{margin-bottom:8px;font-size:12px;letter-spacing:.09em}
  .hero h1{margin-bottom:8px;font-size:30px;max-width:none}
  .hero .lede{margin-bottom:12px;font-size:15px;line-height:1.45}
  .hero-facts{display:none}
  .tool-card{border-radius:12px}
  .tool-card-head{padding:10px 14px}
  .tf-drop{padding:18px 14px}
  .tf-drop-title{font-size:17px}
  .tf-drop-sub{margin-bottom:10px;max-width:32ch;font-size:12.5px}
  .tf-body{padding:12px}
  .tf-body .tf-btn{height:48px}
  .tf-controls{grid-template-columns:1fr;gap:10px;margin-top:12px}
  .tf-field>span{font-size:13.5px}
  .tf-input-row{height:54px}
  .tf-input-row input{font-size:18px}
  .tf-unit{right:14px;font-size:13px}
  .tf-select{height:54px}
  .tf-compare{grid-template-columns:1fr}
  .tf-compare img{height:140px}
  .tf-actions .tf-btn{width:100%}
  .steps li{grid-template-columns:44px 1fr;gap:12px}
  .step-num{font-size:22px}
  .section{padding-top:var(--space-7)}
  .prose h2{font-size:22px}
  .size-table{font-size:14px}
  .size-table th:nth-child(3),.size-table td:nth-child(3){display:none}
  .foot-inner{grid-template-columns:1fr;gap:var(--space-5)}
  .site-foot{margin-top:var(--space-8)}
}


@media (max-width:720px){.hero{padding:16px 0 22px}.eyebrow{margin-bottom:7px;font-size:12px}.hero h1{margin-bottom:10px;font-size:31px}.hero .lede{display:none}.hero-facts{display:none}.tool-card-head{padding:10px 14px}.tf-body{padding:12px}.tf-drop{padding:16px 14px}.tf-drop-sub{margin-bottom:10px;font-size:12.5px}.site-nav a{display:inline-flex;align-items:center;min-height:44px;padding:0 8px}}
.tf-input-row{position:static;height:46px;padding:0 12px;gap:6px;justify-content:flex-start}
.tf-input-row input{flex:0 1 auto;width:9ch;min-width:0;border:0;background:none;text-align:left;font-family:var(--font-mono);font-variant-numeric:tabular-nums}
.tf-unit{position:static;transform:none;margin-left:2px;pointer-events:none;font-size:12.5px}
@media (max-width:720px){.tf-input-row{height:52px}.tf-input-row input{font-size:18px;width:8ch}.tf-unit{font-size:13px}}


@media (max-width:720px){.hero{padding:10px 0 20px}.hero h1{font-size:29px;line-height:1.12;margin-bottom:9px}.eyebrow{margin-bottom:6px}.tool-card-head{padding:8px 13px}.tool-name{font-size:12.5px}.tf-body{padding:11px}.tf-drop{padding:14px 12px}.tf-drop svg{width:26px;height:26px;margin-bottom:6px}.tf-drop-title{font-size:16px;margin-bottom:4px}.tf-drop-sub{margin-bottom:9px;font-size:12px;line-height:1.35}}


@media (max-width:720px){.hero{padding:8px 0 18px}.hero h1{font-size:28px;line-height:1.1;margin-bottom:8px}.tool-card-head{display:none}.tool-card{border-top:0;border-radius:12px}.tf-drop{padding:12px}.tf-drop svg{width:24px;height:24px;margin-bottom:5px}.tf-drop-title{font-size:15.5px;margin-bottom:3px}.tf-drop-sub{margin-bottom:8px}.tf-drop .tf-btn{width:100%}}
