
*{box-sizing:border-box}
:root{--bg:#f5f7fa;--card:#fff;--text:#18202a;--muted:#657180;--line:#dfe5eb;--blue:#245bd7;--blue2:#1747b5;--soft:#eef4ff;--warn:#fff7dc}
body{margin:0;background:var(--bg);color:var(--text);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif}
.ad{width:100%;min-height:1px;background:#fff}
.wrap{max-width:820px;margin:0 auto;padding:30px 18px 50px}
header{margin:10px 0 24px}
.brand{font-size:13px;font-weight:800;letter-spacing:.12em;color:var(--blue);margin-bottom:12px}
h1{font-size:36px;line-height:1.08;margin:0 0 12px}
.lead{font-size:18px;line-height:1.5;color:var(--muted);margin:0;max-width:680px}
.card{background:var(--card);border:1px solid var(--line);box-shadow:0 8px 28px rgba(25,40,65,.06)}
.progress{height:5px;background:#edf0f4}
.progress span{display:block;height:100%;width:0;background:var(--blue);transition:width .2s}
#content{padding:30px}
.step{font-size:13px;color:var(--muted);font-weight:700;margin-bottom:10px}
.question{font-size:25px;font-weight:800;line-height:1.25;margin:0 0 8px}
.help{font-size:15px;color:var(--muted);line-height:1.45;margin:0 0 22px}
.options{display:grid;gap:10px}
.option{width:100%;text-align:left;border:1px solid var(--line);background:#fff;padding:16px 18px;cursor:pointer;font:inherit;color:var(--text);font-weight:700;font-size:16px}
.option:hover{border-color:var(--blue);background:var(--soft)}
.option small{display:block;color:var(--muted);font-weight:400;margin-top:5px;line-height:1.4}
.back,.restart{border:0;background:transparent;color:var(--blue);font:inherit;font-weight:700;cursor:pointer;padding:16px 0 0}
.result-badge{display:inline-block;background:var(--soft);color:var(--blue2);padding:7px 10px;font-size:13px;font-weight:800;margin-bottom:14px}
.result-title{font-size:28px;line-height:1.2;margin:0 0 8px}
.result-summary{color:var(--muted);font-size:16px;line-height:1.5;margin:0 0 25px}
.flow{display:flex;align-items:center;gap:8px;overflow:auto;padding:14px 0 24px}
.flow span{border:1px solid var(--line);padding:10px 12px;background:#fff;white-space:nowrap;font-weight:700}
.flow i{font-style:normal;color:var(--muted)}
.actions{margin:0;padding:0;list-style:none;counter-reset:item}
.actions li{position:relative;padding:0 0 20px 46px;line-height:1.45}
.actions li:before{counter-increment:item;content:counter(item);position:absolute;left:0;top:0;width:30px;height:30px;background:var(--blue);color:#fff;display:grid;place-items:center;font-weight:800}
.actions b{display:block;margin-bottom:3px}
.info{background:#f7f9fb;border-left:4px solid var(--blue);padding:15px 16px;margin:8px 0 18px;line-height:1.5}
.warn{background:var(--warn);border-left-color:#e0a900}
details{border-top:1px solid var(--line);padding:16px 0}
summary{cursor:pointer;font-weight:800}
details p{color:var(--muted);line-height:1.5}
details a,footer a{color:var(--blue)}
.note{font-size:13px;color:var(--muted);line-height:1.5;margin:18px 4px}
footer{font-size:12px;color:#7a8490;border-top:1px solid var(--line);padding-top:18px}
@media(max-width:600px){
 .wrap{padding:20px 12px 35px}
 h1{font-size:29px}
 .lead{font-size:16px}
 #content{padding:22px 17px}
 .question{font-size:22px}
 .option{padding:15px}
 .flow{font-size:13px}
}

.promise{display:flex;flex-wrap:wrap;gap:8px;margin-top:18px}.promise span{font-size:13px;font-weight:700;border:1px solid var(--line);background:#fff;padding:8px 10px}
.route-card{background:#fff;border:1px solid var(--line);padding:18px 20px;margin-bottom:14px}.route-title{font-size:12px;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);font-weight:800;margin-bottom:12px}.route{display:flex;align-items:center;gap:9px;overflow:auto}.route i{font-style:normal;color:#9aa5b1}.route-node{display:flex;align-items:center;gap:8px;white-space:nowrap;color:#8a949f;font-size:13px;font-weight:700}.route-node b{width:25px;height:25px;border:1px solid var(--line);display:grid;place-items:center}.route-node.active{color:var(--text)}.route-node.active b,.route-node.done b{background:var(--blue);border-color:var(--blue);color:#fff}.route-node.done{color:var(--blue)}
.modal{position:fixed;inset:0;background:rgba(15,23,34,.58);display:none;align-items:center;justify-content:center;padding:18px;z-index:9999}.modal.show{display:flex}.modal-box{width:min(470px,100%);background:#fff;border:1px solid var(--line);padding:28px;box-shadow:0 24px 80px rgba(0,0,0,.22)}.modal-icon{width:44px;height:44px;background:var(--blue);color:#fff;display:grid;place-items:center;font-weight:900;margin-bottom:17px}.modal-box h2{margin:0 0 10px;font-size:24px}.modal-box p{color:var(--muted);line-height:1.5;margin:0 0 20px}.modal-actions{display:grid;gap:9px}.modal-actions button{font:inherit;font-weight:800;padding:13px 15px;cursor:pointer}.primary{border:1px solid var(--blue);background:var(--blue);color:#fff}.secondary{border:1px solid var(--line);background:#fff;color:var(--text)}.modal-box small{display:block;color:#89939e;line-height:1.4;margin-top:15px}
.answer-summary{display:flex;flex-wrap:wrap;gap:7px;margin:0 0 18px}.answer-chip{font-size:12px;background:#f3f6f9;border:1px solid var(--line);padding:6px 8px;color:#586474}
.result-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:18px 0 24px}.result-box{border:1px solid var(--line);padding:15px}.result-box small{display:block;color:var(--muted);font-weight:700;margin-bottom:5px}.result-box b{font-size:16px}
@media(max-width:600px){.route-card{padding:14px}.route-node span{display:none}.route-node:last-child span{display:inline}.result-grid{grid-template-columns:1fr}.modal-box{padding:22px}}

.ad-shell{position:sticky;top:0;z-index:9000;height:120px;max-height:120px;background:#fff;border-bottom:1px solid #dfe5eb;overflow:hidden}
.ad{height:120px!important;max-height:120px!important;overflow:hidden!important;display:flex;align-items:center;justify-content:center}
.ad>div,.ad iframe{max-height:120px!important;height:120px!important;overflow:hidden!important}
.roles,.docs{display:grid;gap:9px;margin:14px 0 24px}.role,.doc{border:1px solid var(--line);padding:13px 14px;background:#fff}.role b,.doc b{display:block;margin-bottom:4px}.role span,.doc span{font-size:13px;color:var(--muted);line-height:1.4}
.doc{border-left:4px solid var(--blue)}
@media(max-width:600px){.ad-shell,.ad,.ad>div,.ad iframe{height:90px!important;max-height:90px!important}}

/* v0.4 */
.ad-shell{position:sticky!important;top:0!important;z-index:9999!important;height:120px!important;max-height:120px!important;min-height:0!important;overflow:hidden!important;background:#fff}
.ad-shell .ad,.ad-shell #yandex_rtb_R-A-19791630-2{height:120px!important;max-height:120px!important;min-height:0!important;overflow:hidden!important}
.ad-shell iframe{height:120px!important;max-height:120px!important;min-height:0!important}
.exact-guide{margin:22px 0}.exact-guide h3{margin-bottom:12px}
.guide-step{border:1px solid var(--line);background:#fff;padding:15px 16px;margin:0 0 10px}
.guide-step .where{font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.05em;color:var(--blue);margin-bottom:5px}
.guide-step b{display:block;margin-bottom:7px}.guide-step p{margin:4px 0;color:var(--muted);line-height:1.45}
.guide-step code{font-family:inherit;background:#f3f6fa;padding:2px 5px}
.wait-box{border:1px solid var(--line);background:#f7f9fb;padding:14px 16px;margin:16px 0}.wait-box b{display:block;margin-bottom:6px}
@media(max-width:600px){.ad-shell,.ad-shell .ad,.ad-shell #yandex_rtb_R-A-19791630-2,.ad-shell iframe{height:90px!important;max-height:90px!important}}

/* v0.5 document previews */
.doc-preview-bar,.draft-note{border:1px solid var(--line);background:#fff;padding:15px 16px;margin:18px 0}
.doc-preview-bar>b,.draft-note>b{display:block;margin-bottom:10px}
.doc-preview-buttons{display:flex;flex-wrap:wrap;gap:8px}
.doc-preview-buttons button{border:1px solid var(--line);background:#f7f9fb;padding:9px 12px;font-weight:700;cursor:pointer}
.doc-preview-buttons button:hover{border-color:var(--blue);color:var(--blue)}
.draft-note{border-left:4px solid var(--blue)}.draft-note p{color:var(--muted);line-height:1.5;margin:7px 0}
.doc-modal{position:fixed;inset:0;background:rgba(18,27,39,.62);z-index:20000;display:none;align-items:center;justify-content:center;padding:20px}
.doc-modal.show{display:flex}.doc-modal-card{position:relative;background:#fff;width:min(820px,100%);max-height:88vh;overflow:auto;border:1px solid #cfd7e2;box-shadow:0 18px 60px rgba(0,0,0,.25)}
.doc-modal-body{padding:28px}.doc-modal-close{position:sticky;float:right;top:10px;margin:10px 10px 0 0;width:38px;height:38px;border:1px solid var(--line);background:#fff;font-size:25px;cursor:pointer;z-index:2}
.form-section{border-top:1px solid var(--line);padding:15px 0}.form-section h4{margin:0 0 10px}
.fake-field{margin:0 0 10px}.fake-field label{display:block;font-size:12px;font-weight:800;margin-bottom:5px;color:#4d5a6b}.fake-input{border:1px solid #cfd7e2;background:#fafbfd;padding:10px 12px;color:#8a94a3;min-height:38px}
@media(max-width:600px){.doc-modal{padding:8px}.doc-modal-body{padding:20px 14px}.doc-preview-buttons{display:grid}.doc-preview-buttons button{width:100%;text-align:left}}

/* v0.6 SEO + printable examples */
.seo-help{max-width:960px;margin:42px auto 20px;padding:0 20px}.seo-help>h2{font-size:24px;margin-bottom:16px}
.seo-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.seo-grid article{border:1px solid var(--line);background:#fff;padding:16px}.seo-grid h3{margin:0 0 6px;font-size:16px}.seo-grid p{margin:0;color:var(--muted);line-height:1.5;font-size:14px}
.print-card{width:min(900px,100%)!important}.paper{background:#fff;color:#15191f;padding:12px}.paper-head{display:flex;justify-content:space-between;gap:24px;border-bottom:3px solid #111;padding-bottom:14px;margin-bottom:10px}.paper-head small{font-weight:800;letter-spacing:.08em}.paper-head h2{margin:5px 0 0;font-size:21px}.paper-status{max-width:280px;font-size:12px;font-weight:700;text-align:right}
.paper-note{font-size:12px;background:#f3f5f7;padding:10px;margin:12px 0}.paper-table{width:100%;border-collapse:collapse;font-size:13px}.paper-table th,.paper-table td{border:1px solid #9ba3ad;padding:9px 10px;vertical-align:top}.paper-table th{width:38%;text-align:left;background:#f5f6f7;font-weight:700}.paper-footer{margin-top:14px;border:2px solid #111;padding:12px;line-height:1.45}.paper-footer b{display:block;margin-bottom:4px}
@media(max-width:650px){.seo-grid{grid-template-columns:1fr}.paper{padding:0}.paper-head{display:block}.paper-status{text-align:left;margin-top:8px}.paper-table th{width:42%}}

.needed-docs{margin:18px 0;border-top:1px solid var(--line);padding-top:16px}.needed-docs-title{font-weight:800;margin-bottom:9px}
.doc-guide-btn{display:block;width:100%;text-align:left;border:1px solid #cbd4df;background:#fff;padding:12px 14px;margin:7px 0;font-weight:750;cursor:pointer}.doc-guide-btn:hover{border-color:var(--blue);background:#f5f8ff}
.guide-card{width:min(1040px,96vw)!important}.guide-head{border-bottom:3px solid #111;padding-bottom:12px}.guide-head small{font-weight:800;letter-spacing:.08em;color:var(--blue)}.guide-head h2{margin:5px 0}.guide-head p{margin:5px 0;color:var(--muted);line-height:1.45}.guide-legend{margin:14px 0;padding:11px;background:#f3f5f7}
.guide-table{width:100%;border-collapse:collapse;font-size:13px}.guide-table th,.guide-table td{border:1px solid #c5ccd5;padding:9px;vertical-align:top}.guide-table thead th{background:#edf1f5;text-align:left}.guide-table tbody th{width:27%;background:#fafbfc;text-align:left}.guide-table td:last-child{width:18%;font-weight:700}.guide-after{border:2px solid #111;margin-top:14px;padding:12px}.guide-after p{margin:5px 0 0}
@media(max-width:650px){.guide-table{font-size:12px}.guide-table th,.guide-table td{padding:7px}.guide-table td:last-child{width:auto}}

.clarify-cta{border:2px solid var(--blue);padding:18px;margin:22px 0;background:#f7f9ff}.clarify-cta h2{margin:0 0 6px}.clarify-cta p{color:var(--muted);line-height:1.5}.clarify-cta button,.clarify-options button,.result-actions button,.restart-btn{border:0;background:var(--blue);color:#fff;padding:12px 15px;font-weight:800;cursor:pointer}
.clarify{max-width:780px;margin:28px auto;padding:24px;background:#fff;border:1px solid var(--line)}.clarify-kicker,.result-tag{color:var(--blue);font-size:12px;font-weight:900;letter-spacing:.06em}.clarify h1{font-size:28px}.clarify-help{color:var(--muted);font-size:16px;line-height:1.5}.clarify-options{display:grid;gap:9px;margin-top:20px}.clarify-options button{text-align:left;background:#fff;color:var(--text);border:1px solid var(--line)}.clarify-options button:hover{border-color:var(--blue);background:#f5f8ff}.clarify-back{margin-top:14px}.clarify-back button{border:0;background:none;color:var(--blue);font-weight:800;cursor:pointer}
.chain-result{max-width:900px;margin:25px auto;padding:25px;background:#fff;border:1px solid var(--line)}.role-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:18px 0}.role-grid>div{border:1px solid var(--line);padding:14px}.role-grid small{display:block;color:var(--muted);margin-bottom:5px}.source-box,.where-data{border:1px solid var(--line);padding:16px;margin:18px 0}.source-box h2,.where-data h2{margin-top:0}.source-box li{margin:7px 0}.sequence{display:grid;gap:9px}.seq{display:flex;gap:12px;border:1px solid var(--line);padding:12px}.seq>span{display:flex;align-items:center;justify-content:center;min-width:30px;height:30px;background:var(--blue);color:#fff;font-weight:900}.seq p{margin:4px 0 0;color:var(--muted)}.decision-note,.decision-warning{padding:14px;margin:16px 0;border-left:4px solid var(--blue);background:#f4f7ff}.decision-warning{border-color:#e6a800;background:#fff8dd}.where-data table{width:100%;border-collapse:collapse}.where-data th,.where-data td{border:1px solid var(--line);padding:9px;text-align:left;vertical-align:top}.result-actions{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0}.restart-btn{background:#333}
@media(max-width:650px){.role-grid{grid-template-columns:1fr}.chain-result,.clarify{padding:16px}.where-data{overflow-x:auto}}

/* v0.9 — wide adaptive layout */
:root{--page-w:95vw}
main,.hero-inner,.wizard,.result,.chain-result,.clarify,.seo-help{width:95%;max-width:none;margin-left:auto;margin-right:auto}
@media(min-width:1500px){main,.hero-inner,.wizard,.result,.chain-result,.clarify{width:95%}}
@media(max-width:900px){main,.hero-inner,.wizard,.result,.chain-result,.clarify{width:96%;padding-left:0;padding-right:0}.chain-result,.clarify{padding:18px}.role-grid{grid-template-columns:1fr 1fr}}
@media(max-width:620px){
 main,.hero-inner,.wizard,.result,.chain-result,.clarify{width:100%;border-left:0;border-right:0}
 .chain-result,.clarify{padding:14px}
 .role-grid{grid-template-columns:1fr}
 .where-data table,.guide-table{display:block;overflow-x:auto;white-space:normal}
 .result-actions{display:grid}.result-actions button{width:100%}
 .seq{align-items:flex-start}.clarify h1,.chain-result h1{font-size:23px}
}

/* Hover/tap hints */
.hint{position:relative;border-bottom:1px dashed #7d8998;cursor:help}
.hint::after{content:attr(data-hint);position:absolute;z-index:50;left:0;bottom:calc(100% + 8px);width:min(360px,80vw);padding:10px 12px;background:#17202b;color:#fff;font-size:12px;line-height:1.45;font-weight:500;box-shadow:0 5px 18px rgba(0,0,0,.2);opacity:0;visibility:hidden;transform:translateY(4px);transition:.12s;pointer-events:none}
.hint:hover::after,.hint:focus::after,.hint.show-hint::after{opacity:1;visibility:visible;transform:none}

/* Simpler final result */
.simple-result-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin:12px 0 20px}.simple-result-head p{margin:5px 0;color:var(--muted)}
.answer-strip{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:14px 0 22px}.answer-strip>div{border:1px solid var(--line);padding:12px;min-width:0}.answer-strip small{display:block;color:var(--muted);margin-bottom:5px}.answer-strip b{font-size:15px}
.do-now{border:2px solid var(--blue);padding:16px;margin:18px 0}.do-now small{font-weight:900;color:var(--blue)}.do-now h2{margin:4px 0 6px;font-size:21px}.do-now p{margin:0;color:var(--muted)}
.simple-sequence{display:flex;align-items:stretch;gap:0;margin:12px 0 22px;overflow-x:auto}.simple-step{display:flex;align-items:center;min-width:180px}.simple-step-card{border:1px solid var(--line);padding:12px;min-height:76px;flex:1;background:#fff}.simple-step-card small{display:block;color:var(--blue);font-weight:900;margin-bottom:4px}.simple-arrow{padding:0 8px;font-size:20px;color:#8490a0}
.data-sources{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.data-source{border:1px solid var(--line);padding:12px}.data-source b{display:block;margin-bottom:4px}.data-source span{color:var(--muted);font-size:13px}
.secondary-details{margin-top:18px;padding-top:14px;border-top:1px solid var(--line)}.secondary-details>summary{cursor:pointer;font-weight:800;color:#46566a}
@media(max-width:900px){.answer-strip{grid-template-columns:1fr 1fr}.data-sources{grid-template-columns:1fr 1fr}}
@media(max-width:620px){.answer-strip,.data-sources{grid-template-columns:1fr}.simple-sequence{display:grid;overflow:visible}.simple-step{min-width:0}.simple-arrow{display:none}.simple-step-card{min-height:0}}

.nav-reset-bar{position:sticky;top:0;z-index:1000;background:#172033;border-bottom:1px solid #2d3b54}.nav-reset-inner{width:95%;margin:auto;height:48px;display:flex;align-items:center;justify-content:space-between}.nav-mini-brand{display:flex;align-items:center;gap:8px;color:#fff;font-size:14px}.nav-mark{display:grid;place-items:center;width:25px;height:25px;background:#2f66e8;color:#fff;font-weight:900}#navResetBtn{border:1px solid #71809a;background:transparent;color:#fff;padding:7px 12px;font-weight:800;cursor:pointer}#navResetBtn:hover{background:#fff;color:#172033}
.answer-strip>div:nth-child(1){border-top:4px solid #3568e8;background:#f3f7ff}.answer-strip>div:nth-child(2){border-top:4px solid #7656c9;background:#f8f5ff}.answer-strip>div:nth-child(3){border-top:4px solid #df8b18;background:#fff8ed}.answer-strip>div:nth-child(4){border-top:4px solid #26966b;background:#f0fbf6}.do-now{border-color:#2f66e8;background:#eef4ff}
.simple-step:nth-child(1) .simple-step-card{border-top:4px solid #3568e8;background:#f5f8ff}.simple-step:nth-child(2) .simple-step-card{border-top:4px solid #7656c9;background:#faf7ff}.simple-step:nth-child(3) .simple-step-card{border-top:4px solid #df8b18;background:#fff9ef}.simple-step:nth-child(4) .simple-step-card{border-top:4px solid #26966b;background:#f2fbf7}.simple-step:nth-child(5) .simple-step-card{border-top:4px solid #b64f67;background:#fff5f7}
.data-source:nth-child(1),.data-source:nth-child(4){background:#f3f7ff;border-left:4px solid #3568e8}.data-source:nth-child(2),.data-source:nth-child(5){background:#f0fbf6;border-left:4px solid #26966b}.data-source:nth-child(3),.data-source:nth-child(6){background:#fff8ed;border-left:4px solid #df8b18}.decision-note{background:#f0fbf6;border-color:#26966b}.decision-warning{background:#fff7e2;border-color:#df9b18}
@media(max-width:620px){.nav-reset-inner{width:94%}.nav-mini-brand b{font-size:13px}#navResetBtn{padding:7px 9px;font-size:12px}}
