
:root{
  --bg:#EEF2EF; --surface:#FFFFFF; --surface-2:#F6F9F7; --ink:#15231E; --muted:#56675F;
  --line:#D3DDD8; --line-strong:#A9BAB2; --brand:#0E5A47; --brand-hover:#0A4838; --brand-ink:#FFFFFF;
  --accent:#F0B429; --accent-soft:#FDF1CF; --danger:#B42318; --ok:#1E7A4F;
  --f-pdf:#D64545; --f-docx:#2F62D8; --f-xlsx:#1E8A4F; --f-img:#D08410; --f-html:#7B4FD0;
  --display:"Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --body:"Figtree", "Segoe UI", system-ui, -apple-system, sans-serif;
  box-sizing:border-box;
  padding-top:env(safe-area-inset-top,0px); padding-bottom:env(safe-area-inset-bottom,0px);
  color-scheme:light;
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --bg:#0F1714; --surface:#17221E; --surface-2:#1C2924; --ink:#E4EDE9; --muted:#93A69D;
    --line:#2A3A34; --line-strong:#40554C; --brand:#3DB48D; --brand-hover:#52C6A0; --brand-ink:#08130F;
    --accent:#F4C04E; --accent-soft:#3A3217; color-scheme:dark;
  }
}
:root[data-theme="dark"]{
  --bg:#0F1714; --surface:#17221E; --surface-2:#1C2924; --ink:#E4EDE9; --muted:#93A69D;
  --line:#2A3A34; --line-strong:#40554C; --brand:#3DB48D; --brand-hover:#52C6A0; --brand-ink:#08130F;
  --accent:#F4C04E; --accent-soft:#3A3217; color-scheme:dark;
}
*,*::before,*::after{box-sizing:inherit}
html{scroll-padding-top:env(safe-area-inset-top,0px)}
body{margin:0;background:var(--bg);color:var(--ink);font-family:var(--body);font-size:16px;line-height:1.55;-webkit-font-smoothing:antialiased}
img{max-width:100%}
a{color:inherit}
button,input,textarea,select{font:inherit;color:inherit}
:focus-visible{outline:3px solid var(--accent);outline-offset:2px;border-radius:6px}
.wrap{max-width:1180px;margin:0 auto;padding:0 20px}

/* Header */
.site-head{position:sticky;top:env(safe-area-inset-top,0px);z-index:20;background:color-mix(in srgb,var(--bg) 88%,transparent);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);border-bottom:1px solid var(--line)}
.site-head .wrap{display:flex;align-items:center;gap:18px;height:64px}
.logo{display:flex;align-items:center;gap:10px;text-decoration:none;font-family:var(--display);font-weight:800;font-size:1.35rem;letter-spacing:-.02em}
.logo svg{width:26px;height:32px}
.head-nav{display:flex;gap:4px;margin-left:12px}
.head-nav a{text-decoration:none;padding:8px 12px;border-radius:8px;color:var(--muted);font-weight:500;font-size:.95rem}
.head-nav a:hover{color:var(--ink);background:var(--surface)}
.head-right{margin-left:auto;display:flex;align-items:center;gap:10px}
.local-badge{display:flex;align-items:center;gap:6px;font-size:.85rem;color:var(--muted)}
.local-badge svg{width:16px;height:16px;color:var(--brand)}
.icon-btn{width:38px;height:38px;border-radius:10px;border:1px solid var(--line);background:var(--surface);display:grid;place-items:center;cursor:pointer}
.icon-btn svg{width:18px;height:18px}
@media (max-width:760px){.head-nav,.local-badge{display:none}}

/* Hero */
.hero{display:grid;grid-template-columns:1.15fr .85fr;gap:48px;align-items:center;padding:56px 0 40px}
.hero h1{font-family:var(--display);font-weight:800;font-size:clamp(2.4rem,5.2vw,4.1rem);line-height:1.02;letter-spacing:-.03em;margin:0 0 20px;max-width:13ch}
.hero p{font-size:1.15rem;color:var(--muted);max-width:46ch;margin:0}
.hero-facts{display:flex;flex-wrap:wrap;gap:10px 22px;margin-top:26px;font-size:.95rem;font-weight:500}
.hero-facts span{display:flex;align-items:center;gap:8px}
.hero-facts svg{width:18px;height:18px;color:var(--brand)}
@media (max-width:860px){.hero{grid-template-columns:1fr;gap:28px;padding:36px 0 24px}}

/* The sheet: folded-corner drop target */
.sheet{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:10px;min-height:340px;padding:40px 28px;background:var(--surface);color:var(--ink);cursor:pointer;
  clip-path:polygon(0 0,calc(100% - 64px) 0,100% 64px,100% 100%,0 100%);border-radius:4px 0 4px 4px;transition:transform .25s ease, background .2s}
.sheet::before{content:"";position:absolute;top:0;right:0;width:64px;height:64px;background:linear-gradient(225deg,transparent 50%,var(--accent) 50%);border-bottom-left-radius:6px}
.sheet::after{content:"";position:absolute;inset:14px;border:2px dashed var(--line-strong);border-radius:4px;pointer-events:none;clip-path:polygon(0 0,calc(100% - 58px) 0,100% 58px,100% 100%,0 100%)}
.sheet:hover,.sheet.drag{background:var(--accent-soft)}
.sheet.drag{transform:rotate(-1.5deg) scale(1.01)}
.sheet-title{font-family:var(--display);font-weight:800;font-size:1.6rem;letter-spacing:-.02em}
.sheet-sub{color:var(--muted);max-width:30ch}
.sheet .btn{margin-top:8px;pointer-events:none}
.sheet-icon{width:52px;height:52px;color:var(--brand)}
@media (prefers-reduced-motion:reduce){.sheet,.sheet.drag{transition:none;transform:none}}

/* Picker after dropping a file on the home page */
.picker{background:var(--surface);border:1px solid var(--line);border-left:5px solid var(--accent);border-radius:10px;padding:18px 20px;margin:0 0 28px}
.picker p{margin:0 0 12px;font-weight:500}
.picker-row{display:flex;flex-wrap:wrap;gap:10px}

/* Tool groups */
.group{padding:22px 0 18px}
.group-head{display:flex;align-items:baseline;gap:14px;flex-wrap:wrap;margin-bottom:16px}
.group h2{font-family:var(--display);font-weight:800;font-size:1.55rem;letter-spacing:-.02em;margin:0}
.group-head p{margin:0;color:var(--muted)}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:14px}
.tool-card{display:flex;flex-direction:column;gap:8px;text-decoration:none;background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:18px 18px 20px;transition:border-color .15s}
.tool-card:hover{border-color:var(--brand)}
.tool-card h3{margin:6px 0 0;font-size:1.1rem;font-weight:700}
.tool-card p{margin:0;color:var(--muted);font-size:.95rem;line-height:1.45}

/* Format glyphs */
.pair{display:flex;align-items:center;gap:6px}
.pair .arrow{width:18px;height:18px;color:var(--muted)}
.glyph{width:34px;height:42px;flex:none}
.glyph text{font-family:var(--body);font-weight:700;font-size:9px;fill:#fff;letter-spacing:.02em}
.pair.lg .glyph{width:54px;height:66px}
.pair.lg .arrow{width:24px;height:24px}

/* Buttons */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:46px;padding:0 20px;border-radius:10px;border:1px solid transparent;font-weight:600;cursor:pointer;text-decoration:none;white-space:nowrap}
.btn.primary{background:var(--brand);color:var(--brand-ink)}
.btn.primary:hover{background:var(--brand-hover)}
.btn.primary:disabled{opacity:.45;cursor:not-allowed}
.btn.ghost{background:transparent;border-color:var(--line-strong)}
.btn.ghost:hover{background:var(--surface-2)}
.btn.small{height:38px;padding:0 14px;font-size:.93rem}
.btn.block{width:100%}
.btn svg{width:18px;height:18px}

/* Tool page */
.crumb{padding:22px 0 0}
.crumb a{text-decoration:none;color:var(--muted);font-weight:500;display:inline-flex;align-items:center;gap:6px}
.crumb a:hover{color:var(--ink)}
.crumb svg{width:16px;height:16px}
.tool-head{display:flex;align-items:center;gap:22px;padding:18px 0 26px}
.tool-head h1{font-family:var(--display);font-weight:800;font-size:clamp(1.9rem,4vw,2.7rem);letter-spacing:-.025em;line-height:1.05;margin:0 0 6px}
.tool-head p{margin:0;color:var(--muted);font-size:1.05rem;max-width:60ch}
@media (max-width:600px){.tool-head{flex-direction:column;align-items:flex-start;gap:14px}}
.workspace{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:22px;align-items:start;padding-bottom:60px}
@media (max-width:900px){.workspace{grid-template-columns:1fr}}
.drop{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:10px;min-height:340px;border:2px dashed var(--line-strong);border-radius:18px;background:var(--surface);padding:32px;cursor:pointer;transition:background .15s,border-color .15s}
.drop:hover,.drop.drag{background:var(--accent-soft);border-color:var(--accent)}
.drop .sheet-title{font-size:1.4rem}
.drop small{color:var(--muted)}
.files{display:flex;flex-direction:column;gap:10px}
.file{display:flex;align-items:center;gap:14px;background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:10px 12px}
.thumb{width:56px;height:70px;flex:none;border-radius:6px;background:var(--surface-2);border:1px solid var(--line);display:grid;place-items:center;overflow:hidden}
.thumb img,.thumb canvas{width:100%;height:100%;object-fit:cover;background:#fff}
.file-info{flex:1;min-width:0}
.file-name{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.file-meta{color:var(--muted);font-size:.9rem}
.file-actions{display:flex;gap:4px}
.file-actions button{width:34px;height:34px;border-radius:8px;border:1px solid var(--line);background:transparent;cursor:pointer;display:grid;place-items:center}
.file-actions button:hover{background:var(--surface-2)}
.file-actions button:disabled{opacity:.3;cursor:default}
.file-actions svg{width:16px;height:16px}
.add-more{display:flex;align-items:center;justify-content:center;gap:8px;border:2px dashed var(--line-strong);border-radius:12px;padding:14px;color:var(--muted);cursor:pointer;font-weight:600;background:transparent}
.add-more:hover{border-color:var(--brand);color:var(--ink)}

.panel{position:sticky;top:84px;background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:20px}
.panel h2{font-family:var(--display);font-weight:800;font-size:1.2rem;margin:0 0 14px;letter-spacing:-.01em}
.opt{margin-bottom:18px}
.opt-label{font-weight:600;font-size:.95rem;margin-bottom:8px;display:block}
.choices{display:flex;flex-direction:column;gap:6px}
.choice{display:flex;align-items:flex-start;gap:10px;padding:10px 12px;border:1px solid var(--line);border-radius:10px;cursor:pointer}
.choice:has(input:checked){border-color:var(--brand);background:color-mix(in srgb,var(--brand) 8%,transparent)}
.choice input{accent-color:var(--brand);margin:3px 0 0}
.choice span{font-size:.95rem}
.hint{font-size:.87rem;color:var(--muted);margin-top:6px}
.check{display:flex;gap:10px;align-items:flex-start;cursor:pointer;font-size:.95rem}
.check input{accent-color:var(--brand);margin-top:4px}
textarea.code{width:100%;min-height:150px;resize:vertical;border:1px solid var(--line);border-radius:10px;padding:10px;background:var(--surface-2);font-family:ui-monospace,Menlo,Consolas,monospace;font-size:.85rem}
.privacy{display:flex;gap:8px;font-size:.85rem;color:var(--muted);margin-top:14px}
.privacy svg{width:16px;height:16px;flex:none;margin-top:2px;color:var(--brand)}
.progress{height:8px;background:var(--surface-2);border:1px solid var(--line);border-radius:99px;overflow:hidden;margin-top:14px}
.progress div{height:100%;width:0;background:var(--brand);transition:width .2s}
.progress-label{font-size:.88rem;color:var(--muted);margin-top:8px;min-height:1.3em}

.result{background:var(--surface);border:1px solid var(--line);border-radius:18px;padding:40px 28px;text-align:center;display:flex;flex-direction:column;align-items:center;gap:8px}
.result h2{font-family:var(--display);font-weight:800;font-size:1.8rem;margin:10px 0 0;letter-spacing:-.02em}
.result .file-meta{font-size:1rem}
.result .note{background:var(--accent-soft);border-radius:10px;padding:10px 14px;max-width:52ch;font-size:.93rem;margin-top:6px}
.result-actions{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;margin-top:16px}
.saving{font-size:.95rem;color:var(--ok);font-weight:600;display:flex;align-items:center;gap:6px}
.next-list{display:flex;flex-direction:column;gap:8px}
.next-list a{display:flex;align-items:center;gap:10px;text-decoration:none;padding:10px;border:1px solid var(--line);border-radius:10px}
.next-list a:hover{border-color:var(--brand)}
.next-list .glyph{width:24px;height:30px}

/* Footer */
.site-foot{border-top:1px solid var(--line);padding:28px 0 40px;color:var(--muted);font-size:.9rem;margin-top:30px}
.site-foot .wrap{display:flex;flex-wrap:wrap;gap:12px 28px;justify-content:space-between}
.site-foot p{margin:0;max-width:70ch}

/* Text pages */
.textpage{max-width:68ch;padding:36px 0 40px}
.textpage h1{font-family:var(--display);font-weight:800;font-size:clamp(2rem,4vw,2.6rem);letter-spacing:-.025em;margin:12px 0 18px}
.textpage h2{font-size:1.15rem;margin:26px 0 8px}
.textpage p,.textpage li{color:var(--ink)}
/* Toast */
.toast{position:fixed;left:50%;bottom:calc(24px + env(safe-area-inset-bottom,0px));transform:translateX(-50%);background:var(--ink);color:var(--bg);padding:12px 18px;border-radius:10px;max-width:min(92vw,520px);font-size:.95rem;z-index:50;box-shadow:0 10px 30px rgba(0,0,0,.25)}
.toast.err{background:var(--danger);color:#fff}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}

/* Breadcrumb */
.crumb ol{list-style:none;display:flex;flex-wrap:wrap;gap:6px;margin:0;padding:0;color:var(--muted);font-weight:500}
.crumb li+li::before{content:"/";margin-right:6px;color:var(--line-strong)}
.crumb a{display:inline}
/* SEO content */
.content{max-width:820px;padding:30px 0 10px}
.content h2,.related h2{font-family:var(--display);font-weight:800;font-size:1.55rem;letter-spacing:-.02em;margin:36px 0 14px}
.content > p{max-width:68ch}
.steps{list-style:none;counter-reset:s;padding:0;margin:0;display:grid;gap:14px}
.steps li{counter-increment:s;display:grid;grid-template-columns:38px 1fr;gap:12px;align-items:start;max-width:68ch}
.steps li::before{content:counter(s);width:32px;height:32px;border-radius:50%;background:var(--brand);color:var(--brand-ink);display:grid;place-items:center;font-weight:700}
.features{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:20px}
.features h3{font-size:1.05rem;margin:0 0 6px}
.features p{margin:0;color:var(--muted)}
.faq details{border-bottom:1px solid var(--line);padding:16px 0}
.faq details:first-child{border-top:1px solid var(--line)}
.faq summary{cursor:pointer;font-weight:600;list-style:none;display:flex;justify-content:space-between;gap:16px}
.faq summary::-webkit-details-marker{display:none}
.faq summary::after{content:"+";font-size:1.4rem;line-height:1;color:var(--muted);flex:none}
.faq details[open] summary::after{content:"\2013"}
.faq p{margin:10px 0 0;color:var(--muted);max-width:68ch}
.related{padding:10px 0 20px}
/* Footer */
.foot-grid{display:grid;grid-template-columns:1.2fr 2fr;gap:24px 40px;width:100%}
.foot-tools{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:6px 18px;list-style:none;margin:0;padding:0}
.foot-tools a,.foot-meta a{text-decoration:none}
.foot-tools a:hover,.foot-meta a:hover{color:var(--ink);text-decoration:underline}
.foot-meta{display:flex;gap:18px;flex-wrap:wrap;margin-top:10px}
@media (max-width:700px){.foot-grid{grid-template-columns:1fr}}
