:root {
  --bg: #0d0d12;
  --panel: #16161e;
  --panel-2: #1e1e28;
  --line: #2a2a36;
  --text: #ececf1;
  --muted: #a3a3b4;
  --faint: #74748a;
  --accent: #7c5cff;
  --accent-2: #a78bfa;
  --radius: 14px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; line-height: 1.6; }
a { color: var(--accent-2); }
a:hover { color: #c4b5fd; }
img { max-width: 100%; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px 48px; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--accent); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 20; }
.skip:focus { left: 8px; }
.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; }

/* Header */
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 0; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: -0.01em; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); }
.logo { width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(135deg, var(--accent), #ff7ac6); display: grid; place-items: center; flex: none; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; padding: 8px 10px; border-radius: 8px; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); background: var(--panel); }
.badge { font-size: 11px; font-weight: 600; color: var(--accent-2); border: 1px solid #3b3260; padding: 3px 8px; border-radius: 999px; }
@media (max-width: 520px) { .badge { display: none; } .site-nav a { padding: 8px 6px; } .brand { font-size: 16px; white-space: nowrap; gap: 8px; } }

/* Hero + tool */
.hero { text-align: center; padding: 28px 0 22px; }
.hero h1 { font-size: clamp(30px, 5.5vw, 48px); line-height: 1.1; margin: 0 0 12px; letter-spacing: -0.025em; }
.grad { background: linear-gradient(90deg, var(--accent-2), #ff7ac6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--muted); margin: 0 auto; font-size: 17px; max-width: 560px; }
.composer { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.composer textarea { width: 100%; min-height: 92px; resize: vertical; background: transparent; color: var(--text); border: 0; outline: none; font: inherit; font-size: 16px; line-height: 1.5; padding: 4px 4px 8px; }
.composer textarea::placeholder { color: #6c6c7d; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 12px; }
.styles { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { background: var(--panel-2); color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px; font: inherit; font-size: 13px; cursor: pointer; transition: all .15s; min-height: 34px; }
.chip:hover { color: var(--text); border-color: #3a3a4a; }
.chip[aria-pressed="true"] { background: #2a2350; color: #fff; border-color: var(--accent); }
.actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.count { color: var(--faint); font-size: 12px; }
.go { background: var(--accent); color: #fff; border: 0; border-radius: 10px; padding: 11px 20px; font: inherit; font-weight: 600; font-size: 15px; cursor: pointer; transition: transform .1s, opacity .15s; }
.go:hover:not(:disabled) { transform: translateY(-1px); }
.go:disabled { opacity: .45; cursor: not-allowed; }
.check { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.check .note { color: var(--faint); font-size: 12px; }
#turnstile { min-height: 65px; }
.examples { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; align-items: center; }
.examples small { color: var(--faint); }
.ex { background: none; border: 1px dashed var(--line); color: var(--muted); border-radius: 999px; padding: 6px 11px; font: inherit; font-size: 12px; cursor: pointer; }
.ex:hover { color: var(--text); border-color: #444; }
.msg { margin: 14px 0 0; padding: 11px 14px; border-radius: 10px; font-size: 14px; display: none; }
.msg.show { display: block; }
.msg.err { background: #2a1416; color: #ffb4b4; border: 1px solid #4a2124; }
.results { margin-top: 28px; display: grid; gap: 28px; }
.batch h2 { font-size: 14px; font-weight: 500; color: var(--muted); margin: 0 0 10px; overflow-wrap: anywhere; }
.batch h2 b { color: var(--text); font-weight: 600; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 760px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tile { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--panel); border: 1px solid var(--line); }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.tile .dl { position: absolute; right: 8px; bottom: 8px; background: rgba(13,13,18,.78); color: #fff; border: 1px solid rgba(255,255,255,.15); border-radius: 8px; padding: 6px 10px; font-size: 12px; font-weight: 600; text-decoration: none; backdrop-filter: blur(6px); opacity: 0; transition: opacity .15s; }
.tile:hover .dl, .tile:focus-within .dl { opacity: 1; }
@media (hover: none) { .tile .dl { opacity: 1; } }
.skeleton { background: linear-gradient(100deg, var(--panel) 30%, var(--panel-2) 50%, var(--panel) 70%); background-size: 300% 100%; animation: shimmer 1.4s infinite linear; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.88); display: none; place-items: center; padding: 16px; z-index: 10; cursor: zoom-out; }
.lightbox.show { display: grid; }
.lightbox img { max-width: 100%; max-height: 90vh; border-radius: 12px; }

/* Content sections */
.section { margin-top: 64px; }
.section > h2, .prose h2 { font-size: clamp(22px, 3.2vw, 28px); letter-spacing: -0.015em; line-height: 1.25; margin: 0 0 12px; }
.section > p { color: var(--muted); max-width: 720px; }
.steps { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); counter-reset: s; }
.steps li { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; counter-increment: s; color: var(--muted); }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: #2a2350; color: #fff; font-weight: 700; font-size: 14px; margin-bottom: 10px; }
.steps li strong { display: block; color: var(--text); margin-bottom: 4px; }
.cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 18px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; color: var(--muted); text-decoration: none; display: block; }
a.card:hover { border-color: #3d3560; color: var(--muted); }
.card h3 { color: var(--text); font-size: 17px; margin: 0 0 6px; }
.card p { margin: 0; font-size: 15px; }
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 0 16px; margin-top: 10px; }
.faq summary { cursor: pointer; font-weight: 600; padding: 14px 0; list-style-position: outside; }
.faq details[open] summary { border-bottom: 1px solid var(--line); }
.faq details p { color: var(--muted); margin: 12px 0 14px; }

/* Article pages */
.crumbs { font-size: 13px; color: var(--faint); margin: 8px 0 0; }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: #4a4a5c; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.prose { max-width: 740px; margin: 0 auto; }
.prose h1 { font-size: clamp(30px, 5vw, 42px); line-height: 1.15; letter-spacing: -0.025em; margin: 18px 0 10px; }
.prose .lede { font-size: 18px; color: var(--muted); margin: 0 0 8px; }
.prose .meta { font-size: 13px; color: var(--faint); margin: 0 0 28px; }
.prose h2 { margin-top: 40px; }
.prose h3 { font-size: 19px; margin: 28px 0 8px; }
.prose p, .prose li { color: #cfcfdb; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose strong { color: var(--text); }
.prose code { background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; font-size: 0.92em; }
.prose blockquote { margin: 18px 0; padding: 12px 16px; background: var(--panel); border-left: 3px solid var(--accent); border-radius: 0 10px 10px 0; color: #dcdce6; }
.table-wrap { overflow-x: auto; margin: 18px 0; border: 1px solid var(--line); border-radius: 12px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--panel); color: var(--text); font-weight: 600; }
td { color: #cfcfdb; }
tr:last-child td { border-bottom: 0; }
.cta { display: inline-block; margin-top: 10px; background: var(--accent); color: #fff; text-decoration: none; font-weight: 600; padding: 11px 18px; border-radius: 10px; }
.cta:hover { color: #fff; filter: brightness(1.08); }
.callout { background: #1b1830; border: 1px solid #332b5c; color: #d9d0ff; border-radius: 12px; padding: 14px 16px; margin: 20px 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 72px; padding: 32px 0 8px; color: var(--faint); font-size: 13px; }
.foot-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.foot-grid h2 { font-size: 13px; color: var(--text); margin: 0 0 8px; font-weight: 600; }
.foot-grid ul { list-style: none; padding: 0; margin: 0; }
.foot-grid li { margin: 6px 0; }
.foot-grid a { color: var(--muted); text-decoration: none; }
.foot-grid a:hover { color: var(--text); }
.fine { margin-top: 24px; line-height: 1.6; }
