@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;700&family=IBM+Plex+Sans:wght@400;600&family=IBM+Plex+Mono:wght@400;500&display=swap");

:root {
  --bg-1: #f7efe2;
  --bg-2: #e3f0e6;
  --surface: #fffaf2;
  --ink: #1c232b;
  --muted: #5a616b;
  --accent: #0f6f64;
  --accent-strong: #0b4f4a;
  --accent-2: #f2a154;
  --accent-3: #d65f3c;
  --border: #d9d2c6;
  --shadow: 0 20px 50px rgba(20, 30, 40, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  color: var(--ink);
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 220, 170, 0.7), transparent 50%),
    radial-gradient(circle at 86% 12%, rgba(173, 228, 214, 0.55), transparent 46%),
    linear-gradient(135deg, var(--bg-1), var(--bg-2));
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: repeating-linear-gradient(
    120deg,
    rgba(15, 20, 25, 0.03) 0,
    rgba(15, 20, 25, 0.03) 1px,
    transparent 1px,
    transparent 12px
  );
  pointer-events: none;
  opacity: 0.45;
}

body::after {
  content: "";
  position: fixed;
  width: 320px;
  height: 320px;
  right: -120px;
  bottom: -120px;
  background: radial-gradient(circle, rgba(214, 95, 60, 0.2), transparent 70%);
  pointer-events: none;
}

.page {
  position: relative;
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 20px 52px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
}

.hero__text h1 {
  font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
  font-size: 36px;
  margin: 0 0 6px;
}

.hero__text p {
  margin: 0;
  color: var(--muted);
  max-width: 520px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-strong);
  margin: 0 0 6px;
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pill {
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(15, 111, 100, 0.1);
  color: var(--accent-strong);
}

.link {
  color: var(--accent-strong);
  text-decoration: none;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.8);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.link:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 20px rgba(15, 111, 100, 0.15);
}

.panel {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(217, 210, 198, 0.7);
  position: relative;
  overflow: hidden;
  animation: liftIn 0.6s ease both;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15, 111, 100, 0.08), transparent 55%);
  pointer-events: none;
}

.panel--input {
  animation-delay: 0.05s;
}

.panel--list {
  animation-delay: 0.12s;
}

.panel__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
}

.panel__head h2 {
  font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
  margin: 0;
  font-size: 22px;
}

.panel__head p {
  margin: 4px 0 0;
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 24px;
  position: relative;
  z-index: 1;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.row input {
  flex: 1;
}

label {
  font-weight: 600;
  color: var(--muted);
}

input,
textarea {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 14px;
  background: #fffefb;
  transition: border-color 0.15s ease, box-shadow 0.2s ease;
}

input {
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
}

textarea {
  font-family: "IBM Plex Mono", "Segoe UI", monospace;
  resize: vertical;
  min-height: 240px;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 111, 100, 0.15);
}

.hint {
  font-size: 12px;
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

button {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 20px rgba(15, 111, 100, 0.25);
}

button.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--border);
}

button.primary {
  background: linear-gradient(135deg, var(--accent-2), #f7c46c);
  color: #2b1902;
}

.status {
  padding: 14px 16px;
  border-radius: 14px;
  background: #f6f2ea;
  color: var(--muted);
  min-height: 56px;
  border: 1px dashed rgba(90, 97, 107, 0.25);
}

.status strong {
  color: var(--ink);
}

.status ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.status.ok {
  background: #e6f4ee;
  color: #1a5f46;
  border-color: rgba(26, 95, 70, 0.35);
}

.status.error {
  background: #fdecea;
  color: #8b1e1e;
  border-color: rgba(139, 30, 30, 0.35);
}

.status.info {
  background: #f2f3f6;
  color: var(--muted);
}

.side-card {
  border-radius: 16px;
  border: 1px solid rgba(217, 210, 198, 0.6);
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.7);
}

.side-card h3 {
  margin: 0 0 8px;
  font-size: 14px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.side-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
}

.list {
  display: grid;
  gap: 12px;
}

.list .item {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #fffdf8;
}

.list .item .title {
  font-weight: 600;
}

.list .item .meta {
  color: var(--muted);
  font-size: 13px;
}

.footer {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

@keyframes liftIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Modal */
.modal {
  border: none;
  border-radius: var(--radius);
  padding: 0;
  background: transparent;
  box-shadow: var(--shadow);
}
.modal::backdrop {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
}
.modal__content {
  background: var(--surface);
  padding: 24px;
  border-radius: var(--radius);
  width: 90vw;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Visual Editor */
.editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.editor-tabs {
  display: flex;
  gap: 8px;
}
.tab {
  padding: 4px 12px;
  font-size: 13px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
}
.tab.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.visual-editor {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fffefb;
  min-height: 240px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.visual-editor.hidden, textarea.hidden {
  display: none !important;
}
.question-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  background: #fff;
}
.question-card input[type="text"] {
  width: 100%;
  margin-bottom: 8px;
}
.option-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.option-row input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}
.option-row input[type="text"] {
  flex: 1;
  margin: 0;
}
.option-why {
  width: 100%;
  margin-top: 4px;
  font-size: 12px;
}
.visual-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
}


@media (max-width: 900px) {
  .hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .actions {
    flex-direction: column;
  }

  button {
    width: 100%;
  }

  .row {
    flex-direction: column;
    align-items: stretch;
  }
}
