.ma-editor {
  --ma-ink: #172334;
  --ma-muted: #5e6a79;
  --ma-line: #dce2e8;
  --ma-orange: #ec4b17;
  color: var(--ma-ink);
  color-scheme: light;
  min-width: 0;
}
.ma-editor *, .ma-editor *::before, .ma-editor *::after { box-sizing: border-box; }
.ma-editor [hidden] { display: none !important; }
.ma-editor .ma-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 25px; border-radius: 18px; background: #101b2a; color: #fff; }
.ma-editor .ma-header h1 { margin: 7px 0 10px; font-size: clamp(26px, 3vw, 38px); letter-spacing: -.04em; line-height: 1.1; color: #fff; }
.ma-editor .ma-header p { margin: 0; color: #c4cdda; font-size: 14px; line-height: 1.6; }
.ma-editor .ma-eyebrow { font-size: 10px; text-transform: uppercase; letter-spacing: .15em; color: #ffb293; font-weight: 800; }
.ma-editor .ma-button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 41px; padding: 10px 15px; border: 1px solid transparent; border-radius: 10px; font: inherit; font-size: 13px; line-height: 1.3; font-weight: 750; text-decoration: none; cursor: pointer; transition: background .15s ease, border-color .15s ease; white-space: nowrap; box-shadow: none; }
.ma-editor .ma-button:hover { transform: none; }
.ma-editor .ma-button:focus-visible, .ma-editor .ma-icon-button:focus-visible, .ma-editor summary:focus-visible { outline: 3px solid #ff8e65; outline-offset: 3px; }
.ma-editor .ma-button-primary { background: var(--ma-orange); color: white; }
.ma-editor .ma-button-primary:hover { background: #cf3b0b; }
.ma-editor .ma-button-secondary { border-color: var(--ma-line); background: #fff; color: var(--ma-ink); }
.ma-editor .ma-button-secondary:hover { background: #f3f6f8; border-color: #acb9c8; }
.ma-editor .ma-header .ma-button-secondary { color: #fff; border-color: #506071; background: #233044; }
.ma-editor .ma-header .ma-button-secondary:hover { background: #314259; }
.ma-editor .ma-button:disabled, .ma-editor .ma-icon-button:disabled { cursor: default; opacity: .5; }
.ma-editor .ma-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border: 1px solid var(--ma-line); border-radius: 12px; background: #fff; }
.ma-editor .ma-toolbar-actions { display: flex; gap: 9px; }
.ma-editor .ma-save-state { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: #506353; }
.ma-editor .ma-save-state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #3d8a54; flex-shrink: 0; }
.ma-editor .ma-save-state.ma-unsaved { color: #8b5417; }
.ma-editor .ma-save-state.ma-unsaved::before { background: #e59629; }
.ma-editor .ma-status { margin: 0; min-height: 18px; padding: 0 2px; font-size: 13px; line-height: 1.7; color: #e4eaf1; }
.ma-editor .ma-status[data-level="success"] { color: #bbefce; }
.ma-editor .ma-status[data-level="error"] { color: #ffcfbc; border-left: 3px solid #ff8459; padding: 10px 13px; background: #39251f; border-radius: 4px; }
.ma-editor .ma-form { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 18px; margin: 0; }
.ma-editor .ma-card { display: flex; flex-direction: column; gap: 17px; min-width: 0; padding: 23px; border: 1px solid var(--ma-line); border-radius: 15px; background: #fff; box-shadow: 0 8px 26px #0c1c3012; }
.ma-editor .ma-card-head { margin: 0; }
.ma-editor .ma-card-head h2 { margin: 0 0 7px; color: var(--ma-ink); font-size: 19px; font-weight: 800; line-height: 1.25; letter-spacing: -.025em; }
.ma-editor .ma-card-head p { margin: 0; font-size: 12px; line-height: 1.7; color: var(--ma-muted); }
.ma-editor .ma-wide { grid-column: 1/-1; }
.ma-editor .ma-field-grid, .ma-editor .ma-project-fields { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 17px; }
.ma-editor .ma-field { display: flex; flex-direction: column; gap: 7px; margin: 0; min-width: 0; color: var(--ma-ink); }
.ma-editor .ma-label { font-size: 12px; font-weight: 800; line-height: 1.4; }
.ma-editor .ma-input { display: block; width: 100%; min-width: 0; min-height: 43px; margin: 0; padding: 11px 12px; border: 1px solid #c7d1dc; border-radius: 8px; outline: none; box-shadow: none; background: #fbfcfd; color: var(--ma-ink); font: inherit; font-size: 13px; line-height: 1.5; transition: border-color .15s, box-shadow .15s; }
.ma-editor textarea.ma-input { resize: vertical; min-height: 92px; }
.ma-editor .ma-input:focus { border-color: #df541e; background: #fff; box-shadow: 0 0 0 3px #ec4b1718; }
.ma-editor .ma-input:read-only { color: #506174; background: #eef2f6; border-color: #e1e6ec; }
.ma-editor .ma-input::placeholder { color: #8b96a3; opacity: 1; }
.ma-editor .ma-hint { margin: 0; color: #697685; font-size: 11px; font-weight: 400; line-height: 1.6; }
.ma-editor .ma-collection-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ma-editor .ma-count { color: #6a7685; font-size: 12px; }
.ma-editor .ma-project-search { padding: 15px; border: 1px solid var(--ma-line); border-radius: 10px; background: #f6f8fa; }
.ma-editor .ma-project-search .ma-count { line-height: 1.6; }
.ma-editor .ma-project { border: 1px solid #dde4eb; border-radius: 12px; background: #fff; overflow: hidden; }
.ma-editor .ma-project-summary { display: flex; align-items: center; gap: 12px; padding: 16px; list-style: none; cursor: pointer; background: #f6f8fa; }
.ma-editor .ma-project-summary::-webkit-details-marker { display: none; }
.ma-editor .ma-project-summary-copy { flex: 1; display: grid; gap: 4px; min-width: 0; }
.ma-editor .ma-project-summary strong { color: var(--ma-ink); font-size: 14px; overflow-wrap: anywhere; }
.ma-editor .ma-project-summary small { font-size: 10px; font-weight: 500; color: #6b7a8a; }
.ma-editor .ma-tag { padding: 5px 7px; border-radius: 5px; background: #fff0e9; color: #ae451e; font-weight: 800; font-size: 9px; text-transform: uppercase; letter-spacing: .05em; }
.ma-editor .ma-tag-draft { background: #e9edf3; color: #516176; }
.ma-editor .ma-expand { font-size: 19px; color: #75879a; transition: transform .15s; }
.ma-editor details[open] .ma-expand { transform: rotate(45deg); }
.ma-editor .ma-project-fields { padding: 20px 16px; }
.ma-editor .ma-check { display: flex; gap: 10px; align-items: center; align-self: center; color: #405267; font-size: 12px; font-weight: 700; line-height: 1.5; }
.ma-editor .ma-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--ma-orange); flex-shrink: 0; }
.ma-editor .ma-image-preview { display: block; width: min(100%,280px); height: 150px; object-fit: cover; object-position: top; border: 1px solid var(--ma-line); border-radius: 8px; background: #edf1f5; }
.ma-editor .ma-item-actions { display: flex; justify-content: flex-end; align-items: center; gap: 7px; align-self: end; }
.ma-editor .ma-icon-button { width: 35px; height: 35px; min-height: 0; padding: 0; background: #f7f9fb; border: 1px solid var(--ma-line); border-radius: 7px; color: #506074; font-size: 17px; cursor: pointer; box-shadow: none; }
.ma-editor .ma-button-remove { min-height: 35px; padding: 8px 10px; font-size: 11px; color: #9d3d2c; background: #fff6f3; border-color: #f1dbd4; }
.ma-editor .ma-button-remove:hover { background: #ffede7; }
.ma-editor .ma-faq-fields { display: grid; gap: 14px; border: 1px solid var(--ma-line); border-radius: 10px; padding: 17px; background: #fbfcfd; }
.ma-editor .ma-empty { margin: 0; padding: 15px 0; font-size: 12px; color: #788595; line-height: 1.6; }
.ma-editor .ma-metrics { position: relative; }
.ma-editor .ma-metrics-refresh { align-self: flex-start; }
.ma-editor .ma-metrics-body { display: grid; gap: 24px; }
.ma-editor .ma-click-totals { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.ma-editor .ma-total-clicks { display: grid; gap: 5px; padding: 18px; border-radius: 11px; background: #fff1e8; color: #8f3d19; }
.ma-editor .ma-total-clicks strong { font-size: 39px; line-height: 1; letter-spacing: -.05em; }
.ma-editor .ma-total-clicks span { font-size: 11px; line-height: 1.5; }
.ma-editor .ma-metric-groups { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 24px; }
.ma-editor .ma-metric-group h3 { margin: 0 0 10px; font-size: 13px; font-weight: 800; color: var(--ma-ink); }
.ma-editor .ma-metric-list { display: grid; gap: 0; list-style: none; margin: 0; padding: 0; }
.ma-editor .ma-metric-list li { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 9px 0; border-bottom: 1px solid #e8edf2; color: #5a6c80; font-size: 12px; overflow-wrap: anywhere; }
.ma-editor .ma-metric-list strong { color: #263b53; }
.ma-editor form[inert] { opacity: .7; }
@media (max-width: 1080px) {
  .ma-editor .ma-form { grid-template-columns: minmax(0,1fr); }
  .ma-editor .ma-metrics-body { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 640px) {
  .ma-editor .ma-header { padding: 20px; align-items: flex-start; flex-direction: column; }
  .ma-editor .ma-toolbar { align-items: stretch; flex-direction: column; padding: 13px; }
  .ma-editor .ma-toolbar-actions > * { flex: 1; }
  .ma-editor .ma-card { padding: 17px; border-radius: 12px; }
  .ma-editor .ma-field-grid, .ma-editor .ma-project-fields, .ma-editor .ma-metric-groups { grid-template-columns: minmax(0,1fr); }
  .ma-editor .ma-project-fields { padding: 16px 12px; }
  .ma-editor .ma-tag { font-size: 8px; padding: 4px 5px; }
  .ma-editor .ma-project-summary { padding: 13px; gap: 8px; }
  .ma-editor .ma-image-preview { width: 100%; height: 170px; }
  .ma-editor .ma-item-actions { justify-content: flex-start; }
  .ma-editor .ma-click-totals { grid-template-columns: minmax(0,1fr); }
  .ma-editor .ma-total-clicks { display: flex; align-items: center; gap: 14px; }
}
@media (prefers-reduced-motion: reduce) { .ma-editor * { transition: none !important; scroll-behavior: auto !important; } }
