/* convertingpngtosvg.com
   One accent (violet, from the wordmark), white paper, ink text, hairlines.
   Text colors are all 4.5:1 or better on white. */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/inter-latin.woff2) format('woff2');
}

:root {
  --ink: #1a1830;
  --muted: #555269;        /* 7.4:1 */
  --line: #e6e3ef;
  --wash: #f7f6fb;
  --accent: #7c5cff;       /* decoration and focus only, 4.35:1 */
  --accent-ink: #5b3fd9;   /* links, 6.6:1 */
  --btn: #6845f5;          /* button fill with white text, 5.6:1 */
  --btn-hover: #5b3fd9;
  --holo: linear-gradient(90deg, #7fe7bd 0%, #8f7dff 48%, #7bbcff 100%);
  --radius: 14px;
  --wrap: 1120px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 17px/1.6 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: #fff;
  font-feature-settings: 'cv11', 'ss01';
}
img, svg { max-width: 100%; }
a { color: var(--accent-ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.015em; margin: 0 0 .5em; }
h2 { font-size: 1.6rem; font-weight: 650; margin-top: 2.2em; }
h3 { font-size: 1.15rem; font-weight: 650; margin-top: 1.6em; }
p { margin: 0 0 1em; }
kbd { font: 500 .85em/1 'Inter', system-ui, sans-serif; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 2px 5px; background: #fff; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* ---- header ---- */
.site-header { border-bottom: 1px solid var(--line); background: #fff; position: relative; }
.site-header::before { content: ''; display: block; height: 3px; background: var(--holo); }
.header-row { display: flex; align-items: center; gap: 28px; min-height: 72px; }
.brand { display: block; flex: none; line-height: 0; }
.brand img { height: 44px; width: auto; }
.tools-nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin-left: auto; }
.tools-nav::-webkit-scrollbar { display: none; }
.tools-nav a {
  white-space: nowrap; text-decoration: none; color: var(--muted); font-size: 15px; font-weight: 500;
  padding: 8px 12px; border-radius: 999px;
}
.tools-nav a:hover { color: var(--ink); background: var(--wash); }
.tools-nav a[aria-current="page"] { color: var(--accent-ink); background: #f1edff; }

/* ---- hero ---- */
.hero { padding-top: 40px; padding-bottom: 8px; text-align: center; }
.hero h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); font-weight: 700; letter-spacing: -0.03em; margin-bottom: .3em; }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 640px; margin: 0 auto; }
.is-page .hero { text-align: left; max-width: 760px; }
.is-page .lede { margin: 0; }

/* ---- tool ---- */
.tool { margin-top: 24px; }
.tool-card { border: 1px solid var(--line); border-radius: 20px; padding: 20px; background: #fff; box-shadow: 0 1px 2px rgba(26, 24, 48, .04), 0 12px 32px -18px rgba(91, 63, 217, .18); }
.drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 210px; padding: 28px 20px; text-align: center; cursor: pointer;
  border: 2px dashed #cfc6f5; border-radius: var(--radius); background: var(--wash);
  transition: border-color .15s, background-color .15s;
}
.drop:hover, .drop.is-over { border-color: var(--accent); background: #f3f0ff; }
.has-results .drop { min-height: 120px; padding: 18px; }
.drop-icon { color: var(--accent-ink); width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 1px solid var(--line); margin-bottom: 4px; }
.drop-title { font-size: 1.15rem; font-weight: 600; }
.drop-title u { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.drop-sub { color: var(--muted); font-size: 15px; }
.drop-private { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 14px; font-weight: 500; color: #1f6b52; background: #e9f8f1; border-radius: 999px; padding: 4px 12px; }

.controls { margin-top: 16px; display: grid; gap: 12px; }
.preset-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ctl-label { font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-right: 6px; }
.preset-row button {
  font: inherit; font-size: 15px; font-weight: 500; cursor: pointer; color: var(--ink);
  border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 16px;
}
.preset-row button:hover { border-color: #c9c1ee; }
.preset-row button[aria-checked="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.option-row { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; font-size: 15px; }
.check { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--btn); }
.range-inline, .select-inline, .num-inline, .color-inline { display: inline-flex; gap: 10px; align-items: center; }
.range-inline output { min-width: 2.5ch; font-variant-numeric: tabular-nums; color: var(--muted); }
input[type="range"] { accent-color: var(--btn); }
select, input[type="number"], textarea {
  font: inherit; font-size: 15px; color: var(--ink); background: #fff;
  border: 1px solid #d6d2e4; border-radius: 10px; padding: 7px 10px;
}
input[type="number"] { width: 6.5em; }
input[type="color"] { width: 44px; height: 36px; padding: 2px; border: 1px solid #d6d2e4; border-radius: 10px; background: #fff; }
.advanced { border-top: 1px solid var(--line); padding-top: 10px; }
.advanced summary, .paste-code summary { cursor: pointer; font-weight: 600; font-size: 15px; color: var(--accent-ink); width: max-content; }
.adv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px 28px; margin: 14px 0 10px; }
.adv-grid label { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; font-size: 15px; align-items: center; }
.adv-grid label span { grid-column: 1 / -1; font-weight: 500; }
.adv-grid label small { color: var(--muted); font-weight: 400; margin-left: 4px; font-size: 13px; }
.adv-grid select { grid-column: 1 / -1; }
.adv-grid output { font-variant-numeric: tabular-nums; color: var(--muted); min-width: 4ch; text-align: right; }
.adv-grid .is-off { opacity: .45; }
.link-btn { font: inherit; font-size: 14px; background: none; border: 0; padding: 0; color: var(--accent-ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.paste-code { margin-top: 14px; }
.paste-code textarea { width: 100%; margin: 10px 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; }

.btn {
  font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
  color: #fff; background: var(--btn); border: 1px solid var(--btn); border-radius: 10px; padding: 9px 16px;
}
.btn:hover { background: var(--btn-hover); border-color: var(--btn-hover); }
.btn.ghost { background: #fff; color: var(--ink); border-color: #d6d2e4; }
.btn.ghost:hover { border-color: var(--accent); }
.btn:disabled { opacity: .5; cursor: default; }
.icon-btn { font: 400 24px/1 'Inter', sans-serif; width: 36px; height: 36px; border-radius: 50%; border: 1px solid transparent; background: none; color: var(--muted); cursor: pointer; flex: none; }
.icon-btn:hover { background: var(--wash); color: var(--ink); }

/* ---- results ---- */
.results { display: grid; gap: 16px; margin-top: 16px; }
.results:empty { display: none; }
.notice { margin: 0; padding: 10px 14px; border-radius: 10px; background: #fff7e6; border: 1px solid #f3dfb0; font-size: 15px; }
.res { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.res-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.res-name { margin: 0; font-weight: 600; word-break: break-all; }
.res-meta { margin: 0; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.res[data-status="working"] .res-meta::before, .res[data-status="queued"] .res-meta::before {
  content: ''; display: inline-block; width: 12px; height: 12px; margin-right: 8px; vertical-align: -1px;
  border: 2px solid var(--accent); border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite;
}
.res[data-status="error"] .res-meta { color: #a3261b; }
@keyframes spin { to { transform: rotate(360deg); } }
.res-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.res-actions .spacer { flex: 1; }
.zoom { font-size: 14px; padding: 6px 8px; }

.checker, .compare .viewport, .out-wrap {
  background-color: #fff;
  background-image: linear-gradient(45deg, #eeecf4 25%, transparent 25%), linear-gradient(-45deg, #eeecf4 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #eeecf4 75%), linear-gradient(-45deg, transparent 75%, #eeecf4 75%);
  background-size: 20px 20px; background-position: 0 0, 0 10px, 10px -10px, -10px 0;
}
.compare { position: relative; border-radius: 10px; border: 1px solid var(--line); overflow: hidden; --maxh: min(62vh, 640px); }
.compare .viewport { max-height: var(--maxh); overflow: auto; }
.compare .stage { position: relative; margin: 0 auto; --pos: 50%; width: calc(min(100%, var(--maxh) * var(--ar, 1)) * var(--z, 1)); }
.compare .stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; user-select: none; }
.compare.zoomed .orig { image-rendering: pixelated; }
.compare .traced { clip-path: inset(0 0 0 var(--pos)); }
.compare .divider { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: var(--accent); box-shadow: 0 0 0 1px rgba(255, 255, 255, .8); pointer-events: none; }
.compare .stage:not(:has(.traced[src])) .divider { display: none; }
.compare[data-view="svg"] .orig, .compare[data-view="orig"] .traced, .compare[data-view] .divider { visibility: hidden; }
.compare[data-view="compare"] .divider { visibility: visible; }
.compare[data-view="svg"] .traced { clip-path: none; }
.compare[data-view="svg"] .cmp-range, .compare[data-view="orig"] .cmp-range { display: none; }
.cmp-range { display: block; width: calc(100% - 32px); margin: 10px 16px; }
.tag { position: absolute; top: 10px; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; background: rgba(255, 255, 255, .92); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; color: var(--muted); pointer-events: none; }
.tag-l { left: 10px; }
.tag-r { right: 10px; }
.compare[data-view="svg"] .tag-l, .compare[data-view="orig"] .tag-r { display: none; }

.out-wrap { border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: grid; place-items: center; max-height: 62vh; overflow: auto; }
.out-wrap img { max-width: 100%; height: auto; max-height: 56vh; object-fit: contain; }

.batch-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.batch-bar span { margin-right: auto; color: var(--muted); font-size: 15px; }
.tool-hint { font-size: 14px; color: var(--muted); margin: 14px 2px 0; }

/* ---- article ---- */
.article { max-width: 760px; margin: 0 auto; padding: 24px 24px 0; }
.is-page .article { margin-left: max(0px, calc((100vw - var(--wrap)) / 2)); }
.article ul, .article ol { padding-left: 1.3em; }
.article li { margin-bottom: .45em; }
.steps { list-style: none; counter-reset: s; padding: 0 !important; display: grid; gap: 12px; }
.steps li { counter-increment: s; position: relative; padding: 14px 16px 14px 60px; border: 1px solid var(--line); border-radius: var(--radius); margin: 0; }
.steps li::before {
  content: counter(s); position: absolute; left: 16px; top: 14px; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; font-size: 15px; color: var(--accent-ink); background: #f1edff;
}
.steps strong { display: block; }
.tip { border-left: 3px solid var(--accent); background: var(--wash); padding: 12px 16px; border-radius: 0 10px 10px 0; margin: 1.2em 0; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 1em 0; }
.cols > div { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.cols h3 { margin-top: 0; }
.cols ul { margin: 0; }
.good::before, .meh::before { font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; display: block; margin-bottom: 6px; }
.good::before { content: 'Works well'; color: #1f6b52; }
.meh::before { content: 'Harder'; color: #8a5a00; }
figure.example { margin: 1.6em 0; }
figure.example img { width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); }
figure.example figcaption { font-size: 15px; color: var(--muted); margin-top: 8px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 1em 0; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; background: var(--wash); }

.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.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-weight: 400; font-size: 1.4em; line-height: 1; color: var(--accent-ink); }
.faq details[open] summary::after { content: '−'; }
.faq details div { margin-top: 8px; color: #33304a; }
.faq details div p:last-child { margin-bottom: 0; }

.related { margin-top: 2.6em; }
.related ul { list-style: none; padding: 0 !important; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.related li { margin: 0; }
.related a { display: block; height: 100%; text-decoration: none; color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.related a:hover { border-color: var(--accent); }
.related strong { display: block; color: var(--accent-ink); }
.related span { display: block; font-size: 15px; color: var(--muted); }

/* ---- did you know ---- */
.dyk { margin-top: 48px; }
.dyk-card { max-width: 760px; margin: 0 auto; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; position: relative; overflow: hidden; }
.dyk-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--holo); }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-ink); margin: 0 0 8px; }
.dyk-fact { font-size: 1.1rem; margin-bottom: 14px; }
.dyk-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0; font-size: 14px; }
.pill { font: inherit; font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; color: var(--accent-ink); background: #f1edff; border: 0; border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.pill:hover { background: #e7e0ff; }

/* ---- contact form (markup from the house template) ---- */
.contact-form { display: flex; flex-direction: column; max-width: 560px; margin-top: 8px; }
.contact-form label { font-weight: 600; font-size: 15px; margin-top: 14px; margin-bottom: 4px; }
.contact-form label .optional { font-weight: 400; color: var(--muted); }
.contact-form input, .contact-form textarea { font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid #d6d2e4; border-radius: 10px; }
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(124, 92, 255, .2); }
.contact-form textarea { min-height: 160px; resize: vertical; }
.contact-honeypot { display: none; }
.fs-field-error { color: #a3261b; font-size: 14px; }
.contact-submit { margin-top: 18px; align-self: flex-start; font: inherit; font-weight: 600; color: #fff; background: var(--btn); border: 0; border-radius: 10px; padding: 11px 20px; cursor: pointer; }
.contact-submit:hover { background: var(--btn-hover); }
.contact-status { padding: 12px 14px; border-radius: 10px; }
.contact-success { background: #e9f8f1; color: #1f6b52; }
.contact-error { background: #fdeceb; color: #a3261b; }
.contact-note { font-size: 15px; color: var(--muted); margin-top: 16px; }

/* ---- footer ---- */
.site-footer { margin-top: 72px; border-top: 1px solid var(--line); background: var(--wash); }
.footer-row { padding-top: 28px; padding-bottom: 36px; display: grid; gap: 10px; }
.footer-note { margin: 0; font-weight: 500; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 15px; }
.site-footer nav a { color: var(--muted); }
.site-footer nav a:hover { color: var(--accent-ink); }
.copy { margin: 0; font-size: 14px; color: var(--muted); }

@media (max-width: 760px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .header-row { flex-wrap: wrap; gap: 6px; min-height: 0; padding-top: 12px; padding-bottom: 8px; }
  .brand img { height: 38px; }
  .tools-nav { margin: 0 -16px; padding: 0 12px 2px; width: calc(100% + 32px); }
  .tools-nav a { font-size: 14px; padding: 7px 10px; }
  .hero { padding-top: 22px; }
  .lede { font-size: 1.05rem; }
  .tool { margin-top: 16px; }
  .tool-card { padding: 12px; border-radius: 16px; }
  .drop { min-height: 0; padding: 22px 14px; }
  .drop-title { font-size: 1.05rem; }
  .drop-private { font-size: 13px; }
  .hero h1 { margin-bottom: .2em; }
  .preset-row button { padding: 6px 13px; font-size: 14px; }
  .article { padding-left: 16px; padding-right: 16px; }
  .steps li { padding-left: 54px; }
  .res-actions .spacer { flex-basis: 100%; height: 0; }
  .tag { font-size: 11px; padding: 2px 8px; top: 6px; }
  .tag-l { left: 6px; }
  .tag-r { right: 6px; }
}

@media (hover: none) and (pointer: coarse) {
  .paste-hint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
