:root {
  color-scheme: dark;
  --bg: #0c111d;
  --panel: #121a2a;
  --panel-2: #172236;
  --line: rgba(148, 163, 184, .22);
  --text: #f8fafc;
  --muted: #9fb0cc;
  --blue: #1684ff;
  --blue-2: #38bdf8;
  --red: #fb7185;
  --green: #34d399;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(22, 132, 255, .18), transparent 34rem),
    linear-gradient(135deg, #090d16 0%, #0d1422 100%);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 40px 0;
}

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(18, 26, 42, .82);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .3);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue-2);
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: 13px;
}

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

h1 {
  margin-bottom: 12px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.02;
}

h2 {
  margin-bottom: 18px;
  font-size: 24px;
}

.lead {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.ghost-link,
button,
.button-link {
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--blue), #0f6ff0);
  color: white;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  font-size: 17px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 16px 34px rgba(22, 132, 255, .28);
  transition: transform .18s ease, box-shadow .18s ease;
}

.ghost-link:hover,
button:hover,
.button-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(22, 132, 255, .38);
}

.button-link.secondary {
  background: #22314d;
  box-shadow: none;
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 22px;
  margin-top: 24px;
}

.card {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(18, 26, 42, .88);
  padding: 24px;
}

.card-wide {
  margin-top: 24px;
}

.form,
.fields-form {
  display: grid;
  gap: 18px;
}

label {
  display: grid;
  gap: 9px;
  color: #dbeafe;
  font-size: 15px;
  font-weight: 700;
}

input[type="file"],
input {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-2);
  color: var(--text);
  padding: 0 16px;
  font-size: 16px;
}

input[type="file"] {
  padding: 14px 16px;
}

small,
.muted,
.rules {
  color: var(--muted);
}

.rules {
  margin: 20px 0 0;
  padding-left: 18px;
  line-height: 1.65;
}

code {
  color: #bfdbfe;
  word-break: break-word;
}

.meta {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px 16px;
  margin: 0;
}

.meta dt {
  color: var(--muted);
}

.meta dd {
  margin: 0;
}

.fields-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.alert {
  margin-top: 18px;
  border-radius: 18px;
  padding: 16px 18px;
  font-weight: 700;
}

.alert-error {
  border: 1px solid rgba(251, 113, 133, .55);
  background: rgba(127, 29, 29, .32);
  color: #fecdd3;
}

.alert-ok {
  border: 1px solid rgba(52, 211, 153, .5);
  background: rgba(6, 78, 59, .3);
  color: #bbf7d0;
}

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

iframe {
  width: 100%;
  height: 720px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

@media (max-width: 860px) {
  .shell {
    width: min(100% - 20px, 680px);
    padding: 16px 0;
  }

  .hero,
  .grid {
    grid-template-columns: 1fr;
  }

  .hero {
    align-items: flex-start;
    flex-direction: column;
    padding: 22px;
  }

  h1 {
    font-size: 34px;
  }

  .lead {
    font-size: 16px;
  }

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

  iframe {
    height: 520px;
  }
}
