/* Shared editorial palette and navigation */
:root {--ink:#182e29;--pine:#105445;--paper:#f6f6ef;--edge:#d4dcd1;--accent:#daef9d}
body {background:var(--paper);color:var(--ink);font-family:"Segoe UI",Arial,sans-serif}
a,.text-link,.conversion-guide a {color:var(--pine)}
.mast,.studio-footer {width:min(1180px,92%);margin:auto;display:flex;align-items:center;justify-content:space-between;padding:20px 0;border-bottom:1px solid var(--edge)}
.wordmark {display:inline-flex;align-items:center;gap:10px;color:var(--ink);font-size:23px;font-weight:750;letter-spacing:-1px}
.wordmark i {width:30px;height:30px;border-radius:8px;background:repeating-linear-gradient(130deg,#164d41 0 5px,#d9eca4 5px 9px)}
.directory {position:relative;z-index:30}
.directory summary {cursor:pointer;border:1px solid #bac8b9;border-radius:24px;padding:8px 16px;font-weight:600}
.directory nav {position:absolute;right:0;top:calc(100% + 10px);display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;width:min(540px,90vw);max-height:70vh;overflow:auto;background:white;padding:22px;border:1px solid var(--edge);border-radius:18px;box-shadow:0 16px 48px #193b2722}
.directory nav a,.directory nav b {display:block;padding:5px 0;font-size:14px}
.directory nav a:hover,footer nav a:hover {text-decoration:underline}
main {padding:22px 0;width:min(1180px,92%)}
.hero {margin:0;background:linear-gradient(115deg,#e5eedb,#eff3e7 65%,#e2ead9);padding:clamp(22px,4vw,64px);gap:clamp(24px,5vw,70px);border:1px solid #cedbc8;border-radius:28px;min-height:0}
.hero:before,.hero:after,.converter-card:before,.hero-social,.announcement {display:none}
.hero h1,.reading h1 {font:normal clamp(42px,5.4vw,78px)/1.03 Georgia,serif;letter-spacing:-.048em;color:var(--ink);margin:14px 0 20px;overflow-wrap:break-word}
.hero h1 span {color:var(--pine);background:none;font-style:italic}
.hero h1 br:after {content:" "}
.hero p,.hero-lede {color:#43594c;line-height:1.65}
.eyebrow,.card-caption {color:#4e6558}
.converter-card {background:#fff;border:1px solid #cbd6ca;border-radius:20px;box-shadow:0 12px 36px #294e3310;padding:clamp(18px,2.4vw,32px);transform:none}
.file-surface {background:repeating-conic-gradient(#f0f4ea 0 25%,#f8faf5 0 50%) 0 0/20px 20px;border:1.5px dashed #859c87;border-radius:14px;color:var(--ink)}
.file-surface:hover,.file-surface:focus-within,.file-surface.drag-active {background:#edf5dd;border-color:var(--pine);outline-color:#9abc93}
.file-action,.primary-button,.download-all {background:var(--pine);color:white;border-radius:10px}
.primary-button:not(:disabled):hover {background:#183e33}
.primary-button:disabled {background:#dce3d9;color:#536453}
.file-symbol,.trust-icon,.step-num,.secure-pill {background:#e4efd1;color:var(--pine)}
.settings select,.settings input[type=number],.edit-controls select {padding:7px 10px;border:1px solid #aabca9;border-radius:8px}
.settings input[type=range]{accent-color:var(--pine)}
.converter-card a[download]:not([hidden]) {display:inline-block;border-radius:8px;background:var(--accent);color:#183e33;padding:8px 14px;font-weight:650}
h2,.section-heading h2,.related h2,.info-copy h2 {font:normal clamp(25px,3vw,38px)/1.14 Georgia,serif;color:var(--ink);letter-spacing:-.035em}
.related,.trust-strip,.format-card,.faq-list details,.steps article,.guide-examples article {border-color:var(--edge)}
.related {background:#e9efdf;display:block;border-radius:20px}
.related-links a {color:var(--pine);border-color:#d4ddcf;background:#fff}
.studio-footer {border-top:1px solid var(--edge);border-bottom:0;margin-top:28px;font-size:14px}
.reading {max-width:760px;background:white;padding:clamp(24px,5vw,60px);margin:36px auto;border:1px solid var(--edge);border-radius:22px}
:focus-visible {outline:3px solid #40794d;outline-offset:3px}
@media(max-width:800px){.hero{grid-template-columns:minmax(0,1fr);padding:20px;gap:16px}.hero h1{margin:4px 0 10px}.hero h1 br{display:initial}.mast,.studio-footer{padding:14px 0}.directory nav{gap:12px}.hero .converter-card{min-width:0}.related-links{width:100%}}
@media(max-width:480px){.directory nav{grid-template-columns:1fr 1fr}.hero{padding:16px;border-radius:18px}.file-surface{min-height:175px}.trust-strip{grid-template-columns:1fr}.studio-footer nav{display:flex;gap:8px}}
.mast-links {display:flex;align-items:center;gap:clamp(12px,3vw,32px);font-size:15px}
.mast [aria-current=page],.studio-footer [aria-current=page]{text-decoration:underline;text-underline-offset:4px}
.mast .directory nav{right:0}
.studio-footer {display:block;border-top:1px solid #c9d4c5;padding:36px 0 16px}
.foot-grid {display:grid;grid-template-columns:1.5fr repeat(3,1fr);align-items:start;gap:28px}
.foot-grid p {max-width:25ch;color:#526358;line-height:1.6}
.studio-footer .foot-grid nav {display:grid;gap:8px;font-size:14px}
.foot-grid strong {color:#253e30;margin-bottom:4px}
.foot-bottom {display:flex;justify-content:space-between;align-items:center;border-top:1px solid #d4dcd1;margin-top:24px;padding-top:16px}
@media(max-width:700px){.foot-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}.mast{position:relative}.mast .directory{position:static}.mast .directory nav{top:100%;right:0;width:100%}.mast-links{gap:12px}}
@media(max-width:420px){.mast-links>a:first-child{display:none}.mast-links{font-size:14px}.wordmark{font-size:20px}}
#sample{background:white;border:1px solid var(--edge);border-radius:8px;padding:8px 12px;margin-top:10px;cursor:pointer}
#sizeField:not([hidden]){display:block;margin:12px 0}.compare-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.compare-grid figure{margin:0;min-width:0}.compare-grid figure div{height:120px;overflow:auto;background:repeating-conic-gradient(#eee 0 25%,white 0 50%) 0 0/16px 16px}.compare-grid img{width:100%;height:100%;object-fit:contain}.actual .compare-grid img{width:auto;height:auto;max-width:none}.compare-grid figcaption{font-size:13px}

/* Give every setting an independent row, including at narrow card widths. */
.converter-card .settings,.converter-card .edit-controls {display:grid;grid-template-columns:minmax(0,1fr);gap:12px;padding:20px 0;margin:0}
.converter-card .settings>label,.converter-card .edit-controls label {display:grid;gap:7px;font-weight:600;margin:0}
.converter-card label[for=quality]{display:flex;justify-content:space-between;align-items:center}
.converter-card .settings output{float:none;font-variant-numeric:tabular-nums}
.converter-card .settings select,.converter-card .settings input[type=number]{max-width:100%;width:100%;min-height:40px}
.converter-card #sizeField[hidden],.converter-card [hidden]{display:none}
.converter-card .range-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:12px;margin:0;align-items:center}
.converter-card .range-row input{width:100%;margin:0}.converter-card .setting-foot{margin:0 0 6px}
.converter-card .color-row{display:grid;grid-template-columns:minmax(0,1fr);gap:7px}
.converter-card .primary-button{min-height:44px;margin-top:12px}.converter-card .status{line-height:1.6;margin:12px 0}
.page-notes{max-width:780px;margin:clamp(40px,7vw,84px) auto;line-height:1.7}
.page-notes h2{margin:32px 0 12px}.page-notes details{border-bottom:1px solid var(--edge);padding:14px 0}.page-notes summary{cursor:pointer;font-weight:600}
.related-links{gap:14px}.foot-grid nav a{padding-block:3px}
@media(max-width:480px){.related-links,.guide-examples,.trust-strip{grid-template-columns:minmax(0,1fr)}.converter-card .card-top{flex-wrap:wrap}.converter-card .result-item{flex-wrap:wrap}.converter-card{min-width:0}}
/* Homepage sections share the masthead's edges. Limit prose widths independently. */
.home-page main {width:min(1180px,92%);max-width:none;margin-inline:auto;padding-inline:0}
.home-page main > section:not(.hero) {width:100%;max-width:none;margin:clamp(36px,5vw,68px) 0}
.home-page .trust-strip {margin:18px 0 0}
.home-page .section-heading {text-align:left;margin:0 0 20px}
.home-page .section-heading h2,.home-page .conversion-guide h2,.home-page .tool-library > h2 {margin:8px 0 12px}
.home-page .steps {margin:0}
.home-page .info-grid {align-items:start;gap:clamp(24px,4vw,54px)}
.home-page .format-card {align-self:start;padding:clamp(18px,2vw,28px)}
.home-page .format-card-head {display:flex;justify-content:space-between;gap:10px;padding-bottom:14px;font-size:13px;font-weight:700;letter-spacing:.04em}
.home-page .format-card-head span {color:var(--pine)}
.home-page .tip-box {margin-top:18px;border-left:3px solid #91ad80;background:#ebf0e4;padding:12px 18px;border-radius:0 8px 8px 0}
.home-page .tip-box p {margin:0}
.home-page .conversion-guide,.home-page .faq-section,.home-page .tool-library {border-top:1px solid var(--edge);padding-top:clamp(24px,3vw,38px)}
.home-page .conversion-guide > p {max-width:80ch}
.home-page .guide-examples {gap:clamp(12px,2vw,24px);margin:22px 0 36px}
.home-page .guide-examples article {padding:clamp(18px,2vw,26px);border-radius:14px}
.home-page .guide-examples h3 {line-height:1.35}
.home-page .guide-examples p,.home-page .steps p {color:#43564e;line-height:1.65}
.home-page .faq-list {display:block;max-width:none;margin:0}
.home-page .faq-list details {max-width:none;margin:0;background:transparent;border:0;border-bottom:1px solid var(--edge);border-radius:0;padding:15px 0}
.home-page .faq-list details p {max-width:78ch}
.tool-columns {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:24px;margin-top:20px}
.tool-columns section {border-top:2px solid #adc2a3;padding-top:14px}
.tool-columns h3 {margin:0 0 8px;font-size:17px}
.tool-columns a {display:block;padding:6px 0;font-size:15px}
.tool-columns a:hover {text-decoration:underline}
@media(max-width:850px){.tool-columns{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){.home-page main,.home-page .mast,.home-page .studio-footer{width:calc(100% - 32px)}.tool-columns{gap:18px}.tool-columns a{overflow-wrap:anywhere}.home-page .format-row{flex-wrap:wrap}}
.processing-panel:not([hidden]){display:grid;gap:8px;margin:14px 0;color:var(--pine);font-size:14px}
.processing-panel progress{width:100%;height:10px;accent-color:var(--pine)}
.export-options{border-top:1px solid var(--edge);margin-top:18px;padding-top:12px;font-size:14px}
.export-options summary{cursor:pointer;font-weight:600}.export-options label{display:grid;gap:6px;margin:12px 0}
.export-options input,.export-options button{padding:8px 12px;border:1px solid var(--edge);border-radius:8px;background:white;max-width:100%}.export-options button{cursor:pointer;margin-top:8px}
.catalog-group{margin:26px 0 34px}
.catalog-group h3{margin:0 0 12px;font-size:18px;color:var(--pine)}
.catalog-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));gap:14px}
.catalog-card{position:relative;display:flex;flex-direction:column;gap:10px;padding:20px 42px 20px 20px;background:white;border:1px solid var(--edge);border-radius:14px;color:var(--ink);box-shadow:0 3px 12px #183e3306}
.catalog-card strong{font-size:17px;line-height:1.35}
.catalog-card span{font-size:14px;line-height:1.55;color:#526358}
.catalog-card i{position:absolute;right:16px;top:16px;color:var(--pine);font-style:normal}
.catalog-card:hover,.catalog-card:focus-visible{border-color:#729782;background:#f7fbf4;box-shadow:0 5px 16px #183e3310}
/* Keep the first action within reach; expanded settings grow with their content. */
.hero .converter-card{align-self:center;padding:clamp(16px,2vw,24px)}
.converter-card .file-surface{min-height:134px;gap:5px;padding:12px}
.converter-card .file-symbol{width:28px;height:28px;font-size:18px}
.converter-card .card-top{margin-bottom:12px}
.converter-card #sample{margin:8px 0 0;padding:5px 10px}
.tool-settings{margin:10px 0 0;border-block:1px solid var(--edge)}
.tool-settings summary,.export-options summary{padding:9px 0;cursor:pointer;font-weight:600;font-size:14px}
.converter-card .tool-settings .settings,.converter-card .tool-settings .edit-controls{padding:5px 0 14px;gap:8px}
.converter-card .export-options{margin-top:8px;padding:0}
.converter-card .primary-button{margin-top:10px}
.converter-card .status,.converter-card [role=status]{margin:6px 0;font-size:13px}
.converter-card .file-feedback:empty,.converter-card .edit-controls:empty{display:none}
@media(max-width:800px){
.hero:has(.converter-card){gap:12px;padding:16px}
.hero:has(.converter-card)>div:first-child:not(.converter-card)>:not(h1){display:none}
.hero:has(.converter-card) h1{font-size:clamp(26px,5vw,38px);margin:0}
.hero:has(.converter-card) h1 br{display:none}
}
.mast{position:relative;z-index:35}
.mast .directory{position:static}
.mast .directory nav{top:calc(100% - 4px);left:0;right:0;width:100%;grid-template-columns:repeat(4,minmax(0,1fr));gap:24px;padding:24px;max-height:70vh;overflow:auto}
.mega-group b{border-bottom:1px solid var(--edge);margin-bottom:6px;color:var(--ink)}
.directory nav a:hover{background:#edf4e7}
.live-output:not([hidden]){display:block;width:100%;max-height:260px;object-fit:contain;background:#f3f6ef;border:1px solid var(--edge);border-radius:10px;margin:12px 0}
iframe.live-output{height:250px}
@media(max-width:760px){.mast .directory nav{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;padding:14px}}
.directory .mega-group [hidden]{display:none}
.mega-group button{width:100%;text-align:left;border:0;background:#eef3e8;border-radius:6px;padding:9px;color:var(--pine);font-weight:650}
.mega-group button::after{content:"+";float:right}.mega-group button[aria-expanded=true]::after{content:"−"}
@media(max-width:760px){.mast .directory nav{grid-template-columns:1fr;gap:6px}}
/* Upload workspace */
.hero:has(.file-surface){display:block;background:transparent;border:0;padding:clamp(12px,2vw,28px) 0;overflow:visible}
.hero:has(.file-surface)::before,.hero:has(.file-surface)::after{display:none}
.hero:has(.file-surface)>div:first-child:not(.converter-card){max-width:860px;margin:0 0 20px}
.hero:has(.file-surface) h1{font:730 clamp(30px,4vw,54px)/1.06 "Segoe UI",Arial,sans-serif;letter-spacing:-.052em;margin:0 0 8px}
.hero:has(.file-surface) h1 span{font-style:normal;color:#30645c}
.hero:has(.file-surface) h1 br{display:none}
.hero:has(.file-surface)>div:first-child>p{margin:4px 0;font-size:15px}
.hero:has(.file-surface) .hero-proof,.hero:has(.file-surface) .hero-copy>.text-link,.hero:has(.file-surface) .hero-copy>.eyebrow{display:none}
.hero .converter-card{padding:clamp(15px,2vw,26px);border:1px solid #d4dfdc;border-radius:20px;box-shadow:0 8px 28px #142e2b0c}
.converter-card .file-surface{display:grid;grid-template-columns:54px minmax(0,1fr) auto;grid-template-rows:auto auto;align-items:center;align-content:center;justify-items:start;gap:2px 18px;min-height:124px;text-align:left;padding:20px clamp(16px,3vw,38px);border:1px solid #385952;border-radius:14px;color:#fff;background:radial-gradient(ellipse at 72% 140%,#346655,transparent 58%),linear-gradient(115deg,#142a30,#193d37);box-shadow:inset 0 1px #ffffff16;transition:box-shadow .16s,border-color .16s}
.file-surface .upload-emblem{grid-area:1/1/3/2;width:48px;height:48px;display:grid;place-items:center;background:#ffffff12;border:1px solid #ffffff38;border-radius:14px}
.upload-emblem i{width:20px;height:13px;border:2px solid #d6f3df;border-top:0;border-radius:0 0 4px 4px;position:relative;margin-top:9px}
.upload-emblem i::before{content:"";position:absolute;left:7px;bottom:5px;width:2px;height:15px;background:#d6f3df}
.upload-emblem i::after{content:"";position:absolute;left:4px;bottom:13px;width:7px;height:7px;border-left:2px solid #d6f3df;border-top:2px solid #d6f3df;transform:rotate(45deg)}
.file-surface strong{grid-area:1/2/2/3;align-self:end;font-size:clamp(16px,2vw,21px);letter-spacing:-.025em}
.file-surface small{grid-area:2/2/3/3;align-self:start;color:#c6ded6}
.file-surface .file-action{grid-area:1/3/3/4;background:#d9f3ad;color:#173626;border-radius:9px;padding:10px 17px}
.converter-card .file-surface.drag-active,.converter-card .file-surface:focus-within{border-color:#92c76b;outline:3px solid #a7d48e;outline-offset:2px;box-shadow:inset 0 0 0 3px #b3dd8d44}
.converter-card .file-feedback:not(:empty){display:inline-block;background:#edf4ed;padding:5px 10px;border-radius:6px;max-width:100%}
.converter-card .tool-settings .edit-controls{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,130px),1fr));gap:12px}
.edit-controls label input:not([type=checkbox]),.edit-controls label select{width:100%;min-width:0;box-sizing:border-box}
.converter-card[data-mode] canvas:not([hidden]){display:block;width:auto;height:auto;max-width:100%;max-height:48vh;margin:14px auto;border-radius:8px}
@media(min-width:850px){
.converter-card[data-mode="image-cropper"]:has(canvas:not([hidden])){display:grid;grid-template-columns:minmax(0,1.65fr) minmax(260px,1fr);gap:10px 24px;align-items:start}
.converter-card[data-mode="image-cropper"]:has(canvas:not([hidden]))>*{grid-column:2}
.converter-card[data-mode="image-cropper"]:has(canvas:not([hidden]))>.file-surface{grid-column:1/-1}
.converter-card[data-mode="image-cropper"] canvas:not([hidden]){grid-column:1;grid-row:2/span 9;align-self:center;margin:auto}
.converter-card[data-mode="image-cropper"] .tool-settings .edit-controls{grid-template-columns:1fr 1fr}
}
@media(max-width:540px){.converter-card .file-surface{grid-template-columns:38px 1fr;gap:4px 12px;padding:16px}.file-surface .upload-emblem{width:38px;height:42px}.file-surface .file-action{grid-area:3/2/4/3;margin-top:6px}.converter-card .tool-settings .edit-controls{grid-template-columns:repeat(2,minmax(0,1fr))}}
.crop-stage:not([hidden]){position:relative;display:block;width:min(100%, calc(55vh * var(--crop-ratio,1)));margin:12px auto;overflow:hidden;touch-action:none;user-select:none;cursor:crosshair}
.crop-stage img{display:block;width:100%;height:auto;pointer-events:none}
.crop-frame{position:absolute;border:2px solid white;box-shadow:0 0 0 300vmax #091b24a6;cursor:move;background:linear-gradient(90deg,transparent 33%,#fff8 33.2%,transparent 33.6%,transparent 66%,#fff8 66.2%,transparent 66.6%),linear-gradient(transparent 33%,#fff8 33.2%,transparent 33.6%,transparent 66%,#fff8 66.2%,transparent 66.6%)}
.crop-frame span{position:absolute;width:16px;height:16px;border:2px solid #124837;background:white;border-radius:4px}
.crop-frame span:before{content:"";position:absolute;inset:-5px}
[data-corner=nw]{left:-6px;top:-6px;cursor:nwse-resize}[data-corner=ne]{right:-6px;top:-6px;cursor:nesw-resize}[data-corner=sw]{left:-6px;bottom:-6px;cursor:nesw-resize}[data-corner=se]{right:-6px;bottom:-6px;cursor:nwse-resize}
@media(min-width:850px){.converter-card[data-mode="image-cropper"]:has(.crop-stage:not([hidden])){display:grid;grid-template-columns:minmax(0,1.65fr) minmax(260px,1fr);gap:10px 24px;align-items:start}.converter-card[data-mode="image-cropper"]:has(.crop-stage:not([hidden]))>*{grid-column:2}.converter-card[data-mode="image-cropper"]:has(.crop-stage:not([hidden]))>.file-surface{grid-column:1/-1}.converter-card[data-mode="image-cropper"]:has(.crop-stage:not([hidden]))>.crop-stage{grid-column:1;grid-row:2/span 8}}
.usage-example{max-width:78ch;margin:clamp(28px,4vw,54px) auto;padding:0 0 0 clamp(14px,2vw,24px);border-left:3px solid #91ad80}
.usage-example h2{font-size:clamp(24px,3vw,32px);line-height:1.2;margin:0 0 12px}
.usage-example p{line-height:1.7;color:#43564e;margin:8px 0}.usage-example a{text-decoration:underline;text-underline-offset:3px}
.converter-card .tool-settings{border:1px solid #d6e0d9;border-radius:12px;padding:0 14px;background:#fafcf9}
.tool-settings>summary{display:flex;align-items:center;justify-content:space-between;min-height:44px;list-style:none}
.tool-settings>summary::-webkit-details-marker{display:none}
.tool-settings>summary::after{content:"+";font-size:18px;color:var(--pine)}
.tool-settings[open]>summary::after{content:"−"}
.tool-settings input[type=range]{width:100%;min-width:0;height:26px;margin:0;cursor:ew-resize;accent-color:var(--pine);touch-action:pan-y}
.converter-card:has(.preview-size) .live-output:not([hidden]){height:var(--preview-size);max-height:none}
.converter-card:has(.preview-size) .result-thumb{width:min(40%,var(--preview-size));height:var(--preview-size);object-fit:contain}
#swatches{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}#swatches span{padding:4px 8px;background:#f4f6f1;font:13px monospace}#values{white-space:pre-wrap;overflow-wrap:anywhere}
[data-mode=image-color-picker] canvas{touch-action:none;cursor:crosshair}
#batchQueue{margin:12px 0}#batchQueue summary{cursor:pointer;font-weight:650}
#batchList{padding:0;max-height:190px;overflow:auto}#batchList li{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:6px 0;border-bottom:1px solid var(--edge)}#batchList span{overflow-wrap:anywhere}#batchList button{background:white;border:1px solid var(--edge);border-radius:6px;padding:4px 8px;cursor:pointer}
