/* Визуальный конструктор включается только через index.html?edit=1. */
.landing-editor-panel,
.landing-editor-resume {
  font-family: Inter, Arial, sans-serif;
}

body.landing-editor-mode {
  padding-right: 390px;
}

body.landing-editor-mode .site-header {
  right: 390px;
}

.landing-editor-panel {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 2200;
  width: 390px;
  overflow: auto;
  color: #17353d;
  background: #f7fbfc;
  border-left: 1px solid #cbdde1;
  box-shadow: -18px 0 55px rgba(3, 24, 31, 0.22);
}

.landing-editor-panel * {
  box-sizing: border-box;
}

.landing-editor-head {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 20px 22px 16px;
  color: #fff;
  background: linear-gradient(135deg, #092f39, #155568);
}

.landing-editor-head-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.landing-editor-head h2 {
  margin: 0;
  color: inherit;
  font: 700 21px/1.2 Inter, Arial, sans-serif;
}

.landing-editor-head p {
  margin: 7px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  line-height: 1.45;
}

.landing-editor-close {
  flex: 0 0 auto;
  min-width: 34px;
  min-height: 34px;
  padding: 5px 8px;
  color: #fff;
  font: 700 20px/1 Arial, sans-serif;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 10px;
  cursor: pointer;
}

.landing-editor-body {
  display: grid;
  gap: 15px;
  padding: 18px;
}

.landing-editor-card {
  padding: 15px;
  background: #fff;
  border: 1px solid #d5e3e6;
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(16, 56, 66, 0.06);
}

.landing-editor-card h3 {
  margin: 0 0 10px;
  color: #143d47;
  font: 750 14px/1.3 Inter, Arial, sans-serif;
}

.landing-editor-card p,
.landing-editor-help {
  margin: 0;
  color: #527078;
  font-size: 12px;
  line-height: 1.5;
}

.landing-editor-help + .landing-editor-field,
.landing-editor-field + .landing-editor-field,
.landing-editor-field + .landing-editor-row {
  margin-top: 11px;
}

.landing-editor-field {
  display: grid;
  gap: 6px;
  color: #294e57;
  font-size: 12px;
  font-weight: 700;
}

.landing-editor-field input,
.landing-editor-field select,
.landing-editor-field textarea,
.landing-editor-select {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  color: #183b44;
  font: 500 14px/1.35 Inter, Arial, sans-serif;
  background: #f9fcfd;
  border: 1px solid #bdd2d7;
  border-radius: 9px;
  outline: none;
}

.landing-editor-field input:focus,
.landing-editor-field select:focus,
.landing-editor-select:focus {
  border-color: #0e8296;
  box-shadow: 0 0 0 3px rgba(14, 130, 150, 0.13);
}

.landing-editor-check {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
  color: #294e57;
  font-size: 12px;
  font-weight: 650;
}

.landing-editor-check input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: #0e8296;
}

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

.landing-editor-button {
  min-height: 42px;
  padding: 9px 12px;
  color: #173c45;
  font: 750 12px/1.25 Inter, Arial, sans-serif;
  background: #eaf3f5;
  border: 1px solid #bed3d8;
  border-radius: 10px;
  cursor: pointer;
}

.landing-editor-button:hover,
.landing-editor-button:focus-visible {
  background: #dcebed;
}

.landing-editor-button.is-primary {
  color: #fff;
  background: #0d7f92;
  border-color: #0d7f92;
}

.landing-editor-button.is-primary:hover,
.landing-editor-button.is-primary:focus-visible {
  background: #086b7c;
}

.landing-editor-button.is-danger {
  color: #8a3030;
  background: #fff5f4;
  border-color: #e9c8c4;
}

.landing-editor-button-spaced {
  margin-top: 11px;
}

.landing-editor-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.landing-editor-status {
  min-height: 20px;
  padding: 0 2px;
  color: #4d6e75;
  font-size: 12px;
  line-height: 1.45;
}

.landing-editor-status.is-success { color: #08785d; }
.landing-editor-status.is-error { color: #a13c35; }

.landing-editor-selected-name {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: #0a7084;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.landing-editor-mode [data-landing-text] {
  border-radius: 3px;
  outline: 1px dashed rgba(17, 169, 193, 0.48);
  outline-offset: 2px;
  cursor: text;
}

body.landing-editor-mode [data-landing-text]:hover,
body.landing-editor-mode [data-landing-text]:focus {
  background: rgba(90, 220, 232, 0.16);
  outline: 2px solid #40c1d2;
}

body.landing-editor-mode [data-landing-text].is-editor-selected {
  background: rgba(255, 205, 80, 0.2);
  outline: 2px solid #f0b62f;
}

body.landing-editor-mode [data-landing-action].is-editor-selected {
  outline: 3px solid #f0b62f !important;
  outline-offset: 4px !important;
}

body.landing-editor-mode [data-landing-partner-logo] {
  cursor: pointer;
  outline: 2px dashed rgba(64, 193, 210, 0.8);
  outline-offset: 3px;
}

body.landing-editor-mode [data-landing-partner-logo]::after {
  content: "Заменить";
  position: absolute;
  inset: auto 4px 4px;
  z-index: 2;
  padding: 3px 5px;
  color: #07313a;
  font: 700 9px/1 Inter, Arial, sans-serif;
  text-align: center;
  background: rgba(201, 244, 248, 0.94);
  border-radius: 5px;
}

body.landing-editor-mode [data-exercise-modal-title][contenteditable="true"],
body.landing-editor-mode [data-exercise-modal-description][contenteditable="true"],
body.landing-editor-mode [data-audience-modal-title][contenteditable="true"],
body.landing-editor-mode [data-audience-modal-description][contenteditable="true"] {
  border-radius: 7px;
  outline: 2px dashed #4ac4d4;
  outline-offset: 4px;
}

.landing-editor-resume {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 2201;
  padding: 12px 16px;
  color: #fff;
  font: 750 13px/1 Inter, Arial, sans-serif;
  background: #0d7f92;
  border: 0;
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  cursor: pointer;
}

body.landing-editor-panel-hidden {
  padding-right: 0;
}

body.landing-editor-panel-hidden .site-header {
  right: 0;
}

body.landing-editor-panel-hidden .landing-editor-panel {
  display: none;
}

.editor-launch-page {
  display: grid;
  min-height: 100vh;
  margin: 0;
  place-items: center;
  color: #eaf9fb;
  background: radial-gradient(circle at 20% 15%, #155467, transparent 34%), #061f27;
  font-family: Inter, Arial, sans-serif;
}

.editor-launch-card {
  width: min(520px, calc(100% - 32px));
  padding: 42px;
  text-align: center;
  background: rgba(13, 58, 70, .82);
  border: 1px solid rgba(125, 222, 233, .24);
  border-radius: 24px;
  box-shadow: 0 25px 70px rgba(0,0,0,.3);
}

.editor-launch-mark { font-size: 38px; }
.editor-launch-card h1 { margin: 12px 0; font-size: 30px; }
.editor-launch-card p { margin: 0 0 24px; color: #b7d7dc; line-height: 1.6; }
.editor-launch-button {
  display: inline-flex;
  padding: 13px 20px;
  color: #06242b;
  background: #83e5ec;
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 900px) {
  body.landing-editor-mode {
    padding-right: 0;
    padding-bottom: 48vh;
  }

  body.landing-editor-mode .site-header {
    right: 0;
  }

  .landing-editor-panel {
    inset: auto 0 0;
    width: 100%;
    height: 48vh;
    border-top: 1px solid #cbdde1;
    border-left: 0;
    box-shadow: 0 -18px 55px rgba(3, 24, 31, 0.22);
  }

  .landing-editor-head {
    padding: 12px 16px;
  }

  .landing-editor-head p {
    display: none;
  }

  .landing-editor-body {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 12px;
  }

  .landing-editor-card.is-wide,
  .landing-editor-status {
    grid-column: 1 / -1;
  }

  body.landing-editor-panel-hidden {
    padding-bottom: 0;
  }
}

@media (max-width: 590px) {
  .landing-editor-body { grid-template-columns: 1fr; }
  .landing-editor-card,
  .landing-editor-card.is-wide,
  .landing-editor-status { grid-column: auto; }
  .editor-launch-card { padding: 30px 22px; }
}
