:root {
  --bg: #fafafa; --fg: #1d1d1f; --muted: #6b6b70; --card: #ffffff;
  --border: #e3e3e8; --accent: #3a5bd9; --accent-fg: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #141416; --fg: #ececf0; --muted: #9a9aa3; --card: #1e1e22;
    --border: #33333a; --accent: #7b96ff; --accent-fg: #0d0d10; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); }
.site-header, .site-footer { max-width: 960px; margin: 0 auto; padding: 16px; }
.site-header { display: flex; justify-content: space-between; align-items: center; }
.brand { font-weight: 700; text-decoration: none; color: var(--fg); }
.site-footer { color: var(--muted); font-size: 14px; border-top: 1px solid var(--border); margin-top: 48px; }
.container { max-width: 960px; margin: 0 auto; padding: 0 16px; }
h1 { font-size: 1.9rem; line-height: 1.25; margin: 16px 0 8px; }
.lead { color: var(--muted); margin-top: 0; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 20px; margin: 16px 0; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.tool-grid a { display: block; text-decoration: none; color: inherit; }
.tool-grid a:hover .card { border-color: var(--accent); }
.tool-grid h2 { font-size: 1.1rem; margin: 0 0 4px; }
.tool-grid p { margin: 0; color: var(--muted); font-size: 14px; }
button, .btn { background: var(--accent); color: var(--accent-fg); border: 0; border-radius: 8px;
  padding: 10px 16px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-block; }
button:disabled { opacity: .5; cursor: not-allowed; }
button.secondary { background: transparent; color: var(--fg); border: 1px solid var(--border); }
input, select, textarea { font: inherit; color: var(--fg); background: var(--bg);
  border: 1px solid var(--border); border-radius: 8px; padding: 8px; max-width: 100%; }
label { display: inline-flex; gap: 6px; align-items: center; margin: 4px 12px 4px 0; }
.dropzone { border: 2px dashed var(--border); border-radius: 12px; padding: 32px; text-align: center; color: var(--muted); cursor: pointer; }
.dropzone.over { border-color: var(--accent); color: var(--fg); }
.upsell { border-color: var(--accent); }
.ad-slot { margin: 24px 0; min-height: 0; }
.faq h3 { font-size: 1.05rem; margin-bottom: 4px; }
.related ul { padding-left: 20px; }
canvas { max-width: 100%; image-rendering: pixelated; background: repeating-conic-gradient(#8883 0 25%, transparent 0 50%) 0 0/16px 16px; }
pre { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 12px; overflow-x: auto; max-width: 100%; font-size: 14px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
select { max-width: 100%; }
label { flex-wrap: wrap; max-width: 100%; }
label > select, label > input { min-width: 0; max-width: 100%; }
fieldset { min-width: 0; }
input[type=file] { max-width: 100%; }
:not(pre) > code { overflow-wrap: anywhere; }
