/* PizzaImg — minimal black on white, teal accent, automatic dark theme. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #ffffff;
  --bg-soft: #f5f5f4;
  --bg-softer: #fafaf9;
  --fg: #0b0b0c;
  --fg-2: #3f3f46;
  --muted: #71717a;
  --line: #e7e7e5;
  --line-strong: #d4d4d2;
  --accent: #0f766e;
  --accent-hover: #0d645d;
  --accent-soft: #e6f4f2;
  --accent-ink: #ffffff;
  --ok: #15803d;
  --warn: #b45309;
  --err: #b91c1c;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgb(0 0 0 / .04), 0 8px 24px -12px rgb(0 0 0 / .12);
  --checker: repeating-conic-gradient(#ececea 0% 25%, #ffffff 0% 50%) 0 0 / 16px 16px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0c;
    --bg-soft: #161618;
    --bg-softer: #111113;
    --fg: #f4f4f5;
    --fg-2: #d4d4d8;
    --muted: #a1a1aa;
    --line: #26262a;
    --line-strong: #3a3a40;
    --accent: #2dd4bf;
    --accent-hover: #5eead4;
    --accent-soft: #0f2f2c;
    --accent-ink: #04201d;
    --ok: #4ade80;
    --warn: #fbbf24;
    --err: #f87171;
    --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 8px 24px -12px rgb(0 0 0 / .6);
    --checker: repeating-conic-gradient(#1d1d20 0% 25%, #141416 0% 50%) 0 0 / 16px 16px;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.6 var(--font);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.025em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); font-weight: 750; }
h2 { font-size: clamp(1.3rem, 2.2vw, 1.6rem); font-weight: 700; }
p { margin: 0 0 1em; }
.lead { font-size: 1.125rem; color: var(--fg-2); max-width: 46rem; }
code { font-size: .88em; background: var(--bg-soft); padding: .1em .35em; border-radius: 5px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

.icon { width: 1.25em; height: 1.25em; flex: none; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 20px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--fg); color: var(--bg); padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }

/* ---------------------------------------------------------------- header */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.header-row { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 750; font-size: 1.25rem; letter-spacing: -0.03em; flex: none; }
.logo-mark { width: 34px; height: 34px; }
.logo-word b { color: var(--accent); font-weight: 750; }
.tool-nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.tool-nav::-webkit-scrollbar { display: none; }
.tool-nav a { text-decoration: none; color: var(--fg-2); font-size: .92rem; font-weight: 500; padding: 7px 12px; border-radius: 999px; white-space: nowrap; }
.tool-nav a:hover { background: var(--bg-soft); color: var(--fg); }
.tool-nav a[aria-current="page"] { background: var(--fg); color: var(--bg); }
.lang { display: flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; font-size: .8rem; font-weight: 650; flex: none; }
.lang a, .lang span { padding: 4px 10px; border-radius: 999px; text-decoration: none; }
.lang span { background: var(--fg); color: var(--bg); }
.lang a { color: var(--muted); }
.lang a:hover { color: var(--fg); }
@media (max-width: 860px) {
  .header-row { flex-wrap: wrap; gap: 10px 16px; padding-top: 12px; }
  .logo { order: 1; }
  .lang { order: 2; margin-left: auto; }
  .tool-nav { order: 3; flex: 0 0 calc(100% + 40px); max-width: none; margin: 0 -20px; padding: 0 20px 10px; }
}

/* ---------------------------------------------------------------- layout + ad column */
.layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; flex: 1; padding-top: 32px; padding-bottom: 64px; }
.content { min-width: 0; }
.ad-col { display: none; }
/* The ad column only exists when there is room for it next to the tool: below the
   breakpoint (set in site.json) it disappears instead of squeezing the content. */
@media (min-width: 1180px) {
  .layout { grid-template-columns: minmax(0, 1fr) 300px; }
  .ad-col { display: flex; flex-direction: column; gap: 24px; align-items: flex-start; }
}
.ad-slot { flex: none; overflow: hidden; }
.ad-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  width: 100%; height: 100%; border: 1px solid var(--line); border-radius: 8px;
  color: var(--muted); text-decoration: none; font-size: .78rem; background: var(--bg-softer);
}
.ad-placeholder small { font-size: .7rem; opacity: .8; }
.ad-placeholder:hover { border-color: var(--line-strong); color: var(--fg-2); }

/* ---------------------------------------------------------------- buttons + fields */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: .95rem; line-height: 1;
  padding: 12px 18px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-dark { background: var(--fg); color: var(--bg); }
.btn-dark:hover:not(:disabled) { opacity: .88; }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--line-strong); }
.btn-ghost:hover:not(:disabled) { background: var(--bg-soft); }
.btn-lg { padding: 15px 24px; font-size: 1rem; }
.btn-sm { padding: 8px 12px; font-size: .85rem; }
.btn-icon { padding: 10px; border-radius: 10px; background: var(--bg); border-color: var(--line-strong); color: var(--fg); }
.btn-icon:hover { background: var(--bg-soft); }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }

.field { display: flex; flex-direction: column; gap: 6px; font-size: .85rem; font-weight: 600; color: var(--fg-2); min-width: 0; }
.field > span { display: flex; justify-content: space-between; gap: 8px; }
.field output { color: var(--fg); font-variant-numeric: tabular-nums; }
.field-wide { grid-column: 1 / -1; }
select, input[type="number"], input[type="text"], input[type="email"], input:not([type]), textarea {
  font: inherit; font-size: .95rem; font-weight: 500; color: var(--fg);
  background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 10px 12px; width: 100%; min-width: 0;
}
select { appearance: none; padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
textarea { resize: vertical; }
input[type="range"] { width: 100%; accent-color: var(--accent); margin: 8px 0 4px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font: inherit; font-size: .84rem; font-weight: 550; border: 1px solid var(--line-strong); background: var(--bg); color: var(--fg); padding: 7px 12px; border-radius: 999px; cursor: pointer; }
.chip small { color: var(--muted); font-weight: 500; margin-left: 2px; }
.chip:hover { background: var(--bg-soft); }
.chip.is-on { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.chip.is-on small { color: inherit; opacity: .7; }

.segmented { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px; width: fit-content; }
.segmented label { cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: block; padding: 6px 14px; border-radius: 999px; font-weight: 600; font-size: .85rem; color: var(--muted); }
.segmented input:checked + span { background: var(--fg); color: var(--bg); }
.segmented input:focus-visible + span { outline: 2px solid var(--accent); }

.dims-row { display: flex; gap: 6px; align-items: center; }
.lock { flex: none; border: 1px solid var(--line-strong); background: var(--bg); color: var(--muted); border-radius: 10px; padding: 9px; cursor: pointer; }
.lock.is-on { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }

.hint { font-size: .88rem; color: var(--muted); margin: 0; }
.hint.warn { color: var(--warn); }

/* ---------------------------------------------------------------- home */
.hero { padding: 24px 0 40px; }
.hero-brand { display: flex; width: fit-content; align-items: center; gap: 14px; font-size: clamp(2rem, 4vw, 2.6rem); font-weight: 780; letter-spacing: -0.04em; margin-bottom: 28px; }
.hero-brand .logo-mark { width: 64px; height: 64px; }
.kicker { display: flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); margin-bottom: 14px; }
.kicker::before { content: ""; width: 8px; height: 8px; background: var(--accent); border-radius: 2px; }
.hero h1 { max-width: 15em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }

.badges { display: grid; grid-template-columns: repeat(3, 1fr); align-items: stretch; gap: 14px; margin: 8px 0 32px; }
.badge { display: flex; flex-direction: column; gap: 6px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); height: 100%; }
.badge strong { font-size: 1.1rem; letter-spacing: -0.02em; }
.badge p { margin: 0; color: var(--fg-2); font-size: .92rem; }
.badge-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 6px; }
@media (max-width: 640px) { .badges { grid-template-columns: 1fr; } }

.counter { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 56px; background: var(--bg-softer); }
.counter-cell { padding: 26px 24px; display: flex; flex-direction: column; gap: 4px; }
.counter-cell + .counter-cell { border-left: 1px solid var(--line); }
.counter-num { font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 780; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.counter-num[data-counter] { color: var(--accent); }
.counter-label { color: var(--muted); font-size: .92rem; }
@media (max-width: 640px) { .counter { grid-template-columns: 1fr; } .counter-cell + .counter-cell { border-left: 0; border-top: 1px solid var(--line); } }

.tools-section { margin: 56px 0; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.tool-card { display: flex; align-items: flex-start; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; background: var(--bg); transition: border-color .15s, box-shadow .15s; }
.tool-card:hover { border-color: var(--fg); box-shadow: var(--shadow); }
.tool-card.is-featured .tool-icon { background: var(--accent); color: var(--accent-ink); }
.tool-icon { flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--bg-soft); display: grid; place-items: center; color: var(--fg); }
.tool-icon .icon { width: 22px; height: 22px; }
.tool-icon-lg { width: 56px; height: 56px; border-radius: 14px; background: var(--accent); color: var(--accent-ink); }
.tool-icon-lg .icon { width: 28px; height: 28px; }
.tool-text { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.tool-text strong { font-size: 1.02rem; letter-spacing: -0.015em; }
.tool-text span { font-size: .88rem; color: var(--muted); line-height: 1.45; }
.tool-go { color: var(--muted); margin-top: 2px; }
.tool-card:hover .tool-go { color: var(--fg); }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; counter-reset: step; }
.steps li { counter-increment: step; padding: 20px; border-radius: var(--radius); background: var(--bg-soft); }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--fg); color: var(--bg); font-weight: 700; font-size: .85rem; margin-bottom: 12px; }
.steps strong { display: block; margin-bottom: 4px; }
.steps p { margin: 0; color: var(--fg-2); font-size: .94rem; }
.how { margin: 56px 0; }

.note-card { display: flex; gap: 18px; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); margin: 56px 0 0; }
.note-card h2 { font-size: 1.2rem; }
.note-card p { margin: 0; color: var(--fg-2); }
.note-icon { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }

/* ---------------------------------------------------------------- tool page */
.crumbs { display: flex; gap: 8px; font-size: .85rem; color: var(--muted); margin-bottom: 20px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--fg); }
.tool-head { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 28px; }
.tool-head h1 { margin-bottom: .3em; }
.tool-head .lead { margin: 0; }
@media (max-width: 640px) { .tool-head .tool-icon-lg { display: none; } }

.tool-app { border: 1px solid var(--line); border-radius: 20px; padding: 18px; background: var(--bg); box-shadow: var(--shadow); }
.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
  min-height: 260px; padding: 32px 20px; border: 2px dashed var(--line-strong); border-radius: 14px; cursor: pointer;
  background: var(--bg-softer); transition: border-color .15s, background-color .15s;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone strong { font-size: 1.2rem; letter-spacing: -0.02em; }
.drop-sub { color: var(--muted); font-size: .9rem; }
.drop-art { width: 64px; height: 64px; border-radius: 18px; background: var(--fg); color: var(--bg); display: grid; place-items: center; margin-bottom: 10px; }
.drop-art .icon { width: 30px; height: 30px; }
.tool-app.has-files .dropzone { display: none; }
.tool-app.is-over .workspace { outline: 2px dashed var(--accent); outline-offset: 6px; border-radius: 12px; }

.workspace { display: flex; flex-direction: column; gap: 18px; }
.list-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-weight: 650; }
.list-actions { display: flex; gap: 8px; }
.list-actions .btn { padding: 9px 14px; font-size: .86rem; }

.file-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 520px; overflow-y: auto; }
.file-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.file-item.is-selected { border-color: var(--fg); }
.file-item.is-error { border-color: var(--err); }
.thumbs { display: flex; align-items: center; gap: 6px; }
.thumb { width: 64px; height: 64px; border-radius: 8px; background: var(--checker); overflow: hidden; display: grid; place-items: center; color: var(--muted); flex: none; position: relative; }
.thumb img, .thumb canvas { width: 100%; height: 100%; object-fit: cover; }
.thumb .tag { position: absolute; left: 3px; bottom: 3px; font-size: .58rem; font-weight: 700; text-transform: uppercase; background: rgb(0 0 0 / .65); color: #fff; padding: 1px 4px; border-radius: 4px; letter-spacing: .03em; }
.thumb.after { outline: 2px solid var(--accent); outline-offset: -2px; }
.thumbs .arrow { color: var(--muted); }
.thumbs .arrow .icon { width: 16px; height: 16px; }
.file-meta { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.file-name { font-weight: 600; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-info { font-size: .82rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-variant-numeric: tabular-nums; }
.file-info .sep { opacity: .5; }
.saving { font-weight: 700; color: var(--ok); }
.saving.worse { color: var(--warn); }
.status { font-size: .8rem; font-weight: 600; }
.status.err { color: var(--err); }
.file-actions { display: flex; gap: 6px; align-items: center; }
.file-actions .btn { padding: 8px 12px; font-size: .84rem; }
.icon-btn { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 6px; border-radius: 8px; }
.icon-btn:hover { background: var(--bg-soft); color: var(--fg); }
@media (max-width: 560px) {
  .file-item { grid-template-columns: auto minmax(0, 1fr); }
  .file-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .thumb { width: 52px; height: 52px; }
}

.settings { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; padding: 16px; border-radius: 14px; background: var(--bg-soft); }
.settings .field select, .settings .field input[type="number"] { background-color: var(--bg); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.actions .btn-primary { min-width: 180px; }

.trust-line { display: flex; gap: 8px; align-items: flex-start; margin: 14px 2px 0; font-size: .82rem; color: var(--muted); }
.trust-line .icon { color: var(--accent); margin-top: 1px; }

/* Themed progress: a strip of pixels lighting up. */
.progress { display: flex; flex-direction: column; gap: 8px; }
.pixels { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; }
.pixels i { aspect-ratio: 1; border-radius: 2px; background: var(--line); max-height: 14px; transition: background-color .2s; }
.pixels i.on { background: var(--accent); }
.progress.is-busy .pixels i.on:last-of-type { opacity: .8; }
.progress.indeterminate .pixels i { animation: pix 1.2s infinite ease-in-out; }
@keyframes pix { 0%, 100% { background: var(--line); } 50% { background: var(--accent); } }
@media (prefers-reduced-motion: reduce) { .progress.indeterminate .pixels i { animation: none; background: var(--accent-soft); } }
.progress-text { font-size: .88rem; color: var(--fg-2); font-weight: 550; }

.result { display: flex; flex-direction: column; gap: 12px; }
.result-summary { padding: 14px 16px; border-radius: 12px; background: var(--accent-soft); color: var(--fg); font-weight: 600; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; }

/* Before/after comparison */
.compare { position: relative; border-radius: 12px; overflow: hidden; background: var(--checker); border: 1px solid var(--line); user-select: none; touch-action: none; }
.compare-frame { position: relative; }
.compare-frame > * { display: block; width: 100%; height: auto; max-height: 70vh; object-fit: contain; }
.compare-top { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--pos, 50%)); }
.compare-top > * { width: 100%; height: 100%; object-fit: contain; max-height: none; }
.compare-handle { position: absolute; top: 0; bottom: 0; left: var(--pos, 50%); width: 2px; background: #fff; box-shadow: 0 0 0 1px rgb(0 0 0 / .25); transform: translateX(-1px); pointer-events: none; }
.compare-handle::after { content: "⟷"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 36px; height: 36px; border-radius: 50%; background: #fff; color: #111; display: grid; place-items: center; font-size: 16px; box-shadow: 0 2px 8px rgb(0 0 0 / .3); }
.compare-label { position: absolute; top: 10px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; background: rgb(0 0 0 / .65); color: #fff; padding: 3px 8px; border-radius: 6px; pointer-events: none; }
.compare-label.l { left: 10px; }
.compare-label.r { right: 10px; }
.compare.zoomed { overflow: auto; max-height: 70vh; touch-action: pan-x pan-y; }
.compare.zoomed .compare-frame { width: max-content; }
.compare.zoomed .compare-frame > *, .compare.zoomed .compare-top > * { width: auto; max-width: none; max-height: none; }
.compare-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: .85rem; color: var(--muted); }

.side-by-side { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.side-by-side figure { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.side-by-side .pic { background: var(--checker); border-radius: 12px; border: 1px solid var(--line); overflow: hidden; display: grid; place-items: center; aspect-ratio: 4 / 3; }
.side-by-side .pic > * { max-width: 100%; max-height: 100%; object-fit: contain; }
.side-by-side figcaption { font-size: .82rem; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; }
.side-by-side figcaption strong { color: var(--fg); }

/* Crop */
.crop-stage { position: relative; display: grid; place-items: center; background: var(--checker); border-radius: 14px; border: 1px solid var(--line); padding: 16px; touch-action: none; user-select: none; }
.crop-canvas-wrap { position: relative; line-height: 0; }
.crop-canvas-wrap canvas { max-width: 100%; }
.crop-box { position: absolute; border: 1.5px solid #fff; cursor: move; outline: none; }
.crop-dim { position: absolute; inset: 0; background: rgb(0 0 0 / .55); pointer-events: none; }
.crop-box:focus-visible { border-color: var(--accent); }
.crop-mask { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.crop-mask .crop-box { pointer-events: auto; }
.crop-grid { position: absolute; inset: 0; pointer-events: none; background:
  linear-gradient(to right, transparent calc(33.33% - .5px), rgb(255 255 255 / .45) calc(33.33% - .5px) calc(33.33% + .5px), transparent calc(33.33% + .5px) calc(66.66% - .5px), rgb(255 255 255 / .45) calc(66.66% - .5px) calc(66.66% + .5px), transparent calc(66.66% + .5px)),
  linear-gradient(to bottom, transparent calc(33.33% - .5px), rgb(255 255 255 / .45) calc(33.33% - .5px) calc(33.33% + .5px), transparent calc(33.33% + .5px) calc(66.66% - .5px), rgb(255 255 255 / .45) calc(66.66% - .5px) calc(66.66% + .5px), transparent calc(66.66% + .5px)); }
.handle { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; touch-action: none; }
.handle::after { content: ""; position: absolute; inset: 6px; background: #fff; border-radius: 3px; box-shadow: 0 0 0 1px rgb(0 0 0 / .35); }
.handle[data-h="nw"] { left: 0; top: 0; cursor: nwse-resize; }
.handle[data-h="n"] { left: 50%; top: 0; cursor: ns-resize; }
.handle[data-h="ne"] { left: 100%; top: 0; cursor: nesw-resize; }
.handle[data-h="e"] { left: 100%; top: 50%; cursor: ew-resize; }
.handle[data-h="se"] { left: 100%; top: 100%; cursor: nwse-resize; }
.handle[data-h="s"] { left: 50%; top: 100%; cursor: ns-resize; }
.handle[data-h="sw"] { left: 0; top: 100%; cursor: nesw-resize; }
.handle[data-h="w"] { left: 0; top: 50%; cursor: ew-resize; }
.toolbar { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- FAQ + prose */
.faq { margin: 56px 0; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 36px 18px 0; font-weight: 650; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 1.4rem; font-weight: 400; color: var(--muted); }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--fg-2); margin: 0 0 18px; max-width: 46rem; }

.prose { max-width: 46rem; }
.prose h2 { margin-top: 2em; font-size: 1.3rem; }
.prose p, .prose li { color: var(--fg-2); }
.prose a { color: var(--fg); }
.updated { font-size: .88rem; color: var(--muted); }
.table-wrap { overflow-x: auto; margin: 0 0 1.2em; border: 1px solid var(--line); border-radius: 12px; }
table { border-collapse: collapse; width: 100%; font-size: .88rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--bg-soft); font-weight: 650; }
tr:last-child td { border-bottom: 0; }
.cmp-msg { display: block; margin-top: 10px; font-size: .88rem; color: var(--muted); }

.contact-grid { display: flex; flex-direction: column; gap: 24px; margin-top: 24px; }
.contact-mail { display: flex; gap: 14px; align-items: center; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; }
.contact-mail .icon { width: 28px; height: 28px; color: var(--accent); }
.contact-mail span { display: flex; flex-direction: column; }
.contact-mail small { color: var(--muted); }
.contact-form { display: flex; flex-direction: column; gap: 14px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-softer); }
.contact-form h2 { margin: 0; font-size: 1.2rem; }
.contact-form .btn { align-self: flex-start; }

.not-found { text-align: left; }
.nf-art { display: inline-flex; align-items: center; gap: 12px; font-size: 3rem; font-weight: 800; letter-spacing: -0.05em; color: var(--accent); margin-bottom: 16px; }
.nf-art .icon { width: 56px; height: 56px; }
.not-found .tool-grid { margin: 24px 0; }

/* ---------------------------------------------------------------- footer */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-softer); padding: 48px 0 24px; font-size: .9rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; }
.footer-brand p { color: var(--muted); margin-top: 12px; max-width: 22rem; }
.site-footer h2 { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.site-footer a { text-decoration: none; color: var(--fg-2); }
.site-footer a:hover { color: var(--fg); text-decoration: underline; }
.network li { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.network small { color: var(--muted); }
.net-dot { width: 7px; height: 7px; border-radius: 2px; background: var(--fg-2); flex: none; transform: translateY(-1px); }
.network .current .net-dot { background: var(--accent); }
.network .soon { color: var(--muted); }
.network .soon .net-dot { background: transparent; border: 1px dashed var(--muted); }
.footer-bottom { border-top: 1px solid var(--line); margin-top: 36px; padding-top: 20px; color: var(--muted); font-size: .84rem; }
.footer-bottom p { margin: 0; }
.site-footer .linklike { color: var(--fg-2); text-decoration: none; text-align: left; }
.site-footer .linklike:hover { color: var(--fg); text-decoration: underline; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
