:root {
  --bg: #020805;
  --screen: #03150c;
  --green: #7cff9b;
  --green-soft: #42d66b;
  --green-dark: #154b29;
  --danger: #ff6d6d;
  --text-shadow: 0 0 6px rgba(124, 255, 155, 0.75);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at center, rgba(20, 70, 38, 0.35), transparent 55%),
    #010402;
  color: var(--green);
  font-family: "Courier New", monospace;
}

body {
  overflow-x: hidden;
}

/* СТАРТОВАЯ ЗАГРУЗКА */

.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at center, rgba(22, 96, 46, 0.28), transparent 55%),
    #010503;
  color: var(--green);
}

.boot-box {
  position: relative;
  z-index: 2;
  width: min(620px, 92vw);
  text-align: center;
  padding: 28px;
  border: 1px solid rgba(124, 255, 155, 0.45);
  background: rgba(2, 18, 9, 0.82);
  box-shadow:
    0 0 26px rgba(124, 255, 155, 0.14),
    inset 0 0 42px rgba(124, 255, 155, 0.08);
}

.boot-gif {
  width: min(300px, 70vw);
  max-height: 300px;
  object-fit: contain;
  margin-bottom: 22px;
  filter: drop-shadow(0 0 10px rgba(124, 255, 155, 0.45));
}

.boot-title {
  font-size: 20px;
  letter-spacing: 1px;
  text-shadow: var(--text-shadow);
}

.boot-subtitle {
  margin-top: 7px;
  font-size: 14px;
  color: var(--green-soft);
}

.boot-status {
  min-height: 22px;
  margin-top: 28px;
  font-size: 15px;
  color: var(--green);
}

.progress-frame {
  width: 100%;
  height: 20px;
  margin-top: 14px;
  border: 1px solid rgba(124, 255, 155, 0.65);
  background: rgba(0, 0, 0, 0.45);
  padding: 3px;
}

.progress-bar {
  width: 0%;
  height: 100%;
  background: var(--green);
  box-shadow: 0 0 12px rgba(124, 255, 155, 0.85);
  transition: width 0.18s linear;
}

.boot-percent {
  margin-top: 10px;
  font-size: 14px;
  color: var(--green-soft);
}

.boot-noise,
.scanlines,
.vignette {
  pointer-events: none;
}

.boot-noise::before,
.scanlines::before {
  content: "";
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(124, 255, 155, 0.055) 0px,
    rgba(124, 255, 155, 0.055) 1px,
    transparent 3px,
    transparent 6px
  );
  mix-blend-mode: screen;
  opacity: 0.55;
}

/* ОСНОВНОЙ ТЕРМИНАЛ */

.hidden {
  display: none !important;
}

.terminal {
  position: relative;
  min-height: 100vh;
  padding: 28px;
  overflow-x: hidden;
  overflow-y: auto;
  background:
    radial-gradient(circle at center, rgba(20, 80, 38, 0.18), transparent 60%),
    var(--bg);
}

.terminal::before {
  content: "";
  position: fixed;
  inset: 18px;
  border: 1px solid rgba(124, 255, 155, 0.36);
  box-shadow:
    inset 0 0 65px rgba(124, 255, 155, 0.09),
    0 0 32px rgba(124, 255, 155, 0.10);
  pointer-events: none;
}

.terminal-header {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 22px;
  border: 1px solid rgba(124, 255, 155, 0.35);
  background: rgba(3, 18, 9, 0.78);
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.terminal-title {
  font-size: 22px;
  letter-spacing: 1px;
  text-shadow: var(--text-shadow);
}

.terminal-subtitle,
.terminal-server {
  margin-top: 5px;
  font-size: 14px;
  color: var(--green-soft);
}

.terminal-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 205px;
}

.top-button {
  border: 1px solid rgba(124, 255, 155, 0.45);
  background: rgba(0, 0, 0, 0.35);
  color: var(--green);
  font-family: inherit;
  font-size: 15px;
  padding: 9px 11px;
  cursor: pointer;
  text-align: left;
  text-shadow: var(--text-shadow);
}

.top-button:hover {
  background: rgba(124, 255, 155, 0.14);
}

.terminal-body {
  position: relative;
  z-index: 2;
  max-width: 1180px;
  min-height: 680px;
  margin: 18px auto 28px;
  padding: 26px;
  border: 1px solid rgba(124, 255, 155, 0.35);
  background: rgba(2, 15, 8, 0.84);
  box-shadow: inset 0 0 55px rgba(124, 255, 155, 0.08);
}

.breadcrumbs {
  margin-bottom: 20px;
  color: var(--green-soft);
  font-size: 15px;
}

.screen-title {
  margin: 0 0 14px;
  font-size: 21px;
  letter-spacing: 1px;
  text-shadow: var(--text-shadow);
}

.system-lines {
  margin-bottom: 24px;
  color: var(--green-soft);
  line-height: 1.6;
  font-size: 15px;
}

.menu {
  display: grid;
  gap: 8px;
}

.menu-button {
  width: 100%;
  border: 0;
  border-left: 2px solid transparent;
  background: transparent;
  color: var(--green);
  font-family: inherit;
  font-size: 18px;
  line-height: 1.4;
  text-align: left;
  padding: 8px 9px;
  cursor: pointer;
  text-shadow: var(--text-shadow);
}

.menu-button::before {
  content: "> ";
}

.menu-button:hover,
.menu-button:focus {
  outline: none;
  border-left-color: var(--green);
  background: rgba(124, 255, 155, 0.13);
}

.menu-button.locked {
  color: #b8ffca;
}

.menu-button.back {
  margin-top: 16px;
  color: var(--green-soft);
}

.doc-meta {
  display: grid;
  gap: 7px;
  margin: 18px 0 24px;
  padding: 14px;
  border: 1px dashed rgba(124, 255, 155, 0.34);
  color: var(--green-soft);
  font-size: 15px;
}

.doc-content {
  max-width: 950px;
  line-height: 1.75;
  font-size: 18px;
  white-space: pre-wrap;
  padding-bottom: 20px;
}

.access-box {
  max-width: 700px;
  padding: 20px;
  border: 1px solid rgba(124, 255, 155, 0.45);
  background: rgba(0, 0, 0, 0.22);
  font-size: 17px;
  line-height: 1.6;
}

.access-warning {
  color: var(--danger);
  text-shadow: 0 0 6px rgba(255, 109, 109, 0.6);
  margin-bottom: 14px;
}

.code-input {
  width: 100%;
  margin-top: 14px;
  border: 1px solid rgba(124, 255, 155, 0.55);
  background: rgba(0, 0, 0, 0.35);
  color: var(--green);
  font-family: inherit;
  font-size: 19px;
  padding: 11px;
  outline: none;
}

.code-input:focus {
  box-shadow: 0 0 12px rgba(124, 255, 155, 0.25);
}

.access-error {
  margin-top: 12px;
  color: var(--danger);
}

.image-block {
  max-width: 950px;
  margin-top: 28px;
  padding: 14px;
  border: 1px dashed rgba(124, 255, 155, 0.34);
}

.image-title {
  margin-bottom: 14px;
  color: var(--green-soft);
  font-size: 15px;
}

.image-frame {
  margin: 0 0 18px;
}

.image-frame img {
  display: block;
  max-width: 100%;
  border: 1px solid rgba(124, 255, 155, 0.35);
  filter: none;
}

.image-caption {
  margin-top: 8px;
  color: var(--green-soft);
  font-size: 14px;
}

.terminal-footer {
  margin-top: 30px;
  color: var(--green);
  font-size: 18px;
}

.cursor {
  animation: blink 0.9s steps(2, start) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.glitch {
  animation: glitch 0.18s linear 3;
}

@keyframes glitch {
  0% {
    transform: translate(0);
    opacity: 1;
  }

  33% {
    transform: translate(2px, -1px);
    opacity: 0.82;
  }

  66% {
    transform: translate(-2px, 1px);
    opacity: 0.94;
  }

  100% {
    transform: translate(0);
    opacity: 1;
  }
}

.vignette {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, transparent 48%, rgba(0, 0, 0, 0.55) 100%);
  z-index: 1;
}

.reduced-fx .scanlines,
.reduced-fx .boot-noise,
.reduced-fx .vignette {
  display: none;
}

.reduced-fx .cursor {
  animation: none;
}

/* ТЕЛЕФОН */

@media (max-width: 720px) {
  .terminal {
    padding: 12px;
  }

  .terminal::before {
    inset: 6px;
  }

  .terminal-header {
    display: block;
    padding: 14px;
  }

  .terminal-title {
    font-size: 17px;
  }

  .terminal-subtitle,
  .terminal-server {
    font-size: 12px;
  }

  .terminal-controls {
    margin-top: 14px;
    min-width: 0;
  }

  .top-button {
    font-size: 14px;
    padding: 9px 10px;
  }

  .terminal-body {
    min-height: calc(100vh - 175px);
    padding: 15px;
    margin-top: 12px;
    margin-bottom: 16px;
  }

  .breadcrumbs {
    font-size: 13px;
  }

  .screen-title {
    font-size: 18px;
  }

  .system-lines {
    font-size: 14px;
  }

  .menu-button {
    font-size: 16px;
    padding: 10px 6px;
  }

  .doc-meta {
    font-size: 14px;
  }

  .doc-content {
    font-size: 16px;
    line-height: 1.7;
  }

  .access-box {
    font-size: 15px;
  }

  .boot-box {
    padding: 18px;
  }

  .boot-title {
    font-size: 15px;
  }

  .boot-gif {
    width: min(230px, 72vw);
  }
}
/* ВЫДЕЛЕНИЯ ВНУТРИ ДОКУМЕНТОВ */

.doc-paragraph {
  margin: 0 0 13px;
}

.doc-space {
  height: 12px;
}

.doc-content strong {
  color: #d8ffe0;
  font-weight: 700;
  text-shadow: 0 0 8px rgba(216, 255, 224, 0.8);
}

.doc-content em {
  color: #b8ffca;
  font-style: italic;
  text-shadow: 0 0 6px rgba(184, 255, 202, 0.45);
}

.doc-content code {
  display: inline-block;
  padding: 1px 6px;
  border: 1px solid rgba(124, 255, 155, 0.35);
  background: rgba(124, 255, 155, 0.08);
  color: #d8ffe0;
  font-family: "Courier New", monospace;
}

.terminal-bracket {
  color: #d8ffe0;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.doc-status-line {
  margin: 10px 0 12px;
  padding: 8px 10px;
  border-left: 3px solid rgba(124, 255, 155, 0.75);
  background: rgba(124, 255, 155, 0.08);
  color: #d8ffe0;
  font-weight: 700;
  text-shadow: 0 0 7px rgba(124, 255, 155, 0.65);
}

.doc-subheading {
  margin: 22px 0 12px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(124, 255, 155, 0.28);
  color: #d8ffe0;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-shadow: 0 0 8px rgba(124, 255, 155, 0.7);
}

.doc-log-line {
  margin: 10px 0;
  padding: 8px 10px;
  border-left: 3px solid rgba(124, 255, 155, 0.45);
  background: rgba(0, 0, 0, 0.22);
  color: #b8ffca;
}

.doc-list-line {
  margin: 7px 0;
  padding-left: 18px;
  color: #b8ffca;
}
/* ДОПОЛНИТЕЛЬНАЯ ПОЛИРОВКА ТЕРМИНАЛА */

.terminal-body::before {
  content: "ARCHIVE DISPLAY / ACTIVE SESSION";
  display: block;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(124, 255, 155, 0.22);
  color: rgba(184, 255, 202, 0.75);
  font-size: 13px;
  letter-spacing: 1px;
}

.screen {
  animation: softAppear 0.22s ease-out;
}

@keyframes softAppear {
  from {
    opacity: 0;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.menu-button {
  position: relative;
  transition:
    background 0.12s ease,
    border-color 0.12s ease,
    text-shadow 0.12s ease,
    transform 0.12s ease;
}

.menu-button:hover,
.menu-button:focus {
  transform: translateX(3px);
  text-shadow:
    0 0 6px rgba(124, 255, 155, 0.9),
    0 0 14px rgba(124, 255, 155, 0.35);
}

.menu-button.locked {
  color: #d8ffe0;
}

.menu-button.locked::after {
  content: "  // ACCESS CODE REQUIRED";
  color: rgba(255, 109, 109, 0.85);
  font-size: 13px;
  text-shadow: 0 0 6px rgba(255, 109, 109, 0.45);
}

.menu-button.back {
  border-top: 1px solid rgba(124, 255, 155, 0.16);
  padding-top: 14px;
}

.doc-meta {
  position: relative;
  background:
    linear-gradient(
      90deg,
      rgba(124, 255, 155, 0.08),
      rgba(124, 255, 155, 0.025)
    );
}

.doc-meta::before {
  content: "DOCUMENT CARD";
  display: block;
  margin-bottom: 8px;
  color: #d8ffe0;
  font-weight: 700;
  letter-spacing: 1px;
  text-shadow: 0 0 7px rgba(124, 255, 155, 0.65);
}

.doc-content {
  position: relative;
  padding: 18px 0 28px;
}

.doc-content::before {
  content: "[BEGIN FILE]";
  display: block;
  margin-bottom: 18px;
  color: rgba(184, 255, 202, 0.78);
  font-size: 14px;
  letter-spacing: 1px;
}

.doc-content::after {
  content: "[END FILE]";
  display: block;
  margin-top: 26px;
  color: rgba(184, 255, 202, 0.78);
  font-size: 14px;
  letter-spacing: 1px;
}

.doc-paragraph {
  text-indent: 0;
}

.doc-paragraph:first-letter {
  color: #d8ffe0;
  text-shadow: 0 0 6px rgba(216, 255, 224, 0.55);
}

.doc-status-line + .doc-status-line {
  margin-top: -4px;
}

.access-box {
  box-shadow:
    inset 0 0 24px rgba(255, 109, 109, 0.045),
    0 0 18px rgba(255, 109, 109, 0.06);
}

.access-warning {
  letter-spacing: 0.6px;
}

.code-input::placeholder {
  color: rgba(184, 255, 202, 0.45);
}

.terminal-footer {
  border-top: 1px solid rgba(124, 255, 155, 0.16);
  padding-top: 16px;
}

/* ЧУТЬ ЛУЧШЕ ДЛЯ ТЕЛЕФОНА */

@media (max-width: 720px) {
  .terminal-body::before {
    font-size: 11px;
    margin-bottom: 14px;
  }

  .menu-button.locked::after {
    display: block;
    margin-top: 3px;
    font-size: 11px;
  }

  .doc-content::before,
  .doc-content::after {
    font-size: 12px;
  }
}
/* ИСПРАВЛЕНИЕ: УБИРАЕМ ЯРКУЮ ПЕРВУЮ БУКВУ И ЛИШНИЙ КУРСОР */

.doc-paragraph:first-letter {
  color: inherit;
  text-shadow: inherit;
}

.terminal-footer {
  display: none;
}
/* ИСПРАВЛЕНИЕ ВИДА ПУТИ АРХИВА */

.breadcrumb-button {
  appearance: none;
  -webkit-appearance: none;
  border: none !important;
  background: transparent !important;
  color: var(--green-soft) !important;
  font-family: "Courier New", monospace !important;
  font-size: inherit;
  padding: 0;
  margin: 0;
  cursor: pointer;
  text-shadow: var(--text-shadow);
}

.breadcrumb-button:hover,
.breadcrumb-button:focus {
  color: #d8ffe0 !important;
  background: transparent !important;
  outline: none;
  text-decoration: none;
  text-shadow:
    0 0 6px rgba(124, 255, 155, 0.9),
    0 0 14px rgba(124, 255, 155, 0.35);
}

.breadcrumb-current {
  display: none;
}
/* ИСПРАВЛЕНИЕ ВИДА ПУТИ АРХИВА */

.breadcrumb-button {
  appearance: none;
  -webkit-appearance: none;
  border: none !important;
  background: transparent !important;
  color: var(--green-soft) !important;
  font-family: "Courier New", monospace !important;
  font-size: inherit;
  padding: 0;
  margin: 0;
  cursor: pointer;
  text-shadow: var(--text-shadow);
}

.breadcrumb-button:hover,
.breadcrumb-button:focus {
  color: #d8ffe0 !important;
  background: transparent !important;
  outline: none;
  text-decoration: none;
  text-shadow:
    0 0 6px rgba(124, 255, 155, 0.9),
    0 0 14px rgba(124, 255, 155, 0.35);
}

.breadcrumb-current {
  display: none;
}
/* ИСПРАВЛЕНИЕ ЦВЕТА КНОПКИ INITIALIZE ARCHIVE */

.boot-start-button {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid rgba(124, 255, 155, 0.55) !important;
  background: rgba(0, 0, 0, 0.32) !important;
  color: #7cff9b !important;
  font-family: "Courier New", monospace !important;
  font-size: 17px;
  padding: 10px 16px;
  cursor: pointer;
  text-align: left;
  text-shadow: 0 0 6px rgba(124, 255, 155, 0.75);
  box-shadow:
    inset 0 0 18px rgba(124, 255, 155, 0.07),
    0 0 12px rgba(124, 255, 155, 0.08);
}

.boot-start-button:hover,
.boot-start-button:focus {
  background: rgba(124, 255, 155, 0.12) !important;
  color: #d8ffe0 !important;
  outline: none;
}
/* УСИЛЕННЫЕ АТМОСФЕРНЫЕ ЭФФЕКТЫ */

.terminal {
  animation: wholeTerminalBreath 6s ease-in-out infinite;
}

@keyframes wholeTerminalBreath {
  0%, 100% {
    filter: brightness(1) contrast(1);
  }

  50% {
    filter: brightness(1.12) contrast(1.08);
  }
}

.terminal-body {
  box-shadow:
    inset 0 0 70px rgba(124, 255, 155, 0.12),
    0 0 28px rgba(124, 255, 155, 0.08);
}

.screen-title {
  animation: titlePulse 4s ease-in-out infinite;
}

@keyframes titlePulse {
  0%, 100% {
    text-shadow:
      0 0 6px rgba(124, 255, 155, 0.75),
      0 0 12px rgba(124, 255, 155, 0.18);
  }

  50% {
    text-shadow:
      0 0 10px rgba(216, 255, 224, 0.95),
      0 0 22px rgba(124, 255, 155, 0.35);
  }
}

.random-notice {
  margin: 0 0 22px;
  padding: 9px 12px;
  border-left: 3px solid rgba(124, 255, 155, 0.65);
  background:
    linear-gradient(
      90deg,
      rgba(124, 255, 155, 0.12),
      rgba(124, 255, 155, 0.03)
    );
  color: #d8ffe0;
  font-size: 15px;
  text-shadow: 0 0 7px rgba(124, 255, 155, 0.6);
}

.menu-button.locked {
  color: #d8ffe0;
  animation: lockedPulseStrong 2.2s ease-in-out infinite;
}

.menu-button.locked::after {
  color: #ff9c9c !important;
  animation: lockedMarkPulse 1.7s ease-in-out infinite;
}

@keyframes lockedPulseStrong {
  0%, 100% {
    text-shadow:
      0 0 6px rgba(124, 255, 155, 0.75),
      0 0 12px rgba(124, 255, 155, 0.18);
  }

  50% {
    text-shadow:
      0 0 8px rgba(255, 109, 109, 0.85),
      0 0 18px rgba(255, 109, 109, 0.35);
  }
}

@keyframes lockedMarkPulse {
  0%, 100% {
    opacity: 0.65;
  }

  50% {
    opacity: 1;
  }
}

.doc-meta.status-restricted {
  border-color: rgba(255, 109, 109, 0.65);
  box-shadow:
    inset 0 0 28px rgba(255, 109, 109, 0.08),
    0 0 18px rgba(255, 109, 109, 0.08);
}

.doc-meta.status-damaged {
  border-color: rgba(216, 255, 224, 0.38);
  box-shadow:
    inset 0 0 24px rgba(216, 255, 224, 0.05),
    0 0 14px rgba(124, 255, 155, 0.05);
}

.doc-meta.status-unstable {
  border-color: rgba(124, 255, 155, 0.8);
  animation: unstableFileStrong 2.8s ease-in-out infinite;
}

@keyframes unstableFileStrong {
  0%, 100% {
    filter: brightness(1);
    transform: translateX(0);
  }

  45% {
    filter: brightness(1.18);
    transform: translateX(0);
  }

  50% {
    transform: translateX(1px);
  }

  55% {
    transform: translateX(-1px);
  }
}

.access-denied-flash {
  animation: accessDeniedBodyFlash 0.35s linear 2;
}

@keyframes accessDeniedBodyFlash {
  0%, 100% {
    background-color: transparent;
  }

  50% {
    background-color: rgba(255, 0, 0, 0.08);
  }
}

.access-denied-flash .terminal-body {
  box-shadow:
    inset 0 0 90px rgba(255, 109, 109, 0.22),
    0 0 40px rgba(255, 109, 109, 0.18);
}

.doc-content::before,
.doc-content::after {
  color: #d8ffe0;
  text-shadow: 0 0 7px rgba(124, 255, 155, 0.65);
}

.reduced-fx .terminal,
.reduced-fx .screen-title,
.reduced-fx .menu-button.locked,
.reduced-fx .menu-button.locked::after,
.reduced-fx .doc-meta.status-unstable {
  animation: none !important;
}
/* УБИРАЕМ > У КНОПКИ INITIALIZE ARCHIVE */

.boot-start-button {
  font-size: 0 !important;
}

.boot-start-button::after {
  content: "INITIALIZE ARCHIVE";
  font-size: 17px;
}
/* АРХИВНАЯ ПОМЕТКА О ПРОИСХОЖДЕНИИ ДОКУМЕНТА */

.archive-transfer-note {
  max-width: 950px;
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid rgba(124, 255, 155, 0.22);
  border-left: 3px solid rgba(124, 255, 155, 0.58);
  background:
    linear-gradient(
      90deg,
      rgba(124, 255, 155, 0.09),
      rgba(124, 255, 155, 0.025)
    );
  box-shadow:
    inset 0 0 22px rgba(124, 255, 155, 0.045),
    0 0 12px rgba(124, 255, 155, 0.035);
}

.archive-transfer-title {
  margin-bottom: 7px;
  color: #d8ffe0;
  font-size: 13px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  text-shadow:
    0 0 6px rgba(124, 255, 155, 0.8),
    0 0 14px rgba(124, 255, 155, 0.25);
}

.archive-transfer-text {
  color: rgba(216, 255, 224, 0.82);
  font-size: 15px;
  line-height: 1.65;
  text-shadow: 0 0 5px rgba(124, 255, 155, 0.35);
}

@media (max-width: 720px) {
  .archive-transfer-note {
    padding: 10px 11px;
  }

  .archive-transfer-text {
    font-size: 14px;
    line-height: 1.55;
  }
}
/* ИСПРАВЛЕНИЕ ВЫДЕЛЕНИЙ СЛУЖЕБНЫХ ДАННЫХ И ТЕРМИНОВ */

.doc-source-card {
  max-width: 950px;
  margin: 0 0 22px;
  padding: 12px 14px;
  border: 1px solid rgba(124, 255, 155, 0.28);
  border-left: 4px solid rgba(124, 255, 155, 0.72);
  background:
    linear-gradient(
      90deg,
      rgba(124, 255, 155, 0.13),
      rgba(124, 255, 155, 0.035)
    );
  box-shadow:
    inset 0 0 28px rgba(124, 255, 155, 0.06),
    0 0 16px rgba(124, 255, 155, 0.045);
}

.doc-source-title {
  margin-bottom: 9px;
  color: #d8ffe0;
  font-size: 13px;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  text-shadow:
    0 0 7px rgba(124, 255, 155, 0.85),
    0 0 16px rgba(124, 255, 155, 0.28);
}

.doc-source-line {
  margin: 0 0 7px;
  color: rgba(216, 255, 224, 0.93);
  font-size: 16px;
  line-height: 1.6;
  text-shadow: 0 0 6px rgba(124, 255, 155, 0.5);
}

.doc-source-line:last-child {
  margin-bottom: 0;
}

.doc-term-line {
  max-width: 950px;
  margin: 0 0 17px;
  padding: 11px 13px;
  border: 1px solid rgba(124, 255, 155, 0.24);
  border-left: 4px solid rgba(216, 255, 224, 0.58);
  background:
    linear-gradient(
      90deg,
      rgba(124, 255, 155, 0.09),
      rgba(124, 255, 155, 0.025)
    );
  color: rgba(216, 255, 224, 0.92);
  line-height: 1.7;
}

.archive-term {
  color: #ecfff0;
  font-weight: 900;
  letter-spacing: 0.35px;
  text-shadow:
    0 0 7px rgba(124, 255, 155, 0.95),
    0 0 16px rgba(124, 255, 155, 0.32);
}

.doc-note-heading {
  max-width: 950px;
  margin: 20px 0 9px;
  padding: 7px 11px;
  border-left: 4px solid rgba(124, 255, 155, 0.62);
  color: #d8ffe0;
  background: rgba(124, 255, 155, 0.075);
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.85px;
  text-shadow: 0 0 8px rgba(124, 255, 155, 0.65);
}

.doc-field-line {
  max-width: 950px;
  margin: 0 0 10px;
  padding: 7px 10px;
  border-left: 3px solid rgba(124, 255, 155, 0.62);
  background:
    linear-gradient(
      90deg,
      rgba(124, 255, 155, 0.11),
      rgba(124, 255, 155, 0.025)
    );
  color: #d8ffe0;
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: 0.2px;
  text-shadow: 0 0 6px rgba(124, 255, 155, 0.55);
}

@media (max-width: 720px) {
  .doc-source-line,
  .doc-field-line,
  .doc-term-line,
  .doc-note-heading {
    font-size: 14px;
  }

  .doc-source-card,
  .doc-term-line {
    padding: 10px 11px;
  }
}


/* ВЫДЕЛЕНИЕ ШИФРОВ, МЕТОК И ТЕХНИЧЕСКИХ НОМЕРОВ */

.archive-code-marker {
  color: #ecfff0;
  font-weight: 900;
  letter-spacing: 0.4px;
  text-shadow:
    0 0 6px rgba(124, 255, 155, 0.82),
    0 0 13px rgba(124, 255, 155, 0.28);
}
/* ФИКС СЛУЖЕБНОЙ ШАПКИ И ТЕРМИНОВ В ДОКУМЕНТАХ */

.doc-source-card {
  max-width: 950px;
  min-height: 0 !important;
  margin: 0 0 18px !important;
  padding: 12px 14px !important;
  border: 1px solid rgba(124, 255, 155, 0.28);
  border-left: 3px solid rgba(124, 255, 155, 0.76);
  background:
    linear-gradient(
      90deg,
      rgba(124, 255, 155, 0.10),
      rgba(124, 255, 155, 0.025)
    );
  box-shadow:
    inset 0 0 20px rgba(124, 255, 155, 0.045),
    0 0 12px rgba(124, 255, 155, 0.035);
}

.doc-source-title {
  margin: 0 0 9px !important;
  color: #d8ffe0;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-shadow:
    0 0 6px rgba(124, 255, 155, 0.8),
    0 0 14px rgba(124, 255, 155, 0.25);
}

.doc-source-row {
  margin: 0 0 5px !important;
  padding: 0 !important;
  color: rgba(216, 255, 224, 0.92);
  font-size: 15px;
  line-height: 1.45;
  text-shadow: 0 0 5px rgba(124, 255, 155, 0.35);
}

.doc-source-row:last-child {
  margin-bottom: 0 !important;
}

.doc-source-label {
  color: rgba(184, 255, 202, 0.78);
}

.doc-source-value {
  color: #d8ffe0;
}

.tech-code {
  color: #f0fff3;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-shadow:
    0 0 6px rgba(216, 255, 224, 0.86),
    0 0 14px rgba(124, 255, 155, 0.28);
}

.doc-term-line {
  max-width: 950px;
  margin: 0 0 16px !important;
  padding: 10px 12px !important;
  border: 1px solid rgba(124, 255, 155, 0.22);
  border-left: 3px solid rgba(216, 255, 224, 0.58);
  background:
    linear-gradient(
      90deg,
      rgba(124, 255, 155, 0.075),
      rgba(124, 255, 155, 0.025)
    );
  color: rgba(216, 255, 224, 0.92);
  line-height: 1.65;
}

.archive-term {
  color: #f0fff3;
  font-weight: 800;
  letter-spacing: 0.35px;
  text-shadow:
    0 0 7px rgba(216, 255, 224, 0.85),
    0 0 16px rgba(124, 255, 155, 0.3);
}

.doc-note-heading {
  max-width: 950px;
  margin: 18px 0 8px !important;
  padding: 6px 10px !important;
  border-left: 3px solid rgba(124, 255, 155, 0.62);
  color: #d8ffe0;
  background: rgba(124, 255, 155, 0.075);
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  text-shadow: 0 0 7px rgba(124, 255, 155, 0.55);
}

@media (max-width: 720px) {
  .doc-source-card {
    padding: 10px 11px !important;
  }

  .doc-source-row,
  .doc-term-line,
  .doc-note-heading {
    font-size: 14px;
  }
}
/* КОМПАКТНАЯ СЛУЖЕБНАЯ ШАПКА ДОКУМЕНТА */

.doc-source-card {
  max-width: 950px !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 0 18px !important;
  padding: 12px 14px !important;
  display: block !important;
  border: 1px solid rgba(124, 255, 155, 0.28) !important;
  border-left: 3px solid rgba(124, 255, 155, 0.76) !important;
  background:
    linear-gradient(
      90deg,
      rgba(124, 255, 155, 0.10),
      rgba(124, 255, 155, 0.025)
    ) !important;
}

.doc-source-title {
  display: block !important;
  margin: 0 0 10px !important;
  padding: 0 !important;
  font-size: 13px !important;
  line-height: 1.2 !important;
}

.doc-source-row {
  display: block !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 0 5px !important;
  padding: 0 !important;
  font-size: 15px !important;
  line-height: 1.45 !important;
}

.doc-source-row:last-child {
  margin-bottom: 0 !important;
}

.doc-source-label,
.doc-source-value {
  display: inline !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: inherit !important;
}

.doc-source-label {
  color: rgba(184, 255, 202, 0.78) !important;
}

.doc-source-value {
  color: #d8ffe0 !important;
}
/* ЖЕСТКИЙ ФИКС: КОМПАКТНАЯ SOURCE / FIXATION DATA */

.doc-content .doc-source-card {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  align-items: stretch !important;
  gap: 4px !important;

  width: auto !important;
  max-width: 950px !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;

  margin: 0 0 16px !important;
  padding: 10px 12px !important;

  border: 1px solid rgba(124, 255, 155, 0.28) !important;
  border-left: 3px solid rgba(124, 255, 155, 0.76) !important;
  background:
    linear-gradient(
      90deg,
      rgba(124, 255, 155, 0.10),
      rgba(124, 255, 155, 0.025)
    ) !important;
}

.doc-content .doc-source-title {
  display: block !important;
  width: auto !important;
  height: auto !important;

  margin: 0 0 8px !important;
  padding: 0 !important;

  font-size: 13px !important;
  line-height: 1.2 !important;
}

.doc-content .doc-source-row {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: baseline !important;
  justify-content: flex-start !important;
  gap: 0 8px !important;

  width: auto !important;
  height: auto !important;
  min-height: 0 !important;

  margin: 0 0 3px !important;
  padding: 0 !important;

  font-size: 15px !important;
  line-height: 1.35 !important;
}

.doc-content .doc-source-row:last-child {
  margin-bottom: 0 !important;
}

.doc-content .doc-source-label,
.doc-content .doc-source-value {
  display: inline !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;

  margin: 0 !important;
  padding: 0 !important;

  line-height: 1.35 !important;
}

.doc-content .doc-source-label {
  flex: 0 0 auto !important;
}

.doc-content .doc-source-value {
  flex: 0 1 auto !important;
}
/* ПРИБЛИЖАЕМ ТЕКСТ К СЛУЖЕБНОЙ ШАПКЕ */

.doc-content .doc-source-card {
  margin-bottom: 6px !important;
}

.doc-content .doc-source-card + .doc-space {
  height: 4px !important;
}
/* ФИНАЛЬНАЯ КОМПАКТНОСТЬ SOURCE / FIXATION DATA */

.doc-content .doc-source-card {
  margin-top: 4px !important;
  margin-bottom: 8px !important;
  padding: 10px 12px !important;
}

.doc-content .doc-status-line + .doc-space {
  height: 4px !important;
}

.doc-content .doc-source-card + .doc-space {
  height: 4px !important;
}

.doc-content .doc-source-card + .doc-space + .doc-paragraph {
  margin-top: 0 !important;
}

.doc-content .doc-status-line {
  margin-bottom: 4px !important;
}
/* ЖЕСТКО УБИРАЕМ ЛИШНИЕ ПУСТЫЕ СТРОКИ В ДОКУМЕНТЕ */

.doc-content .doc-space {
  height: 3px !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.doc-content .doc-status-line {
  margin-bottom: 4px !important;
}

.doc-content .doc-source-card {
  margin-top: 2px !important;
  margin-bottom: 6px !important;
}

.doc-content .doc-source-card + .doc-space,
.doc-content .doc-source-card + .doc-space + .doc-space,
.doc-content .doc-source-card + .doc-space + .doc-space + .doc-space {
  display: none !important;
}

.doc-content .doc-status-line + .doc-space,
.doc-content .doc-status-line + .doc-space + .doc-space,
.doc-content .doc-status-line + .doc-space + .doc-space + .doc-space {
  display: none !important;
}

.doc-content .doc-source-card + .doc-paragraph,
.doc-content .doc-source-card + .doc-space + .doc-paragraph,
.doc-content .doc-source-card + .doc-space + .doc-space + .doc-paragraph {
  margin-top: 0 !important;
}

/* КАДРОВЫЙ РЕЕСТР И ПОИСК */

.personnel-profile {
  display: grid;
  grid-template-columns: minmax(230px, 340px) minmax(0, 1fr);
  grid-template-areas: "photo record";
  gap: 28px;
  align-items: start;
  max-width: 1080px;
  margin-top: 22px;
}

.personnel-record {
  grid-area: record;
  min-width: 0;
  max-width: none;
  padding-bottom: 0;
}

.personnel-photo-panel {
  grid-area: photo;
  position: sticky;
  top: 18px;
  min-width: 0;
  margin: 0;
  padding: 12px;
  border: 1px dashed rgba(124, 255, 155, 0.42);
  background: rgba(0, 0, 0, 0.28);
  box-shadow: inset 0 0 24px rgba(124, 255, 155, 0.06);
}

.personnel-photo-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid rgba(124, 255, 155, 0.42);
  background:
    linear-gradient(rgba(124, 255, 155, 0.025), rgba(124, 255, 155, 0.025)),
    #010604;
}

.personnel-photo-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: none;
}

.personnel-photo-caption {
  margin-top: 10px;
  color: var(--green-soft);
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.personnel-overview {
  max-width: 1000px;
}

.search-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  max-width: 1000px;
  margin: 20px 0 22px;
}

.search-input {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(124, 255, 155, 0.55);
  background: rgba(0, 0, 0, 0.38);
  color: var(--green);
  font-family: inherit;
  font-size: 18px;
  padding: 12px 13px;
  outline: none;
  text-shadow: var(--text-shadow);
}

.search-input:focus {
  box-shadow: 0 0 15px rgba(124, 255, 155, 0.18);
}

.search-input::placeholder {
  color: rgba(124, 255, 155, 0.58);
}

.search-submit {
  border: 1px solid rgba(124, 255, 155, 0.55);
  background: rgba(124, 255, 155, 0.08);
  color: var(--green);
  font-family: inherit;
  font-size: 15px;
  padding: 11px 16px;
  cursor: pointer;
  text-shadow: var(--text-shadow);
}

.search-submit:hover,
.search-submit:focus {
  outline: none;
  background: rgba(124, 255, 155, 0.17);
}

.search-results {
  display: grid;
  gap: 10px;
  max-width: 1040px;
  margin-bottom: 20px;
}

.search-summary,
.search-hint,
.search-empty {
  padding: 12px 13px;
  border-left: 2px solid rgba(124, 255, 155, 0.55);
  background: rgba(124, 255, 155, 0.055);
  color: var(--green-soft);
  font-size: 14px;
  line-height: 1.55;
}

.search-empty {
  color: var(--danger);
  border-left-color: rgba(255, 109, 109, 0.6);
}

.search-result {
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 14px 15px;
  border: 1px solid rgba(124, 255, 155, 0.25);
  border-left: 3px solid rgba(124, 255, 155, 0.58);
  background: rgba(0, 0, 0, 0.25);
  color: var(--green);
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.search-result:hover,
.search-result:focus {
  outline: none;
  border-color: rgba(124, 255, 155, 0.62);
  background: rgba(124, 255, 155, 0.10);
  box-shadow: 0 0 16px rgba(124, 255, 155, 0.08);
}

.search-result.locked {
  border-left-color: var(--danger);
}

.search-result-type {
  color: var(--green-soft);
  font-size: 12px;
  letter-spacing: 0.4px;
}

.search-result.locked .search-result-type {
  color: #ff9a9a;
}

.search-result-title {
  font-size: 17px;
  line-height: 1.4;
  text-shadow: var(--text-shadow);
}

.search-result-path {
  color: var(--green-soft);
  font-size: 13px;
  line-height: 1.45;
}

.search-result-snippet {
  color: rgba(184, 255, 202, 0.84);
  font-size: 14px;
  line-height: 1.55;
}

@media (max-width: 900px) {
  .personnel-profile {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "record"
      "photo";
    gap: 22px;
  }

  .personnel-photo-panel {
    position: static;
    width: 100%;
  }

  .personnel-photo-frame {
    width: 100%;
    aspect-ratio: 4 / 5;
  }

  .personnel-photo-frame img {
    width: 100%;
    height: 100%;
  }

  .search-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .search-input {
    font-size: 16px;
  }

  .search-submit {
    width: 100%;
  }

  .search-result {
    padding: 12px;
  }

  .search-result-title {
    font-size: 16px;
  }
}

/* ПРОТОКОЛЫ И ИНТЕРАКТИВНАЯ СИСТЕМА ДОПУСКОВ */

.protocol-masthead {
  max-width: 950px;
  margin: 18px 0 22px;
  padding: 18px 20px;
  border: 1px solid rgba(124, 255, 155, 0.42);
  border-left: 4px solid rgba(124, 255, 155, 0.82);
  background:
    linear-gradient(90deg, rgba(124, 255, 155, 0.11), rgba(124, 255, 155, 0.025)),
    rgba(0, 0, 0, 0.28);
  box-shadow: inset 0 0 28px rgba(124, 255, 155, 0.05);
  text-transform: uppercase;
  letter-spacing: 0.7px;
}

.protocol-masthead.compact {
  margin: 12px 0 18px;
  padding: 12px 15px;
  border-left-width: 3px;
}

.protocol-masthead-line {
  color: var(--green-soft);
  font-size: 14px;
  line-height: 1.45;
}

.protocol-masthead-title {
  margin-top: 5px;
  color: var(--green);
  font-size: 18px;
  line-height: 1.45;
  font-weight: 700;
  text-shadow: var(--text-shadow);
}

.protocol-masthead.compact .protocol-masthead-title {
  font-size: 15px;
}

.protocol-masthead-status {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed rgba(124, 255, 155, 0.28);
  color: rgba(184, 255, 202, 0.78);
  font-size: 13px;
  line-height: 1.45;
}

.protocol-contents-title {
  max-width: 950px;
  margin: 10px 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(124, 255, 155, 0.38);
  color: var(--green);
  font-size: 18px;
  letter-spacing: 1.2px;
  font-weight: 700;
}

.protocol-toc {
  max-width: 950px;
  counter-reset: protocol-items;
}

.protocol-toc-button {
  padding-top: 10px;
  padding-bottom: 10px;
  border-bottom: 1px dotted rgba(124, 255, 155, 0.12);
}

.protocol-toc-button:hover,
.protocol-toc-button:focus {
  border-bottom-color: rgba(124, 255, 155, 0.34);
}

.protocol-section-label {
  max-width: 950px;
  margin: 18px 0 6px;
  color: rgba(184, 255, 202, 0.74);
  font-size: 14px;
  letter-spacing: 1px;
}

.protocol-section-content {
  max-width: 950px;
}

.protocol-section-navigation {
  max-width: 950px;
  margin-top: 16px;
  padding-top: 10px;
  border-top: 1px dashed rgba(124, 255, 155, 0.28);
}

.doc-warning-block {
  display: inline-block;
  margin: 12px 0 6px;
  padding: 7px 11px;
  border: 1px solid rgba(255, 109, 109, 0.58);
  background: rgba(255, 109, 109, 0.08);
  color: var(--danger);
  font-weight: 700;
  letter-spacing: 1.1px;
  text-shadow: 0 0 7px rgba(255, 109, 109, 0.35);
}

.doc-summary-line {
  margin: 12px 0 18px;
  padding: 10px 13px;
  border-left: 3px solid rgba(124, 255, 155, 0.76);
  background: rgba(124, 255, 155, 0.075);
  color: #d8ffe0;
  font-weight: 700;
}

.doc-protocol-label {
  margin: 15px 0 4px;
  padding: 7px 10px;
  border: 1px solid rgba(124, 255, 155, 0.28);
  background: rgba(124, 255, 155, 0.065);
  color: var(--green);
  font-weight: 700;
  letter-spacing: 0.6px;
}

.protocol-code-line {
  margin: 4px 0;
  padding: 7px 10px;
  border-left: 2px solid rgba(124, 255, 155, 0.48);
  background: rgba(124, 255, 155, 0.035);
}

.redacted-fragment {
  display: inline-block;
  padding: 0 3px;
  background: rgba(124, 255, 155, 0.78);
  color: transparent;
  text-shadow: none;
  user-select: none;
}

.omega-code {
  color: #e4ffe9;
  font-weight: 700;
  text-shadow: 0 0 8px rgba(124, 255, 155, 0.62);
}

@media (max-width: 720px) {
  .protocol-masthead {
    margin-top: 14px;
    padding: 14px;
  }

  .protocol-masthead-line,
  .protocol-masthead-status {
    font-size: 12px;
  }

  .protocol-masthead-title,
  .protocol-masthead.compact .protocol-masthead-title {
    font-size: 14px;
  }

  .protocol-contents-title {
    font-size: 16px;
  }

  .protocol-toc-button {
    font-size: 16px;
  }

  .protocol-section-navigation .menu-button {
    font-size: 15px;
  }

  .doc-warning-block,
  .doc-summary-line,
  .doc-protocol-label,
  .protocol-code-line {
    width: 100%;
    box-sizing: border-box;
  }
}
