/* Engineering World — unified editorial design */
:root {--paper:#f3f6f9;--white:#fff;--ink:#17263a;--forest:#14354f;--dim:#516174;--line:#dce4ec;--rust:#185c9c;--clay:#84baf1;--max:82rem;--ux-accent:#185c9c;--exp-bg:#fff;--ux-bg:#fff;--ux-ink:#17263a;--shadow:0 2px 6px #15354b0b,0 8px 22px #15354b08; font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;}
body,body.ux-page {background:var(--paper);color:var(--ink);font:16px/1.6 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;margin:0;padding:0;}
body::before {display:none;}
.site-width,.edition-header {width:min(var(--max),calc(100% - 3rem));margin-inline:auto;}
:where(h1,h2,h3){letter-spacing:-.025em;line-height:1.2;overflow-wrap:break-word;}
:where(a,button,input,select,textarea):focus-visible{outline:3px solid #1976c9;outline-offset:3px;}
.edition-header,.pantry-bottom{background:#102e48;color:#fff;border:0;box-shadow:none;}
.edition-header{border-radius:0 0 10px 10px;}
.edition-header>.header-inner.site-width{width:100%;min-height:64px;padding:10px 20px;gap:12px 24px;flex-wrap:wrap;}
.brand{gap:9px;white-space:normal;}
.brand-mark{width:34px;height:34px;border-radius:0;background:transparent url('img/portal-gear.svg') center/contain no-repeat;flex:0 0 34px;}
.pantry-title{font-size:clamp(1.05rem,2vw,1.42rem);font-weight:750;letter-spacing:-.035em;}
.edition-header .pantry-title>span,.pantry-bottom .pantry-title>span{color:#fff;}
.edition-header .edition-navigation{width:auto;gap:4px 7px;flex-wrap:wrap;justify-content:flex-end;font-size:.87rem;font-weight:650;}
.edition-navigation a{border-radius:6px;padding:.55rem .72rem;color:#e8f1fa;}
.edition-header .edition-navigation a:hover{background:#ffffff16;color:#fff;}
.edition-header .edition-navigation a[aria-current]{background:#1268b7;color:#fff;}
.home-hero{margin-top:12px;border-radius:12px;background:#102e48;color:white;}
.hero-image{object-position:72% 54%;}
.hero-shade{background:linear-gradient(90deg,#0b2744fa 0%,#0d2f50e8 27%,#123b5db0 47%,#123b5d12 78%);}
.hero-inner{min-height:clamp(280px,29vw,350px);padding:28px clamp(20px,4vw,48px);}
.front-intro{max-width:570px;}
.eyebrow{font-size:.72rem;color:#c5def5;letter-spacing:.1em;margin-bottom:.6rem;}
.front-intro h1{max-width:none;font-size:clamp(2.2rem,4.2vw,3.8rem);letter-spacing:-.045em;line-height:1.04;margin-bottom:.7rem;}
.hero-lede{font-size:clamp(1rem,1.5vw,1.15rem);color:#eaf2fa;margin-bottom:1.15rem;max-width:34rem;}
.front-search-row{border:1px solid #e1e9f1;border-radius:8px;min-height:44px;background:white;padding:3px;}
.front-search-input{font-size:.91rem;padding:8px 12px;}
.front-search-submit{background:#1268b7;border-radius:6px;color:white;padding:7px 16px;}
.front-search-submit:hover{background:#0e5294;}
.front-quick{gap:5px;margin-top:8px;}
.front-quick a{font-size:.75rem;padding:3px 8px;background:#102e48a0;border:1px solid #d5e5f663;border-radius:5px;color:#fff;}
.front-quick a:hover{background:#185c9c;}
.block,.front-page .stage-band{padding-block:22px 10px;margin-top:0;}
.section-heading{gap:12px;margin-bottom:14px;align-items:center;}
.section-heading h2{font-size:clamp(1.25rem,2.4vw,1.75rem);letter-spacing:-.035em;line-height:1.2;display:flex;align-items:center;gap:10px;}
.section-heading h2::before{content:"";width:5px;height:1.05em;flex:0 0 5px;border-radius:5px;background:#1768b2;}
.text-link{font-size:.87rem;color:#185c9c;text-decoration:none;}
.text-link:hover{text-decoration:underline;}
.section-grid,.catalog-list,.stage-grid{gap:14px;}
.portal-grid{grid-template-columns:repeat(3,minmax(0,1fr));}
.front-page .portal-directions .portal-grid{grid-template-columns:repeat(6,minmax(0,1fr));}
.section-tile,.article-card,.home-stage-gallery>a,.ux-tile,.expansion .exp-cards li{background:white;border:1px solid var(--line);border-radius:10px;box-shadow:var(--shadow);overflow:hidden;transition:border-color .15s,box-shadow .15s;min-width:0;}
.section-tile:hover,.article-card:hover,.home-stage-gallery>a:hover,.ux-tile:hover,.expansion .exp-cards li:hover{border-color:#9bbfdf;box-shadow:0 5px 16px #15354b16;}
.portal-grid .section-tile{grid-template-columns:1fr;grid-template-rows:auto 1fr;min-height:0;}
.portal-grid .section-tile img{width:100%;height:auto;min-height:0;aspect-ratio:16/9;object-fit:cover;}
.portal-grid .section-tile span{display:block;padding:12px;line-height:1.3;}
.portal-grid .section-tile strong{display:block;font-size:1rem;letter-spacing:-.02em;color:#14263a;}
.portal-grid .section-tile small{display:block;font-size:.81rem;line-height:1.4;margin-top:5px;color:var(--dim);}
.portal-directions .section-tile .direction-icon{display:block;width:32px;height:32px;padding:6px;margin:-28px 0 7px;position:relative;background:#185c9c;border:2px solid white;border-radius:8px;color:#fff;}
.direction-icon svg{display:block;width:100%;height:100%;}
.section-grid:not(.portal-grid) .section-tile{grid-template-columns:90px minmax(0,1fr);min-height:84px;}
.section-grid:not(.portal-grid) .section-tile img{height:100%;min-height:84px;}
.article-card{display:flex;flex-direction:column;}
.catalog-photo img,.home-resources .catalog-photo img,.home-stage-gallery>a .stage-photo,.ux-box .ux-tile-photo img,.expansion .exp-cards img{width:100%;height:auto;aspect-ratio:16/9;object-fit:cover;min-height:0;background:#e6edf3;}
.card-copy{padding:13px 15px 16px;flex:1;display:flex;flex-direction:column;align-items:flex-start;}
.card-section,.article-kicker{font-size:.75rem;letter-spacing:.015em;font-weight:700;color:#185c9c;}
.card-copy h3{font-size:1.12rem;line-height:1.29;margin:.32rem 0 .45rem;letter-spacing:-.023em;}
.card-copy p{font-size:.87rem;line-height:1.48;color:var(--dim);}
.home-resources .card-copy{padding:11px 12px 14px;}
.home-resources .card-copy h3{font-size:1rem;}
.home-resources .card-copy p{font-size:.81rem;}
#home-tools + a{white-space:normal;}
section[aria-labelledby="home-tools"] .home-cards{grid-template-columns:repeat(5,minmax(0,1fr));}
section[aria-labelledby="home-learning"] .home-cards{grid-template-columns:repeat(4,minmax(0,1fr));}
.stage-band{background:transparent;color:var(--ink);border:0;border-radius:0;padding-inline:0;}
.home-stage-gallery>a{color:var(--ink);padding:0;grid-template-rows:auto 1fr;gap:0;}
.home-stage-gallery>a:hover{background:white;}
.home-stage-gallery .stage-card-copy{padding:12px 14px 15px;gap:.32rem;}
.home-stage-gallery .stage-card-copy strong{color:var(--ink);font-size:1.09rem;line-height:1.25;}
.home-stage-gallery .stage-card-copy span{color:var(--dim);font-size:.87rem;line-height:1.45;}
.robot-stage-gallery{grid-template-columns:repeat(4,minmax(0,1fr));}
.inner-page{padding-block:24px 48px;}
.catalog-heading h1{font-size:clamp(1.9rem,4vw,3rem);line-height:1.13;letter-spacing:-.045em;}
.catalog-heading p{font-size:1.05rem;color:var(--dim);}
.topic-heading{background:#e5edf6;border:1px solid var(--line);border-radius:12px;}
.topic-heading img{aspect-ratio:16/9;min-height:0;}
.catalog-crumb{font-size:.85rem;color:var(--dim);}
.catalog-crumb a,.catalog-jumps a,.article-jumps a,.related-article{color:#185c9c;}
.catalog-jumps a,.sitemap-main a{border-radius:6px;}
.catalog-jumps a:hover,.sitemap-main a:hover{border-color:#87b0d8;color:#185c9c;}
.article-head{grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);background:#14354f;color:#fff;border-radius:12px;}
.article-head-copy{padding:clamp(20px,3vw,38px);}
.article-head h1{font-size:clamp(1.8rem,3.3vw,3rem);line-height:1.12;letter-spacing:-.035em;}
.article-head .article-kicker{color:#a7d1f6;}
.article-head .article-meta{color:#d5e4f3;}
.article-head .article-cover{height:100%;min-height:220px;max-height:380px;object-fit:cover;}
.catalog-heading .article-meta{color:var(--dim);}
.article-layout{grid-template-columns:minmax(0,2.55fr) minmax(0,1fr);gap:22px;margin-top:22px;}
.entry-content,.guide-content,.expansion,.ux-box{background:white;border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow);}
.entry-content{font-size:1.075rem;line-height:1.75;padding:clamp(18px,3.2vw,36px);}
.entry-content h2,.guide-content h2,.expansion h2{font-size:clamp(1.27rem,2.4vw,1.65rem);line-height:1.25;color:#162c45;}
.entry-content p,.guide-content p,.expansion p{overflow-wrap:anywhere;}
.entry-content a,.guide-content a,.expansion a{color:#185c9c;text-underline-offset:3px;}
.article-jumps,.expansion .exp-toc{background:#eef5fc;border-left:3px solid #1768b2;border-radius:0 8px 8px 0;padding:15px 17px;}
.checklist,.inspection-figure{background:#eff5fa;color:#17263a;border-color:#cdddeb;border-radius:8px;}
.related-articles{background:white;border:1px solid var(--line);border-radius:10px;box-shadow:var(--shadow);}
.related-articles h2{font-size:1.23rem;}
.guide-content{padding:clamp(18px,3vw,32px);max-width:960px;}
.guide-content .article-cover{width:100%;height:auto;min-height:0;max-height:460px;object-fit:contain;background:#eef3f8;border-radius:8px;}
.guide-content figcaption{font-size:.82rem;color:var(--dim);margin-top:6px;}
.front-page>.guide-content,.front-page main>.guide-content{margin:24px auto 32px;max-width:var(--max);}
.expansion,.ux-box{width:min(980px,calc(100% - 3rem));max-width:980px;margin:26px auto 40px;padding:clamp(18px,3vw,32px);}
body.ux-page .ux-box{margin:26px auto 40px;}
.expansion h1,body.ux-page h1{font-size:clamp(1.9rem,4vw,2.8rem);color:var(--ink);line-height:1.15;}
.expansion .exp-cover{max-height:420px;object-fit:contain;background:#eef3f8;}
.expansion .exp-cards li{padding:0 0 12px;}
.expansion .exp-cards li>a,.expansion .exp-cards li>p{display:block;margin:10px 13px 0;}
.expansion .exp-cards li>a{line-height:1.3;text-decoration:none;}
.expansion .exp-cards li>p{font-size:.87rem;line-height:1.45;}
.expansion .exp-cards img{border-radius:0;}
.expansion-home{background:#eaf1f8;border:1px solid var(--line);max-width:none;margin:0 0 20px;color:var(--ink);padding:16px;}
.expansion-home h2{font-size:1.25rem;color:var(--ink);}
.calc-panel{background:white;border-color:var(--line);box-shadow:var(--shadow);border-radius:10px;}
.calc-panel input,.ux-box input:not([type=checkbox]),.ux-box select,.ux-box textarea,.expansion input{border:1px solid #aebed0;border-radius:7px;}
.calc-panel output{color:#185c9c;background:#eef5fc;border-radius:8px;padding:10px 14px;}
.entry-content pre,.guide-content pre,.expansion pre{white-space:pre-wrap;overflow-wrap:anywhere;overflow:auto;background:#edf3f9;border-radius:8px;padding:16px;}
.entry-content img{max-width:100%;height:auto;}
.pantry-bottom{margin-top:26px;}
.footer-inner{padding-block:20px;gap:12px 20px;}
.footer-inner nav{gap:9px 16px;}
.footer-inner nav a{text-decoration:none;font-size:.83rem;color:#e5eef7;}
.footer-inner nav a:hover{text-decoration:underline;}
.footer-inner small{color:#b9cddd;}
@media(max-width:1100px){.edition-header>.header-inner.site-width{justify-content:flex-start;}.edition-header .edition-navigation{justify-content:flex-start;}.front-page .portal-directions .portal-grid{grid-template-columns:repeat(3,minmax(0,1fr));}section[aria-labelledby="home-tools"] .home-cards{grid-template-columns:repeat(3,minmax(0,1fr));}}
@media(max-width:850px){.site-width,.edition-header{width:calc(100% - 2rem);}.hero-inner{min-height:300px;}.hero-shade{background:linear-gradient(90deg,#0b2744fa,#0d2f50cf 54%,#123b5d48);}.catalog-list,.section-grid,.stage-grid,.portal-grid,.robot-stage-gallery,section[aria-labelledby="home-learning"] .home-cards{grid-template-columns:repeat(2,minmax(0,1fr));}.article-layout{grid-template-columns:1fr;}.article-head{grid-template-columns:1.1fr 1fr;}.article-head .article-cover{min-height:180px;}}
@media(max-width:600px){.site-width,.edition-header,.expansion,.ux-box{width:calc(100% - 1.5rem);}.edition-header>.header-inner.site-width{padding:12px;gap:8px;}.edition-header .edition-navigation{width:100%;justify-content:flex-start;gap:3px;font-size:.78rem;}.edition-navigation a{padding:.44rem .5rem;}.home-hero{margin-top:8px;}.hero-inner{min-height:0;padding:24px 16px;}.hero-image{object-position:70% center;}.hero-shade{background:linear-gradient(90deg,#0b2744f2,#0d2f50c2 75%,#123b5d88);}.front-intro h1{font-size:clamp(1.9rem,8vw,2.8rem);}.hero-lede{font-size:.94rem;}.front-search-input{font-size:.86rem;padding-inline:7px;}.front-search-submit{padding-inline:10px;}.front-quick a{font-size:.7rem;}.block,.front-page .stage-band{padding-block:17px 7px;}.section-heading{align-items:flex-start;flex-wrap:wrap;margin-bottom:10px;}.section-heading h2{font-size:1.28rem;}.front-page .portal-directions .portal-grid,section[aria-labelledby="home-tools"] .home-cards{grid-template-columns:repeat(2,minmax(0,1fr));}.catalog-list,.section-grid,.stage-grid,.portal-grid,.robot-stage-gallery{gap:10px;}.card-copy,.home-resources .card-copy,.home-stage-gallery .stage-card-copy,.portal-grid .section-tile span{padding:10px;}.card-copy h3,.home-resources .card-copy h3,.home-stage-gallery .stage-card-copy strong,.portal-grid .section-tile strong{font-size:.98rem;}.card-copy p,.home-resources .card-copy p,.home-stage-gallery .stage-card-copy span,.portal-grid .section-tile small{font-size:.79rem;}.section-grid:not(.portal-grid){grid-template-columns:1fr;}.article-head{grid-template-columns:1fr;}.article-head .article-cover{min-height:0;max-height:230px;height:auto;aspect-ratio:16/9;}.article-head-copy{padding:20px;}.article-head h1{font-size:1.8rem;}.article-layout{gap:14px;}.entry-content{font-size:1rem;line-height:1.7;}.topic-heading{grid-template-columns:1fr;}.topic-heading img{height:auto;max-height:220px;}.inner-page{padding-block:18px 30px;}.footer-inner{padding-block:18px;}.footer-inner nav{gap:8px 12px;}}
@media(max-width:360px){.front-page .portal-directions .portal-grid,section[aria-labelledby="home-tools"] .home-cards,section[aria-labelledby="home-learning"] .home-cards,.catalog-list,.portal-grid,.stage-grid,.robot-stage-gallery{grid-template-columns:1fr;}}
@media print{.edition-header,.pantry-bottom{display:none!important;}body,.entry-content,.guide-content,.ux-box,.expansion{background:white!important;box-shadow:none!important;border:0!important;}.article-head{background:white!important;color:black!important;}.article-head .article-meta,.article-head .article-kicker{color:black!important;}}

.portal-reading{color:var(--dim);font-size:.86rem;margin:.5rem 0 1rem}.article-page .guide-content{margin-inline:auto}.article-page .guide-content .article-jumps{margin-top:1rem}

@media(min-width:851px){.hero-image{object-position:72% 15%;}}

/* Yandex.Metrika — compact statistics badge in the footer. */
.footer-inner .footer-meta{flex:1 0 100%;min-width:0;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;padding-top:12px;border-top:1px solid rgba(255,255,255,.15);}
.footer-inner .footer-metrika{display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center;line-height:0;border-radius:4px;overflow:hidden;background:#fff;margin-inline-start:auto;}
.footer-inner .footer-metrika img{display:block;width:88px;height:31px;max-width:none;object-fit:contain;}
.footer-inner .footer-metrika:focus-visible{outline:2px solid #fff;outline-offset:4px;}
@media(max-width:600px){.footer-inner .footer-meta{gap:10px;padding-top:10px;}.footer-inner .footer-meta small{font-size:.77rem;}}

/* Footer aligned to the same responsive site-width as the article grid. */
.pantry-bottom.site-width {box-sizing:border-box;margin:26px auto 16px;border:1px solid #24445e;border-radius:12px;overflow:hidden;}
.pantry-bottom > .footer-inner.site-width {box-sizing:border-box;width:100%;max-width:none;padding:22px clamp(16px,2.4vw,32px) 16px;display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);align-items:start;gap:18px 32px;}
.footer-identity {min-width:0;}
.footer-identity .brand {display:inline-flex;align-items:center;}
.footer-description {font-size:.88rem;line-height:1.6;color:#c7d9e8;max-width:62ch;margin:.65rem 0 0;overflow-wrap:break-word;}
.pantry-bottom .footer-inner nav {justify-content:flex-end;align-content:start;gap:10px 18px;padding-top:6px;min-width:0;}
.pantry-bottom .footer-inner .footer-meta {grid-column:1/-1;justify-content:flex-end;}
.about-project-copy {max-width:86ch;line-height:1.75;}
.about-project-copy h2 {margin-top:1.8rem;}
@media(max-width:850px){.pantry-bottom > .footer-inner.site-width{grid-template-columns:1fr;gap:14px;padding:20px;}.pantry-bottom .footer-inner nav{justify-content:flex-start;padding-top:0;}}
@media(max-width:600px){.pantry-bottom.site-width{margin-top:18px;margin-bottom:12px;}.pantry-bottom > .footer-inner.site-width{padding:16px;}.footer-description{font-size:.84rem;}.pantry-bottom .footer-inner nav{gap:9px 14px;}}

/* Place the standard Metrika informer directly below the portal description. */
.pantry-bottom .footer-identity .footer-meta{display:flex;justify-content:flex-start;align-items:center;margin-top:12px;padding:0;border:0;gap:0;min-width:0;}
.pantry-bottom .footer-identity .footer-metrika{margin:0;flex:0 0 auto;}
