<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>ARS Dossier Viewer</title>
<style>
:root{
  --bg:#eef3f8;
  --panel:#ffffff;
  --line:#d7e0ec;
  --line-strong:#b9c7d9;
  --text:#1f2b3a;
  --muted:#6b7b90;
  --brand:#234b87;
  --brand-dark:#183863;
  --hover:#eef5ff;
  --selected:#dce9ff;
  --green-bg:#7fe08f;
  --green-bd:#1f9f45;
  --red-bg:#ff9f96;
  --red-bd:#d33b2f;
  --inactive:#e9edf3;
  --inactive-bd:#8a96a8;
  --shadow:0 8px 24px rgba(27,55,99,.08);
  --radius:12px;
  --topbar:68px;
  --font:"Segoe UI", Arial, sans-serif;
}
*{box-sizing:border-box}
html,body{height:100%;margin:0;font-family:var(--font);background:var(--bg);color:var(--text);overflow:hidden}
body{display:block}
button,input,select{font:inherit}
a{color:inherit}
#leftPane{display:none}
#appTopBar{
  height:var(--topbar);display:flex;flex-direction:column;justify-content:center;gap:5px;padding:6px 10px;
  background:linear-gradient(180deg,var(--brand),var(--brand-dark));color:#fff;box-shadow:0 2px 10px rgba(13,31,63,.18)
}
.topbar-title{display:flex;align-items:center;gap:8px;min-width:0;max-width:none;flex:1 1 auto}
.topbar-badge{width:26px;height:26px;border-radius:7px;background:rgba(255,255,255,.14);display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:700;flex:0 0 auto}
.topbar-text{min-width:0}
.topbar-eyebrow{display:none;font-size:11px;opacity:.78;text-transform:uppercase;letter-spacing:.08em}
.topbar-project{font-size:13px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.topbar-controls{display:flex;flex-direction:column;gap:7px;min-width:0;flex:1 1 auto;justify-content:center}
.topbar-row{display:flex;align-items:center;gap:6px;min-width:0;width:100%;justify-content:flex-start}
.topbar-row-main{justify-content:space-between}
.topbar-row-secondary{justify-content:flex-start}
.topbar-actions-right{display:flex;align-items:center;justify-content:flex-end;gap:6px;min-width:0;flex:0 1 auto}
#globalSearchInput{width:min(360px,28vw);height:26px;border:1px solid rgba(255,255,255,.24);border-radius:6px;background:rgba(255,255,255,.12);color:#fff;padding:0 9px;outline:none;font-size:12px}
#globalSearchInput::placeholder{color:rgba(255,255,255,.8)}
.app-btn,.lang-btn,.app-select{height:26px;border-radius:6px;border:1px solid rgba(255,255,255,.22);background:rgba(255,255,255,.12);color:#fff;padding:0 8px;cursor:pointer;white-space:nowrap;font-size:12px}
.app-select{width:min(260px,24vw);min-width:170px;color:#17345c;background:#fff}
.app-btn:hover,.lang-btn:hover{background:rgba(255,255,255,.18)}
.lang-btn.active{background:#fff;color:var(--brand-dark);font-weight:700}
#appWorkspace{
  height:calc(100vh - var(--topbar));
  display:flex;
  align-items:stretch;padding:12px;gap:0;min-width:0;
}
.pane{min-width:0;min-height:0;display:flex;flex-direction:column;border:1px solid var(--line);border-radius:var(--radius);background:var(--panel);box-shadow:var(--shadow);overflow:hidden}
.pane.pane-hidden{display:none}
.resizer{flex:0 0 6px;cursor:col-resize;position:relative;background:transparent}
.resizer.resizer-hidden{display:none}
.resizer::before{content:"";position:absolute;left:2px;top:14px;bottom:14px;width:2px;border-radius:2px;background:#c4cfde}
.resizer:hover::before,.resizer.is-active::before{background:#7e98c5}
.panel-header{padding:7px 12px;border-bottom:1px solid var(--line);background:linear-gradient(180deg,#f9fbff,#eef4fb);display:flex;align-items:center;justify-content:space-between;gap:12px}
.panel-head-text{min-width:0}
.panel-title{font-size:13px;font-weight:700;color:var(--brand-dark)}
.panel-subtitle{font-size:11px;color:var(--muted);margin-top:1px}
.panel-tools{display:flex;align-items:center;justify-content:flex-end;gap:5px;position:relative;flex-wrap:wrap;min-width:0;max-width:58%}
.panel-tool-btn{min-height:24px;border:1px solid var(--line);background:#fff;border-radius:6px;padding:3px 7px;cursor:pointer;color:var(--brand-dark);font-size:11px;line-height:1.05;white-space:normal;overflow-wrap:anywhere;text-align:center}
.panel-tool-btn:hover{background:#f5f8fd}
.panel-body{min-height:0;flex:1 1 auto;overflow:auto;background:#fff}
#treeBody{padding:2px 0}
#contentBody{padding:0;overflow:auto}
#contentTableWrap{overflow:auto;height:100%}
#treeRootView,#treeRootView ul{list-style:none;margin:0;padding:0}
#treeRootView ul{padding-left:14px}
#treeRootView li{margin:0}
.tree-row{display:flex;align-items:center;gap:5px;height:22px;padding:0 8px 0 6px;cursor:pointer;user-select:none;min-width:0}
.tree-row:hover{background:var(--hover)}
.tree-row.selected{background:var(--selected)}
.tree-row.file-context{background:#fff4c7;box-shadow:inset 4px 0 0 #d79a00}
.tree-row.file-context .tree-label{font-weight:700;color:#7b5300}
.tree-row.related-next{background:var(--green-bg)}
.tree-row.related-next .tree-label{color:#0f5b25;font-weight:700}
.tree-row.related-prev{background:var(--red-bg)}
.tree-row.related-prev .tree-label{color:#7b1d16;font-weight:700}
.tree-row.related-next.related-prev{background:linear-gradient(90deg,var(--green-bg) 0 50%, var(--red-bg) 50% 100%)}
.tree-caret{width:12px;height:20px;display:inline-flex;align-items:center;justify-content:center;color:#5c6f8f;font-size:10px;flex:0 0 12px;cursor:pointer}
.tree-caret.placeholder{color:transparent;cursor:default}
.tree-icon,.file-icon{width:16px;height:16px;object-fit:contain;flex:0 0 16px}
.tree-label{min-width:0;flex:1 1 auto;font-size:12px;line-height:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tree-seq{flex:0 0 auto;max-width:92px;font-size:10px;line-height:1;color:#49637f;background:#eef4fb;border:1px solid #d4deeb;border-radius:999px;padding:2px 5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tree-open-link{width:18px;height:18px;display:inline-flex;align-items:center;justify-content:center;flex:0 0 18px;border:1px solid #d4deeb;border-radius:5px;background:#fff;color:var(--brand-dark);font-size:12px;text-decoration:none}
.tree-open-link:hover{background:#edf5ff}
.tree-file .tree-row{height:20px}
.tree-file .tree-label{font-size:11px}
.tree-folder>ul{display:none}
.tree-folder.expanded>ul{display:block}
.tree-folder.match-branch>ul{display:block}
#contentTable{width:max-content;min-width:100%;border-collapse:collapse;table-layout:fixed;font-size:12px}
#contentTable th,#contentTable td{border-bottom:1px solid #e5ebf3;padding:4px 8px;text-align:left;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#contentTable th{position:sticky;top:0;z-index:2;background:#f5f8fd;color:var(--brand-dark);font-weight:700}
#contentTable th .th-inner{display:flex;align-items:center;justify-content:space-between;gap:8px;position:relative}
#contentTable th .th-label{overflow:hidden;text-overflow:ellipsis}
#contentTable th .sort-mark{color:#7b8ba3;font-size:10px;flex:0 0 auto}
#contentTable th .col-resize{position:absolute;right:-4px;top:-4px;bottom:-4px;width:8px;cursor:col-resize}
#contentTable tbody tr{cursor:pointer}
#contentTable tbody tr:hover{background:var(--hover)}
#contentTable tbody tr.selected{background:var(--selected)!important}
#contentTable tbody tr.related-next{background:var(--green-bg)}
#contentTable tbody tr.related-next td:first-child{box-shadow:inset 4px 0 0 var(--green-bd)}
#contentTable tbody tr.related-prev{background:var(--red-bg)}
#contentTable tbody tr.related-prev td:first-child{box-shadow:inset 4px 0 0 var(--red-bd)}
#contentTable tbody tr.inactive-row{background:var(--inactive)}
#contentTable tbody tr.inactive-row td:first-child{box-shadow:inset 4px 0 0 var(--inactive-bd)}
#contentTable tbody tr.related-next.related-prev{background:linear-gradient(90deg,var(--green-bg) 0 50%, var(--red-bg) 50% 100%)}
#contentTable tbody tr.related-next.inactive-row{background:var(--green-bg)!important}
#contentTable tbody tr.related-prev.inactive-row{background:var(--red-bg)!important}
#contentTable tbody tr.related-next.related-prev.inactive-row{background:linear-gradient(90deg,var(--green-bg) 0 50%, var(--red-bg) 50% 100%)!important}
#contentTable tbody tr.selected.inactive-row{background:#dce4ef!important}
#contentTable td.name{font-weight:600;max-width:420px}
.file-name-cell{display:flex;align-items:center;gap:6px;min-width:0}
.file-name-cell span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#contentTable td.doccode,#contentTable td.seq,#contentTable td.exseq,#contentTable td.size{font-variant-numeric:tabular-nums}
#contentEmpty{padding:18px;color:var(--muted);font-size:12px}
#viewerFrameWrap{position:relative;min-height:0;flex:1 1 auto;background:#f7f9fc}
#viewerEmptyState{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:20px;text-align:center;color:var(--muted);font-size:13px}
#pdfViewer{width:100%;height:100%;border:none;background:#fff;position:relative;z-index:1}
#pdfViewer.hidden{visibility:hidden}
#sequenceModal.hidden,#infoPopup.hidden{display:none}
#sequenceModal{position:fixed;inset:0;background:rgba(21,34,57,.32);z-index:3000;display:flex;align-items:center;justify-content:center;padding:28px}
.modal-card{width:min(1180px,92vw);height:min(82vh,760px);min-width:min(640px,92vw);min-height:min(360px,82vh);max-width:calc(100vw - 32px);max-height:calc(100vh - 32px);resize:both;background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:0 16px 40px rgba(0,0,0,.22);display:flex;flex-direction:column;overflow:hidden}
.modal-header{padding:10px 14px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:10px;background:#f7faff}
.modal-title{font-size:14px;font-weight:700;color:var(--brand-dark)}
.modal-actions{display:flex;gap:8px;align-items:center;position:relative;flex-wrap:wrap;justify-content:flex-end}
.modal-body{min-height:0;flex:1 1 auto;overflow:auto;padding:12px}
#sequenceTableHost table{width:max-content;min-width:100%;border-collapse:collapse;font-size:12px;table-layout:fixed}
#sequenceTableHost caption{caption-side:top;text-align:left;padding-bottom:8px;font-weight:700;color:var(--brand-dark)}
#sequenceTableHost th,#sequenceTableHost td{border:1px solid #dce5f2;padding:6px 8px;text-align:left;vertical-align:top;white-space:pre-wrap;overflow-wrap:anywhere}
#sequenceTableHost th{position:sticky;top:0;background:#eff5ff;z-index:1}
#sequenceTableHost th .th-inner{display:flex;align-items:center;justify-content:space-between;gap:8px;position:relative;min-width:0}
#sequenceTableHost th .th-label{min-width:0;overflow:hidden;text-overflow:ellipsis}
#sequenceTableHost th .sort-mark{color:#7b8ba3;font-size:10px;flex:0 0 auto}
#sequenceTableHost th .col-resize{position:absolute;right:-4px;top:-6px;bottom:-6px;width:8px;cursor:col-resize}
#sequenceTableHost table.sequence-compact th,#sequenceTableHost table.sequence-compact td{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#sequenceTableHost tr.selected{background:var(--selected)}
#infoPopup{position:fixed;right:24px;top:74px;width:min(560px,46vw);max-height:calc(100vh - 96px);overflow:auto;background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:0 18px 44px rgba(0,0,0,.22);z-index:3200}
#popupHeader{padding:10px 14px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:10px;background:#f7faff}
#popupTitle{font-size:14px;font-weight:700;color:var(--brand-dark)}
.popup-close-btn{height:32px;border-radius:10px;border:1px solid var(--line);background:#fff;padding:0 10px;cursor:pointer}
#popupContent{padding:12px}
.popup-empty{padding:10px;color:var(--muted);font-size:12px}
.info-popup-table{width:100%;border-collapse:collapse;font-size:12px}
.info-popup-table th,.info-popup-table td{border:1px solid #dde6f1;padding:6px 8px;text-align:left;vertical-align:top}
.info-popup-table th{background:#f3f7fd}

.column-menu{position:absolute;top:34px;right:0;min-width:240px;max-height:340px;overflow:auto;background:#fff;border:1px solid var(--line);border-radius:10px;box-shadow:0 12px 28px rgba(0,0,0,.18);padding:8px;z-index:40}
.column-menu.hidden{display:none}
.column-menu-title{font-size:12px;font-weight:700;color:var(--brand-dark);padding:4px 6px 8px}
.column-option{display:flex;align-items:center;gap:8px;padding:4px 6px;border-radius:8px;font-size:12px;cursor:pointer}
.column-option:hover{background:#f5f8fd}
.column-option input{margin:0}
#contentPane .panel-header{padding-bottom:4px}
#contentBody{display:flex;flex-direction:column}
#contentTableWrap{flex:1 1 auto;min-height:0}
#contentTable th.dragging{opacity:.45}
#contentTable th.drag-over{outline:2px solid #7e98c5;outline-offset:-2px}

.hidden-source{display:none!important}
@media (max-width:1280px){
  .app-select{width:min(240px,24vw)}
  #globalSearchInput{width:min(300px,28vw)}
  .app-btn,.lang-btn,.app-select{font-size:11px;padding:0 6px}
  .topbar-actions-right{gap:4px}
}
</style>
</head>
<body>
<!-- Embedded dossier data and viewer script follow. -->
