:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #152033;
  --muted: #647084;
  --line: #dfe5ee;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --green: #10b981;
  --shadow: 0 12px 35px rgba(15, 23, 42, 0.08);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 30%),
    radial-gradient(circle at top right, rgba(16, 185, 129, 0.10), transparent 28%),
    var(--bg);
  color: var(--text);
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 22px;
}

.nav {
  border-bottom: 1px solid rgba(223, 229, 238, 0.85);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.nav-inner {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
  font-size: 20px;
}

.logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--blue), var(--green));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 900;
}

.nav-links {
  display: flex;
  gap: 18px;
  align-items: center;
  font-size: 15px;
}

.hero {
  padding: 78px 0 54px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 34px;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(37, 99, 235, 0.1);
  color: var(--blue-dark);
  border: 1px solid rgba(37, 99, 235, 0.18);
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 650;
  font-size: 14px;
}

h1 {
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.045em;
  margin: 18px 0 18px;
}

h2 {
  font-size: 30px;
  letter-spacing: -0.025em;
  margin: 0 0 14px;
}

h3 {
  margin: 0 0 10px;
  font-size: 20px;
}

.lead {
  font-size: 19px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0 0 28px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  padding: 12px 17px;
  font-weight: 750;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}

.btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.btn-primary {
  background: var(--blue);
  color: white;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.26);
}

.btn-primary:hover {
  background: var(--blue-dark);
}

.btn-ghost {
  background: white;
  border-color: var(--line);
  color: var(--text);
}

.panel {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(223, 229, 238, 0.85);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: 24px;
}

.visual {
  min-height: 310px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(16, 185, 129, 0.12)),
    white;
  position: relative;
  overflow: hidden;
}

.visual-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background: #0f172a;
  color: #dbeafe;
  border-radius: 14px;
  padding: 18px;
  line-height: 1.7;
  font-size: 14px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}

.section {
  padding: 32px 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.card p {
  color: var(--muted);
  line-height: 1.65;
}

.toolbox {
  display: grid;
  gap: 14px;
}

textarea,
input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  font: inherit;
  background: white;
  color: var(--text);
  outline: none;
}

textarea {
  min-height: 190px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

textarea:focus,
input:focus {
  border-color: rgba(37, 99, 235, 0.6);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
}

.output {
  white-space: pre-wrap;
  word-break: break-word;
  background: #0f172a;
  color: #e5edf8;
  border-radius: 16px;
  padding: 18px;
  min-height: 90px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  line-height: 1.6;
}

.note {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.footer {
  margin-top: 60px;
  padding: 32px 0;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.page {
  padding: 48px 0;
}

.prose {
  max-width: 820px;
}

.prose p,
.prose li {
  color: var(--muted);
  line-height: 1.75;
}

@media (max-width: 820px) {
  .hero-grid,
  .grid {
    grid-template-columns: 1fr;
  }

  .nav-inner {
    height: auto;
    padding: 14px 0;
    align-items: flex-start;
    gap: 12px;
    flex-direction: column;
  }

  .nav-links {
    flex-wrap: wrap;
  }

  .footer-inner {
    flex-direction: column;
  }
}
