:root {
  --bg: #f5f2e8;
  --ink: #1f1a14;
  --card: rgba(255, 252, 245, 0.88);
  --brand: #005f73;
  --brand-2: #0a9396;
  --accent: #ee9b00;
  --muted: #6a6259;
  --border: #e2d6bf;
  --danger: #ae2012;
  --ok: #3a7d44;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 15% 20%, #ffe8b6 0, transparent 45%),
    radial-gradient(circle at 85% 10%, #c9f7f5 0, transparent 45%),
    linear-gradient(165deg, #f5f2e8 0%, #f9f7f0 100%);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.bg-shape {
  position: fixed;
  width: 40vmax;
  height: 40vmax;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  pointer-events: none;
}

.shape-a {
  background: #0a9396;
  top: -18vmax;
  right: -10vmax;
}

.shape-b {
  background: #ee9b00;
  bottom: -22vmax;
  left: -14vmax;
}

.app-shell {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
  position: relative;
  z-index: 1;
}

.header-card,
.panel,
.footer-note {
  background: var(--card);
  border: 1px solid var(--border);
  backdrop-filter: blur(6px);
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(31, 26, 20, 0.08);
}

.header-card {
  padding: 1.4rem;
  margin-bottom: 1rem;
  animation: rise 0.5s ease-out;
}

.eyebrow {
  margin: 0;
  font-family: "IBM Plex Mono", monospace;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
}

h1 {
  margin: 0.25rem 0 0;
  font-size: clamp(1.5rem, 3.7vw, 2.3rem);
}

.subtitle {
  margin: 0.5rem 0 0;
  color: var(--muted);
}

.panel {
  padding: 1rem;
  margin: 1rem 0;
  animation: rise 0.6s ease-out;
}

h2 {
  margin: 0 0 0.7rem;
  font-size: 1.1rem;
}

h3 {
  margin: 0;
}

label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 500;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.7rem;
  font-size: 0.96rem;
  font-family: inherit;
  background: #fffdf8;
}

.row {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.row.compact {
  margin-top: 0.7rem;
}

.row input {
  flex: 1;
}

.btn {
  border: none;
  border-radius: 10px;
  padding: 0.64rem 0.9rem;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.16s ease, opacity 0.16s ease;
}

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

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  margin-top: 0.65rem;
  background: linear-gradient(130deg, var(--brand), var(--brand-2));
  color: #fff;
}

.btn-secondary {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--border);
}

.status-pill {
  display: inline-block;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.76rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #efe8db;
}

.hint,
.muted {
  color: var(--muted);
  font-size: 0.9rem;
}

.output {
  min-height: 56px;
  background: #fffdf8;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem;
  white-space: pre-wrap;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
}

.answer-wrap {
  margin-top: 0.85rem;
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fffdf8;
}

.footer-note {
  margin-top: 1rem;
  padding: 0.9rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.error {
  color: var(--danger);
}

.ok {
  color: var(--ok);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 700px) {
  .row {
    flex-direction: column;
    align-items: stretch;
  }
}
