/* PremiumSVG Converters — design system */
:root {
  --brand: #2b2f4c;
  --accent: #f55d2c;
  --accent-hover: #e04a1a;
  --bg: #f7f7fb;
  --surface: #ffffff;
  --surface-2: #f1f2f7;
  --border: #e3e5ee;
  --text: #1d2033;
  --muted: #646a85;
  --success: #15803d;
  --success-bg: #e8f7ee;
  --danger: #c0352b;
  --danger-bg: #fdecea;
  --info-bg: #eef1ff;
  --shadow: 0 1px 2px rgb(20 22 40 / .05), 0 6px 24px rgb(20 22 40 / .06);
  --radius: 14px;
  --radius-sm: 9px;
  --checker: #e9eaf0;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #c9cdf2; --accent: #ff7a4d; --accent-hover: #ff9670;
    --bg: #11131c; --surface: #181b27; --surface-2: #212534; --border: #2c3144;
    --text: #e8eaf5; --muted: #9aa0bb; --success: #4ade80; --success-bg: #12301f;
    --danger: #f87171; --danger-bg: #3a1717; --info-bg: #1e2340;
    --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 6px 24px rgb(0 0 0 / .3);
    --checker: #262a3a; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --brand: #c9cdf2; --accent: #ff7a4d; --accent-hover: #ff9670;
  --bg: #11131c; --surface: #181b27; --surface-2: #212534; --border: #2c3144;
  --text: #e8eaf5; --muted: #9aa0bb; --success: #4ade80; --success-bg: #12301f;
  --danger: #f87171; --danger-bg: #3a1717; --info-bg: #1e2340;
  --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 6px 24px rgb(0 0 0 / .3);
  --checker: #262a3a; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px; line-height: 1.6; color: var(--text); background: var(--bg);
}
a { color: var(--accent); }
img, svg { max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.icon { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50; }
.site-header .inner { max-width: 1180px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 16px; }
.logo-link { display: flex; flex-direction: column; align-items: flex-start; text-decoration: none; color: var(--muted); line-height: 1; }
.logo-link img { height: 30px; width: auto; display: block; }
.logo-link span { font-size: 11px; letter-spacing: .08em; text-transform: lowercase; margin-top: 3px; }
:root[data-theme="dark"] .logo-link img { filter: brightness(0) invert(1); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-link img { filter: brightness(0) invert(1); } }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.site-nav a { color: var(--text); text-decoration: none; font-size: 14px; font-weight: 500; padding: 8px 10px; border-radius: 8px; }
.site-nav a:hover { background: var(--surface-2); color: var(--accent); }
.theme-toggle { border: 1px solid var(--border); background: var(--surface); border-radius: 8px; width: 36px; height: 36px; display: grid; place-items: center; cursor: pointer; }
.theme-toggle:hover { background: var(--surface-2); }
.menu-toggle { display: none; }
@media (max-width: 760px) {
  .menu-toggle { display: grid; margin-left: auto; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--border); flex-direction: column; align-items: stretch; padding: 8px 16px 16px; }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px; }
  .site-header .inner { position: relative; }
}

/* Layout */
.page { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 28px 16px 48px; }
.hero { text-align: center; max-width: 820px; margin: 8px auto 24px; }
.hero-badge { display: inline-flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 4px 8px; margin: 0 0 14px; padding: 6px 16px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent); }
.hero-badge .icon { width: 15px; height: 15px; }
.hero-badge .sep { opacity: .6; }
@media (max-width: 480px) { .hero-badge { font-size: 11.5px; padding: 5px 12px; gap: 4px 6px; } .hero-badge .icon { width: 13px; height: 13px; } }
.hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.15; margin: 0 0 12px; letter-spacing: -.02em; }
.hero .lead { color: var(--muted); margin: 0; font-size: 1.05rem; }
.trust { display: flex; gap: 8px 18px; justify-content: center; flex-wrap: wrap; margin-top: 14px; font-size: 13px; color: var(--muted); }
.trust span { display: inline-flex; align-items: center; gap: 6px; }
.trust .icon { color: var(--success); }

/* Tool navigation chips */
.tool-nav { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 2px 10px; margin: 0 auto 20px; max-width: 100%; justify-content: center; }
@media (max-width: 760px) {
  .tool-nav { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; max-width: none; }
  .tool-nav::-webkit-scrollbar { display: none; }
}
.tool-nav a { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; font-size: 14px; font-weight: 500; white-space: nowrap; }
.tool-nav a:hover { border-color: var(--accent); color: var(--accent); }
.tool-nav a[aria-current="page"] { background: var(--brand); border-color: var(--brand); color: var(--surface); }
.tool-nav a.soon { opacity: .55; }

/* Tool card */
.tool { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; max-width: 920px; margin: 0 auto; }
.dropzone { display: block; position: relative; border: 2px dashed var(--border); border-radius: var(--radius); background: var(--surface-2); padding: 34px 16px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--surface-2)); }
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.dropzone .dz-icon { width: 46px; height: 46px; color: var(--accent); margin: 0 auto 6px; display: block; }
.dropzone strong { display: block; font-size: 1.1rem; }
.dropzone small { color: var(--muted); display: block; margin-top: 4px; }
.dropzone kbd { font-family: inherit; font-size: 12px; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; background: var(--surface); }

.settings { margin-top: 18px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.settings > summary { cursor: pointer; padding: 12px 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; list-style: none; }
.settings > summary::-webkit-details-marker { display: none; }
.settings > summary::after { content: ""; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s; }
.settings[open] > summary::after { transform: rotate(-135deg); }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px 18px; padding: 4px 14px 16px; }
.field { display: flex; flex-direction: column; gap: 5px; font-size: 14px; }
.field > span { font-weight: 600; display: flex; justify-content: space-between; gap: 8px; }
.field > span output { font-weight: 500; color: var(--muted); }
.field small { color: var(--muted); font-size: 12px; line-height: 1.4; }
.field select, .field input[type=number], .field input[type=text] { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.field input[type=range] { accent-color: var(--accent); width: 100%; }
.field input[type=color] { width: 100%; height: 38px; border: 1px solid var(--border); border-radius: 8px; padding: 2px; background: var(--surface); }
.field.check { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 8px; row-gap: 2px; align-self: center; }
.field.check input { accent-color: var(--accent); width: 18px; height: 18px; margin: 0; }
.field.check small { grid-column: 2; }
.field.check > span { font-weight: 500; }
.field[hidden] { display: none; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 10px; padding: 10px 16px; font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, opacity .15s; white-space: nowrap; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-secondary { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-secondary:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover:not(:disabled) { color: var(--danger); }
.btn-sm { padding: 6px 10px; font-size: 13px; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; align-items: center; }
.actions .spacer { flex: 1; }
.summary-text { font-size: 14px; color: var(--muted); }

/* File list */
.file-list { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.file-row { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.thumb { width: 52px; height: 52px; border-radius: 8px; object-fit: contain; background: repeating-conic-gradient(var(--checker) 0 25%, var(--surface) 0 50%) 50% / 12px 12px; border: 1px solid var(--border); display: grid; place-items: center; color: var(--muted); font-size: 11px; font-weight: 700; overflow: hidden; }
.file-main { min-width: 0; }
.file-name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-meta { font-size: 12.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--muted); }
.badge.ok { background: var(--success-bg); color: var(--success); }
.badge.err { background: var(--danger-bg); color: var(--danger); }
.badge.work { background: var(--info-bg); color: var(--brand); }
.progress { height: 4px; border-radius: 4px; background: var(--surface-2); overflow: hidden; margin-top: 6px; }
.progress > i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.progress.indeterminate > i { width: 35%; animation: indet 1.1s ease-in-out infinite; }
@keyframes indet { from { transform: translateX(-100%); } to { transform: translateX(300%); } }
.file-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.outputs { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.outputs .btn { font-weight: 500; }
@media (max-width: 560px) {
  .file-row { grid-template-columns: 44px 1fr; }
  .thumb { width: 44px; height: 44px; }
  .file-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .outputs { grid-column: 1 / -1; }
}

/* Notices */
.notice { margin-top: 14px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--info-bg); font-size: 14px; }
.notice.warn { background: var(--danger-bg); color: var(--danger); }

/* Modal / preview */
dialog.modal { border: 0; padding: 0; border-radius: var(--radius); background: var(--surface); color: var(--text); width: min(960px, calc(100vw - 24px)); max-height: calc(100vh - 24px); box-shadow: 0 20px 60px rgb(0 0 0 / .35); }
dialog.modal::backdrop { background: rgb(10 12 20 / .6); }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.modal-head h2 { font-size: 1rem; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal-head .btn:last-child { margin-left: auto; }
.modal-body { padding: 16px; overflow: auto; max-height: calc(100vh - 140px); }
.compare { position: relative; width: 100%; aspect-ratio: var(--ar, 4/3); max-height: 70vh; background: repeating-conic-gradient(var(--checker) 0 25%, var(--surface) 0 50%) 50% / 18px 18px; border-radius: var(--radius-sm); overflow: hidden; user-select: none; touch-action: none; }
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; max-width: none; }
.compare .after { clip-path: inset(0 0 0 var(--pos, 50%)); }
.compare .handle { position: absolute; top: 0; bottom: 0; left: var(--pos, 50%); width: 3px; background: var(--accent); transform: translateX(-50%); }
.compare .handle::after { content: "⇆"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 16px; }
.compare-labels { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-top: 8px; }
.single-preview { display: grid; place-items: center; background: repeating-conic-gradient(var(--checker) 0 25%, var(--surface) 0 50%) 50% / 18px 18px; border-radius: var(--radius-sm); min-height: 240px; }
.single-preview img { max-height: 70vh; object-fit: contain; }
.code-view { width: 100%; min-height: 260px; font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); padding: 12px; resize: vertical; }

/* Toasts */
.toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 100; max-width: calc(100vw - 32px); }
.toast { background: var(--text); color: var(--bg); padding: 10px 14px; border-radius: 10px; box-shadow: var(--shadow); font-size: 14px; animation: toast-in .2s ease-out; max-width: 380px; }
.toast.err { background: var(--danger); color: #fff; }
@keyframes toast-in { from { transform: translateY(10px); opacity: 0; } }

/* Home grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); text-decoration: none; color: var(--text); transition: transform .15s, box-shadow .15s, border-color .15s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--accent); }
.card h2, .card h3 { font-size: 1.05rem; margin: 0; }
.card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.card .card-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--info-bg); color: var(--brand); }
.card .card-icon.orange { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: var(--accent); }
.card .card-icon.red { background: var(--danger-bg); color: var(--danger); }
.card .card-icon.green { background: var(--success-bg); color: var(--success); }
.card .card-icon .icon { width: 22px; height: 22px; }
.card .tag { position: absolute; top: 14px; right: 14px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--accent); color: #fff; }
.card .tag.soon { background: var(--surface-2); color: var(--muted); }
.card.disabled { opacity: .6; pointer-events: none; }
.section-title { font-size: 1.3rem; margin: 36px 0 14px; }

/* Prose / SEO content */
.prose { max-width: 820px; margin: 44px auto 0; color: var(--text); }
.prose h2 { font-size: 1.45rem; margin: 2em 0 .5em; line-height: 1.25; letter-spacing: -.01em; }
.prose h3 { font-size: 1.15rem; margin: 1.6em 0 .4em; }
.prose p, .prose li { color: color-mix(in srgb, var(--text) 82%, var(--muted)); }
.prose strong { color: var(--text); }
.prose ul, .prose ol { padding-left: 1.3em; }
.privacy-note { display: flex; gap: 10px; align-items: flex-start; background: var(--success-bg); color: var(--text); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 14px; }
.privacy-note .icon { color: var(--success); margin-top: 3px; }

/* FAQ (native details) */
.faq { max-width: 820px; margin: 40px auto 0; }
.faq h2 { text-align: center; font-size: 1.45rem; }
.faq details { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); margin-bottom: 8px; }
.faq summary { cursor: pointer; padding: 14px 16px; font-weight: 600; list-style: none; display: flex; gap: 10px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; margin-left: auto; font-size: 20px; color: var(--muted); line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details > div { padding: 0 16px 14px; color: var(--muted); }
.faq details > div p { margin: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); margin-top: 48px; }
.site-footer .inner { max-width: 1180px; margin: 0 auto; padding: 24px 16px; display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; justify-content: space-between; font-size: 14px; color: var(--muted); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }

/* Static pages */
.doc { max-width: 820px; margin: 0 auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(20px, 4vw, 40px); }
.doc h1 { margin-top: 0; line-height: 1.2; }
.soon-box { text-align: center; padding: 40px 16px; }

/* ZIP tool */
.mode-switch { display: inline-flex; padding: 4px; border-radius: 12px; background: var(--surface-2); margin-bottom: 16px; gap: 4px; }
.mode-switch button { border: 0; background: transparent; padding: 8px 16px; border-radius: 9px; font-weight: 600; cursor: pointer; color: var(--muted); }
.mode-switch button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.path-dir { color: var(--muted); }
