:root {
  --ink: #0d1117;
  --ink-2: #3d4654;
  --muted: #6b7482;
  --line: #e5e8ee;
  --line-2: #eef1f6;
  --bg: #ffffff;
  --soft: #f7f8fb;
  --accent: #4f46e5;
  --accent-soft: #eef0ff;
  --ok: #0f9d58;
  --warn: #b45309;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(13, 17, 23, .04), 0 8px 24px rgba(13, 17, 23, .06);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* ---------- header ---------- */

.site-head {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .9);
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: saturate(180%) blur(8px);
}
.site-head .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
}
.brand {
  display: flex; align-items: center; gap: 9px;
  font-weight: 700; font-size: 16px; letter-spacing: -.01em; color: var(--ink);
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 26px; height: 26px; border-radius: 8px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  display: grid; place-items: center; color: #fff; font-size: 14px; font-weight: 800;
}
.nav { display: flex; gap: 22px; font-size: 14px; color: var(--ink-2); }
.nav a { color: var(--ink-2); }
.nav a:hover { color: var(--accent); }

/* ---------- hero ---------- */

.hero { padding: 56px 0 8px; text-align: center; }
.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 5vw, 46px);
  line-height: 1.12;
  letter-spacing: -.028em;
  font-weight: 800;
}
.hero p.lede {
  margin: 0 auto;
  max-width: 620px;
  font-size: 18px;
  color: var(--ink-2);
}
.hero .meta {
  margin-top: 16px;
  font-size: 13.5px;
  color: var(--muted);
  display: flex; gap: 18px; justify-content: center; flex-wrap: wrap;
}
.hero .meta span::before { content: "·"; margin-right: 8px; color: var(--line); }
.hero .meta span:first-child::before { content: none; }

/* ---------- tool ---------- */

.tool { padding: 30px 0 10px; }
.tool-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--bg);
  box-shadow: var(--shadow);
  padding: 18px;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 760px) { .grid-2 { grid-template-columns: 1fr; } }

.drop {
  display: grid; place-items: center;
  min-height: 300px;
  border: 1.5px dashed var(--line);
  border-radius: var(--radius);
  background: var(--soft);
  cursor: pointer;
  overflow: hidden;
  padding: 12px;
  transition: border-color .15s, background .15s;
  text-align: center;
}
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop-inner { display: grid; gap: 4px; color: var(--muted); font-size: 13.5px; }
.drop-inner strong { color: var(--ink); font-size: 15px; }
.drop-icon {
  width: 38px; height: 38px; border-radius: 50%;
  background: #fff; border: 1px solid var(--line);
  display: grid; place-items: center; margin: 0 auto 6px;
  font-size: 18px; color: var(--accent);
}
.drop img { max-width: 100%; max-height: 340px; border-radius: 10px; display: block; }

.panel-label { font-size: 13px; font-weight: 600; color: var(--muted); margin: 0 0 8px; }

.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 10px; }
.chip {
  font: inherit; font-size: 12.5px;
  padding: 6px 11px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  cursor: pointer; transition: all .12s;
}
.chip:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

textarea {
  width: 100%; min-height: 108px; resize: vertical;
  font: inherit; font-size: 14.5px; color: var(--ink);
  padding: 12px 13px;
  border: 1px solid var(--line); border-radius: 11px;
  background: #fff;
}
textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; margin-top: 10px;
  font: inherit; font-size: 15px; font-weight: 650;
  padding: 13px 18px; border-radius: 11px;
  border: 0; background: var(--accent); color: #fff;
  cursor: pointer; transition: filter .12s, transform .06s;
}
.btn:hover:not(:disabled) { filter: brightness(1.07); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.hint { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); text-align: center; }
.hint.err { color: #b91c1c; }
.hint.ok { color: var(--ok); }

.result { margin-top: 16px; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; background: var(--soft); }
.result-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.result-head strong { font-size: 14px; }
.result img { max-width: 100%; border-radius: 10px; display: block; margin: 0 auto; }
.mini {
  font: inherit; font-size: 13px; font-weight: 600;
  padding: 8px 14px; border-radius: 9px; border: 1px solid var(--line);
  background: #fff; color: var(--ink); cursor: pointer;
}
.mini:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- prose ---------- */

.prose { padding: 34px 0 20px; }
.prose h2 {
  font-size: 26px; letter-spacing: -.02em; font-weight: 750;
  margin: 44px 0 14px;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 17.5px; margin: 26px 0 8px; font-weight: 700; }
.prose p { color: var(--ink-2); margin: 0 0 14px; }
.prose ul, .prose ol { color: var(--ink-2); padding-left: 22px; margin: 0 0 16px; }
.prose li { margin: 6px 0; }
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .9em; background: var(--soft); border: 1px solid var(--line-2);
  padding: 1px 5px; border-radius: 5px;
}
.lead-2 { font-size: 17px; color: var(--ink-2); }

.table { width: 100%; border-collapse: collapse; font-size: 14.5px; margin: 8px 0 18px; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line-2); }
.table th { font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }

.note {
  border-left: 3px solid var(--accent);
  background: var(--soft);
  padding: 12px 16px; border-radius: 0 10px 10px 0;
  font-size: 14.5px; color: var(--ink-2);
  margin: 0 0 18px;
}

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line-2); padding: 14px 0; }
.faq summary {
  cursor: pointer; font-weight: 650; font-size: 15.5px;
  list-style: none; display: flex; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq p { margin: 10px 0 0; color: var(--ink-2); font-size: 14.5px; }

/* ---------- footer ---------- */

.site-foot {
  margin-top: 56px;
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
  font-size: 13.5px; color: var(--muted);
}
.site-foot .row { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; }
.site-foot nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-foot a { color: var(--muted); }
.site-foot a:hover { color: var(--accent); }

.page-head { padding: 44px 0 8px; }
.page-head h1 { font-size: clamp(28px, 4vw, 36px); letter-spacing: -.025em; margin: 0 0 10px; font-weight: 800; }
.page-head p { color: var(--muted); margin: 0; }
.page-body { padding: 8px 0 40px; }
.page-body h2 { font-size: 20px; margin: 34px 0 10px; letter-spacing: -.015em; }
.page-body h3 { font-size: 16px; margin: 22px 0 8px; }
.page-body p, .page-body li { color: var(--ink-2); font-size: 15px; }
.page-body ul { padding-left: 20px; }
.updated { font-size: 13px; color: var(--muted); margin-top: 28px; }

/* ---------- example edits ---------- */

.spec {
  margin: 6px 0 0;
  text-align: center;
  font-size: 11.5px;
  letter-spacing: .02em;
  color: #9aa2ae;
}

.demo {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--soft);
}
.demo-head {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  margin-bottom: 14px;
}
.demo-tag {
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft);
  padding: 3px 8px; border-radius: 6px;
}
.demo-note { font-size: 12.5px; color: var(--muted); }

.demo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}
.demo-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 10px;
}
.demo-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.shot { position: relative; }
.shot img {
  width: 100%; height: auto; display: block;
  border-radius: 7px; background: var(--line-2);
  aspect-ratio: 1 / 1; object-fit: cover;
}
.shot span {
  position: absolute; left: 5px; top: 5px;
  font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: #fff; background: rgba(13, 17, 23, .62);
  padding: 2px 6px; border-radius: 4px;
}
.demo-label {
  margin: 9px 0 4px;
  font-size: 12.5px; font-weight: 650; color: var(--ink);
}
.demo-prompt {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px; line-height: 1.5; color: var(--muted);
}
