:root {
  --bg-1: #f7f4ec;
  --bg-2: #ecf2e8;
  --panel: rgba(255, 255, 255, 0.82);
  --ink: #102218;
  --muted: #476054;
  --accent: #d64f2a;
  --accent-2: #1d6f5f;
  --border: rgba(16, 34, 24, 0.12);
  --shadow: 0 16px 50px rgba(18, 36, 26, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 10% 10%, var(--bg-2), transparent 40%),
    radial-gradient(circle at 90% 80%, #fbe3cd, transparent 38%),
    linear-gradient(135deg, #f5f2e8 0%, #e8efe3 100%);
  display: flex;
  justify-content: center;
  padding: 2rem 1rem;
  overflow-x: hidden;
}

.bg-shape {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  filter: blur(30px);
}

.bg-shape-1 {
  width: 260px;
  height: 260px;
  background: rgba(214, 79, 42, 0.25);
  top: -60px;
  right: -80px;
}

.bg-shape-2 {
  width: 220px;
  height: 220px;
  background: rgba(29, 111, 95, 0.22);
  bottom: -50px;
  left: -60px;
}

.container {
  z-index: 1;
  width: min(880px, 100%);
  animation: fade-up 0.5s ease-out;
}

.hero {
  margin-bottom: 1rem;
}

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

h1 {
  margin: 0.35rem 0;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.1;
}

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

.card {
  backdrop-filter: blur(8px);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 1rem;
  margin-top: 1rem;
}

label {
  display: block;
  margin: 0.35rem 0;
  font-weight: 500;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.86);
  border-radius: 10px;
  padding: 0.72rem 0.8rem;
  font: inherit;
  color: var(--ink);
}

input:focus,
textarea:focus {
  outline: 2px solid rgba(29, 111, 95, 0.3);
  border-color: var(--accent-2);
}

textarea {
  resize: vertical;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-top: 0.4rem;
}

.check-wrap {
  align-self: end;
}

.check-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
}

.check-label input {
  width: auto;
}

button {
  margin-top: 0.9rem;
  width: 100%;
  border: none;
  border-radius: 11px;
  padding: 0.8rem 1rem;
  font: inherit;
  font-weight: 700;
  background: linear-gradient(90deg, var(--accent), #e26a49);
  color: #fff;
  cursor: pointer;
  transition: transform 140ms ease, filter 140ms ease;
}

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

button:disabled {
  cursor: wait;
  opacity: 0.75;
  transform: none;
}

.result h2 {
  margin: 0;
}

.card h2 {
  margin: 0 0 0.4rem 0;
}

.card h3 {
  margin: 0.75rem 0 0.45rem 0;
  font-size: 1rem;
  color: var(--accent-2);
}

#status {
  color: var(--muted);
}

#preview {
  margin: 0;
  white-space: pre-wrap;
  background: rgba(16, 34, 24, 0.06);
  border-radius: 10px;
  padding: 0.75rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.9rem;
  max-height: 240px;
  overflow: auto;
}

#summary {
  margin: 0;
  background: rgba(214, 79, 42, 0.08);
  border-radius: 10px;
  padding: 0.9rem 1rem;
  font-size: 1rem;
  line-height: 1.55;
  max-height: 260px;
  overflow: auto;
  font-family: "Space Grotesk", sans-serif;
}

.chatgpt-summary p {
  margin: 0 0 0.65rem 0;
}

.chatgpt-summary ul {
  margin: 0 0 0.8rem 1.2rem;
  padding: 0;
}

.chatgpt-summary li {
  margin: 0.25rem 0;
}

.chatgpt-summary .summary-gap {
  height: 0.45rem;
}

.chatgpt-summary a {
  text-decoration: underline;
}

.links {
  margin-top: 0.75rem;
  display: flex;
  gap: 1rem;
}

a {
  color: var(--accent-2);
  text-decoration: none;
  font-weight: 600;
}

a:hover {
  text-decoration: underline;
}

.mic-row button {
  margin-top: 0.35rem;
}

#stop-recording-btn {
  background: linear-gradient(90deg, #1d6f5f, #2c8d79);
}

#recording-status {
  margin: 0.8rem 0 0 0;
  color: var(--muted);
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 700px) {
  .row {
    grid-template-columns: 1fr;
  }

  body {
    padding: 1.2rem 0.8rem;
  }
}
