:root {
  --ink: #172026;
  --muted: #5f6b76;
  --line: #d8dee6;
  --paper: #ffffff;
  --surface: #f4f6f8;
  --accent: #0f766e;
  --accent-dark: #0b4f49;
  --gold: #9a6518;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Aptos, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--surface);
}

.app-shell {
  min-height: 100vh;
  padding: 28px;
}

.toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

h1 {
  margin: 4px 0 0;
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: 0;
}

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

.actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.workbench {
  display: grid;
  grid-template-columns: minmax(420px, 0.95fr) minmax(440px, 1.05fr);
  gap: 22px;
  padding-top: 22px;
}

.panel,
.preview {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.panel {
  padding: 20px;
}

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

label {
  display: grid;
  gap: 7px;
  min-width: 0;
}

label span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #b8c2cc;
  border-radius: 6px;
  padding: 10px 11px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

textarea {
  resize: vertical;
}

.wide {
  margin-top: 16px;
}

button {
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  white-space: nowrap;
}

button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.primary-button {
  min-height: 42px;
  padding: 0 18px;
  background: var(--accent);
  color: #fff;
}

.primary-button:hover {
  background: var(--accent-dark);
}

.secondary-button {
  min-height: 42px;
  padding: 0 14px;
  color: var(--accent-dark);
  background: #e7f4f2;
}

.preview {
  min-height: 650px;
  overflow: hidden;
}

.preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.status-text {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.preview-content {
  padding: 22px;
  line-height: 1.5;
}

.preview-content h2 {
  margin: 0 0 6px;
  font-size: 24px;
  letter-spacing: 0;
}

.preview-content h3 {
  margin: 22px 0 8px;
  font-size: 16px;
  letter-spacing: 0;
}

.preview-content p {
  margin: 0 0 10px;
}

.preview-content ul {
  margin: 0;
  padding-left: 20px;
}

.preview-content li {
  margin-bottom: 8px;
}

.meta {
  color: var(--muted);
  font-size: 14px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
  margin-bottom: 18px;
}

.status {
  color: var(--gold);
  font-weight: 700;
}

@media (max-width: 980px) {
  .app-shell {
    padding: 18px;
  }

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

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

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

  .actions {
    width: 100%;
  }

  .actions button {
    flex: 1;
  }
}
