:root{
 --red:#d1003b;
 --burgundy:#7c0d2e;
 --gray:#f1f1f1;
 --text:#383838;
 --muted:#777;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0;background:#fff;color:var(--text);font-family:Arial,Helvetica,sans-serif}
body{min-height:100vh}
.topline{height:5px;width:100%;margin:0;background:#d0003a}
.header{background:#fff;border-bottom:1px solid #ddd}
.head-inner{
 max-width:1000px;margin:auto;min-height:300px;padding:44px 35px 40px;
 display:flex;align-items:center;gap:50px
}
.crest{width:205px;height:205px;object-fit:contain}
.head-text{max-width:600px}
.org-title{font-size:42px;line-height:1.23;font-weight:300;color:#861237;letter-spacing:.2px}
.head-rule{height:2px;background:#ddd;margin:19px 0 18px}
.org-subtitle{font-size:25px;line-height:1.35;color:#6d6d6d}
.sections{
 border:0;display:grid;grid-template-columns:minmax(0,1fr);
 grid-template-rows:repeat(3,136px);gap:0;align-items:stretch
}
.section{
 width:100%;height:100%;min-height:0;margin:0;
 display:flex;flex-direction:column;justify-content:center;align-items:flex-start;
 border:0;box-shadow:none;appearance:none;
 background:#fff;text-align:left;color:#3b3b3b;
 font-size:34px;line-height:1.15;font-weight:400;
 padding:14px max(calc((100% - 1000px)/2),35px);
 cursor:pointer
}
.section.active{color:#d0003a;border-left:5px solid #d0003a;padding-left:max(calc((100% - 1000px)/2 - 5px),30px)}
.section small{display:block;font-size:18px;font-weight:600;line-height:1.2;margin-top:4px}
.page-section{max-width:1000px;margin:auto;padding:38px 35px 70px}
.page-section:not(.active){display:none}
.form{max-width:100%}
.field-label{
 display:block;background:#f1f1f1;font-size:25px;padding:23px 40px;margin:0;
}
.field-label b,.fio-row b{color:#d0003a}
.field{
 width:100%;height:70px;border:1px solid #ccc;border-radius:8px;
 margin:0 0 18px;padding:0 28px;font-size:22px;outline:none
}
.field:focus,.date-field:focus,.select-wrap input:focus{border-color:#aaa}
.date-field{
 width:175px;height:70px;border:1px solid #ccc;border-radius:8px;
 margin:0 0 18px;padding:0 16px;font-size:20px;outline:none;color:#666
}
.certifier-tabs{background:#f1f1f1;margin:0 0 18px}
.cert{
 width:100%;border:0;background:#f1f1f1;color:#333;padding:26px 20px;
 font-size:21px;line-height:1.35;cursor:pointer
}
.cert.active{background:#f36363;color:#fff}
.fio-row{display:grid;grid-template-columns:1fr 1.2fr;align-items:center;gap:20px;font-size:21px;margin:5px 0 40px}
.select-wrap{position:relative}
.select-wrap input{
 width:100%;height:62px;border:1px solid #ccc;border-radius:8px;
 padding:0 20px;font-size:18px;outline:none
}
.suggestions{
 position:absolute;left:0;right:0;top:66px;background:#fff;border:1px solid #ccc;
 border-radius:0 0 7px 7px;box-shadow:0 8px 20px #0001;z-index:20;display:none
}
.suggestions.show{display:block}
.suggestion{padding:14px 18px;cursor:pointer;border-bottom:1px solid #eee;font-size:15px}
.suggestion:last-child{border-bottom:0}
.suggestion:hover{background:#f6f6f6}
.search-modes{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 22px}
.search-modes .mode{
  border:1px solid #ccc;background:#fff;color:#333;border-radius:8px;
  padding:12px 14px;font-size:16px;font-weight:700;cursor:pointer
}
.search-modes .mode.active{background:#d0003a;color:#fff;border-color:#d0003a}
.buttons{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.buttons button{height:70px;border:0;font-size:25px;font-weight:700;cursor:pointer}
.find-btn{background:#d0003a;color:#fff}.clear-btn{background:#ddd;color:#222}
.result{margin-top:25px;border:2px solid #d0003a;padding:25px;background:#fff}
.result.success{border-color:#38a169}.result h3{margin:0 0 15px;font-size:24px}
.result p{margin:7px 0;font-size:16px}.result .status{font-weight:700}
.empty-state{text-align:center;padding:18px 12px 8px}
.empty-mark{font-size:42px;line-height:1;color:#d0003a}
.empty-state h3{font-size:28px;margin:12px 0 8px}
.empty-state p{font-size:18px;line-height:1.45;color:#444;margin:6px auto;max-width:520px}
.new-search,.back-list{
  margin-top:18px;min-height:52px;padding:0 22px;border:0;border-radius:6px;
  background:#d0003a;color:#fff;font-size:16px;font-weight:700;cursor:pointer
}
.back-list{background:#eee;color:#222}
.found-count{margin:0 0 14px;font-size:18px}
.hit-list{display:grid;gap:12px}
.hit{border:1px solid #eee;border-left:4px solid #7c0d2e;padding:16px 16px 12px;background:#fff}
.hit h3{margin:0 0 8px;font-size:22px}
.hit .open-hit{
  margin-top:10px;min-height:46px;padding:0 16px;border:0;border-radius:4px;
  background:#d0003a;color:#fff;font-weight:700;cursor:pointer
}
.result .download{display:inline-block;margin-top:15px;background:#d0003a;color:#fff;text-decoration:none;padding:12px 18px}
.secondary{max-width:1000px}
.secondary h2{font-size:30px;text-transform:uppercase;margin-top:0}
.secondary p{font-size:18px;line-height:1.55;color:#555}
.info-box{background:#f1f1f1;padding:25px;margin-top:25px}
.hidden{display:none!important}
.other-stack{display:grid;grid-template-columns:minmax(0,1fr);gap:8px}
.other-btn{
 box-sizing:border-box;width:100%;height:84px;min-height:84px;margin:0;
 display:flex;align-items:center;justify-content:flex-start;text-align:left;
 padding:12px 22px;background:#fff;color:#3b3b3b;
 border:0;border-left:5px solid #d0003a;border-radius:0;
 font-family:Arial,Helvetica,sans-serif;font-size:20px;font-weight:700;line-height:1.2;
 text-decoration:none;cursor:pointer;appearance:none
}
.other-btn:hover,.other-btn:focus-visible{color:#d0003a;outline:none}
.secondary .other-heading{
 margin:22px 0 10px;font-size:22px;line-height:1.3;font-weight:700;
 text-transform:uppercase;letter-spacing:.03em;color:#333
}
.secondary .other-note{margin:0 0 12px;font-size:16px;line-height:1.5;color:#555}
.secondary .other-note a{color:#7c0d2e}
.other-form h2{margin:0 0 8px;font-size:26px;line-height:1.25;text-transform:uppercase;color:#333}
.other-form .field,.other-form textarea.field{width:100%}
.other-form textarea.field{height:150px;padding:16px 22px;resize:vertical;font-family:Arial,Helvetica,sans-serif;line-height:1.4}
.other-status{min-height:0;margin:0 0 12px;font-size:18px;line-height:1.45;color:#222}
.other-status.error{color:#d0003a}
.other-actions{margin-top:8px}
.other-actions .clear-btn:only-child{grid-column:1 / -1}
.cancel-actions{grid-template-columns:1fr}
.agency-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;align-items:stretch}
.agency-card{
 box-sizing:border-box;width:100%;height:100%;min-height:252px;margin:0;padding:22px 12px 16px;
 display:flex;flex-direction:column;align-items:center;text-align:center;
 background:#fff;color:#1c2b4a;border:1px solid #e7ebf3;border-radius:18px;
 box-shadow:0 8px 22px rgba(28,43,74,.05);
 font-family:Arial,Helvetica,sans-serif;cursor:pointer
}
.agency-card:hover,.agency-card:focus-visible,.agency-card.selected{
 border-color:#b7c6ee;box-shadow:0 0 0 3px rgba(183,198,238,.45);outline:none
}
.agency-card img{width:150px;height:116px;object-fit:contain;margin:0 0 10px}
.agency-card b{display:block;font-size:16px;line-height:1.25;font-weight:700;color:#1c2b4a}
.agency-card span{display:block;min-height:2.7em;margin-top:6px;font-size:12.5px;line-height:1.35;font-weight:400;color:#8e96a8}
.apply-sheet,.doc-sheet{background:#fff;border:1px solid #e6e8ee;border-radius:12px;padding:22px 22px 18px}
.apply-head,.doc-head{display:flex;align-items:center;gap:14px;margin:0 0 22px}
.apply-head img,.doc-head img{width:54px;height:54px;object-fit:contain;flex:0 0 auto}
.apply-kicker{font-size:12px;line-height:1.35;font-weight:700;letter-spacing:.02em;text-transform:uppercase;color:#1d2a44}
.apply-sheet h2{margin:4px 0 0;font-size:28px;line-height:1.2;text-transform:none;color:#1d2a44}
.apply-label{display:block;margin:0 0 8px;font-size:15px;font-weight:700;color:#1d2a44}
.apply-label b{color:#d0003a}
.apply-input{
 width:100%;height:48px;margin:0 0 16px;padding:0 14px;
 border:1px solid #d9dde6;border-radius:10px;background:#fff;
 font-family:Arial,Helvetica,sans-serif;font-size:16px;color:#222
}
.apply-row{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.apply-consent{
 display:flex;gap:12px;align-items:flex-start;margin:4px 0 16px;padding:14px;
 background:#f7f8fb;border:1px solid #e6eaf2;border-radius:12px;cursor:pointer
}
.apply-consent input{width:18px;height:18px;margin:2px 0 0;flex:0 0 auto;accent-color:#d0003a}
.apply-consent b{display:block;font-size:15px;color:#1d2a44}
.apply-consent small{display:block;margin-top:4px;font-size:13px;line-height:1.45;color:#667085}
.apply-actions{display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin-top:8px}
.apply-actions button{
 box-sizing:border-box;height:52px;min-height:52px;padding:0 22px;border-radius:10px;
 font-family:Arial,Helvetica,sans-serif;font-size:16px;font-weight:700;cursor:pointer
}
.apply-actions .find-btn{border:0}
.apply-secondary{background:#fff;color:#24324a;border:1px solid #d5d8e0}
.preview-note{margin:0 0 12px;padding:14px 16px;background:#f7f8fb;border:1px solid #e6eaf2;border-radius:12px}
.preview-note b{display:block;margin:0 0 4px;font-size:16px;color:#1d2a44}
.preview-note p{margin:0;font-size:14px;line-height:1.45;color:#667085}
.doc-kicker{font-size:15px;font-weight:700;color:#1d2a44}
.doc-name{font-size:18px;font-weight:700;color:#1d2a44}
.doc-date{margin-top:4px;font-size:14px;color:#667085}
.doc-rule{height:2px;margin:0 0 18px;border:0;background:#d0003a}
.doc-sheet h3{margin:0 0 18px;text-align:center;font-size:22px;letter-spacing:.08em;font-weight:700;color:#1d2a44}
.doc-text p{margin:0 0 14px;font-size:15px;line-height:1.55;color:#24324a}
.doc-person{margin:8px 0 28px;padding:14px 16px;background:#f7f8fb;border-left:4px solid #d0003a}
.doc-person b{display:block;margin:0 0 8px}
.doc-person p{margin:4px 0;font-size:15px}
.doc-sign{display:grid;grid-template-columns:1fr 1fr;gap:28px;margin-top:28px}
.sign-line{display:block;height:1px;margin:28px 0 8px;background:#24324a}
.doc-sign b{display:block;font-size:15px}
.doc-sign small{display:block;margin-top:2px;color:#667085;font-size:13px}
@media(max-width:700px){
 .other-btn{height:96px;min-height:96px;padding:10px 16px;font-size:16px}
 .secondary .other-heading{font-size:18px;margin-top:18px}
 .secondary .other-note{font-size:15px}
 .other-form h2{font-size:20px}
 .other-actions{grid-template-columns:1fr}
 .agency-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .apply-sheet h2{font-size:24px}
}
@media(max-width:560px){
 .agency-grid{grid-template-columns:1fr}
 .apply-row,.doc-sign{grid-template-columns:1fr}
 .apply-actions{flex-direction:column;align-items:stretch}
 .apply-actions button{width:100%}
 .apply-sheet,.doc-sheet{padding:16px}
}
footer{padding:30px;text-align:center;border-top:1px solid #eee}
footer a{color:#777;text-decoration:none;font-size:13px}
#cancel.page-section{max-width:1180px;overflow-x:hidden}
.registry-page{overflow-x:hidden}
.registry-page .head-inner{min-height:0;padding:28px 28px 22px;gap:28px}
.registry-page .crest{width:132px;height:132px}
.registry-page .org-title{font-size:32px}
.registry-page .org-subtitle{font-size:20px}
.registry{max-width:1180px;margin:0 auto;padding:18px 16px 64px}
.registry-title{margin:6px 0 26px;text-align:center;color:#861237;font-size:34px;font-weight:500;letter-spacing:.06em}
.block{margin:0 0 42px}
.block h2{margin:0 0 14px;text-align:center;font-size:22px;line-height:1.35;font-weight:600;color:#333}
.sheet{width:100%;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch;border:1px solid #bdbdbd;background:#fff}
.sheet table{border-collapse:collapse;width:max-content;min-width:100%;background:#fff}
.sheet th,.sheet td{
  border:1px solid #cfcfcf;height:42px;padding:0 12px;font-size:13px;line-height:1.2;
  text-align:left;vertical-align:middle;white-space:nowrap
}
.sheet th:nth-child(1),.sheet td:nth-child(1){min-width:132px}
.sheet th:nth-child(2),.sheet td:nth-child(2){min-width:176px}
.sheet th:nth-child(3),.sheet td:nth-child(3){min-width:240px}
.sheet th:nth-child(4),.sheet td:nth-child(4){min-width:340px}
.sheet th.full-date,.sheet td.full-date{font-variant-numeric:tabular-nums}
.sheet th{background:#f3f3f3;font-weight:700;color:#222;position:sticky;top:0}
.sheet th:first-child,.sheet td:first-child{position:sticky;left:0;z-index:1;background:#fff}
.sheet th:first-child{z-index:2;background:#f3f3f3}
.sheet tbody tr:nth-child(even) td{background:#f7f7f7}
.sheet tbody tr:nth-child(even) td:first-child{background:#f7f7f7}
.doc-cell{white-space:nowrap}
.doc-status{display:block;margin-bottom:4px}
.cell-link{color:#7c0d2e;font-weight:700;background:none;border:0;padding:0;cursor:pointer;text-decoration:underline;font-size:13px}
.pager{display:flex;flex-wrap:wrap;gap:10px 16px;align-items:center;justify-content:space-between;margin-top:10px;color:#555;font-size:14px}
.page-btns{display:flex;flex-wrap:wrap;gap:6px}
.page-btn{min-width:36px;height:34px;border:1px solid #ccc;background:#fff;border-radius:4px;cursor:pointer;font-weight:700}
.page-btn.active{background:#7c0d2e;color:#fff;border-color:#7c0d2e}
.page-gap{padding:0 4px;color:#888}
@media(max-width:700px){
 .registry-page .head-inner{padding:22px 16px 16px}
 .registry-page .crest{width:92px;height:92px}
 .registry-page .org-title{font-size:22px}
 .registry-page .org-subtitle{font-size:16px}
 .registry{padding:12px 10px 40px}
 .registry-title{font-size:24px;margin-bottom:16px}
 .block h2{font-size:18px}
 #cancel.page-section{padding-left:12px;padding-right:12px}
}
.doc-block{margin-top:18px;padding-top:14px;border-top:1px solid #eee}
.doc-block h4{margin:0 0 12px;font-size:16px;letter-spacing:.04em}
.doc-preview{display:block;width:min(100%,420px);height:auto;border:1px solid #ddd;background:#f7f7f7}
.doc-file{margin:10px 0 0;font-size:14px;color:#555}
.doc-actions{display:flex;flex-wrap:nowrap;align-items:stretch;gap:8px;margin-top:12px}
.doc-actions button,
.doc-actions a,
.result .doc-actions a.download{
 box-sizing:border-box;height:48px;min-height:48px;margin:0;flex:0 0 auto;
 display:inline-flex;align-items:center;justify-content:center;
 padding:0 16px;background:#d0003a;color:#fff;text-decoration:none;
 font-family:Arial,Helvetica,sans-serif;font-weight:700;font-size:15px;line-height:1;
 border:1px solid #d0003a;cursor:pointer;border-radius:4px;white-space:nowrap
}
.doc-actions .ghost,
.result .doc-actions a.ghost{background:#fff;color:#7c0d2e;border-color:#7c0d2e}
.doc-missing{color:#777;font-size:16px;margin:8px 0 0}
body.viewer-open{overflow:hidden}
.viewer{
 position:fixed;inset:0;z-index:50;background:#1c1c1c;
 display:flex;flex-direction:column;width:100%;height:100%;height:100dvh;
 padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)
}
.viewer-bar{
 display:flex;flex-wrap:wrap;gap:8px;align-items:center;
 padding:10px 12px;background:#7c0d2e;position:sticky;top:0;z-index:2
}
.viewer-bar button{
 min-height:44px;min-width:44px;padding:8px 12px;background:#fff;color:#7c0d2e;
 border:0;border-radius:6px;font-weight:700;font-size:16px;cursor:pointer
}
.page-label{color:#fff;font-weight:700;min-width:52px;text-align:center}
.viewer-stage{
 flex:1 1 auto;min-height:0;overflow:auto;-webkit-overflow-scrolling:touch;
 padding:16px 12px 28px;touch-action:pan-x pan-y;overscroll-behavior:contain
}
.viewer-pages{display:flex;flex-direction:column;gap:12px;align-items:center;min-height:100%}
.viewer-slot{background:#fff;box-shadow:0 2px 16px #0006;max-width:none}
.viewer-pages canvas{background:#fff;display:block}
.viewer-status{color:#fff;font-size:16px;margin:24px}
.viewer.is-fallback-full{position:fixed;inset:0;width:100%;height:100dvh}

@media(max-width:700px){
 .topline{height:5px}
 .head-inner{min-height:0;padding:38px 38px 55px;gap:30px}
 .crest{width:185px;height:185px}
 .org-title{font-size:30px;line-height:1.25}
 .org-subtitle{font-size:20px}
 .head-rule{margin:12px 0}
 .sections{grid-template-rows:repeat(3,108px)}
 .section{font-size:25px;padding:12px 40px;height:100%;min-height:0}
 .section.active{padding-left:35px}
 .section small{font-size:14px;margin-top:4px}
 .page-section{padding:35px 40px 55px}
 .field-label{font-size:18px;padding:21px 40px}
 .field{height:60px;font-size:17px;padding:0 18px;margin-bottom:14px}
 .date-field{height:60px;font-size:17px;width:130px;margin-bottom:14px}
 .cert{font-size:16px;padding:23px 14px}
 .fio-row{grid-template-columns:1fr;gap:10px;font-size:17px;margin-bottom:30px}
 .select-wrap input{height:58px;font-size:16px}
 .search-modes .mode{flex:1 1 calc(50% - 8px);font-size:15px}
 .buttons button{height:60px;font-size:18px}
 .empty-state h3{font-size:24px}
 .empty-state p{font-size:16px}
 .doc-actions{flex-direction:column;align-items:stretch}
 .doc-actions button,.doc-actions a,.result .doc-actions a.download{
  width:100%;max-width:none;flex:0 0 auto;height:48px;margin:0;
  padding:0 16px;font-size:15px;border-radius:4px
 }
 .viewer-bar button{flex:1 1 auto;font-size:14px}
 .doc-preview{width:100%}
}
@media(max-width:500px){
 .head-inner{padding:36px 38px 48px;gap:26px}
 .crest{width:145px;height:145px}
 .org-title{font-size:24px}
 .org-subtitle{font-size:16px}
 .sections{grid-template-rows:repeat(3,108px)}
 .section{font-size:20px;padding:12px 40px;height:100%;min-height:0}
 .section.active{padding-left:35px}
 .section small{font-size:12px;margin-top:4px}
 .page-section{padding-left:40px;padding-right:40px}
}
