:root {
  color-scheme: light;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: #eff2ff;
  color: #0f172a;
  font-size: 16px;
  line-height: 1.5;
}
* {
  box-sizing: border-box;
}
html, body {
  margin: 0;
  min-height: 100%;
}
body {
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.12), transparent 25%),
    radial-gradient(circle at bottom right, rgba(139, 92, 246, 0.18), transparent 22%),
    #eff2ff;
}
img {
  max-width: 100%;
}
.page-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 4rem;
}
.page-header {
  background: linear-gradient(135deg, #4338ca 0%, #0ea5e9 100%);
  color: white;
  padding: 2.5rem 1.5rem;
  border-radius: 2rem;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.18);
}
.page-header h1 {
  margin: 0;
  /* font-size: clamp(2rem, 3vw, 3rem); */
}
.page-header p {
  margin: 1rem 0 0;
  max-width: 55rem;
  opacity: 0.92;
}
.top-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
}
.top-nav a,
.tool-link {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem 1.15rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #1e293b;
  text-decoration: none;
  font-weight: 700;
  border: 1px solid rgba(15, 23, 42, 0.08);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
a.top-nav-item:hover,
.tool-link:hover {
  transform: translateY(-2px);
  background: white;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}
.card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 1.75rem;
  padding: 2rem;
  box-shadow: 0 28px 48px rgba(15, 23, 42, 0.08);
  margin-top: 1.75rem;
}
.card h2 {
  margin-top: 0;
  font-size: 1.75rem;
}
.card p {
  color: #475569;
}
.grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr 1fr;
}
.field {
  display: flex;
  flex-direction: column;
  gap: .65rem;
}
label {
  font-size: .95rem;
  font-weight: 700;
}
textarea,
input,
select {
  width: 100%;
  min-height: 3.25rem;
  border-radius: 1rem;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: #f8fafc;
  padding: 1rem;
  font: inherit;
  color: #0f172a;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
textarea {
  min-height: 10rem;
  resize: vertical;
}
input:focus,
textarea:focus,
select:focus {
  border-color: rgba(59, 130, 246, 0.65);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}
.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}
button {
  border: none;
  border-radius: 999px;
  padding: .5rem 1.4rem;
  font: inherit;
  font-weight: 700;
  color: white;
  background: #2563eb;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
button.secondary {
  background: #475569;
}
button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
}
.output-box {
  background: #0f172a;
  color: #f8fafc;
  border-radius: 1rem;
  padding: 1rem;
  min-height: 6rem;
  overflow-wrap: break-word;
  white-space: pre-wrap;
  word-break: break-word;
}
.help-text {
  color: #475569;
  font-size: .95rem;
}
.status {
  min-height: 1.25rem;
  margin-top: .75rem;
  color: #dc2626;
  font-weight: 700;
}
.preview {
  width: 100%;
  border-radius: 1rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  margin-top: 1rem;
}
.footer-note {
  margin-top: 2rem;
  color: #64748b;
  font-size: .95rem;
}
@media (max-width: 900px) {
  .grid {
    grid-template-columns: 1fr;
  }
}
