.cms {
  --cms-edge: clamp(16px, 3.62vw, 52px);
  --cms-positive: #304400;
  --cms-failure: #a63b2e;
  background: var(--paper);
  min-height: 100dvh;
  font-size: 14px;
  line-height: 21px;
}
.cms-wrap { width: min(1336px, calc(100% - 2 * var(--cms-edge))); margin-inline: auto; }
.cms-top { border-bottom: 1px solid var(--line); }
.cms-top-inner { min-height: 69px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.cms-brand { display: flex; align-items: center; gap: 13px; }
.cms-brand > span { font: 500 13px/18px var(--mono); color: var(--muted); }
.cms-top nav, .cms-filters, .cms-actions, .cms-utility { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cms-top nav a, .cms-open-site, .cms-filters a {
  color: var(--ink); text-decoration: none; border-radius: 6px; padding: 10px 14px; font-weight: 700;
}
.cms-top nav a:is(:hover, [aria-current]), .cms-filters a:is(:hover, [aria-current]) { background: var(--soft); }
.cms-open-site { justify-self: end; color: var(--muted); font-size: 13px; font-weight: 500; padding: 7px 10px; }
.cms-open-site:hover { background: var(--soft); }
.cms-top-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; justify-self: end; }
.cms-login .cms-top-inner { grid-template-columns: 1fr auto; }
.cms-login-card {
  display: grid; gap: 20px; width: min(100%, 400px); margin: clamp(8px, 9vh, 84px) auto 0;
  background: white; border: 1px solid var(--line); border-radius: 9px; padding: clamp(18px, 5vw, 28px);
}
.cms-login-card h1 { font-size: 32px; line-height: 38px; }
.cms-login-card .cms-notice { margin: 0; }
.cms-main { padding-block: 36px 72px; }
.cms-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px 24px; margin-bottom: 23px; }
.cms h1 { font-size: 41px; line-height: 46px; letter-spacing: -1.15px; font-weight: 700; }
.cms-heading p { color: var(--muted); margin-top: 6px; }
.cms h2 { font-size: 25px; line-height: 29px; letter-spacing: -.7px; font-weight: 800; }
.cms h3 { font-size: 17px; line-height: 23px; font-weight: 700; letter-spacing: -.28px; }
.cms-actions { justify-content: flex-end; gap: 10px; }
.cms-button {
  background: white; border: 1px solid var(--line); border-radius: 6px; color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; min-height: 40px;
  padding: 7px 14px; font: 700 14px/20px "Golos Text", sans-serif; text-decoration: none; white-space: nowrap;
}
.cms-button:hover { background: var(--soft); }
.cms-button.accent { background: var(--lime); border-color: var(--lime); }
.cms-button.accent:hover { background: #cce861; border-color: #cce861; }
.cms-button.compact { min-height: 32px; padding: 5px 10px; font-size: 13px; font-weight: 500; line-height: 19px; }
.cms-button.text { border-color: transparent; background: transparent; color: var(--muted); }
.cms-button.text:hover { background: var(--soft); }
.cms .cms-button:disabled { background: var(--soft); border-color: var(--soft); color: var(--muted); opacity: .65; cursor: default; }
.cms-space { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.cms-rss-grid { display: grid; grid-template-columns: minmax(0, 904fr) minmax(300px, 408fr); gap: 24px; align-items: start; }
.cms-filter-line { margin-bottom: 11px; min-height: 32px; }
.cms-filters a { padding: 6px 10px; font-size: 13px; line-height: 20px; font-weight: 500; color: var(--muted); }
.cms-filters a[aria-current] { color: var(--ink); }
.cms-filter-summary, .cms-table-note, .cms-utility, .cms-details { color: var(--muted); font-size: 13px; line-height: 19px; }
.cms-table-note { margin-top: 11px; }
.cms-table-box { background: white; border: 1px solid var(--line); border-radius: 9px; overflow: auto; }
.cms-rss-scroll { max-height: 444px; }
.cms-register-table { width: 100%; border-collapse: separate; table-layout: fixed; border-spacing: 0; text-align: left; }
.cms-rss-table { min-width: 720px; }
.cms-rss-table col:nth-child(1) { width: 29.1%; }
.cms-rss-table col:nth-child(2) { width: 11.7%; }
.cms-rss-table col:nth-child(3) { width: 16.3%; }
.cms-rss-table col:nth-child(4) { width: 16.2%; }
.cms-rss-table col:nth-child(5) { width: 11.6%; }
.cms-register-table th { background: var(--soft); color: var(--muted); font-size: 13px; line-height: 19px; font-weight: 500; height: 41px; }
.cms-rss-table th { position: sticky; top: 0; z-index: 1; }
.cms-register-table td { height: 67px; }
.cms-register-table tbody tr + tr td { border-top: 1px solid var(--line); }
.cms-register-table :is(th, td) { padding: 5px 3px; }
.cms-register-table :is(th, td):first-child { padding-left: 14px; }
.cms-register-table :is(th, td):last-child { padding-right: 14px; }
.cms-register-table .cms-selected td, .cms-rss-table tr:hover td { background: var(--paper); }
.cms-source-name { display: inline-block; color: var(--ink); font-weight: 700; line-height: 20px; text-decoration: none; }
.cms-source-name:hover { text-decoration: underline; }
.cms-mono { font: 500 11px/16px var(--mono); letter-spacing: .3px; }
.cms-register-table td.cms-mono, .cms-url { color: var(--muted); }
.cms-url { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 3px; }
.cms-tag { display: inline-flex; align-items: center; min-height: 24px; gap: 5px; border-radius: 4px; padding: 2px 8px; white-space: nowrap; font-size: 13px; font-weight: 500; line-height: 19px; }
.cms-tag img { display: block; flex: none; }
.cms-neutral { color: var(--muted); background: var(--soft); }
.cms-positive { color: var(--cms-positive); background: #e8eddb; }
.cms-negative { color: var(--cms-failure); }
.cms-tag.cms-negative, .cms-tag.cms-author { background: var(--paper); color: var(--cms-failure); }
.cms-cars { color: var(--purple); background: #e6ebfd; }
.cms-signal { color: var(--teal); background: #e8eddb; }
.cms-switch { background: transparent; border: 0; width: 64px; min-height: 34px; padding: 0; justify-content: flex-start; }
.cms-switch:hover { background: transparent; }
.cms-switch:hover img { filter: brightness(.94); }
.cms-panel { background: white; border: 1px solid var(--line); border-radius: 8px; padding: 17px 18px; min-width: 0; }
.cms-diagnostics { display: grid; gap: 16px; border-radius: 9px; padding: 19px 20px; }
.cms-diagnostic-title { min-width: 0; }
.cms-diagnostic-title p:first-child { color: var(--muted); font-size: 13px; line-height: 19px; }
.cms-diagnostic-title h2 { margin-top: 5px; overflow-wrap: anywhere; }
.cms-diagnostic-title .cms-url { margin-top: 5px; }
.cms-facts { display: grid; gap: 10px; border-top: 1px solid var(--line); padding-top: 16px; margin: 0; }
.cms-facts div { display: flex; justify-content: space-between; gap: 14px; align-items: baseline; }
.cms-facts dt { color: var(--muted); }
.cms-facts dd { margin: 0; text-align: right; }
.cms-sample { padding: 11px 12px; border-radius: 6px; background: var(--paper); }
.cms-sample p { color: var(--muted); font-size: 13px; line-height: 19px; }
.cms-sample p + strong { display: block; margin-top: 6px; font-size: 17px; line-height: 23px; letter-spacing: -.28px; }
.cms-sample strong + p { margin-top: 5px; }
.cms-diagnostics > .cms-details { margin-top: -8px; }
.cms-details { margin-top: 10px; overflow-wrap: anywhere; }
.cms-details summary { cursor: pointer; width: fit-content; }
.cms-details[open] summary { margin-bottom: 8px; }
.cms-utility { gap: 12px; margin-top: 10px; }
.cms-utility a { color: var(--muted); }
.cms-filter-form { display: flex; align-items: end; flex-wrap: wrap; gap: 8px; }
.cms-filter-form label { flex: 1 1 115px; }
.cms-notice { display: grid; gap: 5px; padding: 12px 14px; border-radius: 6px; background: var(--soft); margin-bottom: 23px; }
.cms-notice.cms-positive { background: #e8eddb; }
.cms-dialog {
  width: min(540px, calc(100% - 32px)); max-height: calc(100dvh - 40px);
  position: fixed; inset: clamp(20px, 16dvh, 130px) 0 auto; margin: 0 auto; padding: 23px 24px;
  color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 10px;
}
.cms-dialog[open] { display: grid; gap: 18px; }
.cms-dialog::backdrop { background: rgba(20, 23, 20, .38); }
.cms-form, .cms-form details[open] { display: grid; gap: 14px; }
.cms-form > .cms-notice { margin: 0; }
.cms label, .cms legend { font-size: 14px; line-height: 20px; font-weight: 700; }
.cms label { display: grid; gap: 7px; }
.cms :is(input:not([type]), input[type="text"], input[type="password"], input[type="url"], input[type="date"], input[type="search"], input[type="number"], textarea, select) {
  background: white; border: 1px solid var(--line); border-radius: 6px; min-height: 45px;
  padding: 10px 12px; color: var(--ink); font: 400 14px/21px "Golos Text", sans-serif;
  width: 100%; min-width: 0; resize: vertical;
}
.cms input[type="checkbox"] { accent-color: var(--cms-positive); }
.cms label.cms-inline { display: flex; align-items: center; gap: 8px; }
.cms-field-hint { margin-top: -8px; color: var(--muted); font-size: 13px; }
.cms-choices { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.cms-choices legend { margin-bottom: 7px; }
.cms-choice { position: relative; }
.cms-choice input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; margin: 0; }
.cms-choice span { padding: 5px 10px; font-weight: 500; font-size: 13px; line-height: 20px; border: 1px solid var(--line); border-radius: 6px; }
.cms-choice input:checked + span { background: var(--soft); border-color: var(--soft); }
.cms-choice input:focus-visible + span, .cms [contenteditable]:focus-visible, .cms :is(textarea,select):focus-visible {
  outline: 2px solid var(--blue); outline-offset: 2px;
}
.cms-material-filters { margin-bottom: 23px; }
.cms-materials-table col:nth-child(2), .cms-materials-table col:nth-child(3) { width: 14%; }
.cms-materials-table col:last-child { width: 176px; }
.cms-material-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.cms .cms-unpublish { color: var(--cms-failure); }
.cms-publication-status { display: grid; justify-items: start; gap: 4px; }
.cms-publication-note { color: var(--muted); font-size: 12px; }
.cms-materials-table td { height: 92px; }
.cms-materials-table :is(td,th):first-child { padding-left: 18px; }
.cms-material { display: flex; align-items: center; gap: 14px; }
.cms-material > div { min-width: 0; overflow-wrap: anywhere; }
.cms-material img { width: 78px; height: 52px; object-fit: cover; border-radius: 5px; flex: none; }
.cms-material h3 a { font-size: inherit; line-height: inherit; }
.cms-material p { color: var(--muted); margin-top: 4px; }
.cms-back { display: inline-block; margin-bottom: 21px; color: var(--muted); text-decoration: none; font-size: 13px; }
.cms-back:hover { text-decoration: underline; }
.cms-editor { display: grid; grid-template-columns: minmax(0, 856fr) minmax(280px, 456fr); gap: 24px; align-items: start; }
.cms-editor-main { padding: 20px; }
.cms-editor-main > label, .cms-editor-label { display: grid; gap: 7px; margin-bottom: 15px; font-weight: 700; }
.cms-editor-label { margin-bottom: 7px; }
.cms-editor-main textarea { height: 75px; }
.cms-rich { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.cms-rich-tools { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px 8px; background: var(--paper); border-bottom: 1px solid var(--line); }
.cms-rich-tools button { min-height: 32px; padding: 5px 10px; border: none; font-size: 13px; line-height: 19px; font-weight: 500; }
.cms-rich-text { height: 282px; overflow-y: auto; padding: 14px; font-size: 16px; line-height: 24px; overflow-wrap: anywhere; }
.cms-rich-text:empty { height: 255px; }
.cms-rich-text:empty::before { content: attr(data-placeholder); color: var(--muted); font-size: 14px; pointer-events: none; }
.cms-rich-text :is(p, div, h2, blockquote, ul, ol) { margin: 0 0 8px; }
.cms-rich-text h2 { font-size: 17px; line-height: 23px; letter-spacing: -.28px; }
.cms-rich-text blockquote { border-inline-start: 2px solid var(--line); padding-inline-start: 10px; }
.cms-saved { color: var(--muted); margin-top: 15px; }
.cms-editor-side { display: grid; gap: 14px; }
.cms-editor-side .cms-panel { display: grid; gap: 12px; }
.cms-editor-side p { color: var(--muted); }
.cms-drop {
  text-align: center; display: grid; justify-items: center; gap: 10px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 22px 12px;
}
.cms-drop.cms-dragging { border-color: var(--cms-positive); background: #e8eddb; }
.cms-drop p { color: var(--ink); font-weight: 700; }
.cms-photo-grid { display: grid; gap: 12px; }
.cms-photo-row { display: flex; align-items: center; gap: 10px; background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 10px; }
.cms-photo-row img { width: 76px; height: 56px; object-fit: cover; border-radius: 5px; }
.cms-photo-row div { min-width: 0; flex: 1; }
.cms-photo-row .cms-url { color: var(--ink); }
.cms-photo-row .cms-photo-label { font-size: 13px; margin-top: 4px; }
.cms-photo-row .cms-photo-label.is-cover { color: var(--cms-failure); }
.cms-photo-row button { flex: none; }
.cms-photo-fields { display: grid; gap: 12px; }
.cms-photo-fields p { font-size: 13px; }
.cms-preview { background: var(--soft); }
.cms-preview .cms-top { background: var(--paper); }
.cms-preview .cms-main { width: auto; padding: 0 0 28px; }
.cms-preview-bar { min-height: 67px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.cms-preview-bar > a { justify-self: start; }
.cms-preview-bar > form { justify-self: end; }
.cms-preview iframe { border: 0; display: block; width: 100%; min-height: 75vh; margin-inline: auto; background: var(--paper); }
.cms-preview iframe.is-mobile { width: min(390px, calc(100% - 32px)); margin-top: 26px; }
@media (max-width: 1120px) {
  .cms-rss-grid { grid-template-columns: minmax(0, 1fr) minmax(278px, .48fr); gap: 16px; }
  .cms-diagnostics .cms-space { flex-wrap: wrap; }
}
@media (max-width: 850px) {
  .cms-rss-grid, .cms-editor { grid-template-columns: minmax(0, 1fr); }
  .cms h1 { font-size: 34px; line-height: 39px; }
  .cms-main { padding-top: 26px; }
}
@media (max-width: 600px) {
  .cms-top-inner { grid-template-columns: 1fr 1fr; gap: 5px; padding-block: 8px; }
  .cms-top nav { grid-row: 2; grid-column: 1 / -1; }
  .cms-top nav a { padding: 6px 10px; }
  .cms-heading { align-items: start; flex-direction: column; }
  .cms-heading .cms-actions { justify-content: flex-start; }
  .cms-materials-table colgroup { display: none; }
  .cms-materials-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .cms-materials-table tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 14px; }
  .cms-materials-table tbody tr + tr { border-top: 1px solid var(--line); }
  .cms-materials-table tbody tr > td, .cms-materials-table tbody tr + tr td { height: auto; border: 0; padding: 0; }
  .cms-materials-table tbody td:is(:first-child, :last-child) { grid-column: 1 / -1; padding: 0; }
  .cms-material-actions { flex-direction: row; flex-wrap: wrap; }
  .cms-dialog { padding: 16px; }
  .cms-dialog h2 { font-size: 21px; }
  .cms-preview-bar { grid-template-columns: 1fr 1fr; }
  .cms-preview-bar .cms-filters { grid-row: 2; grid-column: 1 / -1; justify-content: center; }
  .cms-panel, .cms-editor-main { padding: 14px; }
}
.cms [hidden] { display: none !important; }
.cms-photo-select {
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: 100%;
  min-height: 0; padding: 0; border: 0; border-radius: 0; font: inherit; text-align: left;
}
.cms-photo-select:hover { background: transparent; text-decoration: underline; }

.cms-original-fields { display: grid; gap: 12px; }
.cms-original-fields button { justify-self: start; }
