:root {
  --bg: #ffffff;
  --bg-soft: #f9fafb;
  --text: #1a1a1a;
  --text-muted: #4b5563;
  --text-faint: #6b7280;
  --accent: #7c3aed;
  --accent-dark: #5b21b6;
  --accent-soft: #f5f0fb;
  --header-purple: #2d0a5e;
  --border: rgba(0, 0, 0, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', 'Inter', sans-serif;
  line-height: 1.7;
}

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

h1, h2, h3 {
  font-family: 'Poppins', sans-serif;
  color: #111827;
  line-height: 1.25;
}

.topbar {
  background: var(--header-purple);
  padding: 16px 24px;
}
.topbar__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar__logo {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  color: #ffffff;
  font-size: 1.05rem;
}
.topbar__nav a {
  margin-left: 18px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
}
.topbar__nav a:hover { color: #ffffff; }

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.page-title {
  font-size: clamp(1.7rem, 4.5vw, 2.3rem);
  font-weight: 800;
  margin: 0 0 12px;
}

.page-desc {
  color: var(--text-muted);
  font-size: 1.02rem;
  max-width: 600px;
  margin-bottom: 32px;
}

.tool-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 48px;
}

.field-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.field-row .field { flex: 1; min-width: 160px; }

.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: #374151;
}
.field input,
.field textarea {
  width: 100%;
  padding: 11px 13px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  font-family: inherit;
  font-size: 0.95rem;
  background: #ffffff;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}
.field textarea { resize: vertical; min-height: 70px; }

.generate-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 13px 26px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.generate-btn:hover { background: var(--accent-dark); transform: translateY(-1px); }

.qr-output {
  margin-top: 26px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
  display: none;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.qr-output.is-visible { display: flex; }

#qr-canvas-holder {
  background: #ffffff;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  line-height: 0;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1.5px solid var(--accent);
  cursor: pointer;
  text-decoration: none;
}
.download-btn:hover { background: var(--accent-soft); text-decoration: none; }

.error-msg {
  color: #b91c1c;
  font-size: 0.88rem;
  margin-top: 10px;
  display: none;
}
.error-msg.is-visible { display: block; }

article h2 { font-size: 1.3rem; margin: 36px 0 12px; }
article h3 { font-size: 1.05rem; margin: 26px 0 8px; color: #111827; }
article p { color: var(--text-muted); margin: 0 0 16px; }
article ol, article ul { color: var(--text-muted); padding-left: 20px; margin: 0 0 16px; }
article li { margin-bottom: 6px; }

.faq-item {
  border-top: 1px solid var(--border);
  padding: 16px 0;
}
.faq-item h4 { font-size: 0.96rem; font-weight: 700; margin: 0 0 6px; color: #111827; }
.faq-item p { font-size: 0.9rem; color: var(--text-faint); margin: 0; }

.related-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.related-tools a {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 0.88rem;
  font-weight: 600;
  border: 1px solid rgba(91, 33, 182, 0.15);
}
.related-tools a:hover { text-decoration: none; background: #ece3f9; }

.tool-footer {
  border-top: 1px solid var(--border);
  padding: 28px 24px;
  text-align: center;
  color: var(--text-faint);
  font-size: 0.85rem;
}
.tool-footer a { color: var(--text-faint); margin: 0 8px; }

@media (max-width: 560px) {
  .topbar__nav a { margin-left: 10px; font-size: 0.82rem; }
  .qr-output { flex-direction: column; align-items: flex-start; }
}
