:root {
  --bg-a: #fff8ef;
  --bg-b: #ffe7c2;
  --ink: #2f1f14;
  --ink-soft: #5f4a39;
  --line: #d6b38f;
  --card: rgba(255, 249, 241, 0.88);
  --accent: #0f766e;
  --accent-2: #c2410c;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  min-height: 100vh;
  background: radial-gradient(circle at 20% 20%, #fff7ea, transparent 30%),
    radial-gradient(circle at 80% 0%, #ffd4a5, transparent 40%),
    linear-gradient(150deg, var(--bg-a), var(--bg-b));
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(0, 0, 0, 0.04) 0.6px, transparent 0.6px);
  background-size: 3px 3px;
  opacity: 0.45;
}

.layout {
  width: min(1200px, 92vw);
  margin: 24px auto 48px;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(12, 1fr);
  position: relative;
  z-index: 1;
}

.panel {
  backdrop-filter: blur(3px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 8px 30px rgba(80, 44, 11, 0.08);
}

.hero {
  grid-column: span 12;
  animation: rise 400ms ease-out;
}

.upload,
.transcript {
  grid-column: span 6;
}

.editor,
.diagram {
  grid-column: span 12;
}

.kicker {
  margin: 0;
  font-family: "IBM Plex Mono", monospace;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

h1,
h2,
h3 {
  margin-top: 0;
}

label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

input,
select,
textarea,
button {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
  font-family: inherit;
  background: #fffdf9;
}

textarea {
  resize: vertical;
}

button {
  cursor: pointer;
  background: linear-gradient(120deg, var(--accent), #14b8a6);
  color: #fff;
  border: none;
  font-weight: 700;
  transition: transform 120ms ease, filter 120ms ease;
}

button:hover {
  transform: translateY(-1px);
  filter: saturate(1.1);
}

.actions {
  display: flex;
  gap: 10px;
}

.actions button {
  margin-bottom: 0;
}

.status {
  margin: 0;
  color: var(--ink-soft);
}

.grid-two {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

#diagram {
  min-height: 220px;
  overflow: auto;
  border: 1px dashed var(--line);
  border-radius: 10px;
  padding: 8px;
  background: #fff;
}

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

@media (max-width: 920px) {
  .upload,
  .transcript,
  .editor,
  .diagram {
    grid-column: span 12;
  }

  .grid-two {
    grid-template-columns: 1fr;
  }

  .actions {
    flex-direction: column;
  }
}
