:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --ink: #1f2937;
  --muted: #5d6b7a;
  --line: #d8e0ea;
  --accent: #4f46e5;
  --accent-soft: #eef0ff;
  --accent-2: #0f766e;
  --shadow: 0 14px 34px rgba(31, 41, 55, 0.08);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  background: linear-gradient(180deg, #f7f8fc 0%, #eef4fb 100%);
  color: var(--ink);
}

.app-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

.hero {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.hero-copy,
.hero-card,
.mode-panel,
.editor-panel,
.output-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 28px;
  background: linear-gradient(135deg, #4338ca, #6366f1);
  color: white;
}

.hero-card,
.mode-panel,
.editor-panel,
.output-panel {
  padding: 22px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  opacity: 0.85;
  margin-bottom: 8px;
}

.hero h1 {
  margin: 0 0 10px;
  font-size: 2.2rem;
}

.hero-text {
  margin: 0;
  max-width: 700px;
  line-height: 1.6;
}

.hero-card h2,
.mode-panel h2,
.panel-head h2 {
  margin-top: 0;
}

.hero-card ul {
  padding-left: 20px;
  margin-bottom: 0;
}

.workspace {
  display: grid;
  grid-template-columns: 1.1fr 1.5fr 1.3fr;
  gap: 20px;
}

.mode-grid {
  display: grid;
  gap: 12px;
}

.mode-card {
  text-align: left;
  border: 1px solid var(--line);
  background: #fafbff;
  border-radius: 16px;
  padding: 16px;
  cursor: pointer;
  transition: 0.2s ease;
}

.mode-card:hover,
.mode-card.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.mode-title {
  display: block;
  font-weight: 800;
  margin-bottom: 6px;
}

.mode-desc {
  display: block;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.4;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.panel-head p {
  margin: 6px 0 0;
  color: var(--muted);
}

.copilot-form {
  display: grid;
  gap: 14px;
}

.field label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit;
  background: white;
}

.field textarea {
  min-height: 110px;
  resize: vertical;
}

.actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

.primary-button,
.secondary-button,
.ghost-button {
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 700;
  cursor: pointer;
}

.primary-button {
  background: var(--accent);
  color: white;
}

.secondary-button {
  background: #e8edf5;
  color: var(--ink);
}

.ghost-button {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--line);
}

.output-box {
  min-height: 520px;
  background: #f9fbff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  white-space: pre-wrap;
  line-height: 1.6;
}

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

@media (max-width: 720px) {
  .app-shell {
    padding: 14px;
  }

  .hero-copy,
  .hero-card,
  .mode-panel,
  .editor-panel,
  .output-panel {
    padding: 18px;
    border-radius: 16px;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .actions,
  .panel-head {
    flex-direction: column;
  }

  .primary-button,
  .secondary-button,
  .ghost-button {
    width: 100%;
  }
}
