:root {
  --bg: #080b14;
  --bg-2: #10182c;
  --panel: #131b2f;
  --panel-2: #0f1629;
  --line: #233154;
  --text: #f3f7ff;
  --muted: #9eafce;
  --primary: #4cc2ff;
  --primary-2: #3688ff;
  --success: #62d89f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Manrope", sans-serif;
  background:
    radial-gradient(1200px 640px at 10% -20%, #1b2f63 0%, transparent 70%),
    radial-gradient(900px 520px at 100% 0%, #132d4e 0%, transparent 70%),
    linear-gradient(165deg, var(--bg), var(--bg-2));
}

.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(400px 300px at 72% 18%, rgba(76, 194, 255, 0.15), transparent 70%),
    radial-gradient(550px 300px at 12% 78%, rgba(54, 136, 255, 0.12), transparent 72%);
}

.page {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100vw - 32px));
  margin: 20px auto;
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  gap: 16px;
}

.panel {
  background: linear-gradient(180deg, rgba(23, 34, 59, 0.95), rgba(15, 22, 41, 0.96));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02), 0 18px 42px rgba(0, 0, 0, 0.28);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--primary);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(1.85rem, 3.2vw, 2.45rem);
  line-height: 1.12;
  font-weight: 800;
  position: relative;
  display: inline-block;
}

h1::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 70%;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), transparent);
  opacity: 0.35;
}

h2 {
  margin: 16px 0 10px;
  padding-left: 10px;
  border-left: 3px solid rgba(76, 194, 255, 0.85);
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  font-weight: 800;
}

.lead {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

label {
  display: block;
  margin: 12px 0 7px;
  font-size: 13px;
  font-weight: 700;
  color: #d4deef;
}

input,
select,
textarea,
button {
  width: 100%;
  border-radius: 11px;
  font-family: inherit;
  font-size: 14px;
}

input,
select,
textarea {
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  padding: 11px 12px;
}

input:focus,
select:focus,
textarea:focus,
button:focus {
  outline: 2px solid rgba(76, 194, 255, 0.45);
  outline-offset: 1px;
}

button {
  border: 0;
  padding: 11px 12px;
  font-weight: 700;
  color: #051020;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  cursor: pointer;
  margin-top: 12px;
}

button:hover {
  filter: brightness(1.05);
}

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

.checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.checks label {
  margin: 0;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #c8d5ef;
}

.checks input {
  width: auto;
  margin: 0;
}

.status {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  min-height: 18px;
}

.status.ok {
  color: var(--success);
}

.status.error {
  color: #ff8793;
}

.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.result-head h2 {
  margin: 0;
}

.meta {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.preview-wrap {
  margin-top: 8px;
  border: 1px solid var(--line);
  background: #0c1426;
  border-radius: 12px;
  padding: 10px;
  overflow: hidden;
}

#preview {
  display: block;
  width: min(100%, 780px);
  height: auto;
  margin: 0 auto;
}

textarea {
  resize: vertical;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.footnote {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

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

@media (max-width: 760px) {
  .page {
    width: min(1120px, calc(100vw - 20px));
  }

  .panel {
    padding: 14px;
  }

  .lead {
    font-size: 13px;
  }

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