/* Structured job editor */
.job-editor-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.job-editor-head > div:first-child {
  display: grid;
  gap: 8px;
}

.job-editor-head .back-link {
  margin-bottom: 4px;
}

.job-editor-head .eyebrow {
  display: block;
  letter-spacing: .12em;
}

.job-editor-head h1 {
  margin: 0;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.1;
}

.job-editor-head p {
  color: var(--muted);
  margin: 0;
  max-width: 720px;
}

.job-editor {
  width: 100%;
}

.job-editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: start;
}

.job-editor-grid > main {
  min-width: 0;
  display: grid;
  gap: 18px;
}

.job-editor-grid > aside {
  min-width: 0;
  display: grid;
  gap: 14px;
  position: sticky;
  top: 82px;
}

.job-editor .panel {
  overflow: visible;
}

.job-editor .panel.padded {
  padding: 26px;
}

.job-editor .panel h2 {
  margin: 0 0 20px;
  font-size: 22px;
  line-height: 1.2;
}

.job-editor .panel h3 {
  margin: 18px 0 12px;
  font-size: 16px;
}

.job-editor .two-cols,
.job-editor .three-cols,
.job-editor .four-cols {
  display: grid;
  gap: 16px;
  align-items: start;
}

.job-editor .two-cols {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.job-editor .three-cols {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.job-editor .four-cols {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.job-editor label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.job-editor input,
.job-editor select,
.job-editor textarea {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  border: 1px solid #cfd9e7;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  line-height: 1.4;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.job-editor textarea {
  min-height: 132px;
  resize: vertical;
}

.job-editor select {
  cursor: pointer;
}

.job-editor input:focus,
.job-editor select:focus,
.job-editor textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(11, 91, 211, .12);
}

.job-editor input::placeholder,
.job-editor textarea::placeholder {
  color: #93a1b4;
}

.job-editor small,
.job-editor .muted {
  color: var(--muted);
  font-weight: 400;
}

.job-editor [hidden] {
  display: none !important;
}

.slug-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #dce6f2;
  border-radius: 8px;
  background: #f7faff;
  color: #354866;
  font-size: 12px;
}

.slug-preview strong {
  overflow-wrap: anywhere;
  color: var(--navy);
}

.slug-preview small {
  flex-basis: 100%;
}

.job-editor [data-employment-comp],
.job-editor [data-b2b-comp] {
  margin-top: 4px;
}

.job-editor .logic-note,
.job-editor [data-compensation-note] {
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid #cfe0f8;
  border-radius: 8px;
  background: #eef5ff;
  color: #25538b;
  font-size: 12px;
  line-height: 1.5;
}

.job-editor .check-row,
.job-editor .check-card {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fafcff;
}

.job-editor .check-row input,
.job-editor .check-card input {
  width: auto;
  min-height: auto;
  margin: 3px 0 0;
}

.job-editor-side,
.editor-preview,
.editor-checklist,
.editor-actions {
  min-width: 0;
}

.editor-preview,
.editor-checklist,
.editor-actions {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
}

.editor-preview h2 {
  margin: 8px 0 14px;
  font-size: 20px;
  overflow-wrap: anywhere;
}

.preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.preview-meta span {
  background: var(--blue2);
  color: #1e579d;
  padding: 5px 8px;
  border-radius: 5px;
  font-size: 10px;
}

.preview-comp {
  margin: 16px 0;
  padding: 12px;
  border-radius: 7px;
  background: #f8fafc;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
}

.preview-slug {
  display: grid;
  gap: 5px;
}

.preview-slug code {
  overflow-wrap: anywhere;
  font-size: 10px;
}

.editor-checklist h3 {
  margin-top: 0;
}

.editor-checklist ul {
  display: grid;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.editor-checklist li {
  display: flex;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
}

.editor-checklist li::before {
  content: '○';
  color: #9aa8ba;
}

.editor-checklist li.complete {
  color: var(--green);
}

.editor-checklist li.complete::before {
  content: '✓';
  color: var(--green);
  font-weight: 900;
}

.editor-actions {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 8px;
}

.editor-actions .button {
  width: 100%;
  min-width: 0;
}

@media (max-width: 1180px) {
  .job-editor-grid {
    grid-template-columns: minmax(0, 1fr) 280px;
  }

  .job-editor .four-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .job-editor-grid > aside {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .editor-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .job-editor-head {
    flex-direction: column;
  }

  .job-editor .two-cols,
  .job-editor .three-cols,
  .job-editor .four-cols,
  .job-editor-grid > aside {
    grid-template-columns: 1fr;
  }

  .editor-actions {
    grid-column: auto;
  }

  .job-editor .panel.padded {
    padding: 18px;
  }
}
