/* Public pages share the approved homepage palette, grid and chrome.
   Loaded after the legacy component bundles to keep their functional layouts. */
:root {
  --text-muted:#003a92;
  --brand-blue:#075bd8; --brand-navy:#003a92; --link:#003a92; --border:var(--control-border,#7185a3);
  --font-sans:"Arial Narrow",Arial,sans-serif; --container:96rem;
  --surface-base:var(--surface); --surface-pale:var(--surface-soft);
  --text-primary:var(--text); --text-secondary:var(--text-muted); --text-heading:var(--text);
  --border-default:var(--border); --border-brand-soft:var(--border);
  --icon-color:var(--link); --blue-soft-1:#688adb; --blue-soft-2:#a6c1e4; --blue-soft-3:#d3e9ff;
}
:root[data-theme=dark] {--text-muted:#b8c8e4;--text-heading:var(--text);--brand-blue:#5ca6ff;--brand-navy:#d7e8ff;--link:#93c8ff;--border:var(--control-border,#7185a3);--icon-color:var(--link)}
body {font-family:var(--font-sans)}
.container,.global-breadcrumbs,.page-hero-breadcrumbs {width:min(calc(100% - 68px),var(--container))}
body .site-header__inner {width:min(calc(100% - 68px),var(--container))}
main#main-content {padding-bottom:0}
.site-footer {margin-top:auto;flex-shrink:0}
main#main-content>article.rich-content {margin-block:32px 48px;padding:28px;border:1px solid var(--border);border-radius:12px;background:var(--surface)}
.global-breadcrumbs {margin-block:18px 12px;font-size:13px}
.inner-hero,.page-hero,.prototype-page__hero,.page-heading {
  position:relative;isolation:isolate;width:100%;margin:0 0 28px!important;
  padding:38px max(34px,calc((100% - 1536px)/2));border:0;border-bottom:1px solid var(--border);
  border-radius:12px;background:linear-gradient(105deg,var(--surface-soft),var(--surface));color:var(--text-heading);
}
.prototype-page__hero h1,.page-heading h1,.inner-hero h1,.page-hero__content h1 {
  margin:10px 0 16px;color:var(--text-heading);font-size:clamp(36px,4.5vw,64px);line-height:1.05;
  letter-spacing:-.035em;overflow-wrap:anywhere;text-wrap:balance;
}
.prototype-page__hero>p,.page-hero__intro {max-width:760px;margin:0;color:var(--text-secondary);font-size:18px;line-height:1.5}
.page-hero__inner,.inner-hero__content {width:100%;padding:0;min-height:0}
.page-hero__inner {grid-template-columns:minmax(0,1.2fr) minmax(0,.8fr)}
.page-hero__phrase {color:var(--link);font-family:"Segoe Script","Segoe Print",cursive;line-height:1.35}
.page-hero--image {
  min-height:320px;background:linear-gradient(90deg,rgba(255,255,255,.98),rgba(255,255,255,.9) 38%,rgba(255,255,255,.1) 75%),var(--page-hero-image) center/cover;
}
.page-hero--image .page-hero__intro {max-width:640px}
.page-hero--image .page-hero__aside {align-self:start;padding-top:20px}
.inner-hero {min-height:340px}
.inner-hero__content {min-height:264px;justify-content:center;align-items:flex-start}
.inner-hero__art {display:block;right:7%;top:45px}
.inner-hero::before,.inner-hero::after {display:block}
.prototype-page__hero--illustrated {
  min-height:340px;background:linear-gradient(90deg,rgba(255,255,255,.98),rgba(255,255,255,.9) 37%,rgba(255,255,255,0) 77%),url('../images/home/hero-moscow-energy-v2.png') center/cover;
}
.prototype-page__hero--join {background-image:linear-gradient(90deg,rgba(255,255,255,.99),rgba(255,255,255,.88) 40%,rgba(255,255,255,0) 80%),url('../images/home/join-union-v2.png')}
.prototype-page__hero--illustrated>p,.prototype-page__hero--illustrated h1 {max-width:700px}
.prototype-page__layout {grid-template-columns:minmax(0,1fr) 300px;align-items:start;gap:24px;margin-block:0 40px}
.prototype-page__layout>* {min-width:0}
.prototype-page__content {min-height:0;padding:24px;border:1px solid var(--border);box-shadow:none;background:var(--surface);border-radius:12px}
.prototype-page__aside {padding:20px;border:1px solid var(--border);border-radius:12px;background:var(--surface-soft)}
.prototype-page__content>.content-panel {padding:0;border:0;box-shadow:none;background:transparent}
.prototype-grid {grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.prototype-grid>.prototype-card:only-child {grid-column:1/-1}
.prototype-card {min-width:0;border-color:var(--border);box-shadow:none}
.prototype-card h3 a {text-decoration:none;color:var(--text-heading)}
.prototype-card h3 a:hover {color:var(--link);text-decoration:underline}
.prototype-page__aside h2 {font-size:24px;line-height:1.2;margin-bottom:16px}
.prototype-page__content h2,.section-header h2 {font-size:32px;line-height:1.15;color:var(--text-heading)}
.prototype-page__content h3 {font-size:22px;line-height:1.2;color:var(--text-heading)}
.prototype-list {gap:12px}
.prototype-list > li {border:1px solid var(--border);border-radius:10px;padding:16px;background:transparent}
.prototype-list li>span {min-width:0}
.prototype-list .button {flex-shrink:0}
.prototype-timeline {padding:0;list-style:none;counter-reset:steps}
.prototype-timeline li {position:relative;grid-template-columns:48px minmax(0,1fr);gap:16px;padding:20px 0;border-bottom:1px solid var(--border)}
.prototype-timeline li:last-child {border-bottom:0}
.prototype-timeline time {display:grid;width:44px;height:44px;place-items:center;border-radius:50%;background:var(--surface-soft);color:var(--link);font-weight:700}
.prototype-timeline p {margin:8px 0 0}
.editorial-thumbnail {width:100%;height:auto;aspect-ratio:16/9;object-fit:cover;border-radius:8px;margin-bottom:16px}
.editorial-cover {width:100%;height:auto;max-height:560px;object-fit:cover;border-radius:12px;margin-bottom:24px}
.prototype-page__content .rich-text a {overflow-wrap:anywhere}
.rich-text img,.rich-content img {max-width:100%;height:auto}
.rich-text table,.rich-content table {display:block;max-width:100%;overflow:auto;border-collapse:collapse}
.button--primary {background:linear-gradient(180deg,#1683ff,#0062ee);border-color:#0062ee;color:white}
.button--secondary {background:var(--surface);border-color:var(--border);color:var(--link)}
.mobile-nav__row {display:flex;align-items:center;justify-content:space-between;gap:8px}
.mobile-nav__row>a {flex:1}
.mobile-submenu {padding-left:16px!important;border-left:2px solid var(--border);margin:4px 0 12px 8px!important}
.mobile-submenu[hidden] {display:none}
.mobile-submenu ul {padding-left:16px!important}
.mobile-submenu a {font-size:15px;line-height:1.4}
.search-page {margin-bottom:40px}
.search-page>form {display:flex;flex-wrap:wrap;align-items:end;gap:16px;padding:20px;border:1px solid var(--border);border-radius:12px;background:var(--surface-soft);margin-block:24px}
.search-page>form label {display:grid;gap:8px;font-weight:600}
.search-page input,.search-page select,.prototype-form select {min-width:0;max-width:100%;min-height:44px;padding:10px 12px;border:1px solid var(--border);border-radius:8px;background:var(--surface);color:var(--text);font:inherit}
.search-results {padding:0;list-style:none}
.search-results>li {padding:20px;border:1px solid var(--border);border-radius:12px;margin-bottom:16px}
.portal-contact-strip {border-top:1px solid var(--border);margin-top:32px}
.portal-contact-strip>.container {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;padding-block:20px}
.portal-contact-strip .container>div {border-right:1px solid var(--border);padding:8px 20px;min-width:0}
.portal-contact-strip .container>div:last-child {border:0}
.portal-contact-strip a {overflow-wrap:anywhere}
.about-intro {display:grid;grid-template-columns:1.2fr 1fr;gap:32px;align-items:center;margin-block:32px}
.about-intro img {width:100%;border-radius:12px}
.about-values {margin-block:24px 40px}
.about-values .prototype-card {padding:24px}
.about-values .icon {width:40px;height:40px;margin-bottom:16px;color:var(--link)}
.about-cta {margin-bottom:40px}
[data-theme=dark] .page-hero--image,[data-theme=dark] .prototype-page__hero--illustrated {background-image:linear-gradient(90deg,rgba(16,24,45,.98),rgba(16,24,45,.88) 40%,rgba(16,24,45,.2) 80%),var(--page-hero-image,url('../images/home/hero-moscow-energy-v2.png'))}
[data-theme=dark] .prototype-page__hero--join {--page-hero-image:url('../images/home/join-union-v2.png')}
[data-theme=dark] .page-hero__badge {background:var(--surface-raised);color:var(--text)}
[data-theme=dark] .button--secondary,[data-theme=dark] .section-header__action,[data-theme=dark] .sidebar-nav a {color:var(--link)}
@media(max-width:1279px) {
  .prototype-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
  .prototype-page__layout {grid-template-columns:minmax(0,1fr) 260px}
}
@media(max-width:900px) {
  .prototype-page__layout,.services-shell,.service-detail-shell,.contacts-page-shell,.leadership-shell,.structure-shell,.history-shell,.video-shell {grid-template-columns:minmax(0,1fr)}
  .page-hero__inner {grid-template-columns:minmax(0,1fr)}
  .page-hero__aside {display:none}
}
@media(max-width:767px) {
  .container,.global-breadcrumbs,.page-hero-breadcrumbs,body .site-header__inner {width:calc(100% - 32px)}
  .inner-hero,.page-hero,.prototype-page__hero,.page-heading {width:100%;padding:28px 16px;margin-bottom:24px!important}
  .prototype-page__hero h1,.inner-hero h1,.page-hero__content h1,.page-heading h1 {font-size:38px;line-height:1.08;letter-spacing:-.035em}
  .prototype-page__hero>p,.page-hero__intro {font-size:16px;line-height:1.5}
  .page-hero--image,.prototype-page__hero--illustrated {min-height:460px;padding-bottom:220px;background-position:65% bottom;background-size:auto 100%;background-repeat:no-repeat}
  .prototype-page__hero--illustrated {background-image:linear-gradient(180deg,#fff 0,rgba(255,255,255,.98) 40%,rgba(255,255,255,0) 75%),url('../images/home/hero-moscow-energy-v2.png')}
  .prototype-page__hero--join {background-image:linear-gradient(180deg,#fff 0,rgba(255,255,255,.98) 40%,rgba(255,255,255,0) 75%),url('../images/home/join-union-v2.png')}
  .page-hero--image {background-image:linear-gradient(180deg,#fff 0,rgba(255,255,255,.95) 40%,rgba(255,255,255,0) 75%),var(--page-hero-image)}
  .inner-hero__content {min-height:280px;justify-content:flex-start}
  .inner-hero__art {display:none}
  .prototype-grid,.about-intro {grid-template-columns:minmax(0,1fr)}
  .prototype-page__content {padding:20px}
  .prototype-page__content h2,.section-header h2 {font-size:28px;line-height:1.2}
  .prototype-list li {flex-wrap:wrap}
  .prototype-list li>.button {margin-top:8px}
  .portal-contact-strip>.container {grid-template-columns:minmax(0,1fr)}
  .portal-contact-strip .container>div {border-right:0;border-bottom:1px solid var(--border);padding:16px 0}
  .search-page>form {display:grid;grid-template-columns:minmax(0,1fr)}
  .search-page>form input,.search-page>form select {width:100%}
  [data-theme=dark] .page-hero--image,[data-theme=dark] .prototype-page__hero--illustrated {background-image:linear-gradient(180deg,#10182d 0,rgba(16,24,45,.96) 40%,rgba(16,24,45,.15) 80%),var(--page-hero-image,url('../images/home/hero-moscow-energy-v2.png'))}
}

body .button--account .icon {color:inherit}
body .site-header .submenu {min-width:240px;border:1px solid var(--border);background:var(--surface);box-shadow:var(--shadow-md)}
body .site-header .submenu a {display:block;padding:12px 16px;font-size:14px;color:var(--text-heading)}
body .site-header .submenu a:hover {background:var(--surface-soft)}
.prototype-search input {min-width:0;background:var(--surface);color:var(--text)}
main#main-content>.prototype-page__content {margin-bottom:40px}
[data-theme=dark] .prototype-list strong,[data-theme=dark] .prototype-status {color:var(--text)}

/* A hero can also carry .container: the mobile container rule must not crop it. */
.container.prototype-page__hero {width:100%}
body .site-header__actions {display:flex}
body .site-header__actions>.icon-button {display:grid}
body .site-header__actions>.theme-switch {display:inline-flex}
@media(min-width:1280px){body .site-header__actions>.menu-toggle{display:none}}

[data-theme=dark] main:not(:has(.home-shell)) a:not(.button):not(.is-active):not([aria-current=page]):not([aria-current=location]):not(.service-catalogue__card):not(.org-tree__branch-card):not(.org-tree__territory):not(.governance-node--primary):not(.direction-faq-card):not(.action-link):not(.portal-social-link) {color:var(--link)}
[data-theme=dark] .contact-card__icon,[data-theme=dark] .contact-card .icon,[data-theme=dark] .contact-card__value,[data-theme=dark] .prototype-list .icon {color:var(--link)}
