:root {
  --bg: #ffffff;
  --bg-strong: #f5f8fd;
  --panel: #ffffff;
  --panel-alt: #f4f7fc;
  --text: #18324f;
  --muted: #60748b;
  --line: rgba(24, 50, 79, 0.12);
  --accent: #13b4e3;
  --accent-strong: #0e8db1;
  --accent-soft: #d8f4fb;
  --danger: #9f2037;
  --shadow: 0 18px 48px rgba(19, 180, 227, 0.14);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Trebuchet MS", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(19, 180, 227, 0.12), transparent 34%),
    radial-gradient(circle at right 12%, rgba(19, 180, 227, 0.1), transparent 22%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-strong) 100%);
  padding: 28px 20px 56px;
}

.shell {
  width: min(1160px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 22px;
}

.hero,
.card {
  border: 1px solid rgba(24, 50, 79, 0.08);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(247, 250, 255, 0.97));
  box-shadow: var(--shadow);
  padding: 24px;
}

.card.is-disabled {
  opacity: 0.5;
  filter: grayscale(0.18);
}

.card.is-disabled input,
.card.is-disabled textarea,
.card.is-disabled button {
  pointer-events: none;
}

.hero-brand {
  display: flex;
  align-items: center;
  gap: 20px;
}

.hero-copy {
  min-width: 0;
}

.hero-logo {
  width: clamp(84px, 10vw, 118px);
  height: auto;
  flex: 0 0 auto;
  display: block;
  object-fit: contain;
}

.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.7rem, 3vw, 2.9rem);
  line-height: 0.92;
  letter-spacing: -0.05em;
  text-transform: uppercase;
}

.lead {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

.grid {
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  align-items: start;
}

.stack {
  display: grid;
  gap: 22px;
}

.card h2 {
  margin: 0 0 18px;
  font-size: 1.18rem;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

label {
  font-weight: 700;
  font-size: 0.95rem;
}

input,
.email-box,
.options-box {
  width: 100%;
  border: 1px solid rgba(24, 50, 79, 0.14);
  border-radius: 12px;
  padding: 14px 16px;
  font: inherit;
  color: var(--text);
  background: #fffefb;
}

.email-box {
  min-height: 280px;
  font: 500 0.98rem/1.55 "SFMono-Regular", "Menlo", "Consolas", monospace;
  resize: vertical;
}

.options-box {
  min-height: 140px;
  resize: vertical;
}

.hint {
  margin: -4px 0 16px;
  color: var(--muted);
  line-height: 1.55;
}

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

button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.primary { background: var(--accent); color: white; }
.secondary { background: var(--accent-soft); color: var(--accent-strong); }
.ghost { background: #fffefb; color: var(--text); border: 1px solid rgba(24, 50, 79, 0.12); }

.status {
  min-height: 24px;
  margin-bottom: 16px;
  font-weight: 700;
}

.status.error { color: var(--danger); }
.status.ok { color: var(--accent-strong); }

.spaces-wrap {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.spaces-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
  background: rgba(255, 255, 255, 0.56);
  border-radius: 14px;
  overflow: hidden;
}

.spaces-table th,
.spaces-table td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid rgba(24, 50, 79, 0.08);
  vertical-align: top;
}

.spaces-table th {
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  background: rgba(228, 238, 251, 0.72);
}

.spaces-table tbody tr { cursor: pointer; }
.spaces-table tbody tr:hover { background: rgba(19, 180, 227, 0.08); }

.pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.92rem;
  font-weight: 700;
}

.is-hidden { display: none; }

@media (max-width: 860px) {
  .grid { grid-template-columns: 1fr; }
  body { padding: 18px 14px 42px; }
  .hero, .card { padding: 18px; border-radius: 18px; }
  .actions button { width: 100%; }
  .hero-brand { align-items: flex-start; }
}

@media (max-width: 560px) {
  .hero-brand {
    flex-direction: column;
    gap: 14px;
  }
}
