@font-face {
  font-family: "Masshtab Arial Narrow";
  src: url("fonts/LiberationSansNarrow-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Masshtab Arial Narrow";
  src: url("fonts/LiberationSansNarrow-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700 900;
  font-display: swap;
}
.title-editor {
  display: grid;
  grid-template-columns: minmax(360px, .78fr) minmax(520px, 1.22fr);
  gap: 22px;
  align-items: start;
}
.title-previews { display: grid; gap: 18px; }
.title-preview-heading { display: flex; align-items: center; justify-content: space-between; }
.title-preview-heading h3 { margin: 0; }
.locked-title-field {
  border: 1px solid #d5dce5;
  background: #f7f9fc;
  border-radius: 8px;
  padding: 14px 15px;
  margin: 18px 0;
}
.locked-title-field span, .locked-title-field b, .locked-title-field small { display: block; }
.locked-title-field span { font-size: 12px; color: #6c798b; margin-bottom: 5px; }
.locked-title-field b { color: #173044; }
.locked-title-field small { margin-top: 5px; }
.title-option {
  display: flex;
  align-items: flex-start;
  color: #25364a;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 12px;
  margin: 0 0 10px;
  background: #f9fafc;
}
.title-option input { margin-top: 2px; flex: 0 0 auto; }
.title-page-preview {
  --title-body-font: Arial, Helvetica, sans-serif;
  --title-heading-font: Arial, Helvetica, sans-serif;
  --title-body-size: 9.5pt;
  --title-document-size: 26pt;
  --title-section-size: 12.5pt;
  --title-code-size: 14pt;
  --title-text-color: #122b3b;
  --title-accent-color: #f04427;
  position: relative;
  aspect-ratio: 210 / 297;
  background: linear-gradient(to bottom, #122d42 0 16.16%, #fff 16.16% 100%);
  border: 0;
  border-radius: 0;
  outline: 1px solid #cfd7e1;
  overflow: hidden;
  box-shadow: 0 8px 28px #20385012;
  color: var(--title-text-color);
  font-family: var(--title-body-font);
  container-type: inline-size;
}
.title-fixed-header {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  right: -2px;
  width: auto;
  max-width: none;
  height: 16.16%;
  object-fit: fill;
}
.title-page-body { position: absolute; inset: 16.16% 0 0; padding: 3.8% 8.1%; }
.title-page-preview.approval .title-page-body { inset: 16.16% 0 0; padding: 3.8% 8.1%; }
.title-sro {
  font-size: var(--title-body-size);
  border-top: 1px solid #b7c0c9;
  border-bottom: 1px solid #b7c0c9;
  padding: 2.7% .3%;
  white-space: nowrap;
}
.title-meta {
  display: grid;
  grid-template-columns: 19% 1fr;
  grid-template-rows: repeat(3, 5cqw);
  column-gap: 5%;
  row-gap: 0;
  margin-top: 6.4%;
  padding-bottom: 5%;
  border-bottom: 1px solid #b7c0c9;
  font-size: var(--title-body-size);
  line-height: 1.35;
}
.title-meta b { color: var(--title-accent-color); font-weight: 400; }
.title-meta span { padding-left: 4%; border-left: 1px solid #c3cbd2; min-height: 1.4em; }
.title-document-type {
  font-family: var(--title-heading-font);
  font-size: var(--title-document-size);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -.045em;
  margin-top: 5.7%;
  white-space: nowrap;
}
.title-document-type:after { content: ""; display: block; width: 8%; height: 2px; background: var(--title-accent-color); margin-top: 3.8%; }
.title-section { font-family: var(--title-heading-font); font-size: var(--title-section-size); font-weight: 700; margin-top: 4.2%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.title-code { font-family: var(--title-heading-font); font-size: var(--title-code-size); font-weight: 800; border-left: 2px solid var(--title-accent-color); border-top: 1px solid #b7c0c9; padding: 5% 0 5% 3%; width: 48%; margin-top: 5.5%; }
.title-building { position: absolute; width: 58%; right: 0; bottom: 8.5%; opacity: .7; }
.title-revision { position: absolute; left: 8.1%; bottom: 16%; width: 34%; height: 8.7%; border: 1px solid #76818c; padding: 0; display: grid; grid-template-columns: 13fr 19fr 21fr 14fr; grid-template-rows: repeat(5, 1fr); font-size: calc(var(--title-body-size) * .68); font-weight: 700; }
.title-revision span { display: flex; align-items: center; justify-content: center; min-width: 0; border-right: 1px solid #76818c; border-bottom: 1px solid #76818c; }
.title-revision span:nth-child(4n) { border-right: 0; }
.title-revision span:nth-last-child(-n + 4) { border-bottom: 0; }
.title-footer { position: absolute; left: 8.1%; right: 8.1%; bottom: 3.2%; display: flex; align-items: center; gap: 5%; font-size: calc(var(--title-body-size) * .95); }
.title-footer:before { content: ""; position: absolute; left: 0; bottom: 150%; width: 9%; height: 2px; background: var(--title-accent-color); }
.title-footer span:nth-child(2) { margin-left: auto; }
.title-draft-mark { position: absolute; right: 8.1%; bottom: 1.1%; color: #995333; font-size: calc(var(--title-body-size) * .72); }
.title-page-preview.approval .title-document-type { margin-top: 5.7%; }
.title-page-preview.approval .title-building { bottom: 8.5%; }
.template-admin-layout { display: grid; grid-template-columns: minmax(440px, .9fr) minmax(520px, 1.1fr); gap: 22px; align-items: start; }
.template-lock-note { display: grid; gap: 5px; margin-top: 18px; padding: 14px; border: 1px solid #cbd8eb; border-radius: 8px; background: #f2f6fc; }
.template-lock-note b { color: #255ed6; }
.template-lock-note span { color: #526175; font-size: 13px; line-height: 1.45; }
input[type=color][data-template-setting] { min-height: 44px; padding: 4px; cursor: pointer; }
@media (max-width: 1180px) {
  .title-editor, .template-admin-layout { grid-template-columns: 1fr; }
  .title-previews { max-width: 720px; }
}
