:root {
  color-scheme: dark;
  --bg: #030303;
  --surface: rgba(12, 12, 13, 0.88);
  --line: rgba(255, 255, 255, 0.13);
  --text: #f7f7f1;
  --muted: #aaa9a2;
  --signal: #e9ff70;
  --bad: #ff5c7a;
  --warn: #ffd166;
  --good: #67ff93;
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(125deg, rgba(233, 255, 112, 0.08), transparent 30rem),
    linear-gradient(245deg, rgba(255, 255, 255, 0.06), transparent 36rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, #000, transparent 80%);
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

.scp-page {
  position: relative;
  z-index: 1;
  width: min(1320px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(30px, 5vw, 72px) 0 72px;
}

.intro {
  display: grid;
  justify-items: center;
  gap: 14px;
  margin-bottom: 34px;
  text-align: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 900;
}

.brand-mark {
  width: 17px;
  height: 17px;
  border: 2px solid var(--text);
  border-radius: 50%;
  box-shadow: inset 6px 0 0 var(--signal);
}

.kicker {
  margin: 0;
  color: var(--signal);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

h1, h2 {
  margin: 0;
  letter-spacing: 0;
  line-height: 0.88;
}

h1 {
  max-width: 1120px;
  font-size: clamp(58px, 12vw, 150px);
  font-weight: 950;
}

h2 {
  font-size: clamp(32px, 4vw, 58px);
  font-weight: 950;
}

.lede {
  max-width: 800px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(18px, 2.2vw, 25px);
  line-height: 1.25;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(340px, 0.85fr) minmax(420px, 1.15fr);
  gap: 16px;
  align-items: start;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.045), transparent 70%),
    var(--surface);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
}

.editor {
  display: grid;
  gap: 14px;
  padding: clamp(18px, 3vw, 28px);
}

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

label {
  display: grid;
  gap: 8px;
  color: var(--signal);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

input, select, textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  outline: none;
  padding: 13px 14px;
}

textarea {
  resize: vertical;
  color: #e9e9df;
  line-height: 1.45;
  text-transform: none;
}

select option { background: #111; }

.validation-card {
  border: 1px solid rgba(103, 255, 147, 0.35);
  border-radius: 16px;
  background: rgba(103, 255, 147, 0.07);
  color: var(--good);
  padding: 14px;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.35;
}

.validation-card.blocked {
  border-color: rgba(255, 92, 122, 0.42);
  background: rgba(255, 92, 122, 0.08);
  color: var(--bad);
}

.validation-card.warning {
  border-color: rgba(255, 209, 102, 0.42);
  background: rgba(255, 209, 102, 0.08);
  color: var(--warn);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  cursor: pointer;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 900;
}

.button-light {
  border: 1px solid #eff2d6;
  background: #f5f7e9;
  color: #11120e;
}

.button-dark {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.button[aria-disabled="true"] {
  opacity: 0.45;
  pointer-events: none;
}

.preview {
  padding: clamp(16px, 3vw, 24px);
}

.preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

#preview-badge {
  border: 1px solid rgba(233, 255, 112, 0.45);
  border-radius: 999px;
  background: rgba(233, 255, 112, 0.09);
  color: var(--signal);
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 950;
}

canvas {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: #f1eee5;
}

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

@media (max-width: 640px) {
  .scp-page {
    width: min(100% - 28px, 1320px);
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .preview-header {
    align-items: flex-start;
    flex-direction: column;
  }
}
