/* P-120 WEB-EXPLORE PASS 5.3.1 — screenshot-driven presentation corrections
   Presentation only. No questionnaire, scoring, persistence, privacy, safety or scientific-authority changes. */

/* --------------------------------------------------------------------------
   A. MAIN — saved-research information bubble
   -------------------------------------------------------------------------- */
html.p120-brand53-ready .editorial-resume-rail.p120-resume53{
  width:min(1460px,100%);
  margin:0 auto 22px;
  padding:12px 14px 12px 18px;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:10px 18px;
  align-items:center;
  border:1px solid color-mix(in srgb,var(--p120-brand-line) 60%,transparent);
  border-radius:22px;
  background:color-mix(in srgb,var(--p120-brand-surface) 88%,transparent);
  box-shadow:0 14px 38px color-mix(in srgb,var(--p120-brand-ink) 7%,transparent);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
}
.p120-resume53__copy{min-width:0;display:grid;gap:6px}
.p120-resume53__topline{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.p120-resume53__state{
  font:700 10px/1.2 var(--p120-brand-sans,"IBM Plex Sans",sans-serif);
  letter-spacing:.10em;text-transform:uppercase;color:var(--p120-brand-ink-2)
}
.p120-resume53__progress{
  min-height:24px;display:inline-flex;align-items:center;padding:5px 8px;border-radius:999px;
  background:color-mix(in srgb,var(--p120-brand-teal) 9%,transparent);
  color:var(--p120-brand-teal-deep);font:700 10px/1 var(--p120-brand-sans,"IBM Plex Sans",sans-serif)
}
.p120-resume53__module{font:600 13px/1.35 var(--p120-brand-sans,"IBM Plex Sans",sans-serif);color:var(--p120-brand-ink)}
.p120-resume53__meta{display:flex;align-items:center;gap:8px 14px;flex-wrap:wrap;color:var(--p120-brand-ink-2)}
.p120-resume53__meta span{margin:0!important;font:550 10.5px/1.35 var(--p120-brand-sans,"IBM Plex Sans",sans-serif)!important;color:inherit!important;white-space:nowrap}
.p120-resume53__meta strong{font-weight:700;color:var(--p120-brand-ink)}
.p120-resume53__meta .p120-resume53__session{font-family:"IBM Plex Mono",ui-monospace,monospace!important;font-size:9.5px!important;letter-spacing:.035em}
.p120-resume53__actions{display:flex;align-items:center;gap:10px;justify-content:flex-end;flex-wrap:wrap}
html.p120-brand53-ready .p120-resume53__actions .btn{min-height:40px;padding:9px 15px;font-size:11px;white-space:nowrap}
html.p120-brand53-ready .p120-resume53__actions #homeRestart{background:transparent!important;color:var(--p120-brand-ink)!important;border-color:color-mix(in srgb,var(--p120-brand-line) 75%,transparent)!important}

/* --------------------------------------------------------------------------
   B. ONE PUBLIC FOOTER — suppress legacy page-local footer rails
   -------------------------------------------------------------------------- */
.p120-footer-superseded{display:none!important}

.p120-legal-footer.p120-site-footer{
  position:relative;z-index:2;
  border-top:1px solid color-mix(in srgb,var(--p120-brand-line,#9DBCB2) 56%,transparent)!important;
  background:color-mix(in srgb,var(--p120-brand-canvas,#F2EEE2) 95%,var(--p120-brand-surface,#FBF8EF) 5%)!important;
  color:var(--p120-brand-ink,#263533)!important;
}
.p120-legal-footer.p120-site-footer .p120-legal-footer__inner.p120-site-footer__inner{
  width:min(var(--p120-brand-stage,1680px),calc(100% - 64px))!important;
  max-width:var(--p120-brand-stage,1680px)!important;
  margin:0 auto!important;
  padding:clamp(42px,4.5vw,72px) clamp(0px,1.5vw,22px) 28px!important;
  display:grid!important;
  grid-template-columns:minmax(280px,.72fr) minmax(420px,1.28fr)!important;
  grid-template-areas:"brand legal" "chapters legal" "sandbox sandbox";
  column-gap:clamp(54px,7vw,126px)!important;
  row-gap:24px!important;
  align-items:start!important;
}
.p120-site-footer__brand{grid-area:brand;display:grid;grid-template-columns:38px minmax(0,1fr);gap:14px;align-items:center;max-width:430px}
.p120-site-footer__mark{width:38px;height:38px;border-radius:50%;position:relative;border:1px solid color-mix(in srgb,var(--p120-brand-teal) 28%,transparent);background:radial-gradient(circle at 35% 35%,color-mix(in srgb,var(--p120-brand-teal) 11%,transparent),transparent 58%)}
.p120-site-footer__mark:before{content:"";position:absolute;inset:5px;border:1.5px solid color-mix(in srgb,var(--p120-brand-teal) 42%,transparent);border-radius:50%}
.p120-site-footer__mark:after{content:"";position:absolute;width:10px;height:10px;border-radius:50%;right:4px;top:5px;background:var(--p120-brand-teal);box-shadow:-15px 17px 0 var(--p120-brand-bronze,#B39063)}
.p120-site-footer__brandcopy{min-width:0;display:grid;gap:6px}
.p120-footer-brand{margin:0!important;font:500 clamp(20px,1.55vw,28px)/1.08 var(--p120-brand-display,"Noto Serif Display",serif)!important;letter-spacing:-.025em;color:var(--p120-brand-ink)!important}
.p120-site-footer__brandcopy small{font:700 9px/1.35 var(--p120-brand-sans,"IBM Plex Sans",sans-serif);letter-spacing:.12em;text-transform:uppercase;color:var(--p120-brand-ink-2)}
.p120-site-footer__chapters{grid-area:chapters;display:flex;flex-wrap:wrap;gap:8px 16px;max-width:520px;padding-top:5px}
.p120-site-footer__chapters a{font:600 11px/1.4 var(--p120-brand-sans,"IBM Plex Sans",sans-serif);text-decoration:none;color:var(--p120-brand-ink-2);border-bottom:1px solid transparent;padding-bottom:2px}
.p120-site-footer__chapters a:hover,.p120-site-footer__chapters a:focus-visible{color:var(--p120-brand-ink);border-bottom-color:currentColor;outline:none}
.p120-site-footer__legal{grid-area:legal;display:grid;gap:18px;max-width:780px;justify-self:end}
.p120-legal-footer.p120-site-footer .p120-legal-footer__notice{margin:0;max-width:none;font:450 11.5px/1.72 var(--p120-brand-sans,"IBM Plex Sans",sans-serif);color:var(--p120-brand-ink-2)}
.p120-legal-footer.p120-site-footer .p120-legal-footer__links{display:flex;justify-content:flex-start;flex-wrap:wrap;gap:8px 18px}
.p120-legal-footer.p120-site-footer .p120-legal-footer__links a{font:650 10.5px/1.35 var(--p120-brand-sans,"IBM Plex Sans",sans-serif);color:var(--p120-brand-ink);border-bottom:1px solid color-mix(in srgb,var(--p120-brand-ink) 22%,transparent)}
.p120-legal-footer.p120-site-footer .p120-legal-footer__sandbox{grid-area:sandbox;margin:4px 0 0!important;padding-top:16px!important;border-top:1px solid color-mix(in srgb,var(--p120-brand-line) 38%,transparent)!important;font:500 8.5px/1.5 "IBM Plex Mono",ui-monospace,monospace!important;letter-spacing:.08em;color:color-mix(in srgb,var(--p120-brand-ink-2) 80%,transparent)!important;text-transform:uppercase}

/* Why P-120 retains its original black editorial end state, now as the one footer. */
body.wp-fixed-editorial-theme .p120-legal-footer.p120-site-footer,
.p120-legal-footer--dark.p120-site-footer{
  --p120-brand-canvas:#090B0C;
  --p120-brand-surface:#111416;
  --p120-brand-ink:#F3EEE5;
  --p120-brand-ink-2:rgba(243,238,229,.60);
  --p120-brand-line:rgba(255,255,255,.15);
  --p120-brand-teal:#7C9A9B;
  --p120-brand-bronze:#C7A05B;
  background:#090B0C!important;
}

/* --------------------------------------------------------------------------
   C. WHY P-120 — restore the original dark header, keep canonical geometry
   -------------------------------------------------------------------------- */
html.p120-brand53-ready body.wp-fixed-editorial-theme{
  --p120-brand-header-bg:rgba(9,11,12,.94);
  --p120-brand-ink:#F3EEE5;
  --p120-brand-ink-2:rgba(243,238,229,.68);
  --p120-brand-line:rgba(255,255,255,.15);
  --p120-brand-bubble:rgba(255,255,255,.028);
  --p120-brand-bubble-line:rgba(255,255,255,.11);
  --p120-brand-popover:rgba(15,18,20,.988);
  --p120-brand-hover:rgba(255,255,255,.075);
  --p120-brand-focus:#9DB7B4;
  --p120-brand-teal:#7C9A9B;
}
html.p120-brand53-ready body.wp-fixed-editorial-theme .wp-header.p120-brand53-header{
  background:var(--p120-brand-header-bg)!important;
  color:var(--p120-brand-ink)!important;
  border-top-color:var(--p120-brand-teal)!important;
  border-bottom-color:rgba(255,255,255,.09)!important;
}
html.p120-brand53-ready body.wp-fixed-editorial-theme .wp-header .brand-mark{border-color:rgba(255,255,255,.14)!important;background:radial-gradient(circle at 35% 35%,rgba(124,154,155,.10),rgba(124,154,155,.03) 55%,transparent 56%)!important}
html.p120-brand53-ready body.wp-fixed-editorial-theme .wp-header .brand-orbit{border-color:rgba(137,156,157,.36)!important}
html.p120-brand53-ready body.wp-fixed-editorial-theme .wp-header .brand-orbit:after{background:rgba(199,160,91,.30)!important}
html.p120-brand53-ready body.wp-fixed-editorial-theme .wp-header .brand-node-a{background:#7C9A9B!important}
html.p120-brand53-ready body.wp-fixed-editorial-theme .wp-header .brand-node-b{background:#C7A05B!important}
html.p120-brand53-ready body.wp-fixed-editorial-theme .wp-header :is(.brand,.brand-sub){color:var(--p120-brand-ink)!important}
html.p120-brand53-ready body.wp-fixed-editorial-theme .wp-header .brand-sub{opacity:.62}
html.p120-brand53-ready body.wp-fixed-editorial-theme .wp-header .wp-start{border-color:rgba(255,255,255,.22);color:#F3EEE5;background:rgba(255,255,255,.025)}
html.p120-brand53-ready body.wp-fixed-editorial-theme .wp-header .wp-start:hover{background:#F0ECE4;color:#111}

/* Remove legacy duplicate language/theme controls after canonical controls arrive. */
html.p120-brand53-ready .wp-header-tools > :is(.wp-lang-switch,.wp-theme){display:none!important}
html.p120-brand53-ready .creator-topbar__inner > .creator-tools.p120-brand53-legacy-tools{display:none!important}

/* Founder keeps the same light header but without a second control cluster. */
html.p120-brand53-ready .creator-topbar.p120-brand53-header{box-shadow:0 1px 0 color-mix(in srgb,var(--p120-brand-line) 26%,transparent)}
html.p120-brand53-ready .creator-context{width:min(var(--p120-brand-stage),100%);padding-inline:clamp(18px,2.3vw,42px);opacity:.78}

/* --------------------------------------------------------------------------
   D. Responsive
   -------------------------------------------------------------------------- */
@media(max-width:1080px){
  html.p120-brand53-ready .editorial-resume-rail.p120-resume53{grid-template-columns:1fr;padding:14px 16px;top:86px}
  .p120-resume53__actions{justify-content:flex-start}
  .p120-legal-footer.p120-site-footer .p120-legal-footer__inner.p120-site-footer__inner{width:min(100% - 36px,var(--p120-brand-stage,1680px))!important;grid-template-columns:1fr!important;grid-template-areas:"brand" "chapters" "legal" "sandbox";row-gap:22px!important;padding:36px 0 26px!important}
  .p120-site-footer__legal{justify-self:start;max-width:860px}
  .p120-site-footer__chapters{max-width:100%}
}
@media(max-width:620px){
  html.p120-brand53-ready .editorial-resume-rail.p120-resume53{border-radius:18px;gap:12px}
  .p120-resume53__module{font-size:12px}
  .p120-resume53__meta{display:grid;gap:5px}
  .p120-resume53__meta span{white-space:normal}
  .p120-resume53__actions{display:grid;grid-template-columns:1fr 1fr;width:100%}
  html.p120-brand53-ready .p120-resume53__actions .btn{width:100%;padding-inline:10px}
  .p120-site-footer__brand{grid-template-columns:34px minmax(0,1fr);gap:12px}.p120-site-footer__mark{width:34px;height:34px}
  .p120-footer-brand{font-size:20px!important}
  .p120-site-footer__chapters{display:grid;grid-template-columns:1fr 1fr;gap:10px 18px}
}
@media(min-width:3200px){
  html.p120-brand53-ready .editorial-resume-rail.p120-resume53{width:min(2960px,100%);padding:16px 20px;border-radius:28px}
  .p120-resume53__state,.p120-resume53__progress{font-size:13px}.p120-resume53__module{font-size:17px}.p120-resume53__meta span{font-size:13px!important}.p120-resume53__meta .p120-resume53__session{font-size:12px!important}
  html.p120-brand53-ready .p120-resume53__actions .btn{min-height:48px;padding:11px 19px;font-size:14px}
  .p120-site-footer__brand{grid-template-columns:50px minmax(0,1fr)}.p120-site-footer__mark{width:50px;height:50px}.p120-footer-brand{font-size:34px!important}
  .p120-site-footer__brandcopy small{font-size:12px}.p120-site-footer__chapters a{font-size:14px}.p120-legal-footer.p120-site-footer .p120-legal-footer__notice{font-size:14px}.p120-legal-footer.p120-site-footer .p120-legal-footer__links a{font-size:13px}.p120-legal-footer.p120-site-footer .p120-legal-footer__sandbox{font-size:10px!important}
}

/* --------------------------------------------------------------------------
   E. MOBILE UI MICRO-CORRECTION / PASS 2.1
   CTA-01A: canonical RU /system/ coverage without reopening header authority.
   PROGRESS-01: separate session label and percentage as distinct semantic units.
   -------------------------------------------------------------------------- */
@media(max-width:820px){
  /* RU canonical System did not load the dedicated PASS 2 CTA sheet. Keep the
     same PASS 2.1 authority here, scoped only to that route. */
  body[data-p120-page="system"][data-p120-locale="ru"] .mobile-bottom-nav button.cta,
  body[data-p120-page="system"][data-p120-locale="ru"] .mobile-bottom-nav button.cta.active{
    background:linear-gradient(135deg,#171715,color-mix(in srgb,#171715 74%,#4A8E89));
    color:#fff;
    box-shadow:0 16px 30px rgba(18,18,16,.16);
  }
  body[data-p120-page="system"][data-p120-locale="ru"] .mobile-bottom-nav button.cta .mobile-nav-icon,
  body[data-p120-page="system"][data-p120-locale="ru"] .mobile-bottom-nav button.cta.active .mobile-nav-icon{
    background:rgba(255,255,255,.14);
    color:#fff;
  }
  body[data-p120-page="system"][data-p120-locale="ru"][data-theme="graphite"] .mobile-bottom-nav button.cta,
  body[data-p120-page="system"][data-p120-locale="ru"][data-theme="graphite"] .mobile-bottom-nav button.cta.active{
    background:linear-gradient(135deg,#58706C,#49635F);
    color:#F5EFE5;
    border-color:rgba(205,220,214,.22);
    box-shadow:0 14px 32px rgba(0,0,0,.16),0 0 30px rgba(130,155,152,.08);
  }
  body[data-p120-page="system"][data-p120-locale="ru"][data-theme="graphite"] .mobile-bottom-nav button.cta .mobile-nav-icon,
  body[data-p120-page="system"][data-p120-locale="ru"][data-theme="graphite"] .mobile-bottom-nav button.cta.active .mobile-nav-icon{
    background:rgba(245,239,228,.12);
    color:#F5EFE5;
  }
  body[data-p120-page="system"][data-p120-locale="ru"][data-theme="museum"] .mobile-bottom-nav button.cta,
  body[data-p120-page="system"][data-p120-locale="ru"][data-theme="museum"] .mobile-bottom-nav button.cta.active{
    background:linear-gradient(135deg,#2F756F,#255F5C);
    color:#FFF9EC;
    border-color:rgba(31,92,91,.54);
    box-shadow:0 14px 32px rgba(31,92,91,.16),0 0 34px rgba(47,125,120,.10);
  }
  body[data-p120-page="system"][data-p120-locale="ru"][data-theme="museum"] .mobile-bottom-nav button.cta .mobile-nav-icon,
  body[data-p120-page="system"][data-p120-locale="ru"][data-theme="museum"] .mobile-bottom-nav button.cta.active .mobile-nav-icon{
    background:rgba(255,255,255,.12);
    color:#FFF9EC;
  }

  /* Session progress: label and metric are intentionally stacked. The outer
     meta row remains responsible for left/right alignment and the counter. */
  .mobile-menu-progress-top > div:first-child{
    min-width:0;
    display:grid;
    gap:4px;
    align-content:end;
  }
  .mobile-menu-progress-top > div:first-child > span,
  .mobile-menu-progress-top > div:first-child > strong{
    display:block;
  }
  .mobile-menu-progress-top > span:last-child{
    white-space:nowrap;
    align-self:end;
  }
}

/* --------------------------------------------------------------------------
   F. BRAND / HEADER MOBILE LOCKUP RECONCILIATION / PASS 2
   Authority: preserve the established public identity P-120 + Research
   Architecture / Исследовательская архитектура across desktop and mobile.
   Presentation only: no questionnaire, scoring, CTA, persistence, report,
   scientific-authority, privacy or navigation-IA changes.
   -------------------------------------------------------------------------- */

/* Canonical brand authority wins over legacy Main breakpoint rules that hid
   .brand-sub at 1420 / 860 / 820 / 720. The descriptor remains real DOM text. */
html.p120-brand53-ready :is(.brand-button,.explore-brand,.creator-brand,.wp-brand,.p120-brand53-brand) .brand-sub{
  display:block!important;
}

@media(max-width:1080px){
  html.p120-brand53-ready :is(.brand-button,.explore-brand,.creator-brand,.wp-brand,.p120-brand53-brand){
    gap:10px!important;
  }
  html.p120-brand53-ready :is(.brand-button,.explore-brand,.creator-brand,.wp-brand,.p120-brand53-brand) .brand-lockup{
    min-width:0;
    gap:3px;
  }
  html.p120-brand53-ready :is(.brand-button,.explore-brand,.creator-brand,.wp-brand,.p120-brand53-brand) .brand-sub{
    font-size:7px!important;
    line-height:1.05!important;
    letter-spacing:.12em!important;
    white-space:nowrap!important;
  }
}

/* Phone geometry: retain the descriptor before sacrificing functional controls.
   Main's duplicate quick theme icon is expendable because the full theme chooser
   remains in the Main mobile drawer. Static Explore keeps its theme control. */
@media(max-width:430px){
  html.p120-brand53-ready :is(.topbar-inner,.explore-topbar__inner,.creator-topbar__inner,.wp-header-inner,.p120-brand53-header__inner){
    padding-inline:12px!important;
    gap:8px!important;
  }
  html.p120-brand53-ready :is(.brand-button,.explore-brand,.creator-brand,.wp-brand,.p120-brand53-brand){
    gap:8px!important;
  }
  html.p120-brand53-ready .brand-mark{
    width:34px!important;
    height:34px!important;
    flex-basis:34px!important;
  }
  html.p120-brand53-ready .brand{font-size:21px!important}
  html.p120-brand53-ready :is(.brand-button,.explore-brand,.creator-brand,.wp-brand,.p120-brand53-brand) .brand-sub{
    font-size:6.5px!important;
    letter-spacing:.095em!important;
  }
  html.p120-brand53-ready .topbar .p120-brand53-tools--main-quick .p120-brand53-theme{
    display:none!important;
  }
  html.p120-brand53-ready .topbar .p120-brand53-tools--main-quick{gap:2px!important}
  html.p120-brand53-ready .topbar .p120-brand53-language a{
    min-width:27px;
    height:27px;
    padding-inline:3px;
  }
  html.p120-brand53-ready .topbar-tools{gap:5px!important;flex-wrap:nowrap!important}
  html.p120-brand53-ready .topbar .progress-badge{
    min-width:40px;
    padding-inline:7px;
    font-size:10px;
  }
  html.p120-brand53-ready .topbar .mobile-menu-toggle{
    min-width:44px;
    min-height:44px;
  }

  /* Explore carries canonical locale/theme utilities plus its drawer trigger.
     At phone widths retain all capabilities while showing only the cross-locale
     destination and converting the drawer label into a compact icon control. */
  html.p120-brand53-ready .explore-topbar .p120-brand53-tools{
    gap:4px!important;
    flex:0 0 auto;
  }
  html.p120-brand53-ready .explore-topbar .p120-brand53-language a{
    min-width:27px;
    height:27px;
    padding-inline:3px;
  }
  html.p120-brand53-ready .explore-topbar .p120-brand53-language a[aria-current='page']{
    display:none!important;
  }
  html.p120-brand53-ready .explore-topbar .explore-menu-btn{
    display:inline-flex!important;
    align-items:center;
    justify-content:center;
    flex:0 0 44px;
    width:44px;
    min-width:44px;
    height:44px;
    min-height:44px;
    margin-left:0!important;
    padding:0!important;
    font-size:0!important;
    line-height:1!important;
  }
  html.p120-brand53-ready .explore-topbar .explore-menu-btn::before{
    content:'☰';
    font:500 18px/1 var(--p120-brand-sans);
    letter-spacing:0;
  }

  /* Why P-120 is composition-frozen. This is isolated header micro-polish only:
     the brand already links home, so the legacy mobile home pill is redundant.
     Keep one cross-locale action plus the canonical theme control. */
  html.p120-brand53-ready .wp-header .wp-mobile-menu{
    display:none!important;
  }
  html.p120-brand53-ready .wp-header .wp-header-tools{
    min-width:0!important;
    gap:5px!important;
    margin-left:auto!important;
  }
  html.p120-brand53-ready .wp-header .p120-brand53-tools{
    gap:4px!important;
  }
  html.p120-brand53-ready .wp-header .p120-brand53-language a[aria-current='page']{
    display:none!important;
  }
  html.p120-brand53-ready .wp-header .p120-brand53-language a{
    min-width:27px;
    height:27px;
    padding-inline:3px;
  }
}

/* Extreme narrow stress regime. Full wording is preserved; typography and
   spacing are compacted rather than hiding the identity descriptor. */
@media(max-width:359px){
  html.p120-brand53-ready :is(.topbar-inner,.explore-topbar__inner,.creator-topbar__inner,.wp-header-inner,.p120-brand53-header__inner){
    padding-inline:10px!important;
    gap:7px!important;
  }
  html.p120-brand53-ready :is(.brand-button,.explore-brand,.creator-brand,.wp-brand,.p120-brand53-brand){
    gap:7px!important;
  }
  html.p120-brand53-ready .brand-mark{
    width:31px!important;
    height:31px!important;
    flex-basis:31px!important;
  }
  html.p120-brand53-ready .brand{font-size:20px!important}
  html.p120-brand53-ready :is(.brand-button,.explore-brand,.creator-brand,.wp-brand,.p120-brand53-brand) .brand-sub{
    font-size:6.25px!important;
    letter-spacing:.065em!important;
  }
  html.p120-brand53-ready .topbar .p120-brand53-language a{
    min-width:25px;
    height:27px;
    padding-inline:2px;
  }
  html.p120-brand53-ready .topbar-tools{gap:4px!important}
  html.p120-brand53-ready .topbar .progress-badge{
    min-width:38px;
    padding-inline:6px;
  }
  html.p120-brand53-ready .explore-topbar .p120-brand53-language a,
  html.p120-brand53-ready .wp-header .p120-brand53-language a{
    min-width:25px;
    padding-inline:2px;
  }
}
