/* ===== text-alignment-frame-fix.css ===== */
/* Final text alignment and framed mission block */
:root{--text-fix-wine:#5f0a18;--text-fix-deep:#33060d;--text-fix-gold:#b69042;--text-fix-paper:#fffaf2;--text-fix-ink:#302428}
/* Prevent awkward title fragmentation and keep hero text aligned */
.page-hero h1,.pres-hero h1,.memory-hero h1,.institution-hero h1,.about-command h1,.home-command h1{
  max-width:min(900px,100%)!important;
  overflow-wrap:normal!important;
  word-break:normal!important;
  hyphens:none!important;
  text-wrap:balance!important;
}
.privacy-policy-page .page-hero h1, body[data-page="privacy-policy"] .page-hero h1{
  max-width:980px!important;
  font-size:clamp(2.25rem,6vw,4.35rem)!important;
  line-height:1.06!important;
  letter-spacing:-.025em!important;
}
.page-hero .container,.pres-hero .container,.memory-hero .container{ text-align:center!important; }
.page-hero-sub,.pres-subtitle,.memory-hero p{max-width:820px!important;margin-left:auto!important;margin-right:auto!important;text-align:center!important}
/* Align ordinary prose consistently */
main p, main li{overflow-wrap:break-word!important;word-break:normal!important;hyphens:auto!important}
.section-heading,.about-heading,.home-heading,.pres-section-sub,.section-header{max-width:860px!important}
/* Beautiful frame for the mission text shown on the About page */
.about-profile__statement{
  position:relative!important;
  max-width:1040px!important;
  margin:0 auto!important;
  padding:clamp(28px,4vw,52px)!important;
  border:1px solid rgba(182,144,66,.44)!important;
  border-left:7px solid var(--text-fix-wine)!important;
  border-radius:24px!important;
  background:linear-gradient(135deg,#fff 0%,#fff8ea 100%)!important;
  box-shadow:0 26px 64px rgba(79,7,17,.10), inset 0 1px 0 rgba(255,255,255,.9)!important;
  overflow:hidden!important;
}
.about-profile__statement::before{
  content:""!important;position:absolute!important;inset:0 0 auto!important;height:6px!important;
  background:linear-gradient(90deg,#fff 0 33.333%,#0039a6 33.333% 66.666%,#d52b1e 66.666% 100%)!important;
}
.about-profile__statement::after{
  content:""!important;position:absolute!important;right:-74px!important;bottom:-74px!important;width:210px!important;height:210px!important;border-radius:50%!important;
  background:radial-gradient(circle,rgba(182,144,66,.18),transparent 64%)!important;pointer-events:none!important;
}
.about-profile__statement .about-kicker{color:var(--text-fix-wine)!important;opacity:1!important;letter-spacing:.17em!important}
.about-profile__statement h2{
  color:var(--text-fix-wine)!important;
  max-width:720px!important;
  margin-top:16px!important;
  text-wrap:balance!important;
}
.about-profile__statement p{
  color:#3f3337!important;
  max-width:76ch!important;
  font-size:clamp(1.02rem,1.45vw,1.15rem)!important;
  line-height:1.82!important;
}
@media(max-width:900px){
  .about-profile__statement{display:block!important;padding:30px 24px!important}
  .about-profile__statement .about-kicker,.about-profile__statement h2,.about-profile__statement p{grid-column:auto!important}
  .privacy-policy-page .page-hero h1, body[data-page="privacy-policy"] .page-hero h1{font-size:clamp(2rem,9vw,3.4rem)!important}
}
@media(max-width:520px){
  .page-hero h1,.pres-hero h1,.memory-hero h1,.institution-hero h1{font-size:clamp(2rem,10vw,3rem)!important;line-height:1.1!important}
  .about-profile__statement{border-radius:18px!important;padding:26px 20px!important}
}

/* Decorative elements must never be counted as shifted text or create visual imbalance on narrow screens. */
.hero-flag-corner{overflow:hidden!important;max-width:96px!important}
@media(max-width:520px){
  .hero-flag-corner{display:none!important}
  .page-hero,.pres-hero,.memory-hero,.institution-hero{padding-left:10px!important;padding-right:10px!important}
}

@media(max-width:1000px){.hero-flag-corner{display:none!important}}

/* Remove stray decorative flag marker that was positioned outside the hero text area. */
.hero-flag-corner{display:none!important}

/* ===== final-readability-override.css ===== */
/* Final readability override: all text must remain visible after page renaming and redesign layers. */
:root{--read-wine:#5f0a18;--read-deep:#33060d;--read-gold:#b69042;--read-ink:#302428;--read-muted:#514046;--read-paper:#fffaf2}
body{color:var(--read-ink)!important;background:#fffaf2!important}
main :where(p,li,dd,dt,small,label,span:not([aria-hidden="true"])){text-shadow:none!important;opacity:1!important}
main :where(h1,h2,h3,h4){opacity:1!important;text-shadow:none!important}
/* Light sections */
main :where(.institution-section,.about-profile,.about-values,.about-system,.home-programs,.home-memory,.legal-intro,.law-group,.organization-data,.contact-intro,.memory-roster,.memory-stories,.pres-section,.timeline) :where(p,li,dd,dt,small,label,span:not([aria-hidden="true"])){color:var(--read-muted)!important}
main :where(.institution-section,.about-profile,.about-values,.about-system,.home-programs,.home-memory,.legal-intro,.law-group,.organization-data,.contact-intro,.memory-roster,.memory-stories,.pres-section,.timeline) :where(h1,h2,h3,h4,strong){color:var(--read-wine)!important}
/* Dark hero and CTA blocks */
:where(.home-command,.about-command,.institution-hero,.page-hero,.pres-hero,.memory-hero,.contact-dialogue,.institution-cta__card,.legal-source .institution-cta__card,.cta-section) :where(h1,h2,h3,h4,strong){color:#fff!important;text-shadow:0 2px 10px rgba(0,0,0,.22)!important}
:where(.home-command,.about-command,.institution-hero,.page-hero,.pres-hero,.memory-hero,.contact-dialogue,.institution-cta__card,.legal-source .institution-cta__card,.cta-section) :where(p,li,small,label,span:not([aria-hidden="true"])){color:#f8eef0!important;opacity:1!important;text-shadow:none!important}
:where(.home-command,.about-command,.institution-hero,.page-hero,.pres-hero,.memory-hero,.contact-dialogue,.institution-cta__card,.legal-source .institution-cta__card,.cta-section) :where(.institution-kicker,.page-kicker,.about-kicker,.home-heading__kicker,.pres-rank,.card-index,.law-card__number){color:#f1d99d!important}
/* Cards and form panels always use dark text */
:where(.feature-card,.activity-item,.impact-card,.law-card,.contact-cards article,.organization-grid article,.contact-form-panel,.about-profile__statement,.memory-card,.memorial-card,.state-award-card,.tl-body,.home-direction,.home-programs__grid article){background-color:#fff!important;color:var(--read-ink)!important}
:where(.feature-card,.activity-item,.impact-card,.law-card,.contact-cards article,.organization-grid article,.contact-form-panel,.about-profile__statement,.memory-card,.memorial-card,.state-award-card,.tl-body,.home-direction,.home-programs__grid article) :where(p,li,small,label,span:not([aria-hidden="true"]),dd,dt){color:var(--read-muted)!important;text-shadow:none!important;opacity:1!important}
:where(.feature-card,.activity-item,.impact-card,.law-card,.contact-cards article,.organization-grid article,.contact-form-panel,.about-profile__statement,.memory-card,.memorial-card,.state-award-card,.tl-body,.home-direction,.home-programs__grid article) :where(h1,h2,h3,h4,strong){color:var(--read-wine)!important;text-shadow:none!important;opacity:1!important}
/* Links */
main a{color:#7d1122!important;text-decoration-thickness:2px!important;text-underline-offset:3px!important}
:where(.home-command,.about-command,.institution-hero,.page-hero,.pres-hero,.memory-hero,.contact-dialogue,.institution-cta__card,.cta-section) a{color:#f1d99d!important;text-decoration-color:#f1d99d!important}
/* Buttons keep readable labels */
:where(.btn-primary,.home-btn--wine,.about-btn--wine,.institution-button:not(.institution-button--light),button[type="submit"]){background:#7d1122!important;color:#fff!important;border-color:#7d1122!important;text-shadow:none!important}
:where(.btn-secondary,.home-btn--light,.about-btn--light,.institution-button--light){color:#5f0a18!important;background:#fff!important;border-color:#fff!important;text-shadow:none!important}
/* Form fields */
input,textarea,select{background:#fff!important;color:#302428!important;border-color:rgba(95,10,24,.28)!important;opacity:1!important;text-shadow:none!important}
input::placeholder,textarea::placeholder{color:#7b6c70!important;opacity:1!important}
.consent-row,.home-contact__consent{background:#fff4dc!important;color:#4c3d42!important;border-color:rgba(182,144,66,.32)!important}
.consent-row span,.home-contact__consent span{color:#4c3d42!important}
/* Footer */
footer,footer *{opacity:1!important;text-shadow:none!important} footer p,footer li,footer span,footer small{color:#f8eef0!important} footer h3,footer strong{color:#fff!important} footer a{color:#f1d99d!important}

/* ===== memory-premium-final.css ===== */
/* Premium redesign for Аллея памяти */
body[data-page="memory"]{background:#f7efe4!important}
body[data-page="memory"] .page-hero{display:none!important}
body[data-page="memory"] .memory-page-redesign{background:linear-gradient(180deg,#4b0710 0,#7d1122 520px,#f8f1e7 521px,#fffaf2 100%)!important;overflow:hidden!important}
body[data-page="memory"] .memory-page-redesign section{border:0!important}
body[data-page="memory"] .memory-command-hero{padding:88px 0 58px!important;background:radial-gradient(circle at 78% 15%,rgba(241,217,157,.20),transparent 28%),linear-gradient(135deg,#33060d 0,#7d1122 58%,#4f0711 100%)!important;color:#fff!important;isolation:isolate;overflow:hidden!important}
body[data-page="memory"] .memory-command-hero:before{content:""!important;position:absolute!important;inset:auto 0 0!important;height:8px!important;background:linear-gradient(180deg,#fff 0 33.33%,#0039a6 33.33% 66.66%,#d52b1e 66.66% 100%)!important;opacity:1!important}
body[data-page="memory"] .memory-command-hero:after{content:"";position:absolute;right:-160px;top:-160px;width:420px;height:420px;border:1px solid rgba(241,217,157,.22);border-radius:50%;box-shadow:0 0 0 58px rgba(255,255,255,.025),0 0 0 116px rgba(255,255,255,.016);pointer-events:none}
body[data-page="memory"] .memory-command-shell{grid-template-columns:minmax(0,1fr) 340px!important;gap:34px!important;align-items:center!important;position:relative;z-index:2}
body[data-page="memory"] .memory-command-copy{padding:0!important;background:transparent!important;border:0!important;box-shadow:none!important;backdrop-filter:none!important}
body[data-page="memory"] .memory-command-kicker,body[data-page="memory"] .memory-section-kicker{color:#f1d99d!important;letter-spacing:.2em!important}
body[data-page="memory"] .memory-command-copy h1{max-width:900px!important;margin:20px 0!important;color:#fff!important;font-size:clamp(3rem,6.4vw,6.4rem)!important;line-height:.95!important;letter-spacing:-.045em!important;text-wrap:balance!important}
body[data-page="memory"] .memory-command-lead{max-width:760px!important;color:#fff3e0!important;font-size:1.16rem!important;line-height:1.75!important}
body[data-page="memory"] .memory-command-badges span{background:rgba(255,255,255,.10)!important;border-color:rgba(241,217,157,.45)!important;color:#fff!important;border-radius:10px!important}
body[data-page="memory"] .memory-command-panel{background:#fffaf2!important;color:#302428!important;border:1px solid rgba(241,217,157,.48)!important;border-radius:26px!important;box-shadow:0 28px 70px rgba(0,0,0,.25)!important;padding:26px!important;backdrop-filter:none!important}
body[data-page="memory"] .memory-command-stat{background:#fff!important;border:1px solid rgba(95,10,24,.12)!important;border-left:5px solid #b69042!important;border-radius:16px!important}
body[data-page="memory"] .memory-command-stat strong{color:#5f0a18!important}
body[data-page="memory"] .memory-command-stat span{color:#514046!important}
body[data-page="memory"] .memory-oath-section{padding:46px 0!important;background:#f8f1e7!important}
body[data-page="memory"] .memory-oath-card{border-radius:28px!important;border:1px solid rgba(182,144,66,.38)!important;border-left:7px solid #7d1122!important;background:linear-gradient(135deg,#fff,#fff6e6)!important;box-shadow:0 22px 55px rgba(79,7,17,.10)!important}
body[data-page="memory"] .memory-feature-section,body[data-page="memory"] .memory-heroes-section,body[data-page="memory"] .memory-archive-section{background:#fffaf2!important;padding:82px 0!important}
body[data-page="memory"] .memory-section-heading{margin-bottom:38px!important}.memory-section-heading--center{max-width:860px!important}
body[data-page="memory"] .memory-section-heading h2{font-size:clamp(2.35rem,4vw,4.2rem)!important;color:#5f0a18!important;letter-spacing:-.035em!important}
body[data-page="memory"] .memory-section-heading p{font-size:1.08rem!important;color:#514046!important}
body[data-page="memory"] .memory-feature-card{border-radius:32px!important;border:1px solid rgba(182,144,66,.42)!important;box-shadow:0 30px 78px rgba(79,7,17,.12)!important;background:#fff!important}
body[data-page="memory"] .memory-feature-visual{background:linear-gradient(135deg,#4f0711,#7d1122)!important;padding:24px!important}
body[data-page="memory"] .memory-feature-visual img{border-radius:22px!important;object-fit:cover!important;box-shadow:0 20px 50px rgba(0,0,0,.28)!important;border:1px solid rgba(255,255,255,.25)!important}
body[data-page="memory"] .memory-feature-copy{padding:48px!important}
body[data-page="memory"] .memory-feature-meta{background:#f5ead2!important;color:#5f0a18!important;border-radius:8px!important}
body[data-page="memory"] .memory-heroes-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:26px!important}
body[data-page="memory"] .memory-hero-card{display:flex!important;flex-direction:column!important;border-radius:24px!important;border:1px solid rgba(182,144,66,.30)!important;background:#fff!important;box-shadow:0 20px 52px rgba(79,7,17,.09)!important;overflow:hidden!important}
body[data-page="memory"] .memory-hero-card:hover{transform:translateY(-6px)!important;box-shadow:0 30px 70px rgba(79,7,17,.16)!important}
body[data-page="memory"] .memory-hero-photo{padding:0!important;background:#4f0711!important;position:relative!important}
body[data-page="memory"] .memory-hero-photo:after{content:"";position:absolute;left:0;right:0;bottom:0;height:5px;background:linear-gradient(90deg,#fff 0 33.33%,#0039a6 33.33% 66.66%,#d52b1e 66.66% 100%)}
body[data-page="memory"] .memory-hero-photo img{height:330px!important;min-height:0!important;width:100%!important;object-fit:cover!important;object-position:center 18%!important;border:0!important;border-radius:0!important;filter:saturate(1.02) contrast(1.03)!important}
body[data-page="memory"] .memory-hero-body{padding:24px 24px 28px!important;display:flex!important;flex-direction:column!important;gap:0!important;flex:1!important}
body[data-page="memory"] .memory-hero-years{color:#8a661d!important;font-size:.78rem!important;text-transform:uppercase!important;letter-spacing:.06em!important}
body[data-page="memory"] .memory-hero-body h3{font-size:1.65rem!important;color:#5f0a18!important}
body[data-page="memory"] .memory-hero-body p:last-child{color:#4e4145!important;line-height:1.68!important}
body[data-page="memory"] .memory-archive-card{border-radius:28px!important;border:1px solid rgba(182,144,66,.34)!important;background:linear-gradient(135deg,#fff,#fff8ea)!important;box-shadow:0 22px 58px rgba(79,7,17,.09)!important}
body[data-page="memory"] .memory-archive-photos img{height:340px!important;object-fit:cover!important}
body[data-page="memory"] .memory-call-section{background:#f8f1e7!important;padding:64px 0 92px!important}
body[data-page="memory"] .memory-call-card{border-radius:30px!important;background:linear-gradient(135deg,#33060d,#7d1122)!important;border:1px solid rgba(241,217,157,.28)!important;box-shadow:0 26px 68px rgba(79,7,17,.18)!important}
@media(max-width:1150px){body[data-page="memory"] .memory-command-shell,body[data-page="memory"] .memory-feature-card,body[data-page="memory"] .memory-archive-card{grid-template-columns:1fr!important}body[data-page="memory"] .memory-heroes-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}body[data-page="memory"] .memory-command-panel{max-width:680px!important}}
@media(max-width:720px){body[data-page="memory"] .memory-command-hero{padding:62px 0 44px!important}body[data-page="memory"] .memory-command-copy h1{font-size:clamp(2.55rem,13vw,4.2rem)!important}body[data-page="memory"] .memory-command-panel{padding:18px!important}body[data-page="memory"] .memory-heroes-grid{grid-template-columns:1fr!important}body[data-page="memory"] .memory-feature-copy{padding:28px!important}body[data-page="memory"] .memory-feature-visual img{min-height:320px!important;object-fit:contain!important;background:#2b1117!important}body[data-page="memory"] .memory-hero-photo img{height:auto!important;max-height:430px!important;object-fit:contain!important;background:#2b1117!important}body[data-page="memory"] .memory-archive-photos{grid-template-columns:1fr!important}body[data-page="memory"] .memory-archive-photos img{height:auto!important;max-height:380px!important;object-fit:contain!important}}

/* Compact, clearly defined hero blocks — final refinement */
body[data-page="memory"] .memory-feature-section,
body[data-page="memory"] .memory-heroes-section,
body[data-page="memory"] .memory-archive-section{padding:64px 0!important}
/* Главный символ: сбалансированный размер, не огромное фото */
body[data-page="memory"] .memory-feature-card{grid-template-columns:minmax(280px,.42fr) minmax(0,.58fr)!important;max-width:1080px!important;margin-inline:auto!important}
body[data-page="memory"] .memory-feature-visual img{height:420px!important;min-height:0!important;object-fit:cover!important}
body[data-page="memory"] .memory-feature-copy{padding:36px 40px!important}
body[data-page="memory"] .memory-feature-copy h3{font-size:clamp(1.6rem,2.4vw,2.3rem)!important}
/* Чёткая сетка героев: 4 колонки, компактные фото */
body[data-page="memory"] .memory-heroes-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:20px!important}
body[data-page="memory"] .memory-hero-card{border:1px solid rgba(95,10,24,.22)!important;border-top:5px solid #7d1122!important;border-radius:16px!important;box-shadow:0 12px 32px rgba(79,7,17,.08)!important;background:#fff!important}
body[data-page="memory"] .memory-hero-card:nth-child(even){border-top-color:#b69042!important}
body[data-page="memory"] .memory-hero-photo{background:#fff!important}
body[data-page="memory"] .memory-hero-photo img{height:220px!important;max-height:220px!important;object-fit:cover!important;object-position:center top!important}
body[data-page="memory"] .memory-hero-body{padding:16px 18px 20px!important}
body[data-page="memory"] .memory-hero-years{font-size:.72rem!important;margin-bottom:7px!important}
body[data-page="memory"] .memory-hero-body h3{font-size:1.22rem!important;margin-bottom:9px!important;line-height:1.2!important}
body[data-page="memory"] .memory-hero-body p:last-child{font-size:.9rem!important;line-height:1.6!important}
/* Архив: компактные карточки */
body[data-page="memory"] .memory-archive-card{padding:24px!important}
body[data-page="memory"] .memory-archive-photos img{height:260px!important}
body[data-page="memory"] .memory-archive-photos figcaption{font-size:.78rem!important}
@media(max-width:1150px){
  body[data-page="memory"] .memory-heroes-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
}
@media(max-width:900px){
  body[data-page="memory"] .memory-heroes-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body[data-page="memory"] .memory-feature-card{grid-template-columns:1fr!important;max-width:640px!important}
  body[data-page="memory"] .memory-feature-visual img{height:340px!important}
}
@media(max-width:720px){
  body[data-page="memory"] .memory-hero-photo img{height:240px!important;max-height:240px!important;object-fit:cover!important}
  body[data-page="memory"] .memory-feature-visual img{height:300px!important;object-fit:cover!important}
  body[data-page="memory"] .memory-archive-photos img{height:240px!important;max-height:240px!important;object-fit:cover!important}
}
@media(max-width:560px){
  body[data-page="memory"] .memory-heroes-grid{grid-template-columns:1fr!important;gap:18px!important}
  body[data-page="memory"] .memory-hero-card{max-width:420px!important;margin-inline:auto!important;width:100%!important}
}

/* Дизайн «Архивное дело героя»: фото слева в бордовой панели, текст справа — финальный вариант */
body[data-page="memory"] .memory-heroes-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:24px!important;counter-reset:hero}
body[data-page="memory"] .memory-hero-card{
  display:grid!important;grid-template-columns:228px minmax(0,1fr)!important;
  border:1px solid rgba(95,10,24,.18)!important;border-left:5px solid #7d1122!important;border-top:1px solid rgba(95,10,24,.18)!important;
  border-radius:18px!important;background:#fff!important;box-shadow:0 14px 38px rgba(79,7,17,.09)!important;
  overflow:hidden!important;position:relative!important;transition:transform .25s ease,box-shadow .25s ease,border-color .25s ease!important}
body[data-page="memory"] .memory-hero-card:nth-child(even){border-left-color:#b69042!important}
body[data-page="memory"] .memory-hero-card::before{
  counter-increment:hero;content:counter(hero,decimal-leading-zero);
  position:absolute;top:10px;right:16px;z-index:2;color:rgba(95,10,24,.16);
  font:900 1.35rem/1 Georgia,serif;letter-spacing:.02em}
body[data-page="memory"] .memory-hero-card:hover{transform:translateY(-4px)!important;box-shadow:0 22px 52px rgba(79,7,17,.15)!important;border-color:rgba(182,144,66,.5)!important}
/* Фотопанель: бордовое архивное поле с точечной фактурой и золотой рамкой */
body[data-page="memory"] .memory-hero-photo{position:relative!important;padding:16px!important;background:linear-gradient(160deg,#4f0711,#2b060b)!important;overflow:hidden!important}
body[data-page="memory"] .memory-hero-photo::before{content:""!important;position:absolute!important;inset:0!important;background-image:radial-gradient(rgba(241,217,157,.16) 1px,transparent 1.6px)!important;background-size:18px 18px!important;opacity:.55!important}
body[data-page="memory"] .memory-hero-photo::after{display:none!important}
body[data-page="memory"] .memory-hero-photo img{
  position:relative!important;z-index:1!important;width:100%!important;height:100%!important;min-height:236px!important;max-height:none!important;
  object-fit:cover!important;object-position:center 16%!important;border-radius:12px!important;
  border:1px solid rgba(241,217,157,.42)!important;box-shadow:0 12px 26px rgba(0,0,0,.34)!important;
  filter:sepia(.12) contrast(1.04)!important}
/* Бейдж звания со звездой */
body[data-page="memory"] .memory-hero-body{padding:22px 24px 24px!important;justify-content:center!important}
body[data-page="memory"] .memory-hero-years{
  display:inline-flex!important;align-items:center!important;gap:7px!important;align-self:flex-start!important;
  margin:0 0 10px!important;padding:5px 11px!important;border-radius:6px!important;
  background:#f7ecd2!important;border:1px solid rgba(182,144,66,.4)!important;
  color:#6b4d12!important;font:800 .72rem/1.3 Arial,sans-serif!important;letter-spacing:.07em!important;text-transform:uppercase!important}
body[data-page="memory"] .memory-hero-years::before{content:"★";color:#b69042;font-size:.82rem;line-height:1}
body[data-page="memory"] .memory-hero-body h3{font-size:1.34rem!important;margin:0 0 10px!important;color:#5f0a18!important}
body[data-page="memory"] .memory-hero-body p:last-child{font-size:.93rem!important;line-height:1.66!important;color:#4e4145!important}
/* Главный символ: усиленная архивная рамка и гербовая печать */
body[data-page="memory"] .memory-feature-card{grid-template-columns:minmax(300px,.46fr) minmax(0,.54fr)!important;border:1px solid rgba(182,144,66,.5)!important;box-shadow:0 30px 80px rgba(79,7,17,.14)!important}
body[data-page="memory"] .memory-feature-visual{position:relative!important;background:linear-gradient(160deg,#4f0711,#2b060b)!important;padding:22px!important;overflow:hidden!important}
body[data-page="memory"] .memory-feature-visual::before{content:""!important;position:absolute!important;inset:0!important;background-image:radial-gradient(rgba(241,217,157,.15) 1px,transparent 1.6px)!important;background-size:22px 22px!important;opacity:.5!important}
body[data-page="memory"] .memory-feature-visual img{position:relative!important;z-index:1!important;height:440px!important;border:1px solid rgba(241,217,157,.45)!important;filter:sepia(.08) contrast(1.03)!important}
body[data-page="memory"] .memory-feature-meta{border:1px solid rgba(182,144,66,.5)!important;font-weight:900!important}
body[data-page="memory"] .memory-feature-meta::before{content:"★";margin-right:7px;color:#b69042}
/* Архивные карточки в том же стиле */
body[data-page="memory"] .memory-archive-card{border-left:5px solid #7d1122!important}
body[data-page="memory"] .memory-archive-card:nth-child(even){border-left-color:#b69042!important}
body[data-page="memory"] .memory-archive-photos figure{border:1px solid rgba(182,144,66,.3)!important}
@media(max-width:1150px){
  body[data-page="memory"] .memory-heroes-grid{grid-template-columns:1fr!important;gap:22px!important}
  body[data-page="memory"] .memory-hero-card{max-width:860px!important}
}
@media(max-width:720px){
  body[data-page="memory"] .memory-hero-card{grid-template-columns:1fr!important;max-width:460px!important;margin-inline:auto!important;width:100%!important}
  body[data-page="memory"] .memory-hero-photo img{height:250px!important;min-height:0!important}
  body[data-page="memory"] .memory-feature-visual img{height:320px!important}
}

/* Badge must wrap within the card on narrow screens */
body[data-page="memory"] .memory-feature-meta{
  max-width:100%!important;flex-wrap:wrap!important;white-space:normal!important;
  line-height:1.45!important;height:auto!important;min-height:0!important;overflow-wrap:anywhere!important}
@media(max-width:560px){
  body[data-page="memory"] .memory-feature-meta{padding:7px 10px!important;font-size:.68rem!important;letter-spacing:.05em!important}
}

/* Final mobile fix: feature card must collapse to one column on narrow screens (must stay last). */
@media(max-width:900px){
  body[data-page="memory"] .memory-feature-card{grid-template-columns:1fr!important;max-width:640px!important;margin-inline:auto!important}
  body[data-page="memory"] .memory-feature-visual img{height:320px!important;min-height:0!important}
  body[data-page="memory"] .memory-feature-copy{padding:26px 22px!important}
}

/* ===== unified-footer.css ===== */
/* Unified footer: identical appearance on every page. */
footer{
  background:linear-gradient(180deg,#341218,#210d11)!important;
  border-top:4px solid #b69042!important;
  margin-top:78px!important;
  padding:50px 0 20px!important;
  color:#fff!important;
  box-shadow:none!important;
}
footer::before{display:none!important}
footer .footer-flag-line{
  display:block!important;height:6px!important;border-radius:99px!important;margin:0 0 26px!important;opacity:1!important;
  background:linear-gradient(90deg,#fff 0 33.33%,#0039a6 33.33% 66.66%,#d52b1e 66.66% 100%)!important;
}
footer .footer-grid{display:grid!important;grid-template-columns:1.2fr .8fr 1fr!important;gap:36px!important;align-items:start!important}
footer .footer-section h3{
  color:#fff!important;font:700 1.22rem/1.25 Georgia,serif!important;margin:0 0 14px!important;
  padding-bottom:10px!important;border-bottom:2px solid rgba(182,144,66,.65)!important;text-shadow:none!important;opacity:1!important
}
footer .footer-section p,footer .footer-section li{color:#e9dede!important;line-height:1.7!important;margin:0 0 10px!important;text-shadow:none!important;opacity:1!important}
footer .footer-section ul{margin:0!important;padding:0!important;list-style:none!important}
footer .footer-section strong{color:#fff!important}
footer .footer-section a{color:#f1d99d!important;text-decoration:none!important;transition:color .2s ease!important;text-shadow:none!important}
footer .footer-section a:hover{color:#fff!important;text-decoration:underline!important;text-underline-offset:3px!important}
footer .footer-bottom{
  margin-top:34px!important;padding-top:18px!important;border-top:1px solid rgba(255,255,255,.14)!important;
  text-align:center!important;color:#d8c9c9!important;font-size:.9rem!important;text-shadow:none!important;opacity:1!important
}
footer .footer-bottom a{color:#f1d99d!important}
@media(max-width:860px){footer .footer-grid{grid-template-columns:1fr!important;gap:26px!important}}

/* ===== visibility-safeguard-final.css ===== */
/* Final visibility safeguard: text must never be transparent or invisible. */
body:not(.accessibility-mode) :where(h1,h2,h3,h4,h5,h6,p,li,dd,dt,label,small,strong,em,td,th,figcaption,blockquote){
  opacity:1!important;
}
/* Keep intentional reveal/animation states working: they transition to 1 anyway, but never leave text stuck hidden after load. */
.loaded .reveal-patriotic,[data-reveal],[data-about-reveal],[data-institution-reveal]{
  opacity:1!important;
}
/* Decorative layers never sit above text */
.patriotic-layer,.anim-memory-stars,.anim-laurel-orbit,.anim-medal-salute,.anim-document-ribbons,.anim-signal-lines{
  pointer-events:none!important;z-index:0!important;
}
main,main section{position:relative;z-index:1}
/* Carousel text stays readable in every slide state */
.carousel-slide:not(.active) *{visibility:hidden!important}
.carousel-slide.active *{visibility:visible!important;opacity:1!important}
/* Focus visibility for accessibility */
:focus-visible{outline:3px solid #0039a6!important;outline-offset:2px!important}
/* Placeholders readable */
::placeholder{color:#7b6c70!important;opacity:1!important}
/* Selection readable */
::selection{background:#7d1122!important;color:#fff!important}
/* Honeypot anti-spam field: invisible to people, present for bots */
.hp-field{position:absolute!important;left:-9999px!important;top:-9999px!important;width:1px!important;height:1px!important;overflow:hidden!important;opacity:0!important;pointer-events:none!important}
/* Мягкая защита фото от перетаскивания/сохранения одним кликом */
img{-webkit-user-drag:none;user-drag:none;-webkit-touch-callout:none}

/* Выравнивание "голых" текстовых блоков в <main> (без .container-разметки):
   раньше параграфы сжимались до случайной ширины и уезжали влево вместо
   центрирования наравне с заголовками. */
.honor-wrap{max-width:920px!important;margin:32px auto!important;width:100%!important}
.honor-wrap p{max-width:100%!important;width:100%!important;text-align:left!important}
.merit-grid{max-width:1180px!important;margin:0 auto!important;display:grid!important;grid-template-columns:repeat(auto-fit,minmax(280px,1fr))!important;gap:22px!important}
/* Тот же баг "голого" текстового блока — теперь на .pres-narrative («Биография в деталях») */
body[data-page="president"] .pres-narrative{max-width:900px!important;margin:14px auto 0!important;width:100%!important;display:block!important}
body[data-page="president"] .pres-narrative p{max-width:100%!important;width:100%!important;text-align:left!important;float:none!important}

/* ==================== Триколор-индикатор прокрутки ==================== */
#pdScrollProgress{position:fixed;top:0;left:0;width:100%;height:4px;z-index:9999;background:rgba(0,0,0,.06);pointer-events:none}
#pdScrollProgress span{display:block;height:100%;width:0%;background:linear-gradient(90deg,#ffffff 0%,#ffffff 33%,#0039A6 33%,#0039A6 66%,#D52B1E 66%,#D52B1E 100%);box-shadow:0 0 10px rgba(165,125,34,.55);transition:width .12s linear}
.accessibility-mode #pdScrollProgress{display:none!important}
@media(prefers-reduced-motion:reduce){#pdScrollProgress span{transition:none}}

/* ==================== Мерцающая триколор-линия в подвале ==================== */
.footer-flag-line{position:relative;overflow:hidden}
.footer-flag-line:after{content:"";position:absolute;inset:0;background:linear-gradient(110deg,transparent,rgba(255,255,255,.55),transparent);transform:translateX(-130%);animation:footerFlagSheen 6s ease-in-out infinite}
@keyframes footerFlagSheen{0%,60%{transform:translateX(-130%)}90%,100%{transform:translateX(130%)}}
@media(prefers-reduced-motion:reduce){.footer-flag-line:after{animation:none!important}}

/* ==================== Три карточки главных памятников на Аллее памяти ==================== */
.memory-feature-stack{display:flex!important;flex-direction:column!important;gap:40px!important}
/* Единая высота и выравнивание фото во всех трёх карточках, на любом брейкпоинте */
.memory-feature-stack .memory-feature-card{width:100%!important;max-width:1080px!important;margin-inline:auto!important;box-sizing:border-box!important}
.memory-feature-stack .memory-feature-visual{display:flex!important;align-items:center!important;justify-content:center!important}
body[data-page="memory"] .memory-feature-stack .memory-feature-visual img{width:100%!important;height:auto!important;aspect-ratio:3/4!important;max-height:none!important;min-height:0!important;object-fit:cover!important;object-position:center!important;display:block!important}

/* ==================== Богаче фоновые декоративные частицы ==================== */
.anim-memory-stars span,.anim-laurel-orbit span,.anim-medal-salute span,.anim-signal-lines span{filter:drop-shadow(0 2px 6px rgba(165,125,34,.28))}
.anim-memory-stars span:nth-child(3n){transform:scale(1.3)}
.anim-laurel-orbit span:nth-child(4n){transform:scale(1.25) rotate(calc(var(--i)*22deg))}
