:root {
  --bg-page: #f3f6fb;
  --bg-card: #ffffff;
  --border-subtle: #dbe3f0;
  --text-primary: #111111;
  --text-secondary: #5b6472;
  --shadow-soft: 0 10px 24px rgba(15, 23, 42, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
}

.page-shell {
  max-width: 1440px;
  margin: 0 auto;
  padding: 32px 20px 32px;
}

.hero {
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 12px;
  font-weight: 700;
  color: #4d6b99;
}

.hero h1 {
  margin: 0 0 8px;
  font-size: 40px;
  line-height: 1.05;
}

.hero-text {
  max-width: 760px;
  margin: 0;
  color: var(--text-secondary);
  font-size: 17px;
  line-height: 1.5;
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(380px, 520px) minmax(480px, 1fr);
  gap: 24px;
  align-items: start;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  padding: 24px;
}

.section-heading {
  margin-bottom: 16px;
}

.section-heading h2,
.section-heading h3 {
  margin: 0 0 6px;
  line-height: 1.2;
}

.section-heading p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
}

.controls-panel {
  position: sticky;
  top: 20px;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field {
  margin-bottom: 16px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
  font-size: 14px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cfd8e6;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  background: #ffffff;
  color: #111111;
}

textarea {
  resize: vertical;
}

.helper-text {
  margin: 8px 0 0;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.45;
}

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

.btn {
  appearance: none;
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.btn-primary {
  background: #0066cc;
  color: #ffffff;
}

.btn-secondary {
  background: #e9eefb;
  color: #1f2937;
}

.json-panel {
  margin-top: 24px;
}

.code-block {
  margin: 0;
  background: #0f172a;
  color: #dbeafe;
  border-radius: 14px;
  padding: 16px;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.55;
}

.compact-code-block {
  min-height: 180px;
  max-height: 260px;
  overflow-y: auto;
}

.preview-panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.preview-surface {
  border-radius: 18px;
  padding: 32px;
  min-height: 360px;
  transition: background 200ms ease;
}

.ui-card {
  max-width: 640px;
  border-radius: 16px;
  padding: 24px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
  transition: all 200ms ease;
}

.ui-card-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.ui-title {
  margin: 0;
  font-size: 24px;
  line-height: 1.15;
}

.ui-body {
  margin: 14px 0 18px;
  font-size: 15px;
  line-height: 1.6;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.button-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.preview-button,
.secondary-inline-button {
  font-family: Inter, Arial, sans-serif;
}

.preview-button {
  border: none;
  min-height: 40px;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: default;
  transition: all 200ms ease;
}

.secondary-inline-button {
  border: 1.5px solid #0066cc;
  background: transparent;
  color: #0066cc;
  min-height: 40px;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
}

.embed-card {
  min-height: 760px;
}

.figma-embed {
  width: 100%;
  height: 620px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: #ffffff;
}

.theme-base-surface {
  background: #ffffff;
}

.theme-entertainment-surface {
  background: #0a0a0a;
}

.theme-education-surface {
  background: #fffbf2;
}

.theme-base-card {
  background: #ffffff;
  color: #111111;
}

.theme-entertainment-card {
  background: #1a1a1a;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.08);
}

.theme-education-card {
  background: #fff7e8;
  color: #111111;
}

.badge-success {
  background: #00aa44;
  color: #ffffff;
}

.badge-warning {
  background: #f4a300;
  color: #111111;
}

.badge-danger {
  background: #e50914;
  color: #ffffff;
}

.site-footer {
  width: 100%;
  padding: 24px;
  text-align: center;
  border-top: 1px solid rgb(228, 228, 231);
  margin-top: 32px;
  background-color: rgb(255, 255, 255);
  font-family: Inter, Arial, sans-serif;
}

.footer-name {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  color: rgb(24, 24, 27);
  letter-spacing: 0.01em;
}

.footer-name a {
  color: rgb(10, 102, 194);
  text-decoration: none;
}

.footer-role {
  margin: 0 auto 4px;
  font-size: 12px;
  color: rgb(24, 24, 27);
  font-weight: 600;
  line-height: 1.7;
  max-width: 580px;
}

.footer-description {
  margin: 0 auto 14px;
  font-size: 12px;
  color: rgb(82, 82, 91);
  line-height: 1.7;
  max-width: 580px;
}

.footer-description span {
  color: rgb(24, 24, 27);
  font-weight: 600;
}

.footer-linkedin {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: rgb(10, 102, 194);
  color: rgb(255, 255, 255);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 20px;
  text-decoration: none;
  letter-spacing: 0.02em;
}

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

  .controls-panel {
    position: static;
  }
}

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

  .hero h1 {
    font-size: 32px;
  }

  .preview-surface {
    padding: 20px;
  }

  .ui-card-top {
    flex-direction: column;
  }

  .figma-embed {
    height: 440px;
  }
}