/* ========================================================================== 
   Middle Community 0.4.0 — unified visual system for every internal page
   ========================================================================== */

:root{
  --mc-page-canvas:1480px;
  --mc-page-radius:28px;
  --mc-page-radius-sm:18px;
  --mc-page-border:#dfe8f2;
  --mc-page-bg:#f4f7fb;
  --mc-page-surface:#fff;
  --mc-page-text:#10213a;
  --mc-page-muted:#73839a;
  --mc-page-blue:#1977e9;
  --mc-page-blue-soft:#edf6ff;
  --mc-page-shadow:0 14px 40px rgba(27,55,88,.07);
  --mc-page-shadow-hover:0 20px 50px rgba(27,55,88,.12);
}

body:not(.home):not(.front-page){
  background:var(--mc-page-bg)!important;
  color:var(--mc-page-text)!important;
}

/* --------------------------------------------------------------------------
   Header: same visual language as the homepage on desktop
   -------------------------------------------------------------------------- */
@media(min-width:721px){
  body:not(.home):not(.front-page) .middle-site-header{
    position:sticky!important;
    top:0!important;
    z-index:1200!important;
    padding-top:0!important;
    background:rgba(244,247,251,.88)!important;
    backdrop-filter:blur(18px) saturate(1.08)!important;
    -webkit-backdrop-filter:blur(18px) saturate(1.08)!important;
    border-bottom:1px solid rgba(220,230,240,.78)!important;
    pointer-events:auto!important;
  }
  body.admin-bar:not(.home):not(.front-page) .middle-site-header{top:32px!important}
  body:not(.home):not(.front-page) .middle-header-row{
    width:min(var(--mc-page-canvas),calc(100% - 44px))!important;
    min-height:72px!important;
    margin:0 auto!important;
    padding:8px 10px 8px 12px!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
  }
  body:not(.home):not(.front-page) .middle-brand{gap:9px!important}
  body:not(.home):not(.front-page) .middle-brand img{max-height:44px!important}
  body:not(.home):not(.front-page) .middle-brand__text{font-size:18px!important}
  body:not(.home):not(.front-page) .middle-home-header-search{
    display:flex!important;
    align-items:center!important;
    flex:1 1 460px!important;
    max-width:620px!important;
    min-height:44px!important;
    margin-left:12px!important;
    padding:0 15px!important;
    gap:10px!important;
    border:1px solid #dce7f2!important;
    border-radius:16px!important;
    background:#fff!important;
    box-shadow:0 8px 22px rgba(25,54,86,.045)!important;
  }
  body:not(.home):not(.front-page) .middle-home-header-search svg{width:19px!important;height:19px!important;fill:none!important;stroke:#6e8096!important;stroke-width:1.8!important}
  body:not(.home):not(.front-page) .middle-home-header-search input{
    width:100%!important;min-width:0!important;border:0!important;outline:0!important;background:transparent!important;color:#17283e!important;font-size:13px!important;
  }
  body:not(.home):not(.front-page) .middle-home-header-search input::placeholder{color:#91a0b1!important}
  body:not(.home):not(.front-page) .middle-header-tools{margin-left:auto!important}
  body:not(.home):not(.front-page) .middle-header-tools>.middle-search-toggle{display:none!important}
  body:not(.home):not(.front-page) .middle-header-weather,body:not(.home):not(.front-page) .middle-icon-btn,body:not(.home):not(.front-page) .middle-btn--ghost,body:not(.home):not(.front-page) .middle-account-link,body:not(.home):not(.front-page) .middle-messages-link{
    border-color:#dce7f2!important;background:#fff!important;box-shadow:0 7px 18px rgba(25,54,86,.04)!important;
  }
  body:not(.home):not(.front-page) .middle-home-topnav{
    width:100%!important;
    height:48px!important;
    display:flex!important;
    align-items:center!important;
    padding:0!important;
    background:#fff!important;
    border-top:1px solid #edf2f7!important;
    border-bottom:1px solid #e7eef6!important;
  }
  body:not(.home):not(.front-page) .middle-home-topnav__scroll{
    width:min(var(--mc-page-canvas),calc(100% - 44px))!important;
    height:48px!important;
    margin:0 auto!important;
    display:flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:2px!important;
    overflow-x:auto!important;
    scrollbar-width:none!important;
  }
  body:not(.home):not(.front-page) .middle-home-topnav__scroll::-webkit-scrollbar{display:none!important}
  body:not(.home):not(.front-page) .middle-home-topnav a,body:not(.home):not(.front-page) .middle-home-topnav__more{
    flex:0 0 auto!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:6px!important;
    min-height:38px!important;
    padding:0 11px!important;
    border:0!important;
    border-radius:12px!important;
    background:transparent!important;
    color:#27384f!important;
    font-size:11.5px!important;
    white-space:nowrap!important;
    cursor:pointer!important;
    transition:background .18s ease,color .18s ease,transform .18s ease!important;
  }
  body:not(.home):not(.front-page) .middle-home-topnav a:hover,body:not(.home):not(.front-page) .middle-home-topnav__more:hover{background:#eff6ff!important;color:#126ed8!important;transform:translateY(-1px)!important}
  body:not(.home):not(.front-page) .middle-home-topnav a span{display:grid!important;place-items:center!important;width:22px!important;height:22px!important}
  body:not(.home):not(.front-page) .middle-home-topnav a img{width:19px!important;height:19px!important;object-fit:contain!important}
  body:not(.home):not(.front-page) .middle-home-topnav a b,body:not(.home):not(.front-page) .middle-home-topnav__more b{font-weight:720!important}

  /* Same modern menu sheet used by the homepage, positioned below both header rows. */
  body:not(.home):not(.front-page) .middle-primary-nav.middle-top-sheet{
    position:fixed!important;top:126px!important;right:max(22px,calc((100vw - var(--mc-page-canvas))/2 + 22px))!important;left:auto!important;
    width:min(920px,calc(100vw - 44px))!important;max-height:min(72dvh,720px)!important;margin:0!important;padding:18px!important;overflow:auto!important;
    border:1px solid #dbe6f1!important;border-radius:28px!important;background:rgba(255,255,255,.99)!important;box-shadow:0 28px 80px rgba(18,43,73,.19)!important;
    backdrop-filter:blur(20px) saturate(1.08)!important;-webkit-backdrop-filter:blur(20px) saturate(1.08)!important;
    opacity:0!important;visibility:hidden!important;pointer-events:none!important;transform:translateY(-10px) scale(.985)!important;transform-origin:top right!important;
    transition:opacity .18s ease,visibility .18s ease,transform .25s cubic-bezier(.22,.8,.2,1)!important;
  }
  body.admin-bar:not(.home):not(.front-page) .middle-primary-nav.middle-top-sheet{top:158px!important}
  body:not(.home):not(.front-page) .middle-primary-nav.middle-top-sheet.is-open{opacity:1!important;visibility:visible!important;pointer-events:auto!important;transform:none!important}
  body:not(.home):not(.front-page) .middle-primary-nav .middle-dropdown-panel__head{position:static!important;margin:0 0 10px!important;padding:4px 4px 14px!important;background:transparent!important}
  body:not(.home):not(.front-page) .middle-primary-nav .middle-dropdown-panel__head strong{font-size:22px!important;font-weight:800!important;letter-spacing:-.03em!important}
  body:not(.home):not(.front-page) .middle-primary-nav .middle-combined-panel{display:grid!important;grid-template-columns:1.08fr .92fr!important;gap:16px!important}
  body:not(.home):not(.front-page) .middle-primary-nav .middle-combined-panel__section{padding:17px!important;border:1px solid #e2eaf3!important;border-radius:22px!important;background:linear-gradient(180deg,#fff,#f7fbff)!important}
  body:not(.home):not(.front-page) .middle-primary-nav .middle-category-list{grid-template-columns:1fr 1fr!important;gap:8px!important}
  body:not(.home):not(.front-page) .middle-primary-nav .middle-category-list a,body:not(.home):not(.front-page) .middle-primary-nav .middle-combined-panel__section--nav a{min-height:50px!important;border-radius:14px!important;background:#f4f8fc!important;border:1px solid #e5ecf4!important}
}

/* --------------------------------------------------------------------------
   Desktop canvas and universal cards
   -------------------------------------------------------------------------- */
body:not(.home):not(.front-page) .middle-layout{
  width:min(var(--mc-page-canvas),calc(100% - 44px))!important;
  max-width:none!important;
  margin:0 auto!important;
  padding:28px 0 58px!important;
  gap:22px!important;
  grid-template-columns:minmax(0,1fr) 318px!important;
}
body.middle-service-landing-body .middle-layout,
body.middle-messages-system-page .middle-layout,
body.middle-advertising-page .middle-layout,
body.post-type-archive-middle_organization .middle-layout,
body.single-middle_organization .middle-layout,
body.middle-ads-board-page .middle-layout{
  grid-template-columns:minmax(0,1fr)!important;
}
body:not(.home):not(.front-page) .middle-main{min-width:0!important}

body:not(.home):not(.front-page) .middle-card,
body:not(.home):not(.front-page) .middle-widget,
body:not(.home):not(.front-page) .middle-comments{
  border:1px solid var(--mc-page-border)!important;
  border-radius:22px!important;
  background:#fff!important;
  box-shadow:0 10px 30px rgba(27,55,88,.045)!important;
}

body:not(.home):not(.front-page) .middle-page-head{
  position:relative!important;
  isolation:isolate!important;
  overflow:hidden!important;
  display:flex!important;
  align-items:flex-end!important;
  justify-content:space-between!important;
  gap:20px!important;
  min-height:150px!important;
  margin:0 0 16px!important;
  padding:28px 30px!important;
  border:1px solid #d9e7f5!important;
  border-radius:28px!important;
  background:linear-gradient(135deg,#ffffff 0%,#edf6ff 100%)!important;
  box-shadow:var(--mc-page-shadow)!important;
}
body:not(.home):not(.front-page) .middle-page-head::after{
  content:"";position:absolute;z-index:-1;right:-70px;top:-100px;width:310px;height:310px;border-radius:50%;
  background:radial-gradient(circle,rgba(46,143,246,.18),rgba(46,143,246,0) 68%);
}
body:not(.home):not(.front-page) .middle-page-head h1{
  margin:6px 0 0!important;font-size:clamp(32px,4.2vw,52px)!important;line-height:.98!important;letter-spacing:-.045em!important;color:#10213a!important;
}
body:not(.home):not(.front-page) .middle-page-head .middle-kicker,
body:not(.home):not(.front-page) .middle-kicker{
  color:#1672df!important;font-size:10px!important;font-weight:850!important;letter-spacing:.13em!important;text-transform:uppercase!important;
}
body:not(.home):not(.front-page) .middle-page-head .middle-muted{max-width:780px!important;margin-top:10px!important;color:#75869c!important;line-height:1.55!important}

/* News / archive cards. */
body:not(.home):not(.front-page) .middle-post-card{
  display:grid!important;
  grid-template-columns:240px minmax(0,1fr)!important;
  grid-template-areas:
    "thumb meta"
    "thumb title"
    "thumb excerpt"
    "thumb actions"!important;
  column-gap:20px!important;
  row-gap:7px!important;
  min-height:190px!important;
  margin:0 0 14px!important;
  padding:14px!important;
  overflow:hidden!important;
  transition:transform .22s ease,box-shadow .22s ease,border-color .22s ease!important;
}
body:not(.home):not(.front-page) .middle-post-card:hover{transform:translateY(-3px)!important;border-color:#cbdff4!important;box-shadow:var(--mc-page-shadow-hover)!important}
body:not(.home):not(.front-page) .middle-post-card .middle-post-meta{grid-area:meta!important;margin:3px 0 0!important}
body:not(.home):not(.front-page) .middle-post-card__title{grid-area:title!important;margin:0!important;font-size:23px!important;line-height:1.12!important;letter-spacing:-.025em!important}
body:not(.home):not(.front-page) .middle-post-card__title a{color:#12243b!important}
body:not(.home):not(.front-page) .middle-post-card__title a:hover{color:#1673e6!important}
body:not(.home):not(.front-page) .middle-post-card__thumb{
  grid-area:thumb!important;display:block!important;width:240px!important;height:100%!important;min-height:162px!important;overflow:hidden!important;border-radius:17px!important;background:#edf3f9!important;
}
body:not(.home):not(.front-page) .middle-post-card__thumb img{display:block!important;width:100%!important;height:100%!important;object-fit:cover!important;transition:transform .35s ease!important}
body:not(.home):not(.front-page) .middle-post-card:hover .middle-post-card__thumb img{transform:scale(1.025)!important}
body:not(.home):not(.front-page) .middle-post-card__excerpt{grid-area:excerpt!important;color:#687b92!important;font-size:13px!important;line-height:1.48!important}
body:not(.home):not(.front-page) .middle-post-card__excerpt p{margin:0!important}
body:not(.home):not(.front-page) .middle-post-card .middle-post-actions{grid-area:actions!important;margin:4px 0 0!important;padding:9px 0 0!important;border-top:1px solid #edf2f7!important}

/* Single articles and regular pages. */
body:not(.home):not(.front-page) .middle-article{
  padding:30px!important;border-radius:28px!important;
}
body:not(.home):not(.front-page) .middle-article__title{
  margin:10px 0 22px!important;font-size:clamp(34px,4.5vw,56px)!important;line-height:1.02!important;letter-spacing:-.045em!important;color:#10213a!important;
}
body:not(.home):not(.front-page) .middle-article__image{
  overflow:hidden!important;margin:0 -8px 26px!important;border-radius:22px!important;background:#edf3f9!important;
}
body:not(.home):not(.front-page) .middle-article__image img{display:block!important;width:100%!important;height:auto!important;max-height:720px!important;object-fit:cover!important}
body:not(.home):not(.front-page) .middle-content{color:#273b53!important;font-size:16px!important;line-height:1.72!important}
body:not(.home):not(.front-page) .middle-content>:first-child{margin-top:0!important}
body:not(.home):not(.front-page) .middle-content h2{margin:34px 0 14px!important;font-size:30px!important;line-height:1.1!important;letter-spacing:-.03em!important;color:#14263d!important}
body:not(.home):not(.front-page) .middle-content h3{margin:26px 0 12px!important;font-size:23px!important;line-height:1.15!important;color:#14263d!important}
body:not(.home):not(.front-page) .middle-content p{margin:0 0 17px!important}
body:not(.home):not(.front-page) .middle-content a{color:#1474e5!important;text-decoration-thickness:1px!important;text-underline-offset:3px!important}
body:not(.home):not(.front-page) .middle-content img{max-width:100%!important;height:auto!important;border-radius:18px!important}
body:not(.home):not(.front-page) .middle-content blockquote{
  margin:24px 0!important;padding:18px 20px!important;border:0!important;border-left:4px solid #2b89f2!important;border-radius:0 18px 18px 0!important;background:#eef6ff!important;color:#29445f!important;
}
body:not(.home):not(.front-page) .middle-content table{width:100%!important;border-collapse:separate!important;border-spacing:0!important;overflow:hidden!important;border:1px solid #dfe8f2!important;border-radius:16px!important;background:#fff!important}
body:not(.home):not(.front-page) .middle-content th,body:not(.home):not(.front-page) .middle-content td{padding:11px 12px!important;border-bottom:1px solid #e7eef6!important}
body:not(.home):not(.front-page) .middle-content th{background:#f4f8fc!important;color:#1c324b!important;text-align:left!important}

/* Sidebar. */
body:not(.home):not(.front-page) .middle-sidebar{position:sticky!important;top:142px!important;display:grid!important;gap:12px!important;align-self:start!important}
body.admin-bar:not(.home):not(.front-page) .middle-sidebar{top:174px!important}
body:not(.home):not(.front-page) .middle-sidebar .middle-widget{padding:17px!important;border-radius:20px!important}
body:not(.home):not(.front-page) .middle-widget__title{margin:0 0 13px!important;font-size:14px!important;letter-spacing:-.01em!important;color:#13263d!important}
body:not(.home):not(.front-page) .middle-sidebar-categories{display:grid!important;gap:7px!important}
body:not(.home):not(.front-page) .middle-sidebar-categories a{
  display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;min-height:42px!important;padding:0 11px!important;border-radius:12px!important;background:#f5f8fc!important;color:#2a3d54!important;font-size:11px!important;font-weight:700!important;
}
body:not(.home):not(.front-page) .middle-sidebar-categories a:hover{background:#edf6ff!important;color:#1673e6!important}

/* Comments, forms, pagination, empty states. */
body:not(.home):not(.front-page) .middle-comments{margin-top:15px!important;padding:22px!important}
body:not(.home):not(.front-page) input:not([type=checkbox]):not([type=radio]):not([type=submit]),
body:not(.home):not(.front-page) textarea,
body:not(.home):not(.front-page) select{
  border-radius:13px!important;border-color:#dbe6f1!important;background:#fff!important;
}
body:not(.home):not(.front-page) input:focus,body:not(.home):not(.front-page) textarea:focus,body:not(.home):not(.front-page) select:focus{outline:2px solid rgba(32,126,235,.14)!important;border-color:#82b9ef!important}
body:not(.home):not(.front-page) .navigation.pagination{margin:20px 0 0!important}
body:not(.home):not(.front-page) .nav-links{display:flex!important;flex-wrap:wrap!important;gap:7px!important}
body:not(.home):not(.front-page) .page-numbers{display:grid!important;place-items:center!important;min-width:39px!important;height:39px!important;padding:0 10px!important;border:1px solid #dce7f2!important;border-radius:12px!important;background:#fff!important;color:#31445a!important;font-size:11px!important;font-weight:800!important}
body:not(.home):not(.front-page) .page-numbers.current,body:not(.home):not(.front-page) .page-numbers:hover{background:#1977e9!important;border-color:#1977e9!important;color:#fff!important}
body:not(.home):not(.front-page) .middle-empty{min-height:420px!important;display:grid!important;place-items:center!important;align-content:center!important;text-align:center!important;padding:38px!important}
body:not(.home):not(.front-page) .middle-empty__code{font-size:80px!important;line-height:.9!important;font-weight:900!important;letter-spacing:-.08em!important;color:#c6ddf5!important}

/* --------------------------------------------------------------------------
   Photo archive
   -------------------------------------------------------------------------- */
body:not(.home):not(.front-page) .middle-photo-archive__hero,
body:not(.home):not(.front-page) .middle-market-hero,
body:not(.home):not(.front-page) .middle-org-directory__hero,
body:not(.home):not(.front-page) .middle-messages-app__hero,
body:not(.home):not(.front-page) .middle-advertising-hero,
body:not(.home):not(.front-page) .middle-seo-landing__hero,
body:not(.home):not(.front-page) .middle-outages-hero{
  position:relative!important;isolation:isolate!important;overflow:hidden!important;
  border:1px solid #dbe7f3!important;border-radius:28px!important;
  background:linear-gradient(135deg,#fff 0%,#edf6ff 100%)!important;
  box-shadow:var(--mc-page-shadow)!important;
}
body:not(.home):not(.front-page) .middle-photo-archive__hero{padding:28px 30px!important}
body:not(.home):not(.front-page) .middle-photo-card{border-radius:20px!important;border-color:#dce7f2!important;box-shadow:0 10px 28px rgba(27,55,88,.045)!important;transition:transform .22s ease,box-shadow .22s ease!important}
body:not(.home):not(.front-page) .middle-photo-card:hover{transform:translateY(-3px)!important;box-shadow:var(--mc-page-shadow-hover)!important}
body:not(.home):not(.front-page) .middle-photo-card__media img{transition:transform .35s ease!important}
body:not(.home):not(.front-page) .middle-photo-card:hover .middle-photo-card__media img{transform:scale(1.03)!important}

/* --------------------------------------------------------------------------
   Marketplace / advertisements
   -------------------------------------------------------------------------- */
body.middle-ads-board-page .middle-layout,
body.category-ads .middle-layout{width:min(var(--mc-page-canvas),calc(100% - 44px))!important;max-width:none!important;margin:0 auto!important;padding:28px 0 58px!important}
.middle-market-hero,.middle-ads-board__hero{border-radius:28px!important;box-shadow:var(--mc-page-shadow)!important}
.middle-market-search{border-radius:20px!important}
.middle-market-categories,.middle-market-results,.middle-ads-categories,.middle-ads-results{border-radius:24px!important;border-color:#dce7f2!important;box-shadow:0 10px 30px rgba(27,55,88,.045)!important}
.middle-market-category-card,.middle-market-card,.middle-ad-card{border-radius:18px!important;transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease!important}
.middle-market-card:hover,.middle-ad-card:hover{transform:translateY(-3px)!important;box-shadow:0 16px 38px rgba(27,55,88,.10)!important;border-color:#cbdff4!important}

/* Single advert. */
.middle-ad-detail__head,.middle-ad-gallery,.middle-ad-description,.middle-ad-seller,.middle-ad-related,.middle-ad-detail__comments .middle-comments{
  border-color:#dce7f2!important;border-radius:24px!important;box-shadow:0 10px 30px rgba(27,55,88,.045)!important;
}
.middle-ad-detail__head h1{letter-spacing:-.04em!important}
.middle-ad-gallery__stage{border-radius:18px!important}
.middle-ad-seller{background:linear-gradient(180deg,#fff,#f7fbff)!important}
.middle-ad-phone-button--detail{border-radius:15px!important}

/* --------------------------------------------------------------------------
   Organizations
   -------------------------------------------------------------------------- */
.middle-org-directory__hero{padding:28px 30px!important}
.middle-org-directory__hero h1{font-size:clamp(34px,4vw,50px)!important;letter-spacing:-.045em!important;line-height:1!important}
.middle-org-directory__hero p{color:#71839a!important;line-height:1.55!important}
.middle-org-search__field,.middle-org-search__map-toggle{border-radius:17px!important;border-color:#dce7f2!important;box-shadow:0 8px 22px rgba(27,55,88,.045)!important}
.middle-org-filters{padding:7px!important;border:1px solid #dce7f2!important;border-radius:18px!important;background:#fff!important;box-shadow:0 8px 24px rgba(27,55,88,.035)!important}
.middle-org-filters button{border-radius:12px!important}
.middle-org-results,.middle-org-map-panel,.middle-org-single__card{border-color:#dce7f2!important;border-radius:24px!important;box-shadow:var(--mc-page-shadow)!important}
.middle-org-card{border-radius:18px!important;background:#fff!important;transition:transform .2s ease,box-shadow .2s ease!important}
.middle-org-card:hover{transform:translateY(-3px)!important;box-shadow:0 16px 36px rgba(27,55,88,.10)!important}
.middle-org-single__breadcrumbs{margin-bottom:12px!important;padding:9px 12px!important;border-radius:12px!important;background:#edf6ff!important;color:#6e8198!important;font-size:10px!important}
.middle-org-single__head{padding:22px!important}
.middle-org-single__media{border-radius:20px!important}
.middle-org-single__intro h1{font-size:clamp(34px,4vw,52px)!important;letter-spacing:-.045em!important;line-height:1!important}
.middle-org-single__details>div{border-radius:14px!important;background:#f7faff!important}
.middle-org-map--single{border-radius:20px!important}

/* --------------------------------------------------------------------------
   Advertising page, service landings, outages and notifications
   -------------------------------------------------------------------------- */
.middle-advertising-main,.middle-service-landing-page,.middle-city-info-page-main,.middle-messages-page-main{max-width:none!important;width:100%!important}
.middle-advertising-hero{padding:30px!important}
.middle-advertising-section,.middle-advertising-contact,.middle-advertising-placement,.middle-advertising-stat,.middle-advertising-benefits{border-radius:22px!important;border-color:#dce7f2!important;box-shadow:0 10px 28px rgba(27,55,88,.045)!important}
.middle-seo-landing__hero,.middle-outages-hero{padding:28px!important}
.middle-seo-landing__grid,.middle-outages-grid{gap:12px!important}
.middle-outage-card{border-radius:18px!important;border-color:#dce7f2!important;box-shadow:0 8px 24px rgba(27,55,88,.04)!important}
.middle-messages-app__hero{padding:26px 28px!important}
.middle-messages-app__hero-copy h1{font-size:clamp(34px,4vw,50px)!important;font-weight:800!important}
.middle-messages-app__body>.middle-notifications{padding:20px!important;border:1px solid #dce7f2!important;border-radius:22px!important;background:#fff!important;box-shadow:0 10px 28px rgba(27,55,88,.045)!important}
.middle-notification{border-radius:16px!important;border-color:#dce7f2!important;background:#fff!important}
.middle-notification.is-unread{background:#f7fbff!important}

/* City-info plugin wrapper: visually belongs to the same portal even when the
   plugin owns the actual weather/transport cards. */
.middle-city-info-page{width:100%!important;min-width:0!important}
.middle-city-info-page>.middle-content{font-size:14px!important}
.middle-city-info-page .middle-card,
.middle-city-info-page [class*="weather"],
.middle-city-info-page [class*="bus"],
.middle-city-info-page [class*="transport"]{border-radius:20px}

/* --------------------------------------------------------------------------
   Core profile / auth / privacy UI
   -------------------------------------------------------------------------- */
.middle-core-profile{
  padding:24px!important;border:1px solid #dce7f2!important;border-radius:28px!important;background:#fff!important;box-shadow:var(--mc-page-shadow)!important;
}
.middle-core-profile__top{
  padding:20px!important;border:1px solid #e1eaf4!important;border-radius:22px!important;background:linear-gradient(135deg,#fafdff,#edf6ff)!important;
}
.middle-core-profile__avatar{border:4px solid #fff!important;box-shadow:0 10px 26px rgba(27,55,88,.12)!important}
.middle-core-profile__identity h1{font-size:34px!important;letter-spacing:-.04em!important}
.middle-core-profile-section{
  margin-top:14px!important;padding:18px!important;border:1px solid #e0e9f3!important;border-radius:20px!important;background:#fff!important;
}
.middle-core-profile-section__head h2{font-size:23px!important;letter-spacing:-.025em!important}
.middle-core-panel{border-radius:18px!important;border-color:#dce7f2!important;box-shadow:0 8px 24px rgba(27,55,88,.035)!important}
.middle-core-button{min-height:42px!important;border-radius:13px!important;background:#1977e9!important;border-color:#1977e9!important;box-shadow:0 7px 18px rgba(25,119,233,.15)!important}
.middle-core-button--secondary{background:#fff!important;color:#176fd8!important;border-color:#cfe1f5!important;box-shadow:none!important}
.middle-profile-ad-card{border-radius:16px!important;border-color:#dce7f2!important;background:#fafdff!important}
.middle-profile-ad-card__thumb{border-radius:12px!important}
.middle-profile-ad-editor{border-radius:20px!important;background:#f7fbff!important}
.middle-auth-form,.middle-social-login,.middle-auth-register__toggle{border-radius:20px!important;border-color:#dce7f2!important}
.middle-auth-form{box-shadow:0 12px 32px rgba(27,55,88,.07)!important}
.middle-auth-modal__panel,.middle-publish-modal__panel{border-radius:28px!important;border-color:#dce7f2!important;box-shadow:0 30px 90px rgba(12,35,60,.22)!important}

/* --------------------------------------------------------------------------
   Internal footer — compact version of the same light portal aesthetic
   -------------------------------------------------------------------------- */
body:not(.home):not(.front-page) .middle-site-footer{
  margin-top:0!important;padding:0!important;border-top:1px solid #dfe8f2!important;background:#fff!important;
}
body:not(.home):not(.front-page) .middle-footer-row{
  width:min(var(--mc-page-canvas),calc(100% - 44px))!important;min-height:96px!important;margin:0 auto!important;padding:20px 0!important;gap:18px!important;
}
body:not(.home):not(.front-page) .middle-footer-main{font-size:11px!important;color:#61748b!important}
body:not(.home):not(.front-page) .middle-footer-main nav a,body:not(.home):not(.front-page) .middle-footer-legal a,body:not(.home):not(.front-page) .middle-footer-legal button{color:#61748b!important;font-size:9.5px!important}
body:not(.home):not(.front-page) .middle-footer-main nav a:hover,body:not(.home):not(.front-page) .middle-footer-legal a:hover{color:#1673e6!important}

/* --------------------------------------------------------------------------
   Motion on internal pages
   -------------------------------------------------------------------------- */
@media(prefers-reduced-motion:no-preference){
  body:not(.home):not(.front-page) .middle-page-head,
  body:not(.home):not(.front-page) .middle-post-card,
  body:not(.home):not(.front-page) .middle-article,
  body:not(.home):not(.front-page) .middle-photo-archive__hero,
  body:not(.home):not(.front-page) .middle-market-hero,
  body:not(.home):not(.front-page) .middle-org-directory__hero,
  body:not(.home):not(.front-page) .middle-org-single__card,
  body:not(.home):not(.front-page) .middle-messages-app__hero{
    animation:mcInnerIn .44s cubic-bezier(.2,.8,.2,1) both;
  }
  body:not(.home):not(.front-page) .middle-post-card:nth-of-type(2){animation-delay:.035s}
  body:not(.home):not(.front-page) .middle-post-card:nth-of-type(3){animation-delay:.07s}
  body:not(.home):not(.front-page) .middle-post-card:nth-of-type(4){animation-delay:.105s}
}
@keyframes mcInnerIn{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}

/* --------------------------------------------------------------------------
   MOBILE — same bottom app navigation as the approved homepage version
   -------------------------------------------------------------------------- */
@media(max-width:720px){
  :root{--middle-mobile-nav-height:80px;--middle-mobile-nav-bottom:0px}
  html,body{overflow-x:hidden!important}
  body:not(.home):not(.front-page){background:#f4f7fb!important}

  /* No empty mobile header strip. The fixed app nav is the mobile navigation. */
  .middle-site-header{
    position:relative!important;top:0!important;height:0!important;min-height:0!important;margin:0!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;overflow:visible!important;pointer-events:none!important;
  }
  .middle-header-row{
    position:relative!important;width:100%!important;max-width:none!important;height:0!important;min-height:0!important;margin:0!important;padding:0!important;gap:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;overflow:visible!important;pointer-events:none!important;
  }
  .middle-brand,.middle-home-header-search,.middle-header-weather,.middle-home-header-bell,.middle-theme-toggle--desktop,.middle-home-topnav{display:none!important}

  /* Five real equal columns. */
  .middle-header-tools{
    position:fixed!important;z-index:270!important;left:0!important;right:0!important;bottom:0!important;
    display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;grid-template-rows:1fr!important;align-items:end!important;justify-items:stretch!important;
    width:100%!important;height:calc(80px + env(safe-area-inset-bottom))!important;min-height:80px!important;margin:0!important;padding:7px 7px max(8px,env(safe-area-inset-bottom))!important;gap:0!important;
    border:0!important;border-top:1px solid rgba(210,221,234,.96)!important;border-radius:23px 23px 0 0!important;background:rgba(255,255,255,.985)!important;box-shadow:0 -10px 32px rgba(25,48,77,.13)!important;
    backdrop-filter:blur(20px) saturate(1.12)!important;-webkit-backdrop-filter:blur(20px) saturate(1.12)!important;pointer-events:auto!important;overflow:visible!important;
  }
  .middle-mobile-home-link{grid-column:1!important;grid-row:1!important}
  .middle-header-tools>.middle-search-toggle{grid-column:2!important;grid-row:1!important}
  .middle-header-tools>.middle-write-link{grid-column:3!important;grid-row:1!important}
  .middle-header-tools>.middle-messages-link,
  .middle-header-tools>.middle-account-link:not(.middle-profile-link){grid-column:4!important;grid-row:1!important}
  .middle-header-dropdown--menu{grid-column:5!important;grid-row:1!important;position:static!important}
  .middle-header-tools>.middle-profile-link,.middle-header-tools>.middle-theme-toggle--desktop,.middle-header-tools>.middle-header-weather{display:none!important}

  .middle-mobile-home-link,
  .middle-header-tools>.middle-search-toggle,
  .middle-header-tools>.middle-write-link,
  .middle-header-tools>.middle-messages-link,
  .middle-header-tools>.middle-account-link:not(.middle-profile-link),
  .middle-header-dropdown--menu,
  .middle-header-dropdown--menu>.middle-nav-toggle{
    position:relative!important;inset:auto!important;width:100%!important;min-width:0!important;max-width:none!important;height:66px!important;min-height:66px!important;margin:0!important;padding:4px 1px 5px!important;
    display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:flex-end!important;gap:5px!important;
    border:0!important;border-radius:15px!important;background:transparent!important;color:#52647b!important;box-shadow:none!important;transform:none!important;text-align:center!important;overflow:visible!important;pointer-events:auto!important;
  }
  .middle-mobile-home-link__brand{
    display:grid!important;place-items:center!important;width:28px!important;height:28px!important;min-width:28px!important;min-height:28px!important;flex:0 0 28px!important;margin:0 auto!important;padding:0!important;overflow:hidden!important;border:0!important;border-radius:8px!important;background:transparent!important;box-shadow:none!important;
  }
  .middle-mobile-home-link__brand img{display:block!important;width:100%!important;height:100%!important;object-fit:contain!important;border-radius:7px!important}
  .middle-mobile-home-link__brand--fallback{background:linear-gradient(145deg,#31b989,#2b7de9)!important;color:#fff!important;font-size:13px!important;font-weight:900!important}

  .middle-header-tools>.middle-search-toggle svg,
  .middle-header-tools>.middle-messages-link svg,
  .middle-header-tools>.middle-account-link:not(.middle-profile-link) svg,
  .middle-header-dropdown--menu>.middle-nav-toggle>.middle-menu-dots-icon{
    display:block!important;width:25px!important;height:25px!important;min-width:25px!important;min-height:25px!important;flex:0 0 25px!important;margin:0 auto!important;padding:0!important;color:#152131!important;stroke:currentColor!important;fill:none!important;
  }
  .middle-header-dropdown--menu>.middle-nav-toggle>.middle-menu-dots-icon{fill:currentColor!important;stroke:none!important}

  /* Approved central plus button. */
  .middle-header-tools>.middle-write-link{color:#2178e7!important}
  .middle-header-tools>.middle-write-link .middle-publish-plus-icon{
    display:block!important;width:50px!important;height:50px!important;min-width:50px!important;min-height:50px!important;flex:0 0 50px!important;margin:-9px auto 0!important;padding:12px!important;border:3px solid #fff!important;border-radius:50%!important;background:linear-gradient(145deg,#2f98ff,#1473eb)!important;color:#fff!important;stroke:#fff!important;stroke-width:2.2!important;stroke-linecap:round!important;fill:none!important;box-shadow:0 9px 22px rgba(26,118,235,.31)!important;
  }

  .middle-mobile-home-link>span,
  .middle-header-tools .middle-mobile-nav-label,
  .middle-header-tools>.middle-write-link>span,
  .middle-header-tools>.middle-account-link:not(.middle-profile-link)>span,
  .middle-header-dropdown--menu>.middle-nav-toggle>span{
    display:block!important;position:static!important;visibility:visible!important;opacity:1!important;width:100%!important;max-width:100%!important;min-width:0!important;height:auto!important;min-height:11px!important;max-height:none!important;margin:0!important;padding:0!important;
    background:transparent!important;background-image:none!important;border:0!important;border-radius:0!important;box-shadow:none!important;color:#52647b!important;font-size:9.2px!important;line-height:1!important;font-weight:680!important;letter-spacing:0!important;text-align:center!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;transform:none!important;
  }
  .middle-header-tools>.middle-write-link>span{color:#1f75e3!important}
  .middle-header-dropdown--menu>.middle-nav-toggle>.middle-chevron{display:none!important}
  .middle-messages-link__badge{top:1px!important;right:calc(50% - 19px)!important;border-width:1px!important}

  /* Search and Menu sheets open above the bottom navigation. */
  .middle-primary-nav.middle-top-sheet,
  .middle-header-search.middle-top-sheet{
    position:fixed!important;z-index:280!important;left:8px!important;right:8px!important;top:auto!important;bottom:calc(82px + env(safe-area-inset-bottom))!important;width:auto!important;max-height:min(72dvh,680px)!important;margin:0!important;padding:14px!important;overflow:auto!important;
    border:1px solid #dce7f2!important;border-radius:24px!important;background:rgba(255,255,255,.99)!important;box-shadow:0 24px 70px rgba(14,38,67,.20)!important;transform:translateY(14px) scale(.985)!important;transform-origin:bottom center!important;opacity:0!important;visibility:hidden!important;pointer-events:none!important;
    transition:opacity .18s ease,visibility .18s ease,transform .24s cubic-bezier(.22,.8,.2,1)!important;
  }
  .middle-primary-nav.middle-top-sheet.is-open,
  .middle-header-search.middle-top-sheet.is-open{opacity:1!important;visibility:visible!important;pointer-events:auto!important;transform:none!important}
  .middle-primary-nav .middle-dropdown-panel__head{position:static!important;margin:0 0 8px!important;padding:4px 4px 10px!important;background:transparent!important}
  .middle-combined-panel{display:grid!important;gap:10px!important}
  .middle-combined-panel__section{padding:12px!important;border:1px solid #e1eaf4!important;border-radius:18px!important;background:#f9fbfe!important}
  .middle-primary-nav .middle-category-list,.middle-combined-panel__section--nav ul{grid-template-columns:1fr!important}
  .middle-primary-nav .middle-category-list a,.middle-combined-panel__section--nav a{min-height:46px!important;border-radius:13px!important;background:#fff!important}

  /* Mobile page canvas and content. */
  body:not(.home):not(.front-page) .middle-layout,
  body.middle-service-landing-body .middle-layout,
  body.middle-messages-system-page .middle-layout,
  body.middle-advertising-page .middle-layout,
  body.post-type-archive-middle_organization .middle-layout,
  body.single-middle_organization .middle-layout,
  body.middle-ads-board-page .middle-layout{
    display:block!important;width:100%!important;max-width:none!important;margin:0!important;padding:10px 9px calc(108px + env(safe-area-inset-bottom))!important;
  }
  body:not(.home):not(.front-page) .middle-main{width:100%!important;max-width:none!important;margin:0!important}
  body:not(.home):not(.front-page) .middle-sidebar{position:static!important;margin-top:12px!important}

  body:not(.home):not(.front-page) .middle-page-head{
    min-height:0!important;margin:0 0 10px!important;padding:20px 18px!important;border-radius:20px!important;align-items:flex-start!important;
  }
  body:not(.home):not(.front-page) .middle-page-head h1{font-size:31px!important;line-height:1!important}
  body:not(.home):not(.front-page) .middle-page-head .middle-muted{font-size:11px!important}

  body:not(.home):not(.front-page) .middle-post-card{
    display:grid!important;grid-template-columns:102px minmax(0,1fr)!important;
    grid-template-areas:"thumb meta" "thumb title" "thumb excerpt" "actions actions"!important;
    min-height:0!important;margin:0 0 9px!important;padding:9px!important;column-gap:10px!important;row-gap:4px!important;border-radius:17px!important;
  }
  body:not(.home):not(.front-page) .middle-post-card__thumb{width:102px!important;height:94px!important;min-height:94px!important;border-radius:13px!important}
  body:not(.home):not(.front-page) .middle-post-card__title{font-size:16px!important;line-height:1.13!important;display:-webkit-box!important;-webkit-box-orient:vertical!important;-webkit-line-clamp:3!important;overflow:hidden!important}
  body:not(.home):not(.front-page) .middle-post-card__excerpt{font-size:10px!important;line-height:1.35!important;display:-webkit-box!important;-webkit-box-orient:vertical!important;-webkit-line-clamp:2!important;overflow:hidden!important}
  body:not(.home):not(.front-page) .middle-post-card .middle-post-meta{font-size:8.5px!important}
  body:not(.home):not(.front-page) .middle-post-card .middle-post-actions{padding-top:7px!important}

  body:not(.home):not(.front-page) .middle-article{padding:17px!important;border-radius:20px!important}
  body:not(.home):not(.front-page) .middle-article__title{margin:8px 0 16px!important;font-size:31px!important;line-height:1.02!important}
  body:not(.home):not(.front-page) .middle-article__image{margin:0 0 18px!important;border-radius:16px!important}
  body:not(.home):not(.front-page) .middle-content{font-size:14px!important;line-height:1.65!important}
  body:not(.home):not(.front-page) .middle-content h2{font-size:24px!important;margin-top:28px!important}
  body:not(.home):not(.front-page) .middle-content h3{font-size:20px!important}
  body:not(.home):not(.front-page) .middle-content blockquote{padding:14px 15px!important;border-radius:0 14px 14px 0!important}
  body:not(.home):not(.front-page) .middle-comments{padding:15px!important;border-radius:18px!important}

  /* Specialized mobile pages. */
  .middle-photo-archive__hero,.middle-market-hero,.middle-org-directory__hero,.middle-messages-app__hero,.middle-advertising-hero,.middle-seo-landing__hero,.middle-outages-hero{padding:18px!important;border-radius:20px!important}
  .middle-photo-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  .middle-photo-card{border-radius:15px!important}
  .middle-market-hero__top,.middle-ads-board__hero{align-items:flex-start!important;flex-direction:column!important}
  .middle-market-search{border-radius:16px!important}
  .middle-market-results,.middle-market-categories,.middle-ads-results,.middle-ads-categories{border-radius:18px!important}
  .middle-market-grid,.middle-ads-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  .middle-ad-detail__head,.middle-ad-gallery,.middle-ad-description,.middle-ad-seller,.middle-ad-related{border-radius:18px!important}
  .middle-org-directory__hero{display:block!important}
  .middle-org-directory__hero h1{font-size:31px!important}
  .middle-org-directory__count{margin-top:13px!important;width:max-content!important}
  .middle-org-filters{overflow-x:auto!important;flex-wrap:nowrap!important;scrollbar-width:none!important;border-radius:15px!important}
  .middle-org-filters::-webkit-scrollbar{display:none!important}
  .middle-org-results{padding:12px!important;border-radius:18px!important}
  .middle-org-cards{grid-template-columns:1fr!important}
  .middle-org-card{grid-template-columns:88px minmax(0,1fr)!important;border-radius:15px!important}
  .middle-org-card__media{min-height:118px!important}
  .middle-org-single__card{border-radius:20px!important}
  .middle-org-single__head{padding:14px!important}
  .middle-org-single__intro h1{font-size:31px!important}
  .middle-org-single__primary-actions{display:grid!important}
  .middle-org-single__primary-actions>*{width:100%!important;justify-content:center!important}
  .middle-messages-app__hero{grid-template-columns:auto minmax(0,1fr)!important;gap:12px!important}
  .middle-messages-app__status{grid-column:1/-1!important;width:max-content!important}
  .middle-messages-app__hero-copy h1{font-size:30px!important}
  .middle-messages-app__body>.middle-notifications{padding:13px!important;border-radius:18px!important}
  .middle-notification{grid-template-columns:36px minmax(0,1fr)!important;padding:11px!important}

  /* Core profile on phones. */
  .middle-core-profile{padding:12px!important;border-radius:20px!important}
  .middle-core-profile__top{padding:14px!important;border-radius:17px!important;gap:12px!important}
  .middle-core-profile__avatar-area{width:76px!important;flex-basis:76px!important}
  .middle-core-profile__avatar,.middle-core-profile__avatar img{width:76px!important;height:76px!important}
  .middle-core-profile__identity{padding-top:0!important}
  .middle-core-profile__identity h1{font-size:25px!important}
  .middle-core-profile-section{padding:13px!important;border-radius:16px!important}
  .middle-profile-ad-card{grid-template-columns:64px minmax(0,1fr)!important;border-radius:14px!important}
  .middle-auth-modal__panel,.middle-publish-modal__panel{left:6px!important;right:6px!important;top:6px!important;border-radius:23px!important;padding:14px!important;max-height:calc(100dvh - 92px)!important}

  body:not(.home):not(.front-page) .middle-site-footer{padding-bottom:calc(92px + env(safe-area-inset-bottom))!important}
  body:not(.home):not(.front-page) .middle-footer-row{width:calc(100% - 18px)!important;display:grid!important;grid-template-columns:1fr!important;gap:10px!important;padding:16px 0!important}
  body:not(.home):not(.front-page) .middle-footer-main,body:not(.home):not(.front-page) .middle-footer-meta{align-items:flex-start!important;flex-direction:column!important;gap:8px!important}
}

@media(max-width:390px){
  .middle-header-tools{padding-left:4px!important;padding-right:4px!important}
  .middle-mobile-home-link>span,.middle-header-tools .middle-mobile-nav-label,.middle-header-tools>.middle-write-link>span,.middle-header-tools>.middle-account-link:not(.middle-profile-link)>span,.middle-header-dropdown--menu>.middle-nav-toggle>span{font-size:8.4px!important}
  body:not(.home):not(.front-page) .middle-layout{padding-left:7px!important;padding-right:7px!important}
  .middle-market-grid,.middle-ads-grid,.middle-photo-grid{grid-template-columns:1fr 1fr!important}
}

/* Dark theme compatibility. */
:root[data-middle-theme="dark"] body:not(.home):not(.front-page){--mc-page-bg:#171a1f;--mc-page-surface:#20242a;--mc-page-border:#343b45;--mc-page-text:#eef3f8;--mc-page-muted:#9aa8b8;background:#171a1f!important;color:#edf2f7!important}
:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-card,
:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-widget,
:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-comments,
:root[data-middle-theme="dark"] .middle-core-profile,
:root[data-middle-theme="dark"] .middle-core-profile-section,
:root[data-middle-theme="dark"] .middle-messages-app__body>.middle-notifications{background:#20242a!important;border-color:#343b45!important}
:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-page-head,
:root[data-middle-theme="dark"] .middle-photo-archive__hero,
:root[data-middle-theme="dark"] .middle-market-hero,
:root[data-middle-theme="dark"] .middle-org-directory__hero,
:root[data-middle-theme="dark"] .middle-messages-app__hero{background:linear-gradient(135deg,#22272e,#1b2a38)!important;border-color:#354251!important}
:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-page-head h1,
:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-article__title,
:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-content h2,
:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-content h3{color:#f1f5f9!important}
:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-content{color:#c6d0dc!important}
:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-post-card__title a{color:#edf3f8!important}
:root[data-middle-theme="dark"] .middle-header-tools{background:rgba(29,33,39,.985)!important;border-top-color:#3b424b!important}
:root[data-middle-theme="dark"] .middle-header-tools>.middle-write-link .middle-publish-plus-icon{border-color:#1d2127!important}
:root[data-middle-theme="dark"] .middle-primary-nav.middle-top-sheet,:root[data-middle-theme="dark"] .middle-header-search.middle-top-sheet{background:rgba(29,33,39,.99)!important;border-color:#414a55!important}

/* City information pages have no theme sidebar, so use the full canvas. */
body.middle-city-info-body .middle-layout{grid-template-columns:minmax(0,1fr)!important}
body.middle-city-info-body .middle-main{width:100%!important;max-width:none!important}
@media(max-width:720px){body.middle-city-info-body .middle-layout{display:block!important}}

/* ========================================================================== 
   Middle Community 0.4.1 — category audit + one portal footer everywhere
   ========================================================================== */

/* Generic category archives should feel like real portal sections, not a plain
   WordPress archive. */
body.category:not(.category-ads) .middle-page-head.middle-category-head{
  min-height:166px!important;
  padding:26px 30px!important;
}
.middle-category-head__kicker{
  display:flex!important;
  align-items:center!important;
  gap:9px!important;
  width:max-content!important;
  max-width:100%!important;
  margin:0!important;
  color:#176fdc!important;
  font-size:10px!important;
  font-weight:850!important;
  letter-spacing:.09em!important;
  text-transform:uppercase!important;
}
.middle-category-head__icon{
  display:grid!important;
  place-items:center!important;
  width:34px!important;
  height:34px!important;
  flex:0 0 34px!important;
  border-radius:11px!important;
  background:#eaf4ff!important;
}
.middle-category-head__icon img{width:22px!important;height:22px!important;object-fit:contain!important}
.middle-category-head__kicker small{
  display:grid!important;
  place-items:center!important;
  min-width:27px!important;
  height:24px!important;
  padding:0 7px!important;
  border-radius:999px!important;
  background:#eef5fc!important;
  color:#6f8299!important;
  font-size:9px!important;
  font-weight:800!important;
  letter-spacing:0!important;
}
.middle-category-head--green{background:linear-gradient(135deg,#fff 0%,#edf9f2 100%)!important;border-color:#d7ecdf!important}
.middle-category-head--green::after{background:radial-gradient(circle,rgba(57,178,112,.16),rgba(57,178,112,0) 68%)!important}
.middle-category-head--green .middle-category-head__icon{background:#e5f7ed!important}
.middle-category-head--green .middle-category-head__kicker{color:#168457!important}
.middle-category-head--amber{background:linear-gradient(135deg,#fff 0%,#fff8e8 100%)!important;border-color:#f0e3bd!important}
.middle-category-head--amber::after{background:radial-gradient(circle,rgba(244,174,37,.18),rgba(244,174,37,0) 68%)!important}
.middle-category-head--amber .middle-category-head__icon{background:#fff1c9!important}
.middle-category-head--amber .middle-category-head__kicker{color:#a86b00!important}
.middle-category-head--orange{background:linear-gradient(135deg,#fff 0%,#fff4ec 100%)!important;border-color:#f0dfd1!important}
.middle-category-head--orange::after{background:radial-gradient(circle,rgba(244,127,47,.18),rgba(244,127,47,0) 68%)!important}
.middle-category-head--orange .middle-category-head__icon{background:#ffeadb!important}
.middle-category-head--orange .middle-category-head__kicker{color:#bd5d1b!important}
.middle-category-head--sky{background:linear-gradient(135deg,#fff 0%,#edf8ff 100%)!important;border-color:#d8eaf5!important}
.middle-category-head--dark{background:linear-gradient(135deg,#1f2835,#2d3b4d)!important;border-color:#34465d!important}
.middle-category-head--dark::after{background:radial-gradient(circle,rgba(88,168,255,.22),rgba(88,168,255,0) 68%)!important}
.middle-category-head--dark h1,.middle-category-head--dark .middle-muted{color:#fff!important}
.middle-category-head--dark .middle-category-head__kicker{color:#c9e3ff!important}
.middle-category-head--dark .middle-category-head__icon{background:rgba(255,255,255,.12)!important}
.middle-category-head--dark .middle-category-head__kicker small{background:rgba(255,255,255,.12)!important;color:#dcecff!important}

/* No-thumbnail posts were still reserving the old 240px media column. */
body:not(.home):not(.front-page) .middle-post-card--no-thumb{
  grid-template-columns:minmax(0,1fr)!important;
  grid-template-areas:"meta" "title" "excerpt" "actions"!important;
  min-height:0!important;
  padding:18px 20px!important;
}
body:not(.home):not(.front-page) .middle-post-card--no-thumb .middle-post-card__title{max-width:940px!important}
body:not(.home):not(.front-page) .middle-post-card--no-thumb .middle-post-card__excerpt{max-width:980px!important}

/* Prevent the sidebar from making category pages look cramped on medium screens. */
@media(max-width:1120px) and (min-width:721px){
  body.category:not(.category-ads) .middle-layout{grid-template-columns:minmax(0,1fr) 270px!important;gap:16px!important}
  body.category:not(.category-ads) .middle-post-card{grid-template-columns:190px minmax(0,1fr)!important;column-gap:15px!important}
  body.category:not(.category-ads) .middle-post-card__thumb{width:190px!important}
  body.category:not(.category-ads) .middle-post-card--no-thumb{grid-template-columns:minmax(0,1fr)!important}
}

/* --------------------------------------------------------------------------
   The exact same rich footer structure now exists on every page.
   -------------------------------------------------------------------------- */
body:not(.home):not(.front-page) .middle-site-footer--portal{
  margin-top:24px!important;
  padding:0!important;
  border-top:0!important;
  background:transparent!important;
}
body:not(.home):not(.front-page) .middle-footer-home{
  width:min(var(--mc-page-canvas),calc(100% - 44px))!important;
  margin:0 auto 18px!important;
  overflow:hidden!important;
  border:1px solid #dfe8f2!important;
  border-radius:30px!important;
  background:#fff!important;
  box-shadow:0 16px 42px rgba(29,57,89,.08)!important;
}
body:not(.home):not(.front-page) .middle-footer-home__top{
  display:grid!important;
  grid-template-columns:1.45fr .85fr 1.05fr .8fr!important;
  gap:30px!important;
  padding:34px 34px 30px!important;
}
body:not(.home):not(.front-page) .middle-footer-home__brand-link{display:flex!important;align-items:center!important;gap:13px!important;color:#13243d!important}
body:not(.home):not(.front-page) .middle-footer-home__logo{width:54px!important;height:54px!important;object-fit:contain!important;border-radius:15px!important}
body:not(.home):not(.front-page) .middle-footer-home__brand-link span{display:flex!important;flex-direction:column!important;gap:3px!important}
body:not(.home):not(.front-page) .middle-footer-home__brand-link strong{font-size:20px!important;line-height:1.05!important}
body:not(.home):not(.front-page) .middle-footer-home__brand-link small{color:#71859d!important;font-size:10.5px!important}
body:not(.home):not(.front-page) .middle-footer-home__brand>p{max-width:430px!important;margin:15px 0 0!important;color:#718298!important;font-size:12.5px!important;line-height:1.6!important}
body:not(.home):not(.front-page) .middle-footer-home__nav,
body:not(.home):not(.front-page) .middle-footer-home__legal,
body:not(.home):not(.front-page) .middle-footer-home__actions{display:flex!important;flex-direction:column!important;align-items:flex-start!important;gap:9px!important}
body:not(.home):not(.front-page) .middle-footer-home__nav>strong,
body:not(.home):not(.front-page) .middle-footer-home__legal>strong,
body:not(.home):not(.front-page) .middle-footer-home__actions>strong{margin-bottom:4px!important;color:#14243b!important;font-size:13px!important}
body:not(.home):not(.front-page) .middle-footer-home__section-list{display:grid!important;gap:6px!important;width:100%!important;margin:0!important;padding:0!important;list-style:none!important}
body:not(.home):not(.front-page) .middle-footer-home__section-list li{margin:0!important;padding:0!important}
body:not(.home):not(.front-page) .middle-footer-home__section-list a{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;min-height:30px!important;width:100%!important;padding:0 2px!important;color:#64788f!important;font-size:11.5px!important}
body:not(.home):not(.front-page) .middle-footer-home__section-list a i{color:#9bb0c9!important;font-style:normal!important}
body:not(.home):not(.front-page) .middle-footer-home__legal a,
body:not(.home):not(.front-page) .middle-footer-home__legal button{padding:0!important;border:0!important;background:none!important;color:#64788f!important;font:inherit!important;font-size:11.5px!important;line-height:1.4!important;text-align:left!important;cursor:pointer!important}
body:not(.home):not(.front-page) .middle-footer-home__nav a:hover,
body:not(.home):not(.front-page) .middle-footer-home__legal a:hover,
body:not(.home):not(.front-page) .middle-footer-home__legal button:hover{color:#1779eb!important}
body:not(.home):not(.front-page) .middle-footer-home__actions p{margin:0!important;color:#74869b!important;font-size:11.5px!important;line-height:1.55!important}
body:not(.home):not(.front-page) .middle-footer-home__top-button{display:inline-flex!important;align-items:center!important;gap:8px!important;min-height:42px!important;margin-top:6px!important;padding:0 15px!important;border:1px solid #d9e6f5!important;border-radius:13px!important;background:#f3f8ff!important;color:#176fd9!important;font-weight:760!important;cursor:pointer!important}
body:not(.home):not(.front-page) .middle-footer-home__bottom{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:18px!important;min-height:58px!important;padding:12px 34px!important;border-top:1px solid #edf2f7!important;background:#f8fafc!important;color:#8090a4!important;font-size:10.5px!important}
body:not(.home):not(.front-page) .middle-footer-home__bottom .middle-footer-credit{margin-left:auto!important;color:#73849a!important;font-size:10.5px!important}
body:not(.home):not(.front-page) .middle-footer-home__metrika{display:inline-flex!important;align-items:center!important}

@media(max-width:1180px) and (min-width:721px){
  body:not(.home):not(.front-page) .middle-footer-home__top{grid-template-columns:1.35fr 1fr 1fr!important;gap:22px!important}
  body:not(.home):not(.front-page) .middle-footer-home__actions{grid-column:1/-1!important;flex-direction:row!important;align-items:center!important}
  body:not(.home):not(.front-page) .middle-footer-home__actions p{max-width:520px!important}
  body:not(.home):not(.front-page) .middle-footer-home__top-button{margin-left:auto!important}
}

@media(max-width:720px){
  body.category:not(.category-ads) .middle-page-head.middle-category-head{min-height:0!important;padding:17px 16px!important;border-radius:20px!important}
  .middle-category-head__kicker{gap:7px!important;font-size:8.5px!important;letter-spacing:.07em!important}
  .middle-category-head__icon{width:30px!important;height:30px!important;flex-basis:30px!important;border-radius:10px!important}
  .middle-category-head__icon img{width:19px!important;height:19px!important}
  .middle-category-head__kicker small{height:21px!important;min-width:24px!important;font-size:8px!important}
  body:not(.home):not(.front-page) .middle-post-card--no-thumb{display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-areas:"meta" "title" "excerpt" "actions"!important;padding:14px!important}
  body:not(.home):not(.front-page) .middle-post-card--no-thumb .middle-post-card__title{font-size:18px!important;line-height:1.12!important}
  body:not(.home):not(.front-page) .middle-post-card--no-thumb .middle-post-card__excerpt{font-size:11px!important;line-height:1.42!important;-webkit-line-clamp:3!important}

  body:not(.home):not(.front-page) .middle-site-footer--portal{margin-top:10px!important;padding-bottom:calc(92px + env(safe-area-inset-bottom))!important}
  body:not(.home):not(.front-page) .middle-footer-home{width:calc(100% - 18px)!important;margin:0 auto 8px!important;border-radius:22px!important}
  body:not(.home):not(.front-page) .middle-footer-home__top{grid-template-columns:1fr!important;gap:18px!important;padding:24px 22px!important}
  body:not(.home):not(.front-page) .middle-footer-home__brand,
  body:not(.home):not(.front-page) .middle-footer-home__actions{grid-column:auto!important}
  body:not(.home):not(.front-page) .middle-footer-home__actions{display:flex!important;flex-direction:column!important;align-items:flex-start!important}
  body:not(.home):not(.front-page) .middle-footer-home__top-button{margin-left:0!important}
  body:not(.home):not(.front-page) .middle-footer-home__bottom{align-items:flex-start!important;flex-direction:column!important;gap:9px!important;padding:16px 22px!important}
  body:not(.home):not(.front-page) .middle-footer-home__bottom .middle-footer-credit{margin-left:0!important}
}

:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-footer-home{background:#20242a!important;border-color:#343b45!important}
:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-footer-home__bottom{background:#1b1f24!important;border-top-color:#343b45!important}
:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-footer-home__brand-link,
:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-footer-home__nav>strong,
:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-footer-home__legal>strong,
:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-footer-home__actions>strong{color:#eef3f8!important}

/* ========================================================================== 
   Middle Community 0.4.2 — exact inner-page desktop header + category grids
   ========================================================================== */

/* Use the same desktop canvas and header geometry as the approved homepage. */
:root{--mc-page-canvas:clamp(1180px,88vw,1760px)}

@media(min-width:721px){
  body:not(.home):not(.front-page) .middle-site-header{
    position:sticky!important;
    top:0!important;
    z-index:1200!important;
    padding:0!important;
    border:0!important;
    border-bottom:1px solid rgba(18,42,75,.07)!important;
    background:#fff!important;
    box-shadow:none!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
  }
  body.admin-bar:not(.home):not(.front-page) .middle-site-header{top:32px!important}
  body:not(.home):not(.front-page) .middle-header-row{
    width:min(var(--mc-page-canvas),calc(100% - 34px))!important;
    max-width:none!important;
    min-height:72px!important;
    margin:0 auto!important;
    padding:0!important;
    gap:18px!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
  }
  body:not(.home):not(.front-page) .middle-brand{
    flex:0 0 auto!important;
    min-width:245px!important;
    gap:10px!important;
  }
  body:not(.home):not(.front-page) .middle-brand .custom-logo,
  body:not(.home):not(.front-page) .middle-brand__mark--icon img{max-height:48px!important;width:auto!important}
  body:not(.home):not(.front-page) .middle-brand__text{
    font-size:25px!important;
    font-weight:850!important;
    letter-spacing:-.035em!important;
    color:#0e2444!important;
  }
  body:not(.home):not(.front-page) .middle-home-header-search{
    display:flex!important;
    align-items:center!important;
    flex:1 1 520px!important;
    max-width:620px!important;
    min-width:300px!important;
    height:46px!important;
    min-height:46px!important;
    margin-left:auto!important;
    padding:0 16px!important;
    gap:0!important;
    border:1px solid #e1e8f1!important;
    border-radius:14px!important;
    background:#f3f7fb!important;
    box-shadow:none!important;
  }
  body:not(.home):not(.front-page) .middle-home-header-search svg{
    width:18px!important;height:18px!important;flex:0 0 auto!important;
    fill:none!important;stroke:#7a91af!important;stroke-width:1.8!important;
  }
  body:not(.home):not(.front-page) .middle-home-header-search input{
    width:100%!important;height:100%!important;padding:0 0 0 10px!important;
    border:0!important;outline:0!important;background:transparent!important;
    color:#1c2d44!important;font-size:14px!important;box-shadow:none!important;
  }
  body:not(.home):not(.front-page) .middle-home-header-search input::placeholder{color:#9aacc0!important}

  body:not(.home):not(.front-page) .middle-header-tools{
    display:flex!important;align-items:center!important;gap:9px!important;flex:0 0 auto!important;margin-left:0!important;
  }
  /* These are the mobile app-bar controls. Desktop keeps the same header as home. */
  body:not(.home):not(.front-page) .middle-mobile-home-link,
  body:not(.home):not(.front-page) .middle-search-toggle,
  body:not(.home):not(.front-page) .middle-theme-toggle--desktop,
  body:not(.home):not(.front-page) .middle-messages-link,
  body:not(.home):not(.front-page) .middle-write-link{display:none!important}

  body:not(.home):not(.front-page) .middle-header-weather{
    order:1!important;height:44px!important;min-width:112px!important;padding:0 9px!important;
    border:0!important;background:transparent!important;box-shadow:none!important;
  }
  body:not(.home):not(.front-page) .middle-header-weather__icon{font-size:24px!important}
  body:not(.home):not(.front-page) .middle-header-weather strong{font-size:18px!important;color:#11223d!important}

  body:not(.home):not(.front-page) .middle-home-header-bell{
    order:2!important;position:relative!important;display:grid!important;place-items:center!important;
    width:44px!important;height:44px!important;border:1px solid #e1e8f1!important;border-radius:13px!important;
    background:#fff!important;color:#203653!important;box-shadow:none!important;
  }
  body:not(.home):not(.front-page) .middle-home-header-bell svg{
    width:20px!important;height:20px!important;fill:none!important;stroke:currentColor!important;stroke-width:1.7!important;stroke-linecap:round!important;stroke-linejoin:round!important;
  }
  body:not(.home):not(.front-page) .middle-home-header-bell b{
    position:absolute!important;right:-3px!important;top:-4px!important;display:grid!important;place-items:center!important;
    min-width:18px!important;height:18px!important;padding:0 4px!important;border:2px solid #fff!important;border-radius:99px!important;
    background:#ff4f57!important;color:#fff!important;font-size:9px!important;line-height:1!important;
  }

  body:not(.home):not(.front-page) .middle-account-link{
    order:3!important;display:inline-flex!important;min-width:104px!important;height:44px!important;
    border-radius:12px!important;font-size:13px!important;font-weight:750!important;
  }
  body:not(.home):not(.front-page) .middle-account-link--guest{
    border:1px solid #2481ff!important;background:#fff!important;color:#1474ee!important;box-shadow:none!important;
  }
  body:not(.home):not(.front-page) .middle-account-link svg{width:17px!important;height:17px!important}
  body:not(.home):not(.front-page) .middle-header-dropdown--menu{order:4!important}
  body:not(.home):not(.front-page) .middle-header-tools .middle-nav-toggle{
    width:44px!important;min-width:44px!important;height:44px!important;padding:0!important;
    border:0!important;border-radius:12px!important;background:transparent!important;color:#142a46!important;box-shadow:none!important;
  }
  body:not(.home):not(.front-page) .middle-header-tools .middle-nav-toggle>svg,
  body:not(.home):not(.front-page) .middle-header-tools .middle-nav-toggle>span{display:none!important}
  body:not(.home):not(.front-page) .middle-header-tools .middle-nav-toggle::before{content:"☰"!important;font-size:25px!important;line-height:1!important;font-weight:500!important}

  body:not(.home):not(.front-page) .middle-home-topnav{
    width:min(var(--mc-page-canvas),calc(100% - 34px))!important;
    max-width:none!important;height:52px!important;margin:0 auto!important;padding:0!important;
    border-top:1px solid #f0f4f8!important;border-bottom:0!important;background:#fff!important;
  }
  body:not(.home):not(.front-page) .middle-home-topnav__scroll{
    width:100%!important;height:52px!important;margin:0!important;display:flex!important;align-items:center!important;
    justify-content:flex-start!important;gap:4px!important;overflow-x:auto!important;scrollbar-width:none!important;
  }
  body:not(.home):not(.front-page) .middle-home-topnav a,
  body:not(.home):not(.front-page) .middle-home-topnav__more{
    display:inline-flex!important;align-items:center!important;gap:7px!important;flex:0 0 auto!important;
    height:40px!important;min-height:40px!important;padding:0 12px!important;border:0!important;border-radius:10px!important;
    background:transparent!important;color:#14263f!important;font-size:12.5px!important;font-weight:720!important;white-space:nowrap!important;
  }
  body:not(.home):not(.front-page) .middle-home-topnav a:hover,
  body:not(.home):not(.front-page) .middle-home-topnav__more:hover{background:#f2f7fd!important;color:#1474ee!important;transform:none!important}
  body:not(.home):not(.front-page) .middle-home-topnav a span{display:grid!important;place-items:center!important;width:22px!important;height:22px!important}
  body:not(.home):not(.front-page) .middle-home-topnav a span img{width:20px!important;height:20px!important;object-fit:contain!important}

  /* Menu sheet sits immediately below the same two-row header. */
  body:not(.home):not(.front-page) .middle-primary-nav.middle-top-sheet{
    top:124px!important;
    right:max(17px,calc((100vw - min(var(--mc-page-canvas),calc(100vw - 34px)))/2 + 17px))!important;
  }
  body.admin-bar:not(.home):not(.front-page) .middle-primary-nav.middle-top-sheet{top:156px!important}
}

/* --------------------------------------------------------------------------
   Category archive cards — stable desktop geometry
   -------------------------------------------------------------------------- */
@media(min-width:721px){
  body.category:not(.category-ads):not(.category-foto) .middle-post-card,
  body.archive:not(.category-ads):not(.category-foto) .middle-post-card,
  body.search .middle-post-card{
    display:grid!important;
    grid-template-columns:220px minmax(0,1fr)!important;
    grid-template-rows:auto auto 1fr auto!important;
    grid-template-areas:"thumb meta" "thumb title" "thumb excerpt" "thumb actions"!important;
    column-gap:18px!important;row-gap:7px!important;
    min-height:190px!important;padding:14px!important;margin:0 0 14px!important;
    align-items:start!important;
  }
  body.category:not(.category-ads):not(.category-foto) .middle-post-card__thumb,
  body.archive:not(.category-ads):not(.category-foto) .middle-post-card__thumb,
  body.search .middle-post-card__thumb{
    width:220px!important;height:162px!important;min-height:162px!important;align-self:start!important;
    border-radius:17px!important;overflow:hidden!important;
  }
  body.category:not(.category-ads):not(.category-foto) .middle-post-card__thumb img,
  body.archive:not(.category-ads):not(.category-foto) .middle-post-card__thumb img,
  body.search .middle-post-card__thumb img{width:100%!important;height:100%!important;object-fit:cover!important}
  body.category:not(.category-ads):not(.category-foto) .middle-post-card__title,
  body.archive:not(.category-ads):not(.category-foto) .middle-post-card__title,
  body.search .middle-post-card__title{
    margin:0!important;font-size:22px!important;line-height:1.14!important;
    display:-webkit-box!important;-webkit-box-orient:vertical!important;-webkit-line-clamp:2!important;overflow:hidden!important;
  }
  body.category:not(.category-ads):not(.category-foto) .middle-post-card__excerpt,
  body.archive:not(.category-ads):not(.category-foto) .middle-post-card__excerpt,
  body.search .middle-post-card__excerpt{
    align-self:start!important;margin:0!important;font-size:13px!important;line-height:1.48!important;
    display:-webkit-box!important;-webkit-box-orient:vertical!important;-webkit-line-clamp:3!important;overflow:hidden!important;
  }
  body.category:not(.category-ads):not(.category-foto) .middle-post-card .middle-post-actions,
  body.archive:not(.category-ads):not(.category-foto) .middle-post-card .middle-post-actions,
  body.search .middle-post-card .middle-post-actions{align-self:end!important;width:100%!important}

  body.category:not(.category-ads):not(.category-foto) .middle-post-card--no-thumb,
  body.archive:not(.category-ads):not(.category-foto) .middle-post-card--no-thumb,
  body.search .middle-post-card--no-thumb{
    grid-template-columns:minmax(0,1fr)!important;
    grid-template-rows:auto auto 1fr auto!important;
    grid-template-areas:"meta" "title" "excerpt" "actions"!important;
    min-height:150px!important;padding:18px 20px!important;
  }
}

/* --------------------------------------------------------------------------
   Фото category: it has no sidebar, so make the archive truly full-width.
   -------------------------------------------------------------------------- */
body.category-foto .middle-layout,
body.category-photo .middle-layout{
  grid-template-columns:minmax(0,1fr)!important;
  gap:0!important;
}
body.category-foto .middle-sidebar,
body.category-photo .middle-sidebar{display:none!important}
body.category-foto .middle-photo-archive,
body.category-photo .middle-photo-archive{width:100%!important;max-width:none!important;min-width:0!important}

@media(min-width:1101px){
  body.category-foto .middle-photo-grid,
  body.category-photo .middle-photo-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:16px!important}
}
@media(min-width:721px) and (max-width:1100px){
  body.category-foto .middle-photo-grid,
  body.category-photo .middle-photo-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:14px!important}
}
@media(min-width:721px){
  body.category-foto .middle-photo-card,
  body.category-photo .middle-photo-card{min-width:0!important;margin:0!important;border:0!important;background:transparent!important;box-shadow:none!important}
  body.category-foto .middle-photo-card__link,
  body.category-photo .middle-photo-card__link{
    display:block!important;width:100%!important;aspect-ratio:16/10.6!important;
    overflow:hidden!important;border:1px solid #dce7f2!important;border-radius:19px!important;
    background:#edf3f8!important;box-shadow:0 10px 28px rgba(27,55,88,.055)!important;
  }
  body.category-foto .middle-photo-card__media,
  body.category-photo .middle-photo-card__media{position:absolute!important;inset:0!important;width:100%!important;height:100%!important}
  body.category-foto .middle-photo-card__media>img,
  body.category-photo .middle-photo-card__media>img{display:block!important;width:100%!important;height:100%!important;object-fit:cover!important}
  body.category-foto .middle-photo-card__content,
  body.category-photo .middle-photo-card__content{padding:18px!important}
  body.category-foto .middle-photo-card__content h2,
  body.category-photo .middle-photo-card__content h2{font-size:19px!important;line-height:1.18!important;-webkit-line-clamp:2!important}
}

/* Footer remains exactly the same visual block as on the homepage. */
body:not(.home):not(.front-page) .middle-site-footer--portal{border:0!important;background:transparent!important}
body:not(.home):not(.front-page) .middle-footer-home{
  width:min(var(--mc-page-canvas),calc(100% - 34px))!important;
}

/* Keep the approved mobile app bar and collapsed top header on every page. */
@media(max-width:720px){
  body:not(.home):not(.front-page) .middle-home-header-bell{display:none!important}
  body.category-foto .middle-layout,
  body.category-photo .middle-layout{display:block!important;width:100%!important;padding:10px 9px calc(108px + env(safe-area-inset-bottom))!important}
  body.category-foto .middle-photo-grid,
  body.category-photo .middle-photo-grid{grid-template-columns:1fr!important;gap:10px!important}
  body.category-foto .middle-photo-card__link,
  body.category-photo .middle-photo-card__link{aspect-ratio:16/10.6!important;border-radius:17px!important}
}

/* ========================================================================== 
   Middle Community 0.4.3 — category desktop alignment + photo full-width fix
   ========================================================================== */

@media(min-width:721px){
  /* Internal desktop header: same compact geometry as the homepage. */
  body:not(.home):not(.front-page) .middle-brand{
    min-width:0!important;
    width:auto!important;
    flex:0 0 auto!important;
  }
  body:not(.home):not(.front-page) .middle-header-row{
    align-items:center!important;
  }
  body:not(.home):not(.front-page) .middle-home-header-search{
    margin-left:18px!important;
    margin-right:auto!important;
  }

  /* Restore the modern menu chip instead of the old hamburger injected by CSS. */
  body:not(.home):not(.front-page) .middle-header-tools .middle-nav-toggle{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:7px!important;
    width:auto!important;
    min-width:92px!important;
    height:44px!important;
    padding:0 12px!important;
    border:1px solid #e1e8f1!important;
    border-radius:13px!important;
    background:#fff!important;
    color:#17304e!important;
    box-shadow:0 7px 18px rgba(25,54,86,.04)!important;
  }
  body:not(.home):not(.front-page) .middle-header-tools .middle-nav-toggle::before{
    content:none!important;
    display:none!important;
  }
  body:not(.home):not(.front-page) .middle-header-tools .middle-nav-toggle>.middle-menu-dots-icon{
    display:block!important;
    width:20px!important;
    height:20px!important;
    min-width:20px!important;
    fill:currentColor!important;
    stroke:none!important;
  }
  body:not(.home):not(.front-page) .middle-header-tools .middle-nav-toggle>span{
    display:block!important;
    width:auto!important;
    height:auto!important;
    background:transparent!important;
    color:inherit!important;
    font-size:12px!important;
    line-height:1!important;
    font-weight:760!important;
  }
  body:not(.home):not(.front-page) .middle-header-tools .middle-nav-toggle>.middle-chevron{
    display:none!important;
  }

  /* Photo archive has no sidebar. The old generic internal grid still reserved
     318px for it, which shifted the whole gallery to the left. */
  body.middle-photo-archive-page:not(.home):not(.front-page) .middle-layout,
  body.category-foto:not(.home):not(.front-page) .middle-layout,
  body.category-photo:not(.home):not(.front-page) .middle-layout{
    display:block!important;
    grid-template-columns:minmax(0,1fr)!important;
    width:min(var(--mc-page-canvas),calc(100% - 34px))!important;
    max-width:none!important;
    margin:0 auto!important;
    padding:28px 0 58px!important;
    gap:0!important;
  }
  body.middle-photo-archive-page:not(.home):not(.front-page) .middle-sidebar,
  body.category-foto:not(.home):not(.front-page) .middle-sidebar,
  body.category-photo:not(.home):not(.front-page) .middle-sidebar{
    display:none!important;
  }
  body.middle-photo-archive-page:not(.home):not(.front-page) .middle-main,
  body.category-foto:not(.home):not(.front-page) .middle-main,
  body.category-photo:not(.home):not(.front-page) .middle-main,
  body.middle-photo-archive-page:not(.home):not(.front-page) .middle-photo-archive,
  body.category-foto:not(.home):not(.front-page) .middle-photo-archive,
  body.category-photo:not(.home):not(.front-page) .middle-photo-archive{
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    margin:0!important;
  }
  body.middle-photo-archive-page .middle-photo-archive__hero,
  body.category-foto .middle-photo-archive__hero,
  body.category-photo .middle-photo-archive__hero{
    width:100%!important;
    min-height:190px!important;
    margin:0 0 18px!important;
    padding:30px 32px!important;
    align-items:center!important;
    border-radius:24px!important;
  }
  /* Remove the oversized decorative blob visible in the screenshot. */
  body.middle-photo-archive-page .middle-photo-archive__hero::before,
  body.middle-photo-archive-page .middle-photo-archive__hero::after,
  body.category-foto .middle-photo-archive__hero::before,
  body.category-foto .middle-photo-archive__hero::after,
  body.category-photo .middle-photo-archive__hero::before,
  body.category-photo .middle-photo-archive__hero::after{
    display:none!important;
    content:none!important;
  }
  body.middle-photo-archive-page .middle-photo-archive__publish,
  body.category-foto .middle-photo-archive__publish,
  body.category-photo .middle-photo-archive__publish{
    align-self:center!important;
    min-width:150px!important;
    justify-content:center!important;
    border-radius:14px!important;
  }
  body.middle-photo-archive-page .middle-photo-grid,
  body.category-foto .middle-photo-grid,
  body.category-photo .middle-photo-grid{
    width:100%!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:16px!important;
    align-items:stretch!important;
  }
  body.middle-photo-archive-page .middle-photo-card,
  body.category-foto .middle-photo-card,
  body.category-photo .middle-photo-card{
    min-width:0!important;
    width:100%!important;
  }
  body.middle-photo-archive-page .middle-photo-card__link,
  body.category-foto .middle-photo-card__link,
  body.category-photo .middle-photo-card__link{
    width:100%!important;
    aspect-ratio:16/10!important;
    border-radius:18px!important;
  }

  /* Other category archives: use the full portal canvas instead of a narrow
     legacy content column. This keeps every news card aligned with the header,
     page title and footer. */
  body.category:not(.category-ads):not(.category-foto):not(.category-photo):not(.home):not(.front-page) .middle-layout{
    display:block!important;
    grid-template-columns:minmax(0,1fr)!important;
    width:min(var(--mc-page-canvas),calc(100% - 34px))!important;
    max-width:none!important;
    margin:0 auto!important;
    padding:28px 0 58px!important;
    gap:0!important;
  }
  body.category:not(.category-ads):not(.category-foto):not(.category-photo):not(.home):not(.front-page) .middle-sidebar{
    display:none!important;
  }
  body.category:not(.category-ads):not(.category-foto):not(.category-photo):not(.home):not(.front-page) .middle-main{
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
  }
  body.category:not(.category-ads):not(.category-foto):not(.category-photo) .middle-page-head{
    width:100%!important;
    margin-bottom:16px!important;
  }
  body.category:not(.category-ads):not(.category-foto):not(.category-photo) .middle-post-card{
    width:100%!important;
    grid-template-columns:250px minmax(0,1fr)!important;
    min-height:194px!important;
    padding:14px!important;
    margin:0 0 14px!important;
  }
  body.category:not(.category-ads):not(.category-foto):not(.category-photo) .middle-post-card__thumb{
    width:250px!important;
    height:166px!important;
    min-height:166px!important;
  }
  body.category:not(.category-ads):not(.category-foto):not(.category-photo) .middle-post-card--no-thumb{
    grid-template-columns:minmax(0,1fr)!important;
    min-height:150px!important;
    padding:18px 20px!important;
  }
}

@media(min-width:721px) and (max-width:1050px){
  body.middle-photo-archive-page .middle-photo-grid,
  body.category-foto .middle-photo-grid,
  body.category-photo .middle-photo-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  body.category:not(.category-ads):not(.category-foto):not(.category-photo) .middle-post-card{
    grid-template-columns:210px minmax(0,1fr)!important;
  }
  body.category:not(.category-ads):not(.category-foto):not(.category-photo) .middle-post-card__thumb{
    width:210px!important;
    height:150px!important;
    min-height:150px!important;
  }
}

/* ========================================================================== 
   Middle Community 0.4.4 — all service sections + global advertising banner
   ========================================================================== */

/* One header structure really exists everywhere now: search + section row. */
@media(min-width:721px){
  body:not(.home):not(.front-page) .middle-home-header-search{display:flex!important}
  body:not(.home):not(.front-page) .middle-home-topnav{display:flex!important}
}

/* --------------------------------------------------------------------------
   Global banner immediately below the header on every page where the slot is
   enabled in the admin panel, including the homepage.
   -------------------------------------------------------------------------- */
.middle-ad-zone--top{
  width:min(var(--mc-page-canvas,1480px),calc(100% - 44px))!important;
  max-width:none!important;
  margin:18px auto 18px!important;
  padding:0!important;
}
.home .middle-ad-zone--top,
.front-page .middle-ad-zone--top{
  width:min(var(--mc-home-canvas,1540px),calc(100% - 44px))!important;
}
.middle-ad-zone--top .middle-ad--top{
  overflow:hidden!important;
  border:1px solid #dce7f2!important;
  border-radius:22px!important;
  background:#fff!important;
  box-shadow:0 12px 34px rgba(27,55,88,.07)!important;
}
.middle-ad-zone--top .middle-ad--top .middle-ad__media{
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  aspect-ratio:1200/250!important;
  background:#eef4fa!important;
}
.middle-ad-zone--top .middle-ad--top .middle-ad__media img{
  position:absolute!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
  max-width:none!important;
  max-height:none!important;
  object-fit:cover!important;
  object-position:center!important;
}
.middle-ad-zone--top .middle-ad__label{
  top:10px!important;
  left:10px!important;
  min-height:22px!important;
  padding:0 8px!important;
  font-size:8.5px!important;
}

/* If the homepage banner is active, the hero starts cleanly below it. */
.home .middle-ad-zone--top + .middle-layout--exact-home,
.front-page .middle-ad-zone--top + .middle-layout--exact-home{
  padding-top:0!important;
}
.home .middle-ad-zone--top + .middle-layout--exact-home .middle-exact-hero-zone,
.front-page .middle-ad-zone--top + .middle-layout--exact-home .middle-exact-hero-zone{
  margin-top:0!important;
}

/* --------------------------------------------------------------------------
   Full-width special sections.  These templates do not have a real sidebar,
   so no invisible right column may reserve space.
   -------------------------------------------------------------------------- */
body.post-type-archive-middle_organization .middle-layout,
body.single-middle_organization .middle-layout,
body.middle-ads-board-page .middle-layout,
body.middle-photo-archive-page .middle-layout,
body.middle-service-landing-body .middle-layout,
body.middle-city-info-body .middle-layout,
body.middle-messages-system-page .middle-layout,
body.middle-advertising-page .middle-layout{
  grid-template-columns:minmax(0,1fr)!important;
  gap:0!important;
}
body.post-type-archive-middle_organization .middle-main,
body.single-middle_organization .middle-main,
body.middle-ads-board-page .middle-main,
body.middle-photo-archive-page .middle-main,
body.middle-service-landing-body .middle-main,
body.middle-city-info-body .middle-main,
body.middle-messages-system-page .middle-main,
body.middle-advertising-page .middle-main{
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
}

/* Organizations — use the same wide canvas as the rest of the portal. */
body.post-type-archive-middle_organization .middle-org-directory,
body.single-middle_organization .middle-org-single{
  width:100%!important;
  max-width:none!important;
  margin:0!important;
}
body.post-type-archive-middle_organization .middle-org-directory__layout{
  grid-template-columns:minmax(0,1.25fr) minmax(360px,.75fr)!important;
  gap:18px!important;
}
body.post-type-archive-middle_organization .middle-org-cards{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:12px!important;
}
body.post-type-archive-middle_organization .middle-org-card{
  min-width:0!important;
}
body.single-middle_organization .middle-org-single__layout{
  grid-template-columns:minmax(0,1fr) minmax(360px,430px)!important;
}

/* Classifieds — hero, filters and results align to exactly the same edges. */
body.middle-ads-board-page .middle-market,
body.middle-ads-board-page .middle-ads-board{
  width:100%!important;
  max-width:none!important;
  margin:0!important;
}
body.middle-ads-board-page .middle-market-hero,
body.middle-ads-board-page .middle-market-results,
body.middle-ads-board-page .middle-market-filter,
body.middle-ads-board-page .middle-ads-board__hero,
body.middle-ads-board-page .middle-ads-categories,
body.middle-ads-board-page .middle-ads-results{
  width:100%!important;
  max-width:none!important;
}
body.middle-ads-board-page .middle-market-grid,
body.middle-ads-board-page .middle-ads-grid{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:14px!important;
}

/* Work / Real estate / Auto SEO landing pages. */
body.middle-service-landing-body .middle-seo-landing,
body.middle-service-landing-body .middle-outages-page{
  width:100%!important;
  max-width:none!important;
  margin:0!important;
}
body.middle-service-landing-body .middle-seo-landing__hero{
  width:100%!important;
  min-height:176px!important;
  margin:0 0 18px!important;
  padding:30px 32px!important;
  border-radius:28px!important;
  background:linear-gradient(135deg,#fff 0%,#edf6ff 100%)!important;
  box-shadow:var(--mc-page-shadow)!important;
}
body.middle-service-landing-body .middle-seo-landing__stats{
  margin:0 0 16px!important;
  padding:12px 4px 0!important;
}
body.middle-service-landing-body .middle-seo-landing__grid{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:14px!important;
}
body.middle-service-landing-body .middle-seo-ad-card{
  overflow:hidden!important;
  border:1px solid #dce7f2!important;
  border-radius:20px!important;
  background:#fff!important;
  box-shadow:0 10px 28px rgba(27,55,88,.045)!important;
  transition:transform .2s ease,box-shadow .2s ease!important;
}
body.middle-service-landing-body .middle-seo-ad-card:hover{
  transform:translateY(-3px)!important;
  box-shadow:0 16px 38px rgba(27,55,88,.10)!important;
}

/* Advertising/about pages and plugin-owned city pages should not re-introduce
   their old narrower 1240px inner shell. */
body.middle-advertising-page .middle-advertising,
body.middle-city-info-body .middle-city-info-page,
body.middle-messages-system-page .middle-messages-app{
  width:100%!important;
  max-width:none!important;
  margin-left:0!important;
  margin-right:0!important;
}

/* --------------------------------------------------------------------------
   Medium desktop: keep everything balanced instead of creating cramped cards.
   -------------------------------------------------------------------------- */
@media(max-width:1180px) and (min-width:721px){
  body.post-type-archive-middle_organization .middle-org-directory__layout{
    grid-template-columns:minmax(0,1fr) 330px!important;
  }
  body.post-type-archive-middle_organization .middle-org-cards{
    grid-template-columns:1fr!important;
  }
  body.middle-ads-board-page .middle-market-grid,
  body.middle-ads-board-page .middle-ads-grid,
  body.middle-service-landing-body .middle-seo-landing__grid{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
}

/* --------------------------------------------------------------------------
   Mobile: same approved bottom navigation, full-width service pages and a
   complete advertising banner without a giant crop.
   -------------------------------------------------------------------------- */
@media(max-width:720px){
  .middle-ad-zone--top,
  .home .middle-ad-zone--top,
  .front-page .middle-ad-zone--top{
    width:calc(100% - 18px)!important;
    margin:8px auto 10px!important;
  }
  .middle-ad-zone--top .middle-ad--top{
    border-radius:16px!important;
  }
  .middle-ad-zone--top .middle-ad--top .middle-ad__media{
    aspect-ratio:1200/250!important;
  }
  .middle-ad-zone--top .middle-ad__label{
    top:6px!important;
    left:6px!important;
    min-height:18px!important;
    padding:0 6px!important;
    font-size:7px!important;
  }

  body.post-type-archive-middle_organization .middle-layout,
  body.single-middle_organization .middle-layout,
  body.middle-ads-board-page .middle-layout,
  body.middle-photo-archive-page .middle-layout,
  body.middle-service-landing-body .middle-layout,
  body.middle-city-info-body .middle-layout,
  body.middle-messages-system-page .middle-layout,
  body.middle-advertising-page .middle-layout{
    display:block!important;
    width:100%!important;
    padding:10px 0 calc(100px + env(safe-area-inset-bottom))!important;
  }

  body.post-type-archive-middle_organization .middle-org-directory,
  body.single-middle_organization .middle-org-single,
  body.middle-service-landing-body .middle-seo-landing,
  body.middle-service-landing-body .middle-outages-page,
  body.middle-advertising-page .middle-advertising,
  body.middle-city-info-body .middle-city-info-page,
  body.middle-messages-system-page .middle-messages-app{
    width:calc(100% - 18px)!important;
    margin:0 auto!important;
  }

  body.post-type-archive-middle_organization .middle-org-directory__layout,
  body.single-middle_organization .middle-org-single__layout{
    grid-template-columns:1fr!important;
  }
  body.post-type-archive-middle_organization .middle-org-cards,
  body.middle-ads-board-page .middle-market-grid,
  body.middle-ads-board-page .middle-ads-grid,
  body.middle-service-landing-body .middle-seo-landing__grid{
    grid-template-columns:1fr!important;
  }
  body.middle-service-landing-body .middle-seo-landing__hero{
    min-height:0!important;
    padding:20px!important;
    border-radius:20px!important;
  }
}

/* ========================================================================== 
   Middle Community 0.4.5 — wider internal catalogs + more cards per row
   ========================================================================== */

/* The internal portal now uses the available browser width as confidently as
   the homepage. 1600px keeps the content centered but prevents service pages
   from looking like a narrow 1240px island on large monitors. */
:root{
  --mc-page-canvas:1600px;
}

@media(min-width:721px){
  body:not(.home):not(.front-page) .middle-header-row,
  body:not(.home):not(.front-page) .middle-home-topnav__scroll,
  body:not(.home):not(.front-page) .middle-layout,
  body:not(.home):not(.front-page) .middle-ad-zone--top{
    width:min(var(--mc-page-canvas),calc(100% - 32px))!important;
  }

  /* All special full-width pages really fill their main shell. */
  body.middle-service-landing-body .middle-main,
  body.middle-service-landing-body .middle-service-landing-page,
  body.middle-service-landing-body .middle-service-landing-content,
  body.middle-service-landing-body .middle-service-landing-content>.middle-seo-landing,
  body.middle-ads-board-page .middle-main,
  body.middle-ads-board-page .middle-market,
  body.middle-ads-board-page .middle-ads-board,
  body.post-type-archive-middle_organization .middle-main,
  body.post-type-archive-middle_organization .middle-org-directory,
  body.middle-photo-archive-page .middle-main,
  body.middle-photo-archive-page .middle-photo-archive,
  body.category-foto .middle-main,
  body.category-foto .middle-photo-archive,
  body.category-photo .middle-main,
  body.category-photo .middle-photo-archive{
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    margin-left:0!important;
    margin-right:0!important;
  }

  /* Real estate / work / other SEO card landings: five useful cards per row. */
  body.middle-service-landing-body .middle-seo-landing__grid{
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
    gap:14px!important;
  }

  /* Classifieds: five columns on large desktop instead of leaving unused space. */
  body.middle-ads-board-page .middle-market-grid,
  body.middle-ads-board-page .middle-ads-grid{
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
    gap:14px!important;
  }

  /* Photo section: the wider page can comfortably carry four photographs. */
  body.middle-photo-archive-page .middle-photo-grid,
  body.category-foto .middle-photo-grid,
  body.category-photo .middle-photo-grid{
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:15px!important;
  }

  /* Organizations: keep the map, but show three organizations alongside it. */
  body.post-type-archive-middle_organization .middle-org-directory__layout{
    grid-template-columns:minmax(0,1fr) minmax(360px,390px)!important;
    gap:18px!important;
  }
  body.post-type-archive-middle_organization .middle-org-cards{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:12px!important;
  }
  body.post-type-archive-middle_organization .middle-org-card{
    grid-template-columns:92px minmax(0,1fr)!important;
  }
  body.post-type-archive-middle_organization .middle-org-card__media{
    min-height:142px!important;
  }

  /* Regular news/category archives: use two balanced portal cards per row. */
  body.category:not(.category-ads):not(.category-foto):not(.category-photo):not(.home):not(.front-page) .middle-archive-grid--category{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:14px!important;
    width:100%!important;
  }
  body.category:not(.category-ads):not(.category-foto):not(.category-photo) .middle-archive-grid--category .middle-post-card{
    width:100%!important;
    min-height:188px!important;
    margin:0!important;
    grid-template-columns:210px minmax(0,1fr)!important;
  }
  body.category:not(.category-ads):not(.category-foto):not(.category-photo) .middle-archive-grid--category .middle-post-card__thumb{
    width:210px!important;
    height:160px!important;
    min-height:160px!important;
  }
  body.category:not(.category-ads):not(.category-foto):not(.category-photo) .middle-archive-grid--category .middle-post-card--no-thumb{
    grid-template-columns:minmax(0,1fr)!important;
  }
}

/* Large-but-not-huge desktop: four catalog cards and two organization cards. */
@media(min-width:721px) and (max-width:1380px){
  body.middle-service-landing-body .middle-seo-landing__grid,
  body.middle-ads-board-page .middle-market-grid,
  body.middle-ads-board-page .middle-ads-grid{
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
  }
  body.middle-photo-archive-page .middle-photo-grid,
  body.category-foto .middle-photo-grid,
  body.category-photo .middle-photo-grid{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
  body.post-type-archive-middle_organization .middle-org-cards{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  body.category:not(.category-ads):not(.category-foto):not(.category-photo) .middle-archive-grid--category .middle-post-card{
    grid-template-columns:175px minmax(0,1fr)!important;
  }
  body.category:not(.category-ads):not(.category-foto):not(.category-photo) .middle-archive-grid--category .middle-post-card__thumb{
    width:175px!important;
    height:142px!important;
    min-height:142px!important;
  }
}

/* Two-column category cards need room; collapse gracefully before they become cramped. */
@media(min-width:721px) and (max-width:1080px){
  body.category:not(.category-ads):not(.category-foto):not(.category-photo):not(.home):not(.front-page) .middle-archive-grid--category{
    grid-template-columns:1fr!important;
  }
  body.post-type-archive-middle_organization .middle-org-directory__layout{
    grid-template-columns:minmax(0,1fr) 330px!important;
  }
  body.post-type-archive-middle_organization .middle-org-cards{
    grid-template-columns:1fr!important;
  }
}

@media(max-width:720px){
  /* Preserve the approved one-column mobile layouts and bottom navigation. */
  body.category:not(.category-ads):not(.category-foto):not(.category-photo) .middle-archive-grid--category{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:10px!important;
  }
}


/* ==========================================================================
   Middle Community 0.4.6 — classifieds fill the entire portal canvas
   ========================================================================== */
@media(min-width:721px){
  /*
   * The classifieds template has no real sidebar, but an old global
   * .middle-layout grid can still reserve a right-hand column. Collapse the
   * wrapper itself, not only the body-class variant.
   */
  body.middle-ads-board-page .middle-layout,
  .middle-layout:has(> .middle-market){
    display:block!important;
    grid-template-columns:none!important;
    gap:0!important;
    width:min(var(--mc-page-canvas),calc(100% - 32px))!important;
    max-width:none!important;
    margin-left:auto!important;
    margin-right:auto!important;
  }

  body.middle-ads-board-page .middle-main,
  body.middle-ads-board-page .middle-market,
  .middle-layout:has(> .middle-market)>.middle-market{
    display:block!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    margin:0!important;
  }

  body.middle-ads-board-page .middle-market-hero,
  body.middle-ads-board-page .middle-market-results,
  body.middle-ads-board-page .middle-market-filter{
    width:100%!important;
    max-width:none!important;
    margin-left:0!important;
    margin-right:0!important;
  }

  /* Use the recovered width instead of leaving a blank stripe on the right. */
  body.middle-ads-board-page .middle-market-grid,
  body.middle-ads-board-page .middle-ads-grid,
  .middle-layout:has(> .middle-market) .middle-market-grid{
    grid-template-columns:repeat(6,minmax(0,1fr))!important;
    gap:14px!important;
  }
}

@media(min-width:1080px) and (max-width:1399px){
  body.middle-ads-board-page .middle-market-grid,
  body.middle-ads-board-page .middle-ads-grid,
  .middle-layout:has(> .middle-market) .middle-market-grid{
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
  }
}

@media(min-width:861px) and (max-width:1079px){
  body.middle-ads-board-page .middle-market-grid,
  body.middle-ads-board-page .middle-ads-grid,
  .middle-layout:has(> .middle-market) .middle-market-grid{
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
  }
}


/* ==========================================================================
   Middle Community 0.4.7 — true full-width wrapper for special inner pages
   ========================================================================== */

/*
 * Previous versions tried to infer a full-width page only from body classes /
 * :has(). The actual 310px legacy sidebar track could therefore survive.
 * 0.4.7 marks the wrapper itself in PHP and removes that track unconditionally.
 */
@media(min-width:721px){
  .middle-layout.middle-layout--portal-full{
    display:block!important;
    grid-template-columns:none!important;
    grid-template-rows:none!important;
    gap:0!important;
    width:min(var(--mc-page-canvas),calc(100% - 32px))!important;
    max-width:none!important;
    margin-left:auto!important;
    margin-right:auto!important;
    padding-left:0!important;
    padding-right:0!important;
  }

  .middle-layout.middle-layout--portal-full>.middle-main{
    display:block!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    margin-left:0!important;
    margin-right:0!important;
  }

  /* Classifieds: hero and results now span the same full portal canvas. */
  .middle-layout--portal-full>.middle-market,
  .middle-layout--portal-full .middle-market-hero,
  .middle-layout--portal-full .middle-market-results{
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    margin-left:0!important;
    margin-right:0!important;
  }

  .middle-layout--portal-full .middle-market-grid,
  .middle-layout--portal-full .middle-ads-grid{
    grid-template-columns:repeat(6,minmax(0,1fr))!important;
    gap:14px!important;
  }

  /* Other full-width sections share the same recovered width. */
  .middle-layout--portal-full .middle-photo-archive,
  .middle-layout--portal-full .middle-org-directory,
  .middle-layout--portal-full .middle-org-single,
  .middle-layout--portal-full .middle-seo-landing,
  .middle-layout--portal-full .middle-outages-page,
  .middle-layout--portal-full .middle-city-info-page,
  .middle-layout--portal-full .middle-messages-app,
  .middle-layout--portal-full .middle-advertising{
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    margin-left:0!important;
    margin-right:0!important;
  }
}

@media(min-width:1180px) and (max-width:1450px){
  .middle-layout--portal-full .middle-market-grid,
  .middle-layout--portal-full .middle-ads-grid{
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
  }
}

@media(min-width:900px) and (max-width:1179px){
  .middle-layout--portal-full .middle-market-grid,
  .middle-layout--portal-full .middle-ads-grid{
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
  }
}

@media(max-width:720px){
  .middle-layout.middle-layout--portal-full{
    display:block!important;
    width:100%!important;
    max-width:none!important;
    margin:0!important;
  }
}


/* ==========================================================================
   Middle Community 0.4.8 — header menu variant #3: right slide drawer
   Same behaviour on desktop and mobile.
   ========================================================================== */

/* Backdrop now belongs to the side drawer on desktop too. */
.middle-sheet-backdrop{
  z-index:1450!important;
  background:rgba(13,28,46,.38)!important;
  backdrop-filter:blur(4px)!important;
  -webkit-backdrop-filter:blur(4px)!important;
}
.middle-sheet-backdrop.is-open{
  opacity:1!important;
  visibility:visible!important;
}

/* Opening the side drawer must never push page content/header down. */
.middle-header-row.middle-header-row--nav-open{
  margin-bottom:0!important;
}

/* The Menu trigger remains a small clean app-style action. */
.middle-header-dropdown--menu>.middle-nav-toggle{
  position:relative!important;
}
.middle-header-dropdown--menu>.middle-nav-toggle[aria-expanded="true"]{
  background:#edf5ff!important;
  color:#176fd8!important;
}

/* One right-hand drawer for every desktop/internal/home page. */
.middle-primary-nav.middle-top-sheet{
  position:fixed!important;
  z-index:1500!important;
  top:0!important;
  right:0!important;
  bottom:0!important;
  left:auto!important;
  width:min(430px,92vw)!important;
  height:100dvh!important;
  max-height:none!important;
  margin:0!important;
  padding:0!important;
  overflow:hidden!important;
  border:0!important;
  border-left:1px solid rgba(216,226,238,.98)!important;
  border-radius:28px 0 0 28px!important;
  background:rgba(255,255,255,.992)!important;
  box-shadow:-28px 0 70px rgba(22,45,73,.18)!important;
  backdrop-filter:blur(22px) saturate(1.08)!important;
  -webkit-backdrop-filter:blur(22px) saturate(1.08)!important;
  opacity:1!important;
  visibility:hidden!important;
  pointer-events:none!important;
  transform:translate3d(104%,0,0)!important;
  transform-origin:right center!important;
  transition:
    transform .34s cubic-bezier(.22,.8,.2,1),
    visibility .34s ease!important;
  animation:none!important;
  clip-path:none!important;
  filter:none!important;
}

.middle-primary-nav.middle-top-sheet.is-open{
  visibility:visible!important;
  pointer-events:auto!important;
  transform:translate3d(0,0,0)!important;
  opacity:1!important;
  animation:none!important;
}

/* Remove leftovers from the old dropdown/mega-menu pointer. */
.middle-primary-nav.middle-top-sheet::before,
.middle-primary-nav.middle-top-sheet::after{
  content:none!important;
  display:none!important;
}

/* Drawer header. */
.middle-primary-nav .middle-dropdown-panel__head{
  position:sticky!important;
  z-index:5!important;
  top:0!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:14px!important;
  min-height:82px!important;
  margin:0!important;
  padding:18px 18px 15px 22px!important;
  border:0!important;
  border-bottom:1px solid #e8eef5!important;
  border-radius:0!important;
  background:rgba(255,255,255,.97)!important;
  backdrop-filter:blur(16px)!important;
  -webkit-backdrop-filter:blur(16px)!important;
}
.middle-drawer-title{
  display:flex!important;
  flex-direction:column!important;
  gap:3px!important;
  min-width:0!important;
}
.middle-primary-nav .middle-dropdown-panel__head .middle-drawer-title strong{
  margin:0!important;
  color:#13253c!important;
  font-size:23px!important;
  line-height:1!important;
  font-weight:850!important;
  letter-spacing:-.035em!important;
}
.middle-drawer-title small{
  display:block!important;
  color:#8493a7!important;
  font-size:10px!important;
  line-height:1.2!important;
  font-weight:650!important;
  letter-spacing:.01em!important;
}
.middle-primary-nav .middle-sheet-head-actions{
  display:flex!important;
  align-items:center!important;
  gap:7px!important;
}
.middle-primary-nav .middle-sheet-close,
.middle-primary-nav .middle-sheet-theme-toggle{
  display:grid!important;
  place-items:center!important;
  width:38px!important;
  height:38px!important;
  min-width:38px!important;
  margin:0!important;
  padding:0!important;
  border:1px solid #e1e9f2!important;
  border-radius:12px!important;
  background:#f6f9fc!important;
  color:#23364e!important;
  box-shadow:none!important;
}
.middle-primary-nav .middle-sheet-close{
  font-size:25px!important;
  line-height:1!important;
}

/* Scroll only the drawer content; header stays visible. */
.middle-primary-nav .middle-combined-panel{
  display:flex!important;
  flex-direction:column!important;
  gap:16px!important;
  height:calc(100dvh - 82px)!important;
  padding:16px 16px 28px!important;
  overflow-y:auto!important;
  overscroll-behavior:contain!important;
  scrollbar-width:thin!important;
}

/* Sections are flatter than the old mega-menu: closer to a native side panel. */
.middle-primary-nav .middle-combined-panel__section{
  display:flex!important;
  flex-direction:column!important;
  gap:9px!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
.middle-primary-nav .middle-combined-panel__section::before{
  content:none!important;
  display:none!important;
}
.middle-primary-nav .middle-combined-panel__label,
.middle-primary-nav .middle-combined-panel__label-wrap .middle-combined-panel__label{
  color:#8b99aa!important;
  font-size:9px!important;
  line-height:1.2!important;
  font-weight:850!important;
  letter-spacing:.12em!important;
  text-transform:uppercase!important;
}
.middle-primary-nav .middle-combined-panel__label-wrap{
  min-height:25px!important;
  padding:0 4px!important;
}
.middle-primary-nav .middle-combined-panel__label-wrap span{
  min-width:25px!important;
  height:25px!important;
  padding:0 7px!important;
  border:0!important;
  border-radius:999px!important;
  background:#edf5ff!important;
  color:#176fd8!important;
  font-size:10px!important;
}

/* Main list = single clean vertical rail, exactly like selected variant #3. */
.middle-primary-nav .middle-category-list{
  display:flex!important;
  flex-direction:column!important;
  gap:5px!important;
  grid-template-columns:none!important;
}
.middle-primary-nav .middle-category-list a,
.middle-primary-nav .middle-combined-panel__section--nav a{
  position:relative!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  width:100%!important;
  min-height:49px!important;
  margin:0!important;
  padding:0 39px 0 14px!important;
  border:1px solid transparent!important;
  border-radius:14px!important;
  background:transparent!important;
  color:#1b2b40!important;
  font-size:13px!important;
  line-height:1.2!important;
  font-weight:720!important;
  box-shadow:none!important;
  transform:none!important;
}
.middle-primary-nav .middle-category-list a::before,
.middle-primary-nav .middle-combined-panel__section--nav a::before{
  content:""!important;
  display:block!important;
  flex:0 0 8px!important;
  width:8px!important;
  height:8px!important;
  margin-right:11px!important;
  border-radius:50%!important;
  background:#52a2f4!important;
  box-shadow:0 0 0 5px rgba(82,162,244,.10)!important;
}
.middle-primary-nav .middle-category-list a::after,
.middle-primary-nav .middle-combined-panel__section--nav a::after{
  content:"›"!important;
  position:absolute!important;
  right:15px!important;
  top:50%!important;
  transform:translateY(-52%)!important;
  color:#91a0b2!important;
  font-size:23px!important;
  line-height:1!important;
  font-weight:400!important;
  opacity:1!important;
}
.middle-primary-nav .middle-category-list a:hover,
.middle-primary-nav .middle-category-list a:focus-visible,
.middle-primary-nav .middle-combined-panel__section--nav a:hover,
.middle-primary-nav .middle-combined-panel__section--nav .current-menu-item>a{
  border-color:#dce9f8!important;
  background:#f2f7fd!important;
  color:#126dd6!important;
  transform:none!important;
}
.middle-primary-nav .middle-category-list a small{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-width:24px!important;
  height:22px!important;
  margin-left:auto!important;
  margin-right:2px!important;
  padding:0 7px!important;
  border:0!important;
  border-radius:999px!important;
  background:#f0f4f8!important;
  color:#718196!important;
  font-size:9px!important;
  font-weight:750!important;
}

/* Quick actions become two compact buttons at the bottom of the drawer. */
.middle-primary-nav .middle-menu-quick-actions{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:8px!important;
  margin-bottom:2px!important;
}
.middle-primary-nav .middle-menu-action{
  min-height:46px!important;
  justify-content:center!important;
  padding:0 10px!important;
  border:1px solid #e1eaf4!important;
  border-radius:13px!important;
  background:#f7f9fc!important;
  color:#36506f!important;
  font-size:11px!important;
  font-weight:750!important;
}
.middle-primary-nav .middle-menu-action svg{
  width:18px!important;
  height:18px!important;
}

/* WP menu in the second section stays vertical too. */
.middle-primary-nav .middle-combined-panel__section--nav ul{
  display:flex!important;
  flex-direction:column!important;
  gap:5px!important;
  grid-template-columns:none!important;
  margin:0!important;
  padding:0!important;
}

/* WordPress admin bar support. */
body.admin-bar .middle-primary-nav.middle-top-sheet{
  top:32px!important;
  height:calc(100dvh - 32px)!important;
}
body.admin-bar .middle-primary-nav .middle-combined-panel{
  height:calc(100dvh - 114px)!important;
}

/* Dark theme keeps the same geometry. */
:root[data-middle-theme="dark"] .middle-primary-nav.middle-top-sheet{
  border-left-color:#343d49!important;
  background:rgba(23,27,33,.992)!important;
  box-shadow:-28px 0 70px rgba(0,0,0,.40)!important;
}
:root[data-middle-theme="dark"] .middle-primary-nav .middle-dropdown-panel__head{
  border-bottom-color:#343d49!important;
  background:rgba(23,27,33,.97)!important;
}
:root[data-middle-theme="dark"] .middle-primary-nav .middle-dropdown-panel__head .middle-drawer-title strong{
  color:#f3f6fa!important;
}
:root[data-middle-theme="dark"] .middle-primary-nav .middle-sheet-close,
:root[data-middle-theme="dark"] .middle-primary-nav .middle-sheet-theme-toggle{
  border-color:#3a4552!important;
  background:#2a3038!important;
  color:#f3f6fa!important;
}
:root[data-middle-theme="dark"] .middle-primary-nav .middle-category-list a,
:root[data-middle-theme="dark"] .middle-primary-nav .middle-combined-panel__section--nav a{
  color:#ecf2f8!important;
}
:root[data-middle-theme="dark"] .middle-primary-nav .middle-category-list a:hover,
:root[data-middle-theme="dark"] .middle-primary-nav .middle-combined-panel__section--nav a:hover{
  border-color:#3d4c5e!important;
  background:#29323d!important;
  color:#73b7ff!important;
}
:root[data-middle-theme="dark"] .middle-primary-nav .middle-menu-action{
  border-color:#3a4552!important;
  background:#292f37!important;
  color:#e7edf5!important;
}

/* Mobile uses the exact same right-side motion, only narrower. */
@media(max-width:720px){
  .middle-primary-nav.middle-top-sheet{
    z-index:1500!important;
    top:0!important;
    right:0!important;
    bottom:0!important;
    left:auto!important;
    width:min(88vw,360px)!important;
    height:100dvh!important;
    max-height:none!important;
    padding:0!important;
    border:0!important;
    border-left:1px solid rgba(216,226,238,.98)!important;
    border-radius:24px 0 0 24px!important;
    transform:translate3d(104%,0,0)!important;
  }
  .middle-primary-nav.middle-top-sheet.is-open{
    transform:translate3d(0,0,0)!important;
  }
  .middle-primary-nav .middle-dropdown-panel__head{
    min-height:76px!important;
    padding:16px 13px 13px 17px!important;
  }
  .middle-primary-nav .middle-dropdown-panel__head .middle-drawer-title strong{
    font-size:21px!important;
  }
  .middle-primary-nav .middle-combined-panel{
    height:calc(100dvh - 76px)!important;
    padding:13px 12px calc(94px + env(safe-area-inset-bottom))!important;
  }
  .middle-primary-nav .middle-category-list a,
  .middle-primary-nav .middle-combined-panel__section--nav a{
    min-height:48px!important;
    padding-left:13px!important;
    border-radius:13px!important;
    font-size:12px!important;
  }
  body.admin-bar .middle-primary-nav.middle-top-sheet{
    top:46px!important;
    height:calc(100dvh - 46px)!important;
  }
  body.admin-bar .middle-primary-nav .middle-combined-panel{
    height:calc(100dvh - 122px)!important;
  }
}

@media(prefers-reduced-motion:reduce){
  .middle-primary-nav.middle-top-sheet{
    transition:none!important;
  }
}


/* ==========================================================================
   Middle Community 0.4.9 — rebuilt side drawer, not a restyled mega-menu
   ========================================================================== */

.middle-side-drawer.middle-primary-nav.middle-top-sheet{
  position:fixed!important;
  z-index:1500!important;
  inset:0 0 0 auto!important;
  display:block!important;
  width:min(404px,92vw)!important;
  height:100dvh!important;
  max-height:none!important;
  margin:0!important;
  padding:0!important;
  overflow:hidden!important;
  border:0!important;
  border-left:1px solid #dce5ef!important;
  border-radius:26px 0 0 26px!important;
  background:#fff!important;
  box-shadow:-28px 0 80px rgba(20,42,68,.20)!important;
  opacity:1!important;
  visibility:hidden!important;
  pointer-events:none!important;
  transform:translate3d(105%,0,0)!important;
  clip-path:none!important;
  filter:none!important;
  animation:none!important;
  transition:transform .32s cubic-bezier(.22,.8,.2,1),visibility .32s ease!important;
}

.middle-side-drawer.middle-primary-nav.middle-top-sheet.is-open{
  display:block!important;
  opacity:1!important;
  visibility:visible!important;
  pointer-events:auto!important;
  transform:translate3d(0,0,0)!important;
}

.middle-side-drawer.middle-primary-nav::before,
.middle-side-drawer.middle-primary-nav::after{
  display:none!important;
  content:none!important;
}

.middle-side-drawer__head{
  position:relative!important;
  z-index:3!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  min-height:78px!important;
  padding:14px 14px 13px 17px!important;
  border-bottom:1px solid #e9eef4!important;
  background:rgba(255,255,255,.98)!important;
}

.middle-side-drawer__brand{
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  min-width:0!important;
  color:#14263d!important;
}
.middle-side-drawer__brand:hover{color:#14263d!important}
.middle-side-drawer__brand>.middle-mobile-home-link__brand{
  display:grid!important;
  place-items:center!important;
  flex:0 0 38px!important;
  width:38px!important;
  height:38px!important;
  margin:0!important;
  border-radius:11px!important;
  overflow:hidden!important;
}
.middle-side-drawer__brand>.middle-mobile-home-link__brand img{
  display:block!important;
  width:100%!important;
  height:100%!important;
  object-fit:contain!important;
}
.middle-side-drawer__brand>span:last-child{
  display:flex!important;
  flex-direction:column!important;
  gap:2px!important;
  min-width:0!important;
}
.middle-side-drawer__brand strong{
  color:#14263d!important;
  font-size:15px!important;
  line-height:1.05!important;
  font-weight:850!important;
  letter-spacing:-.025em!important;
}
.middle-side-drawer__brand small{
  color:#8795a7!important;
  font-size:9px!important;
  line-height:1.15!important;
  font-weight:650!important;
}

.middle-side-drawer__head-actions{
  display:flex!important;
  align-items:center!important;
  gap:7px!important;
}
.middle-side-drawer__theme,
.middle-side-drawer__close{
  display:grid!important;
  place-items:center!important;
  width:38px!important;
  height:38px!important;
  min-width:38px!important;
  margin:0!important;
  padding:0!important;
  border:1px solid #dfe7f0!important;
  border-radius:12px!important;
  background:#f7f9fc!important;
  color:#20344c!important;
  box-shadow:none!important;
}
.middle-side-drawer__theme svg{width:18px!important;height:18px!important}
.middle-side-drawer__close{font-size:25px!important;line-height:1!important}

.middle-side-drawer__body{
  height:calc(100dvh - 78px)!important;
  padding:15px 14px 26px!important;
  overflow-y:auto!important;
  overscroll-behavior:contain!important;
  scrollbar-width:thin!important;
}

.middle-side-drawer__intro{
  display:flex!important;
  flex-direction:column!important;
  gap:3px!important;
  padding:2px 5px 12px!important;
}
.middle-side-drawer__intro span{
  color:#1e77de!important;
  font-size:8px!important;
  line-height:1.2!important;
  font-weight:850!important;
  letter-spacing:.12em!important;
  text-transform:uppercase!important;
}
.middle-side-drawer__intro strong{
  color:#162940!important;
  font-size:18px!important;
  line-height:1.08!important;
  font-weight:820!important;
  letter-spacing:-.025em!important;
}

.middle-side-drawer__nav{
  display:flex!important;
  flex-direction:column!important;
  gap:6px!important;
  margin:0!important;
  padding:0!important;
}

.middle-side-drawer__nav>a{
  display:grid!important;
  grid-template-columns:46px minmax(0,1fr) 20px!important;
  align-items:center!important;
  gap:10px!important;
  width:100%!important;
  min-height:62px!important;
  margin:0!important;
  padding:7px 11px 7px 8px!important;
  border:1px solid transparent!important;
  border-radius:16px!important;
  background:transparent!important;
  color:#1a2c42!important;
  box-shadow:none!important;
  transform:none!important;
}
.middle-side-drawer__nav>a:hover,
.middle-side-drawer__nav>a:focus-visible{
  border-color:#dbe8f7!important;
  background:#f3f8fe!important;
  color:#126fd8!important;
  transform:none!important;
}

.middle-side-drawer__icon{
  display:grid!important;
  place-items:center!important;
  width:46px!important;
  height:46px!important;
  border-radius:14px!important;
  background:#f2f7fd!important;
}
.middle-side-drawer__icon img{
  display:block!important;
  width:31px!important;
  height:31px!important;
  object-fit:contain!important;
}

.middle-side-drawer__copy{
  display:flex!important;
  flex-direction:column!important;
  gap:3px!important;
  min-width:0!important;
}
.middle-side-drawer__copy strong{
  color:inherit!important;
  font-size:12.5px!important;
  line-height:1.1!important;
  font-weight:800!important;
}
.middle-side-drawer__copy small{
  color:#8a98aa!important;
  font-size:9px!important;
  line-height:1.15!important;
  font-weight:550!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}

.middle-side-drawer__arrow{
  width:18px!important;
  height:18px!important;
  fill:none!important;
  stroke:#9aa8b8!important;
  stroke-width:1.8!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
}

.middle-side-drawer__utility{
  display:grid!important;
  grid-template-columns:1fr 1fr!important;
  gap:8px!important;
  margin-top:14px!important;
  padding-top:14px!important;
  border-top:1px solid #e9eef4!important;
}
.middle-side-drawer__utility-item{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:7px!important;
  min-height:45px!important;
  margin:0!important;
  padding:0 9px!important;
  border:1px solid #dfe7f0!important;
  border-radius:13px!important;
  background:#f7f9fc!important;
  color:#405875!important;
  font-size:10px!important;
  line-height:1!important;
  font-weight:750!important;
  cursor:pointer!important;
}
.middle-side-drawer__utility-item svg{
  width:17px!important;
  height:17px!important;
  fill:none!important;
  stroke:currentColor!important;
  stroke-width:1.7!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
}

.middle-sheet-backdrop{
  z-index:1440!important;
  background:rgba(10,24,41,.40)!important;
  backdrop-filter:blur(4px)!important;
  -webkit-backdrop-filter:blur(4px)!important;
}
.middle-sheet-backdrop.is-open{
  opacity:1!important;
  visibility:visible!important;
}

/* Never let drawer opening create a white gap below the header. */
.middle-header-row.middle-header-row--nav-open{
  margin-bottom:0!important;
}

/* Dark variant. */
:root[data-middle-theme="dark"] .middle-side-drawer.middle-primary-nav.middle-top-sheet{
  border-left-color:#35404d!important;
  background:#1b2027!important;
  box-shadow:-28px 0 80px rgba(0,0,0,.42)!important;
}
:root[data-middle-theme="dark"] .middle-side-drawer__head{
  border-bottom-color:#343d48!important;
  background:rgba(27,32,39,.98)!important;
}
:root[data-middle-theme="dark"] .middle-side-drawer__brand,
:root[data-middle-theme="dark"] .middle-side-drawer__brand:hover,
:root[data-middle-theme="dark"] .middle-side-drawer__brand strong,
:root[data-middle-theme="dark"] .middle-side-drawer__intro strong{
  color:#f2f6fa!important;
}
:root[data-middle-theme="dark"] .middle-side-drawer__theme,
:root[data-middle-theme="dark"] .middle-side-drawer__close,
:root[data-middle-theme="dark"] .middle-side-drawer__utility-item{
  border-color:#394451!important;
  background:#272d35!important;
  color:#e8eef5!important;
}
:root[data-middle-theme="dark"] .middle-side-drawer__nav>a{
  color:#edf2f7!important;
}
:root[data-middle-theme="dark"] .middle-side-drawer__nav>a:hover{
  border-color:#3b4a5c!important;
  background:#27313c!important;
  color:#79baff!important;
}
:root[data-middle-theme="dark"] .middle-side-drawer__icon{
  background:#252d37!important;
}
:root[data-middle-theme="dark"] .middle-side-drawer__utility{
  border-top-color:#343d48!important;
}

/* Mobile = the same exact drawer, just slightly narrower and with bottom-nav clearance. */
@media(max-width:720px){
  .middle-side-drawer.middle-primary-nav.middle-top-sheet{
    inset:0 0 0 auto!important;
    width:min(86vw,350px)!important;
    height:100dvh!important;
    border-radius:22px 0 0 22px!important;
  }
  .middle-side-drawer__head{
    min-height:72px!important;
    padding:12px 11px 11px 14px!important;
  }
  .middle-side-drawer__brand>.middle-mobile-home-link__brand{
    flex-basis:34px!important;
    width:34px!important;
    height:34px!important;
  }
  .middle-side-drawer__body{
    height:calc(100dvh - 72px)!important;
    padding:12px 10px calc(94px + env(safe-area-inset-bottom))!important;
  }
  .middle-side-drawer__intro{
    padding-left:4px!important;
    padding-right:4px!important;
  }
  .middle-side-drawer__intro strong{font-size:16px!important}
  .middle-side-drawer__nav>a{
    grid-template-columns:42px minmax(0,1fr) 18px!important;
    min-height:57px!important;
    padding:6px 9px 6px 7px!important;
    border-radius:14px!important;
  }
  .middle-side-drawer__icon{
    width:42px!important;
    height:42px!important;
    border-radius:13px!important;
  }
  .middle-side-drawer__icon img{
    width:28px!important;
    height:28px!important;
  }
  .middle-side-drawer__copy strong{font-size:12px!important}
  .middle-side-drawer__copy small{font-size:8.5px!important}
  .middle-side-drawer__utility{margin-top:11px!important;padding-top:11px!important}
}

/* WordPress admin toolbar should not break the drawer. */
@media(min-width:783px){
  body.admin-bar .middle-side-drawer.middle-primary-nav.middle-top-sheet{
    top:32px!important;
    height:calc(100dvh - 32px)!important;
  }
  body.admin-bar .middle-side-drawer__body{
    height:calc(100dvh - 110px)!important;
  }
}
@media(max-width:782px){
  body.admin-bar .middle-side-drawer.middle-primary-nav.middle-top-sheet{
    top:46px!important;
    height:calc(100dvh - 46px)!important;
  }
  body.admin-bar .middle-side-drawer__body{
    height:calc(100dvh - 118px)!important;
  }
}


/* ==========================================================================
   Middle Community 0.4.10 — slide drawer stacking/blur fix
   ========================================================================== */

/*
 * The screenshot showed the drawer itself under the backdrop blur. The drawer
 * is now moved to <body> by JS, so it can live in a true layer above the
 * backdrop and remain perfectly sharp.
 */
.middle-sheet-backdrop{
  position:fixed!important;
  z-index:1490!important;
  inset:0!important;
  background:rgba(12,24,39,.42)!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
}
.middle-sheet-backdrop.is-open{
  opacity:1!important;
  visibility:visible!important;
  pointer-events:auto!important;
}

body>.middle-side-drawer.middle-primary-nav.middle-top-sheet{
  position:fixed!important;
  z-index:1500!important;
  top:0!important;
  right:0!important;
  bottom:0!important;
  left:auto!important;
  width:min(430px,92vw)!important;
  height:100dvh!important;
  max-height:none!important;
  margin:0!important;
  filter:none!important;
  opacity:1!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
  isolation:isolate!important;
  background:#fff!important;
  box-shadow:-34px 0 90px rgba(11,31,55,.25)!important;
}

body>.middle-side-drawer.middle-primary-nav.middle-top-sheet.is-open{
  visibility:visible!important;
  pointer-events:auto!important;
  transform:translate3d(0,0,0)!important;
}

/* Keep every drawer element crisp even if old theme rules target panels. */
body>.middle-side-drawer,
body>.middle-side-drawer *{
  filter:none!important;
}

body>.middle-side-drawer .middle-side-drawer__head{
  background:#fff!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
}
body>.middle-side-drawer .middle-side-drawer__body{
  background:#fff!important;
}

/* Slightly stronger typography/spacing at desktop size. */
@media(min-width:721px){
  body>.middle-side-drawer .middle-side-drawer__head{
    min-height:82px!important;
    padding:15px 16px 14px 19px!important;
  }
  body>.middle-side-drawer .middle-side-drawer__body{
    height:calc(100dvh - 82px)!important;
    padding:16px 15px 30px!important;
  }
  body>.middle-side-drawer .middle-side-drawer__nav>a{
    min-height:64px!important;
  }
  body>.middle-side-drawer .middle-side-drawer__copy strong{
    font-size:13px!important;
  }
  body>.middle-side-drawer .middle-side-drawer__copy small{
    font-size:9.3px!important;
  }
}

/* Mobile keeps the same drawer, without blurring itself or the fixed nav. */
@media(max-width:720px){
  body>.middle-side-drawer.middle-primary-nav.middle-top-sheet{
    width:min(88vw,360px)!important;
    height:100dvh!important;
    border-radius:22px 0 0 22px!important;
  }
  body>.middle-side-drawer .middle-side-drawer__head{
    background:#fff!important;
  }
  body>.middle-side-drawer .middle-side-drawer__body{
    background:#fff!important;
  }
}

/* Admin toolbar offsets after drawer is moved to body. */
@media(min-width:783px){
  body.admin-bar>.middle-side-drawer.middle-primary-nav.middle-top-sheet{
    top:32px!important;
    height:calc(100dvh - 32px)!important;
  }
}
@media(max-width:782px){
  body.admin-bar>.middle-side-drawer.middle-primary-nav.middle-top-sheet{
    top:46px!important;
    height:calc(100dvh - 46px)!important;
  }
}

/* Dark theme for detached drawer. */
:root[data-middle-theme="dark"] body>.middle-side-drawer.middle-primary-nav.middle-top-sheet,
:root[data-middle-theme="dark"] body>.middle-side-drawer .middle-side-drawer__head,
:root[data-middle-theme="dark"] body>.middle-side-drawer .middle-side-drawer__body{
  background:#1b2027!important;
}


/* ==========================================================================
   Middle Community 0.4.11 — complete dark-theme pass
   ========================================================================== */

:root[data-middle-theme="dark"]{
  --mc-dark-bg:#0f1721;
  --mc-dark-bg-2:#111c28;
  --mc-dark-surface:#182534;
  --mc-dark-surface-2:#1e2d3e;
  --mc-dark-surface-3:#24364a;
  --mc-dark-border:#2b3e52;
  --mc-dark-text:#f2f6fb;
  --mc-dark-muted:#9eafc2;
  --mc-dark-link:#7bb5ff;
  --mc-dark-shadow:0 12px 34px rgba(0,0,0,.22);
}

/* Global page background — never mix a black page with white header strips. */
:root[data-middle-theme="dark"] body,
:root[data-middle-theme="dark"] body.home,
:root[data-middle-theme="dark"] body.front-page,
:root[data-middle-theme="dark"] body:not(.home):not(.front-page){
  background:
    radial-gradient(circle at 80% 0%,rgba(49,86,126,.20),transparent 28%),
    radial-gradient(circle at 10% 70%,rgba(34,66,101,.13),transparent 30%),
    var(--mc-dark-bg)!important;
  color:var(--mc-dark-text)!important;
}

/* ========================= HEADER ========================= */

:root[data-middle-theme="dark"] .middle-site-header,
:root[data-middle-theme="dark"] .home .middle-site-header{
  background:var(--mc-dark-bg-2)!important;
  border-bottom:1px solid #223344!important;
  box-shadow:0 7px 24px rgba(0,0,0,.18)!important;
}

:root[data-middle-theme="dark"] .middle-header-row,
:root[data-middle-theme="dark"] .home .middle-header-row{
  border-color:var(--mc-dark-border)!important;
  background:rgba(24,37,52,.97)!important;
  box-shadow:0 10px 28px rgba(0,0,0,.18)!important;
}

:root[data-middle-theme="dark"] .middle-brand,
:root[data-middle-theme="dark"] .middle-brand:hover,
:root[data-middle-theme="dark"] .middle-brand__text{
  color:var(--mc-dark-text)!important;
}

:root[data-middle-theme="dark"] .middle-home-header-search,
:root[data-middle-theme="dark"] .middle-header-search form{
  border-color:var(--mc-dark-border)!important;
  background:#111d29!important;
  box-shadow:none!important;
}

:root[data-middle-theme="dark"] .middle-home-header-search input,
:root[data-middle-theme="dark"] .middle-header-search input{
  color:var(--mc-dark-text)!important;
  background:transparent!important;
}

:root[data-middle-theme="dark"] .middle-home-header-search input::placeholder,
:root[data-middle-theme="dark"] .middle-header-search input::placeholder{
  color:#73869b!important;
}

:root[data-middle-theme="dark"] .middle-home-header-search svg,
:root[data-middle-theme="dark"] .middle-header-search svg{
  color:#8da2b7!important;
  stroke:currentColor!important;
}

:root[data-middle-theme="dark"] .middle-header-weather,
:root[data-middle-theme="dark"] .middle-home-header-bell,
:root[data-middle-theme="dark"] .middle-account-link,
:root[data-middle-theme="dark"] .middle-icon-btn,
:root[data-middle-theme="dark"] .middle-chip,
:root[data-middle-theme="dark"] .middle-header-dropdown--menu>.middle-nav-toggle{
  border-color:var(--mc-dark-border)!important;
  background:#182534!important;
  color:#dbe7f3!important;
  box-shadow:none!important;
}

:root[data-middle-theme="dark"] .middle-header-weather strong,
:root[data-middle-theme="dark"] .middle-header-weather span,
:root[data-middle-theme="dark"] .middle-account-link span,
:root[data-middle-theme="dark"] .middle-nav-toggle span{
  color:#e8f0f8!important;
}

:root[data-middle-theme="dark"] .middle-account-link--guest{
  border-color:#3b78bf!important;
  background:#182534!important;
  color:#8ec0ff!important;
}

:root[data-middle-theme="dark"] .middle-home-topnav{
  border-color:#223344!important;
  background:#111c28!important;
}

:root[data-middle-theme="dark"] .middle-home-topnav a,
:root[data-middle-theme="dark"] .middle-home-topnav__more{
  color:#c7d5e4!important;
  background:transparent!important;
}

:root[data-middle-theme="dark"] .middle-home-topnav a:hover,
:root[data-middle-theme="dark"] .middle-home-topnav__more:hover{
  background:#1e3042!important;
  color:#83baff!important;
}

/* ========================= HOME PAGE ========================= */

:root[data-middle-theme="dark"] .home main.middle-exact-home,
:root[data-middle-theme="dark"] .home .middle-layout--exact-home>.middle-main{
  color:var(--mc-dark-text)!important;
}

:root[data-middle-theme="dark"] .home .middle-exact-head h2,
:root[data-middle-theme="dark"] .home .middle-exact-head h3,
:root[data-middle-theme="dark"] .home .middle-exact-head strong{
  color:var(--mc-dark-text)!important;
}

:root[data-middle-theme="dark"] .home .middle-exact-head small,
:root[data-middle-theme="dark"] .home .middle-exact-head p{
  color:var(--mc-dark-muted)!important;
}

:root[data-middle-theme="dark"] .home .middle-exact-head a{
  color:var(--mc-dark-link)!important;
}

/* Main service cards under the hero. */
:root[data-middle-theme="dark"] .home .middle-exact-service{
  border-color:var(--mc-dark-border)!important;
  background:var(--mc-dark-surface)!important;
  color:var(--mc-dark-text)!important;
  box-shadow:var(--mc-dark-shadow)!important;
}

:root[data-middle-theme="dark"] .home .middle-exact-service__copy strong{
  color:#edf4fb!important;
}
:root[data-middle-theme="dark"] .home .middle-exact-service__copy small{
  color:#91a4b8!important;
}

/* Neutralize overly bright icon squares while keeping the icons colorful. */
:root[data-middle-theme="dark"] .home .middle-exact-service__icon{
  background:#223448!important;
}
:root[data-middle-theme="dark"] .home .middle-exact-service--yellow .middle-exact-service__icon{background:#3a3420!important}
:root[data-middle-theme="dark"] .home .middle-exact-service--green .middle-exact-service__icon{background:#18372d!important}
:root[data-middle-theme="dark"] .home .middle-exact-service--red .middle-exact-service__icon{background:#3a2529!important}
:root[data-middle-theme="dark"] .home .middle-exact-service--purple .middle-exact-service__icon{background:#302740!important}
:root[data-middle-theme="dark"] .home .middle-exact-service--pink .middle-exact-service__icon{background:#3c2637!important}
:root[data-middle-theme="dark"] .home .middle-exact-service--orange .middle-exact-service__icon{background:#3c2d21!important}
:root[data-middle-theme="dark"] .home .middle-exact-service--amber .middle-exact-service__icon{background:#3c3420!important}

/* News, discussions and ads. */
:root[data-middle-theme="dark"] .home .middle-exact-news-row,
:root[data-middle-theme="dark"] .home .middle-exact-discuss-card,
:root[data-middle-theme="dark"] .home .middle-exact-ad-card,
:root[data-middle-theme="dark"] .home .middle-exact-region-story,
:root[data-middle-theme="dark"] .home .middle-exact-bottom-card{
  border-color:var(--mc-dark-border)!important;
  background:var(--mc-dark-surface)!important;
  box-shadow:0 7px 20px rgba(0,0,0,.16)!important;
}

:root[data-middle-theme="dark"] .home .middle-exact-news-row__media,
:root[data-middle-theme="dark"] .home .middle-exact-discuss-card__media,
:root[data-middle-theme="dark"] .home .middle-exact-ad-card__media,
:root[data-middle-theme="dark"] .home .middle-exact-region__media,
:root[data-middle-theme="dark"] .home .middle-exact-photos__grid a{
  background:#223347!important;
}

:root[data-middle-theme="dark"] .home .middle-exact-news-row h3 a,
:root[data-middle-theme="dark"] .home .middle-exact-discuss-card h3 a,
:root[data-middle-theme="dark"] .home .middle-exact-ad-card h3 a,
:root[data-middle-theme="dark"] .home .middle-exact-region h3 a,
:root[data-middle-theme="dark"] .home .middle-exact-attention li a{
  color:#e7eef6!important;
}

:root[data-middle-theme="dark"] .home .middle-exact-news-row small,
:root[data-middle-theme="dark"] .home .middle-exact-discuss-card small,
:root[data-middle-theme="dark"] .home .middle-exact-ad-card small,
:root[data-middle-theme="dark"] .home .middle-exact-region small{
  color:var(--mc-dark-muted)!important;
}

:root[data-middle-theme="dark"] .home .middle-exact-ad-card strong{
  color:#9fc8ff!important;
}

:root[data-middle-theme="dark"] .home .middle-exact-ad-card__heart{
  background:rgba(22,35,50,.94)!important;
  color:#a7bbd0!important;
}

/* Right column: weather / bus / submit. */
:root[data-middle-theme="dark"] .home .middle-exact-weather,
:root[data-middle-theme="dark"] .home .middle-exact-bus,
:root[data-middle-theme="dark"] .home .middle-exact-submit{
  border-color:var(--mc-dark-border)!important;
  background:var(--mc-dark-surface)!important;
  color:var(--mc-dark-text)!important;
  box-shadow:0 7px 20px rgba(0,0,0,.16)!important;
}

:root[data-middle-theme="dark"] .home .middle-exact-weather__top strong,
:root[data-middle-theme="dark"] .home .middle-exact-weather__live .middle-header-weather strong,
:root[data-middle-theme="dark"] .home .middle-exact-bus header strong,
:root[data-middle-theme="dark"] .home .middle-exact-submit strong{
  color:#edf4fb!important;
}

:root[data-middle-theme="dark"] .home .middle-exact-weather__top small,
:root[data-middle-theme="dark"] .home .middle-exact-weather__stats small,
:root[data-middle-theme="dark"] .home .middle-exact-bus>small,
:root[data-middle-theme="dark"] .home .middle-exact-submit p{
  color:var(--mc-dark-muted)!important;
}

:root[data-middle-theme="dark"] .home .middle-exact-weather__live{
  background:#111e2a!important;
}

:root[data-middle-theme="dark"] .home .middle-exact-weather__stats{
  color:#8fb8e8!important;
}

:root[data-middle-theme="dark"] .home .middle-exact-weather__link,
:root[data-middle-theme="dark"] .home .middle-exact-bus__all{
  background:#1b3553!important;
  color:#8fc0ff!important;
}

:root[data-middle-theme="dark"] .home .middle-exact-bus__row{
  border-top-color:#2a3b4d!important;
  color:#dbe6f2!important;
}

:root[data-middle-theme="dark"] .home .middle-exact-bus__row i{
  color:#90a4ba!important;
}

:root[data-middle-theme="dark"] .home .middle-exact-submit{
  background:linear-gradient(135deg,#192b3d,#162434)!important;
}

/* Reader block: keep editorial black, but remove white story tiles. */
:root[data-middle-theme="dark"] .home .middle-exact-reader{
  border:1px solid #31404f!important;
  background:linear-gradient(100deg,#18222c,#101820 58%,#1b2731)!important;
}

:root[data-middle-theme="dark"] .home .middle-exact-reader__grid article{
  background:#22303d!important;
  color:#edf4fb!important;
}

:root[data-middle-theme="dark"] .home .middle-exact-reader__grid h3 a{
  color:#eef4fa!important;
}

:root[data-middle-theme="dark"] .home .middle-exact-reader__grid small{
  color:#9cacbd!important;
}

:root[data-middle-theme="dark"] .home .middle-exact-reader__media{
  background:#1b2936!important;
}

/* Ads CTA. */
:root[data-middle-theme="dark"] .home .middle-exact-ads__cta{
  border-color:#3b3b36!important;
  background:linear-gradient(135deg,#302a20,#1c2732)!important;
  box-shadow:0 7px 20px rgba(0,0,0,.16)!important;
}

:root[data-middle-theme="dark"] .home .middle-exact-ads__cta h3{
  color:#f1f5f9!important;
}
:root[data-middle-theme="dark"] .home .middle-exact-ads__cta p{
  color:#aab6c4!important;
}

/* Useful-life pastel cards become calm dark tinted cards. */
:root[data-middle-theme="dark"] .home .middle-exact-useful-card{
  border-color:var(--mc-dark-border)!important;
  color:#eaf1f8!important;
  box-shadow:0 6px 18px rgba(0,0,0,.14)!important;
}
:root[data-middle-theme="dark"] .home .middle-exact-useful-card--mint{background:#173028!important}
:root[data-middle-theme="dark"] .home .middle-exact-useful-card--rose{background:#33232d!important}
:root[data-middle-theme="dark"] .home .middle-exact-useful-card--sand{background:#332b20!important}
:root[data-middle-theme="dark"] .home .middle-exact-useful-card--green{background:#193127!important}
:root[data-middle-theme="dark"] .home .middle-exact-useful-card--blue{background:#1b2d43!important}
:root[data-middle-theme="dark"] .home .middle-exact-useful-card--sky{background:#1a3040!important}
:root[data-middle-theme="dark"] .home .middle-exact-useful-card>span{
  background:rgba(12,22,32,.48)!important;
}
:root[data-middle-theme="dark"] .home .middle-exact-useful-card b{
  color:#83b9ff!important;
}

/* Attention counters. */
:root[data-middle-theme="dark"] .home .middle-exact-attention li>span{
  background:#1c3552!important;
  color:#88bbff!important;
}
:root[data-middle-theme="dark"] .home .middle-exact-attention li:first-child>span{
  background:#41272b!important;
  color:#ff9696!important;
}

/* Empty cards. */
:root[data-middle-theme="dark"] .home .middle-exact-empty{
  color:#91a3b7!important;
}

/* ========================= INTERNAL PAGES ========================= */

/* All common surfaces. */
:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-page-head,
:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-category-head,
:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-post-card,
:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-card,
:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-widget,
:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-comments,
:root[data-middle-theme="dark"] .middle-photo-archive__hero,
:root[data-middle-theme="dark"] .middle-photo-card,
:root[data-middle-theme="dark"] .middle-market-hero,
:root[data-middle-theme="dark"] .middle-market-results,
:root[data-middle-theme="dark"] .middle-market-card,
:root[data-middle-theme="dark"] .middle-market-category-card,
:root[data-middle-theme="dark"] .middle-market-filter,
:root[data-middle-theme="dark"] .middle-org-directory__hero,
:root[data-middle-theme="dark"] .middle-org-results,
:root[data-middle-theme="dark"] .middle-org-filters,
:root[data-middle-theme="dark"] .middle-org-card,
:root[data-middle-theme="dark"] .middle-org-single__card,
:root[data-middle-theme="dark"] .middle-seo-landing__hero,
:root[data-middle-theme="dark"] .middle-seo-ad-card,
:root[data-middle-theme="dark"] .middle-advertising-section,
:root[data-middle-theme="dark"] .middle-advertising-contact,
:root[data-middle-theme="dark"] .middle-messages-app__hero,
:root[data-middle-theme="dark"] .middle-messages-app__body>.middle-notifications,
:root[data-middle-theme="dark"] .middle-notification{
  border-color:var(--mc-dark-border)!important;
  background:var(--mc-dark-surface)!important;
  color:var(--mc-dark-text)!important;
  box-shadow:0 8px 24px rgba(0,0,0,.16)!important;
}

:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-page-head,
:root[data-middle-theme="dark"] .middle-photo-archive__hero,
:root[data-middle-theme="dark"] .middle-market-hero,
:root[data-middle-theme="dark"] .middle-org-directory__hero,
:root[data-middle-theme="dark"] .middle-seo-landing__hero,
:root[data-middle-theme="dark"] .middle-messages-app__hero{
  background:linear-gradient(135deg,#1c2a39,#162334)!important;
}

:root[data-middle-theme="dark"] body:not(.home):not(.front-page) h1,
:root[data-middle-theme="dark"] body:not(.home):not(.front-page) h2,
:root[data-middle-theme="dark"] body:not(.home):not(.front-page) h3,
:root[data-middle-theme="dark"] body:not(.home):not(.front-page) h4{
  color:#edf4fb!important;
}

:root[data-middle-theme="dark"] body:not(.home):not(.front-page) p,
:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-post-card__excerpt{
  color:#acb9c7!important;
}

:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-post-card__title a,
:root[data-middle-theme="dark"] .middle-market-card a,
:root[data-middle-theme="dark"] .middle-photo-card a,
:root[data-middle-theme="dark"] .middle-org-card a{
  color:#e7eef6!important;
}

:root[data-middle-theme="dark"] body:not(.home):not(.front-page) a:hover{
  color:#8fc0ff!important;
}

/* Forms / filters / pagination. */
:root[data-middle-theme="dark"] .middle-market-search,
:root[data-middle-theme="dark"] .middle-org-search__field,
:root[data-middle-theme="dark"] body:not(.home):not(.front-page) input,
:root[data-middle-theme="dark"] body:not(.home):not(.front-page) select,
:root[data-middle-theme="dark"] body:not(.home):not(.front-page) textarea{
  border-color:var(--mc-dark-border)!important;
  background:#111e2a!important;
  color:#eaf1f8!important;
}

:root[data-middle-theme="dark"] body:not(.home):not(.front-page) input::placeholder,
:root[data-middle-theme="dark"] body:not(.home):not(.front-page) textarea::placeholder{
  color:#75889c!important;
}

:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .page-numbers{
  border-color:var(--mc-dark-border)!important;
  background:#182534!important;
  color:#cbd8e5!important;
}

:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .page-numbers.current,
:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .page-numbers:hover{
  border-color:#2d82e7!important;
  background:#2377d7!important;
  color:#fff!important;
}

/* Tables / article content. */
:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-content table{
  border-color:var(--mc-dark-border)!important;
  background:var(--mc-dark-surface)!important;
}
:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-content th{
  border-color:var(--mc-dark-border)!important;
  background:#223246!important;
  color:#edf4fb!important;
}
:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-content td{
  border-color:var(--mc-dark-border)!important;
  color:#cbd6e2!important;
}

/* ========================= FOOTER ========================= */

:root[data-middle-theme="dark"] .middle-site-footer,
:root[data-middle-theme="dark"] .home .middle-site-footer{
  border-top-color:#263748!important;
  background:var(--mc-dark-bg)!important;
}

:root[data-middle-theme="dark"] .middle-footer-home,
:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-footer-home{
  border-color:var(--mc-dark-border)!important;
  background:var(--mc-dark-surface)!important;
  box-shadow:0 14px 36px rgba(0,0,0,.20)!important;
}

:root[data-middle-theme="dark"] .middle-footer-home__bottom{
  border-top-color:var(--mc-dark-border)!important;
  background:#131e2a!important;
}

:root[data-middle-theme="dark"] .middle-footer-home__brand-link,
:root[data-middle-theme="dark"] .middle-footer-home__nav>strong,
:root[data-middle-theme="dark"] .middle-footer-home__legal>strong,
:root[data-middle-theme="dark"] .middle-footer-home__actions>strong{
  color:#edf4fb!important;
}

:root[data-middle-theme="dark"] .middle-footer-home p,
:root[data-middle-theme="dark"] .middle-footer-home__nav a,
:root[data-middle-theme="dark"] .middle-footer-home__legal a,
:root[data-middle-theme="dark"] .middle-footer-home__bottom{
  color:#9eafc2!important;
}

/* ========================= MOBILE BOTTOM NAV ========================= */

@media(max-width:720px){
  :root[data-middle-theme="dark"] .middle-header-tools{
    border-top-color:#2b3c4d!important;
    background:rgba(20,30,42,.985)!important;
    box-shadow:0 -10px 28px rgba(0,0,0,.28)!important;
  }

  :root[data-middle-theme="dark"] .middle-mobile-home-link,
  :root[data-middle-theme="dark"] .middle-header-tools>.middle-search-toggle,
  :root[data-middle-theme="dark"] .middle-header-tools>.middle-write-link,
  :root[data-middle-theme="dark"] .middle-header-tools>.middle-messages-link,
  :root[data-middle-theme="dark"] .middle-header-tools>.middle-account-link,
  :root[data-middle-theme="dark"] .middle-header-dropdown--menu>.middle-nav-toggle{
    background:transparent!important;
    color:#b7c6d7!important;
  }

  :root[data-middle-theme="dark"] .middle-mobile-home-link>span,
  :root[data-middle-theme="dark"] .middle-header-tools .middle-mobile-nav-label,
  :root[data-middle-theme="dark"] .middle-header-tools>.middle-write-link>span,
  :root[data-middle-theme="dark"] .middle-header-tools>.middle-account-link>span,
  :root[data-middle-theme="dark"] .middle-header-dropdown--menu>.middle-nav-toggle>span{
    color:#aebfd1!important;
  }

  :root[data-middle-theme="dark"] .middle-header-tools>.middle-write-link>span{
    color:#76b2ff!important;
  }
}


/* ==========================================================================
   Middle Community 0.4.12 — mobile search rebuild + regional dark block fix
   ========================================================================== */

/* Regional-news wrapper itself was still using its old white gradient. */
:root[data-middle-theme="dark"] .home .middle-exact-region-showcase{
  border-color:#2b3e52!important;
  background:
    radial-gradient(circle at 90% 0%,rgba(52,93,137,.20),transparent 34%),
    linear-gradient(145deg,#182636 0%,#111d2a 100%)!important;
  box-shadow:0 14px 38px rgba(0,0,0,.20)!important;
}
:root[data-middle-theme="dark"] .home .middle-exact-region-showcase__head h2{
  color:#f1f6fb!important;
}
:root[data-middle-theme="dark"] .home .middle-exact-region-showcase__head small{
  color:#96a9bd!important;
}
:root[data-middle-theme="dark"] .home .middle-exact-region-showcase__head a{
  color:#82baff!important;
}
:root[data-middle-theme="dark"] .home .middle-exact-region-featured{
  background:#1b2b3b!important;
  box-shadow:0 12px 30px rgba(0,0,0,.24)!important;
}
:root[data-middle-theme="dark"] .home .middle-exact-region-story{
  border-color:#2b3e52!important;
  background:#1a2838!important;
  box-shadow:0 7px 20px rgba(0,0,0,.16)!important;
}
:root[data-middle-theme="dark"] .home .middle-exact-region-story:hover{
  border-color:#38536e!important;
  background:#1e3042!important;
  box-shadow:0 13px 27px rgba(0,0,0,.24)!important;
}
:root[data-middle-theme="dark"] .home .middle-exact-region-story h3 a{
  color:#e9f0f7!important;
}
:root[data-middle-theme="dark"] .home .middle-exact-region-story small{
  color:#99aabd!important;
}
:root[data-middle-theme="dark"] .home .middle-exact-region-story__media{
  background:#223448!important;
}

/* Clean mobile search bottom sheet. It is detached to <body> by JS. */
@media(max-width:720px){
  body>.middle-header-search.middle-top-sheet{
    position:fixed!important;
    z-index:1500!important;
    top:auto!important;
    left:10px!important;
    right:10px!important;
    bottom:calc(84px + env(safe-area-inset-bottom))!important;
    width:auto!important;
    max-width:none!important;
    max-height:min(52dvh,420px)!important;
    margin:0!important;
    padding:12px!important;
    overflow:auto!important;
    border:1px solid #dce6f1!important;
    border-radius:24px!important;
    background:#fff!important;
    box-shadow:0 -18px 55px rgba(15,38,66,.22)!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
    opacity:0!important;
    visibility:hidden!important;
    pointer-events:none!important;
    transform:translateY(18px) scale(.985)!important;
    transform-origin:bottom center!important;
    transition:
      opacity .18s ease,
      visibility .18s ease,
      transform .24s cubic-bezier(.22,.8,.2,1)!important;
  }

  body>.middle-header-search.middle-top-sheet.is-open{
    opacity:1!important;
    visibility:visible!important;
    pointer-events:auto!important;
    transform:none!important;
  }

  body>.middle-header-search .middle-mobile-sheet-head{
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:12px!important;
    min-height:42px!important;
    margin:0 0 10px!important;
    padding:0 2px 7px!important;
    border-bottom:1px solid #edf1f6!important;
  }

  body>.middle-header-search .middle-mobile-sheet-head strong{
    color:#152940!important;
    font-size:18px!important;
    line-height:1!important;
    font-weight:850!important;
    letter-spacing:-.025em!important;
  }

  body>.middle-header-search .middle-mobile-sheet-head .middle-sheet-close{
    display:grid!important;
    place-items:center!important;
    width:34px!important;
    height:34px!important;
    min-width:34px!important;
    padding:0!important;
    border:1px solid #e1e8f1!important;
    border-radius:11px!important;
    background:#f6f9fc!important;
    color:#263b53!important;
    font-size:23px!important;
    line-height:1!important;
  }

  body>.middle-header-search form{
    display:grid!important;
    grid-template-columns:auto minmax(0,1fr)!important;
    align-items:center!important;
    gap:8px!important;
    min-height:0!important;
    margin:0!important;
    padding:9px 10px!important;
    border:1px solid #dce6f1!important;
    border-radius:17px!important;
    background:#f5f8fc!important;
  }

  body>.middle-header-search form>svg{
    width:21px!important;
    height:21px!important;
    margin-left:2px!important;
    color:#71859c!important;
    stroke:currentColor!important;
  }

  body>.middle-header-search .middle-header-search__input{
    grid-column:2!important;
    width:100%!important;
    min-width:0!important;
    min-height:44px!important;
    margin:0!important;
    padding:0 4px!important;
    border:0!important;
    outline:0!important;
    background:transparent!important;
    color:#14263d!important;
    font-size:16px!important;
  }

  body>.middle-header-search .middle-header-search__input::placeholder{
    color:#8a9bae!important;
  }

  body>.middle-header-search form>.middle-btn{
    grid-column:1/-1!important;
    width:100%!important;
    min-height:46px!important;
    margin:2px 0 0!important;
    border-radius:13px!important;
    font-size:13px!important;
  }

  body>.middle-header-search .middle-search-close--desktop{
    display:none!important;
  }

  /* Keep the dim layer below the search, not above it. */
  .middle-sheet-backdrop{
    z-index:1490!important;
  }

  /* Dark mobile search. */
  :root[data-middle-theme="dark"] body>.middle-header-search.middle-top-sheet{
    border-color:#32465b!important;
    background:#182534!important;
    box-shadow:0 -18px 55px rgba(0,0,0,.36)!important;
  }
  :root[data-middle-theme="dark"] body>.middle-header-search .middle-mobile-sheet-head{
    border-bottom-color:#2c4054!important;
  }
  :root[data-middle-theme="dark"] body>.middle-header-search .middle-mobile-sheet-head strong{
    color:#edf4fb!important;
  }
  :root[data-middle-theme="dark"] body>.middle-header-search .middle-mobile-sheet-head .middle-sheet-close{
    border-color:#35495d!important;
    background:#223246!important;
    color:#e9f1f8!important;
  }
  :root[data-middle-theme="dark"] body>.middle-header-search form{
    border-color:#304559!important;
    background:#111e2a!important;
  }
  :root[data-middle-theme="dark"] body>.middle-header-search .middle-header-search__input{
    color:#edf4fb!important;
  }
  :root[data-middle-theme="dark"] body>.middle-header-search .middle-header-search__input::placeholder{
    color:#7f92a6!important;
  }
}


/* ==========================================================================
   Middle Community 0.4.13 — single advert page recovery + portal layout
   ========================================================================== */

/* A single advert is a portal full-width page, not an old content+sidebar page. */
body.middle-ad-single-page .middle-layout,
body.middle-ad-single-page .middle-layout--portal-full{
  display:block!important;
  grid-template-columns:none!important;
  gap:0!important;
  width:min(var(--mc-page-canvas),calc(100% - 32px))!important;
  max-width:none!important;
  margin-left:auto!important;
  margin-right:auto!important;
}

body.middle-ad-single-page .middle-ad-detail{
  width:100%!important;
  max-width:none!important;
  margin:0!important;
}

@media(min-width:1200px){
  body.middle-ad-single-page .middle-ad-detail__layout{
    grid-template-columns:minmax(0,1.72fr) minmax(310px,.58fr)!important;
    gap:22px!important;
  }
  body.middle-ad-single-page .middle-ad-gallery__stage{
    min-height:430px!important;
  }
  body.middle-ad-single-page .middle-ad-gallery__main{
    height:clamp(430px,42vw,620px)!important;
  }
  body.middle-ad-single-page .middle-ad-related .middle-ads-grid{
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
  }
}

/* The page header has the same calm visual language as the other inner pages. */
body.middle-ad-single-page .middle-ad-detail__head{
  border-color:#dce6f1!important;
  border-radius:24px!important;
  background:
    radial-gradient(circle at 91% 6%,rgba(71,151,239,.11),transparent 28%),
    linear-gradient(145deg,#fff,#f5f9fe)!important;
  box-shadow:0 12px 34px rgba(32,72,118,.07)!important;
}

/* Seller panel must not collide with the sticky site header. */
body.middle-ad-single-page .middle-ad-seller{
  top:112px!important;
}

/* Comprehensive dark version for advert details. */
:root[data-middle-theme="dark"] body.middle-ad-single-page .middle-ad-detail__head,
:root[data-middle-theme="dark"] body.middle-ad-single-page .middle-ad-gallery,
:root[data-middle-theme="dark"] body.middle-ad-single-page .middle-ad-description,
:root[data-middle-theme="dark"] body.middle-ad-single-page .middle-ad-seller,
:root[data-middle-theme="dark"] body.middle-ad-single-page .middle-ad-related,
:root[data-middle-theme="dark"] body.middle-ad-single-page .middle-ad-detail__comments .middle-comments{
  border-color:#2b3e52!important;
  background:#182534!important;
  color:#f0f5fa!important;
  box-shadow:0 10px 28px rgba(0,0,0,.18)!important;
}

:root[data-middle-theme="dark"] body.middle-ad-single-page .middle-ad-detail__head{
  background:
    radial-gradient(circle at 91% 6%,rgba(64,132,211,.18),transparent 30%),
    linear-gradient(145deg,#1b2a3a,#162331)!important;
}

:root[data-middle-theme="dark"] body.middle-ad-single-page .middle-ad-detail__head h1,
:root[data-middle-theme="dark"] body.middle-ad-single-page .middle-ad-description h2,
:root[data-middle-theme="dark"] body.middle-ad-single-page .middle-ad-related h2,
:root[data-middle-theme="dark"] body.middle-ad-single-page .middle-ad-seller strong{
  color:#f1f6fb!important;
}

:root[data-middle-theme="dark"] body.middle-ad-single-page .middle-ad-detail__breadcrumbs,
:root[data-middle-theme="dark"] body.middle-ad-single-page .middle-ad-detail__breadcrumbs a,
:root[data-middle-theme="dark"] body.middle-ad-single-page .middle-ad-detail__meta,
:root[data-middle-theme="dark"] body.middle-ad-single-page .middle-ad-seller__label,
:root[data-middle-theme="dark"] body.middle-ad-single-page .middle-ad-seller__note p,
:root[data-middle-theme="dark"] body.middle-ad-single-page .middle-ad-related__head>a{
  color:#9eafc2!important;
}

:root[data-middle-theme="dark"] body.middle-ad-single-page .middle-ad-gallery__stage,
:root[data-middle-theme="dark"] body.middle-ad-single-page .middle-ad-gallery__thumb,
:root[data-middle-theme="dark"] body.middle-ad-single-page .middle-ad-facts>div,
:root[data-middle-theme="dark"] body.middle-ad-single-page .middle-ad-seller__note,
:root[data-middle-theme="dark"] body.middle-ad-single-page .middle-ad-seller__owner{
  background:#111e2a!important;
  border-color:#304459!important;
}

:root[data-middle-theme="dark"] body.middle-ad-single-page .middle-ad-facts,
:root[data-middle-theme="dark"] body.middle-ad-single-page .middle-ad-seller__person,
:root[data-middle-theme="dark"] body.middle-ad-single-page .middle-ad-related__head{
  border-color:#2d4053!important;
}

:root[data-middle-theme="dark"] body.middle-ad-single-page .middle-ad-description__content,
:root[data-middle-theme="dark"] body.middle-ad-single-page .middle-ad-facts dd{
  color:#d8e2ec!important;
}

@media(max-width:720px){
  body.middle-ad-single-page .middle-layout,
  body.middle-ad-single-page .middle-layout--portal-full{
    width:calc(100% - 16px)!important;
    margin-left:auto!important;
    margin-right:auto!important;
    padding-top:8px!important;
  }

  body.middle-ad-single-page .middle-ad-detail__head{
    padding:17px!important;
    border-radius:18px!important;
  }

  body.middle-ad-single-page .middle-ad-detail__head h1{
    font-size:clamp(27px,8vw,35px)!important;
  }

  body.middle-ad-single-page .middle-ad-seller{
    top:auto!important;
  }
}


/* ==========================================================================
   Middle Community 0.4.14 — dark mobile bottom-nav label visibility
   ========================================================================== */
@media(max-width:720px){
  /*
   * Some older homepage rules have higher specificity and force the bottom-nav
   * labels back to the light-theme dark blue/gray. Override every visible tab
   * from the final stylesheet with a stronger selector.
   */
  html:root[data-middle-theme="dark"] body .middle-header-tools{
    background:rgba(18,28,39,.985)!important;
    border-top-color:#314458!important;
    box-shadow:0 -10px 30px rgba(0,0,0,.32)!important;
  }

  html:root[data-middle-theme="dark"] body .middle-header-tools .middle-mobile-home-link,
  html:root[data-middle-theme="dark"] body .middle-header-tools>.middle-search-toggle,
  html:root[data-middle-theme="dark"] body .middle-header-tools>.middle-write-link,
  html:root[data-middle-theme="dark"] body .middle-header-tools>.middle-messages-link,
  html:root[data-middle-theme="dark"] body .middle-header-tools>.middle-account-link,
  html:root[data-middle-theme="dark"] body .middle-header-tools .middle-header-dropdown--menu>.middle-nav-toggle{
    color:#d8e4f0!important;
    background:transparent!important;
  }

  /* All five captions: force visible and readable. */
  html:root[data-middle-theme="dark"] body .middle-header-tools .middle-mobile-home-link>span,
  html:root[data-middle-theme="dark"] body .middle-header-tools .middle-mobile-nav-label,
  html:root[data-middle-theme="dark"] body .middle-header-tools>.middle-write-link>span,
  html:root[data-middle-theme="dark"] body .middle-header-tools>.middle-account-link>span,
  html:root[data-middle-theme="dark"] body .middle-header-tools .middle-header-dropdown--menu>.middle-nav-toggle>span{
    display:block!important;
    position:static!important;
    visibility:visible!important;
    opacity:1!important;
    width:100%!important;
    max-width:100%!important;
    height:auto!important;
    min-height:10px!important;
    margin:0!important;
    padding:0 1px!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    background-image:none!important;
    box-shadow:none!important;
    color:#c8d6e5!important;
    font-size:9.2px!important;
    line-height:1!important;
    font-weight:700!important;
    letter-spacing:0!important;
    text-align:center!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    transform:none!important;
  }

  /* Active/primary actions remain clearly blue. */
  html:root[data-middle-theme="dark"] body .middle-header-tools .middle-mobile-home-link>span,
  html:root[data-middle-theme="dark"] body .middle-header-tools>.middle-write-link>span{
    color:#79b6ff!important;
    font-weight:800!important;
  }

  /* Icons also get enough contrast against the dark bar. */
  html:root[data-middle-theme="dark"] body .middle-header-tools>.middle-search-toggle svg,
  html:root[data-middle-theme="dark"] body .middle-header-tools>.middle-messages-link svg,
  html:root[data-middle-theme="dark"] body .middle-header-tools>.middle-account-link svg,
  html:root[data-middle-theme="dark"] body .middle-header-tools .middle-header-dropdown--menu>.middle-nav-toggle>.middle-menu-dots-icon{
    color:#d7e3ef!important;
    stroke:currentColor!important;
  }

  html:root[data-middle-theme="dark"] body .middle-header-tools .middle-header-dropdown--menu>.middle-nav-toggle>.middle-menu-dots-icon{
    fill:#d7e3ef!important;
    stroke:none!important;
  }

  /* Keep the plus white inside its blue circle. */
  html:root[data-middle-theme="dark"] body .middle-header-tools>.middle-write-link .middle-publish-plus-icon{
    color:#fff!important;
    stroke:#fff!important;
    border-color:#121c27!important;
  }
}

@media(max-width:380px){
  html:root[data-middle-theme="dark"] body .middle-header-tools .middle-mobile-home-link>span,
  html:root[data-middle-theme="dark"] body .middle-header-tools .middle-mobile-nav-label,
  html:root[data-middle-theme="dark"] body .middle-header-tools>.middle-write-link>span,
  html:root[data-middle-theme="dark"] body .middle-header-tools>.middle-account-link>span,
  html:root[data-middle-theme="dark"] body .middle-header-tools .middle-header-dropdown--menu>.middle-nav-toggle>span{
    font-size:8.5px!important;
  }
}


/* ==========================================================================
   Middle Community 0.4.15 — dark “В центре внимания” on desktop + mobile
   ========================================================================== */

:root[data-middle-theme="dark"] .home .middle-exact-attention{
  border-color:#2b3e52!important;
  background:
    radial-gradient(circle at 90% 0%,rgba(54,101,151,.16),transparent 34%),
    linear-gradient(145deg,#182635,#111d2a)!important;
  box-shadow:0 12px 34px rgba(0,0,0,.20)!important;
}

:root[data-middle-theme="dark"] .home .middle-exact-attention .middle-exact-head h2,
:root[data-middle-theme="dark"] .home .middle-exact-attention .middle-exact-head strong{
  color:#f0f5fa!important;
}

:root[data-middle-theme="dark"] .home .middle-exact-attention .middle-exact-head small{
  color:#9eafc2!important;
}

/* Main featured item */
:root[data-middle-theme="dark"] .home .middle-exact-attention-featured{
  border-color:#2d4257!important;
  background:#1a2939!important;
  box-shadow:0 10px 26px rgba(0,0,0,.22)!important;
}

:root[data-middle-theme="dark"] .home .middle-exact-attention-featured__media{
  background:#223448!important;
}

:root[data-middle-theme="dark"] .home .middle-exact-attention-featured__placeholder{
  background:
    radial-gradient(circle at 30% 20%,rgba(171,116,45,.18),transparent 42%),
    linear-gradient(135deg,#263140,#1b2c3d)!important;
}

:root[data-middle-theme="dark"] .home .middle-exact-attention-featured__placeholder small{
  color:#d9a06f!important;
}

:root[data-middle-theme="dark"] .home .middle-exact-attention-featured__copy h3 a{
  color:#edf4fb!important;
}

:root[data-middle-theme="dark"] .home .middle-exact-attention-featured__copy>small{
  color:#9cacbd!important;
}

/* Secondary attention rows */
:root[data-middle-theme="dark"] .home .middle-exact-attention-item{
  border-color:#2b3f53!important;
  background:#182736!important;
  color:#edf4fb!important;
}

:root[data-middle-theme="dark"] .home .middle-exact-attention-item:hover{
  border-color:#3b5874!important;
  background:#1d3042!important;
}

:root[data-middle-theme="dark"] .home .middle-exact-attention-item__index{
  background:#1e3c5d!important;
  color:#8fc0ff!important;
}

:root[data-middle-theme="dark"] .home .middle-exact-attention-item__copy strong{
  color:#eaf1f8!important;
}

:root[data-middle-theme="dark"] .home .middle-exact-attention-item__copy small{
  color:#91a4b8!important;
}

:root[data-middle-theme="dark"] .home .middle-exact-attention-item>i{
  color:#7f9fbe!important;
}

/* Mobile: keep the same palette and prevent old white card rules from winning. */
@media(max-width:720px){
  html:root[data-middle-theme="dark"] body.home .middle-exact-attention{
    border-color:#2b3e52!important;
    background:linear-gradient(145deg,#182635,#111d2a)!important;
  }

  html:root[data-middle-theme="dark"] body.home .middle-exact-attention-featured{
    border-color:#2d4257!important;
    background:#1a2939!important;
  }

  html:root[data-middle-theme="dark"] body.home .middle-exact-attention-item{
    border-color:#2b3f53!important;
    background:#182736!important;
  }

  html:root[data-middle-theme="dark"] body.home .middle-exact-attention-featured__copy h3 a,
  html:root[data-middle-theme="dark"] body.home .middle-exact-attention-item__copy strong{
    color:#edf4fb!important;
  }

  html:root[data-middle-theme="dark"] body.home .middle-exact-attention-featured__copy>small,
  html:root[data-middle-theme="dark"] body.home .middle-exact-attention-item__copy small{
    color:#99aabd!important;
  }
}


/* ==========================================================================
   Middle Community 0.4.16 — complete dark mode for ALL internal pages
   ========================================================================== */

/*
 * Internal pages were still inheriting the light --mc-page-* variables and
 * several high-specificity rules with hard-coded #fff backgrounds. Override
 * both the variables and the concrete portal surfaces here.
 */
html:root[data-middle-theme="dark"]{
  --mc-page-bg:#0f1721!important;
  --mc-page-surface:#182534!important;
  --mc-page-text:#f1f6fb!important;
  --mc-page-muted:#9eafc2!important;
  --mc-page-border:#2b3e52!important;
  --mc-page-blue:#72adf5!important;
  --mc-page-blue-soft:#1b3552!important;
  --mc-page-shadow:0 14px 40px rgba(0,0,0,.22)!important;
  --mc-page-shadow-hover:0 20px 50px rgba(0,0,0,.30)!important;
}

html:root[data-middle-theme="dark"] body:not(.home):not(.front-page){
  background:
    radial-gradient(circle at 83% 2%,rgba(44,78,116,.18),transparent 31%),
    radial-gradient(circle at 8% 80%,rgba(32,58,87,.12),transparent 28%),
    #0f1721!important;
  color:#f1f6fb!important;
}

/* --------------------------------------------------------------------------
   DESKTOP INTERNAL HEADER — override the old high-specificity white rules.
   -------------------------------------------------------------------------- */
@media(min-width:721px){
  html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-site-header{
    border-bottom-color:#26384a!important;
    background:#111c28!important;
    box-shadow:0 7px 25px rgba(0,0,0,.20)!important;
  }

  html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-header-row{
    background:transparent!important;
    border-color:transparent!important;
    box-shadow:none!important;
  }

  html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-brand,
  html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-brand:hover,
  html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-brand__text{
    color:#f1f6fb!important;
  }

  html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-home-header-search{
    border-color:#2c4054!important;
    background:#172432!important;
    box-shadow:none!important;
  }
  html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-home-header-search input{
    color:#eef4fa!important;
    background:transparent!important;
  }
  html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-home-header-search input::placeholder{
    color:#73879c!important;
  }
  html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-home-header-search svg{
    stroke:#8fa3b8!important;
  }

  html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-header-weather,
  html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-icon-btn,
  html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-btn--ghost,
  html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-account-link,
  html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-messages-link,
  html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-header-dropdown--menu>.middle-nav-toggle{
    border-color:#2c4054!important;
    background:#182635!important;
    color:#dce7f2!important;
    box-shadow:none!important;
  }

  html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-home-topnav{
    border-top-color:#223446!important;
    border-bottom-color:#26394c!important;
    background:#111c28!important;
  }

  html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-home-topnav a,
  html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-home-topnav__more{
    background:transparent!important;
    color:#c8d5e3!important;
  }
  html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-home-topnav a:hover,
  html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-home-topnav__more:hover{
    background:#1c3043!important;
    color:#85bbff!important;
  }
}

/* --------------------------------------------------------------------------
   COMMON CATEGORY / ARCHIVE / SEARCH PAGES
   -------------------------------------------------------------------------- */
html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-page-head,
html:root[data-middle-theme="dark"] body.category:not(.category-ads) .middle-page-head.middle-category-head,
html:root[data-middle-theme="dark"] body.search .middle-page-head{
  border-color:#2b3e52!important;
  background:
    radial-gradient(circle at 92% 6%,rgba(71,137,211,.16),transparent 31%),
    linear-gradient(145deg,#1b2a39,#152231)!important;
  box-shadow:0 12px 34px rgba(0,0,0,.20)!important;
}

html:root[data-middle-theme="dark"] body.category:not(.category-ads) .middle-category-head--green,
html:root[data-middle-theme="dark"] body.category:not(.category-ads) .middle-category-head--amber,
html:root[data-middle-theme="dark"] body.category:not(.category-ads) .middle-category-head--orange,
html:root[data-middle-theme="dark"] body.category:not(.category-ads) .middle-category-head--sky,
html:root[data-middle-theme="dark"] body.category:not(.category-ads) .middle-category-head--blue{
  border-color:#2d4358!important;
  background:linear-gradient(145deg,#1b2a39,#152231)!important;
}

html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-page-head h1,
html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-page-head h2{
  color:#f2f6fb!important;
}
html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-page-head .middle-muted{
  color:#9eafc2!important;
}

html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-post-card,
html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-card{
  border-color:#2b3e52!important;
  background:#182534!important;
  color:#eef4fa!important;
  box-shadow:0 8px 25px rgba(0,0,0,.16)!important;
}
html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-post-card:hover{
  border-color:#38526c!important;
  background:#1b2a3a!important;
  box-shadow:0 15px 34px rgba(0,0,0,.26)!important;
}
html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-post-card__thumb{
  background:#223448!important;
  box-shadow:none!important;
}
html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-post-card__title a{
  color:#edf4fb!important;
}
html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-post-card__excerpt,
html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-post-meta{
  color:#9eafc2!important;
}
html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-post-actions{
  border-top-color:#2c4054!important;
}
html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-action{
  border-color:#31475c!important;
  background:#1d2d3e!important;
  color:#b9cadb!important;
}

/* Sidebar */
html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-widget,
html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-sidebar .middle-widget{
  border-color:#2b3e52!important;
  background:#182534!important;
  color:#eef4fa!important;
  box-shadow:0 8px 25px rgba(0,0,0,.16)!important;
}
html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-widget--intro{
  background:linear-gradient(145deg,#1b3552,#182534)!important;
}
html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-widget__title,
html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-sidefeed-title{
  color:#edf4fb!important;
}
html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-sidefeed-item{
  border-color:#2b3e52!important;
}
html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-sidefeed-meta,
html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-sidefeed-excerpt,
html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-sidefeed-empty{
  color:#9eafc2!important;
}

/* --------------------------------------------------------------------------
   CLASSIFIEDS BOARD
   -------------------------------------------------------------------------- */
html:root[data-middle-theme="dark"] body.middle-ads-board-page .middle-market-hero,
html:root[data-middle-theme="dark"] body.middle-ads-board-page .middle-market-results,
html:root[data-middle-theme="dark"] body.middle-ads-board-page .middle-market-filter,
html:root[data-middle-theme="dark"] body.middle-ads-board-page .middle-market-category-card,
html:root[data-middle-theme="dark"] body.category-ads .middle-ads-board__hero,
html:root[data-middle-theme="dark"] body.category-ads .middle-ads-categories,
html:root[data-middle-theme="dark"] body.category-ads .middle-ads-results{
  border-color:#2b3e52!important;
  background:
    radial-gradient(circle at 90% 0%,rgba(60,116,178,.11),transparent 30%),
    #182534!important;
  color:#eef4fa!important;
  box-shadow:0 10px 30px rgba(0,0,0,.18)!important;
}

html:root[data-middle-theme="dark"] body.middle-ads-board-page .middle-market-hero h1,
html:root[data-middle-theme="dark"] body.middle-ads-board-page .middle-market-results h2,
html:root[data-middle-theme="dark"] body.category-ads .middle-ads-board__hero h1,
html:root[data-middle-theme="dark"] body.category-ads .middle-ads-results h2{
  color:#f2f6fb!important;
}

html:root[data-middle-theme="dark"] body.middle-ads-board-page .middle-market-hero p,
html:root[data-middle-theme="dark"] body.middle-ads-board-page .middle-market-results small,
html:root[data-middle-theme="dark"] body.category-ads .middle-ads-board__description,
html:root[data-middle-theme="dark"] body.category-ads .middle-ads-results small{
  color:#9eafc2!important;
}

/* Search and sorting controls */
html:root[data-middle-theme="dark"] body.middle-ads-board-page .middle-market-search,
html:root[data-middle-theme="dark"] body.middle-ads-board-page .middle-market-search__field,
html:root[data-middle-theme="dark"] body.middle-ads-board-page .middle-market-search__filter,
html:root[data-middle-theme="dark"] body.middle-ads-board-page .middle-market-sort>summary,
html:root[data-middle-theme="dark"] body.middle-ads-board-page .middle-market-sort__menu{
  border-color:#30465b!important;
  background:#111e2a!important;
  color:#eaf1f8!important;
  box-shadow:none!important;
}
html:root[data-middle-theme="dark"] body.middle-ads-board-page .middle-market-search input{
  color:#edf4fb!important;
  background:transparent!important;
}
html:root[data-middle-theme="dark"] body.middle-ads-board-page .middle-market-search input::placeholder{
  color:#7d90a4!important;
}
html:root[data-middle-theme="dark"] body.middle-ads-board-page .middle-market-sort__eyebrow,
html:root[data-middle-theme="dark"] body.middle-ads-board-page .middle-market-sort__copy small{
  color:#8497ab!important;
}
html:root[data-middle-theme="dark"] body.middle-ads-board-page .middle-market-sort__current,
html:root[data-middle-theme="dark"] body.middle-ads-board-page .middle-market-sort__option{
  color:#d9e5f0!important;
}
html:root[data-middle-theme="dark"] body.middle-ads-board-page .middle-market-sort__option:hover,
html:root[data-middle-theme="dark"] body.middle-ads-board-page .middle-market-sort__option.is-active{
  background:#1e3449!important;
  color:#8fc0ff!important;
}

/* Cards */
html:root[data-middle-theme="dark"] body.middle-ads-board-page .middle-market-card{
  border-color:#2b3e52!important;
  background:#1a2735!important;
  box-shadow:0 8px 22px rgba(0,0,0,.15)!important;
}
html:root[data-middle-theme="dark"] body.middle-ads-board-page .middle-market-card:hover{
  border-color:#3b5670!important;
  background:#1e2e3e!important;
}
html:root[data-middle-theme="dark"] body.middle-ads-board-page .middle-market-card__content{
  background:#1a2735!important;
}
html:root[data-middle-theme="dark"] body.middle-ads-board-page .middle-market-card__link,
html:root[data-middle-theme="dark"] body.middle-ads-board-page .middle-market-card__content h3{
  color:#edf4fb!important;
}
html:root[data-middle-theme="dark"] body.middle-ads-board-page .middle-market-card__meta{
  color:#96a9bd!important;
}
html:root[data-middle-theme="dark"] body.middle-ads-board-page .middle-market-card__media{
  background:#223448!important;
}
html:root[data-middle-theme="dark"] body.middle-ads-board-page .middle-market-card__condition,
html:root[data-middle-theme="dark"] body.middle-ads-board-page .middle-market-card__badge{
  border-color:#38516a!important;
  background:#1b3552!important;
  color:#95c2fa!important;
}

/* Filter category cards/chips */
html:root[data-middle-theme="dark"] body.middle-ads-board-page .middle-market-category-parent,
html:root[data-middle-theme="dark"] body.middle-ads-board-page .middle-market-category-chip,
html:root[data-middle-theme="dark"] body.category-ads .middle-ads-category-group,
html:root[data-middle-theme="dark"] body.category-ads .middle-ads-categories__all,
html:root[data-middle-theme="dark"] body.category-ads .middle-ads-subcategory-link{
  border-color:#30465b!important;
  background:#111e2a!important;
  color:#dbe7f2!important;
}
html:root[data-middle-theme="dark"] body.middle-ads-board-page .middle-market-category-parent:hover,
html:root[data-middle-theme="dark"] body.middle-ads-board-page .middle-market-category-chip:hover,
html:root[data-middle-theme="dark"] body.category-ads .middle-ads-subcategory-link:hover{
  background:#1d3347!important;
  color:#8fc0ff!important;
}

/* --------------------------------------------------------------------------
   PHOTO GALLERY
   -------------------------------------------------------------------------- */
html:root[data-middle-theme="dark"] body.middle-photo-archive-page .middle-photo-archive__hero,
html:root[data-middle-theme="dark"] body.category-foto .middle-photo-archive__hero,
html:root[data-middle-theme="dark"] body.category-photo .middle-photo-archive__hero{
  border-color:#2b3e52!important;
  background:
    radial-gradient(circle at 90% 0%,rgba(65,130,201,.14),transparent 31%),
    linear-gradient(145deg,#1b2a39,#152231)!important;
  color:#f1f6fb!important;
  box-shadow:0 12px 34px rgba(0,0,0,.20)!important;
}
html:root[data-middle-theme="dark"] body.middle-photo-archive-page .middle-photo-archive__hero h1,
html:root[data-middle-theme="dark"] body.middle-photo-archive-page .middle-photo-archive__hero p{
  color:#f0f5fa!important;
}
html:root[data-middle-theme="dark"] body.middle-photo-archive-page .middle-photo-archive__count{
  color:#9eafc2!important;
}
html:root[data-middle-theme="dark"] body.middle-photo-archive-page .middle-photo-card{
  border-color:#2b3e52!important;
  background:#182534!important;
  box-shadow:0 8px 24px rgba(0,0,0,.18)!important;
}
html:root[data-middle-theme="dark"] body.middle-photo-archive-page .middle-photo-card__media{
  background:#223448!important;
}

/* --------------------------------------------------------------------------
   ORGANIZATIONS
   -------------------------------------------------------------------------- */
html:root[data-middle-theme="dark"] body.post-type-archive-middle_organization .middle-org-directory__hero,
html:root[data-middle-theme="dark"] body.post-type-archive-middle_organization .middle-org-results,
html:root[data-middle-theme="dark"] body.post-type-archive-middle_organization .middle-org-filters,
html:root[data-middle-theme="dark"] body.post-type-archive-middle_organization .middle-org-map-panel,
html:root[data-middle-theme="dark"] body.single-middle_organization .middle-org-single__card{
  border-color:#2b3e52!important;
  background:#182534!important;
  color:#eef4fa!important;
  box-shadow:0 10px 30px rgba(0,0,0,.18)!important;
}
html:root[data-middle-theme="dark"] body.post-type-archive-middle_organization .middle-org-directory__hero{
  background:
    radial-gradient(circle at 90% 0%,rgba(70,137,209,.14),transparent 30%),
    linear-gradient(145deg,#1b2a39,#152231)!important;
}
html:root[data-middle-theme="dark"] body.post-type-archive-middle_organization .middle-org-directory__hero h1,
html:root[data-middle-theme="dark"] body.post-type-archive-middle_organization .middle-org-results h2,
html:root[data-middle-theme="dark"] body.single-middle_organization h1,
html:root[data-middle-theme="dark"] body.single-middle_organization h2{
  color:#f1f6fb!important;
}
html:root[data-middle-theme="dark"] body.post-type-archive-middle_organization .middle-org-directory__hero p,
html:root[data-middle-theme="dark"] body.post-type-archive-middle_organization .middle-org-card__line,
html:root[data-middle-theme="dark"] body.single-middle_organization .middle-org-single__details,
html:root[data-middle-theme="dark"] body.single-middle_organization .middle-org-single__source,
html:root[data-middle-theme="dark"] body.single-middle_organization .middle-org-single__photo-credit{
  color:#9eafc2!important;
}
html:root[data-middle-theme="dark"] body.post-type-archive-middle_organization .middle-org-search__field,
html:root[data-middle-theme="dark"] body.post-type-archive-middle_organization .middle-org-search__map-toggle,
html:root[data-middle-theme="dark"] body.post-type-archive-middle_organization .middle-org-results__head select{
  border-color:#30465b!important;
  background:#111e2a!important;
  color:#eaf1f8!important;
}
html:root[data-middle-theme="dark"] body.post-type-archive-middle_organization .middle-org-card{
  border-color:#2b3e52!important;
  background:#1a2735!important;
}
html:root[data-middle-theme="dark"] body.post-type-archive-middle_organization .middle-org-card__media,
html:root[data-middle-theme="dark"] body.post-type-archive-middle_organization .middle-org-map,
html:root[data-middle-theme="dark"] body.single-middle_organization .middle-org-map{
  background:#172636!important;
}
html:root[data-middle-theme="dark"] body.post-type-archive-middle_organization .middle-org-card__actions,
html:root[data-middle-theme="dark"] body.post-type-archive-middle_organization .middle-org-map-panel__top,
html:root[data-middle-theme="dark"] body.post-type-archive-middle_organization .middle-org-map-panel__credit{
  border-color:#2c4054!important;
}
html:root[data-middle-theme="dark"] body.single-middle_organization .middle-org-single__details>div,
html:root[data-middle-theme="dark"] body.single-middle_organization .middle-org-single__description,
html:root[data-middle-theme="dark"] body.single-middle_organization .middle-org-single__map-wrap{
  border-color:#2c4054!important;
  background:#111e2a!important;
}
html:root[data-middle-theme="dark"] body.single-middle_organization .middle-org-outline-btn{
  border-color:#3a5875!important;
  background:#1a2f43!important;
  color:#8fc0ff!important;
}

/* --------------------------------------------------------------------------
   GENERIC SINGLE ARTICLES / PAGES / COMMENTS
   -------------------------------------------------------------------------- */
html:root[data-middle-theme="dark"] body.single:not(.middle-ad-single-page) .middle-main>.middle-card,
html:root[data-middle-theme="dark"] body.page .middle-main>.middle-card,
html:root[data-middle-theme="dark"] body.page .middle-content,
html:root[data-middle-theme="dark"] body.single:not(.middle-ad-single-page) .middle-content{
  color:#d4dfeb!important;
}
html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-article__title{
  color:#f2f6fb!important;
}
html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-content a{
  color:#82baff!important;
}
html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-content pre,
html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-content blockquote{
  border-color:#31485f!important;
  background:#15283a!important;
  color:#dce7f2!important;
}
html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-comments,
html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .comment-body{
  border-color:#2b3e52!important;
  background:#182534!important;
  color:#dce7f2!important;
}

/* --------------------------------------------------------------------------
   ADVERTISING / MESSAGES / SERVICE LANDINGS
   -------------------------------------------------------------------------- */
html:root[data-middle-theme="dark"] body .middle-advertising-hero,
html:root[data-middle-theme="dark"] body .middle-advertising-section,
html:root[data-middle-theme="dark"] body .middle-advertising-contact,
html:root[data-middle-theme="dark"] body .middle-advertising-placement,
html:root[data-middle-theme="dark"] body .middle-advertising-stat,
html:root[data-middle-theme="dark"] body .middle-messages-app__hero,
html:root[data-middle-theme="dark"] body .middle-messages-app__body,
html:root[data-middle-theme="dark"] body .middle-notification,
html:root[data-middle-theme="dark"] body .middle-service-landing-content{
  border-color:#2b3e52!important;
  background:#182534!important;
  color:#eef4fa!important;
  box-shadow:0 9px 27px rgba(0,0,0,.18)!important;
}
html:root[data-middle-theme="dark"] body .middle-advertising-hero,
html:root[data-middle-theme="dark"] body .middle-messages-app__hero{
  background:
    radial-gradient(circle at 90% 0%,rgba(66,132,206,.15),transparent 31%),
    linear-gradient(145deg,#1b2a39,#152231)!important;
}
html:root[data-middle-theme="dark"] body .middle-advertising-section h2,
html:root[data-middle-theme="dark"] body .middle-advertising-contact h2,
html:root[data-middle-theme="dark"] body .middle-messages-app__hero h1{
  color:#f1f6fb!important;
}

/* --------------------------------------------------------------------------
   FOOTER — same dark portal footer on every internal page.
   -------------------------------------------------------------------------- */
html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-site-footer{
  border-top-color:#26384a!important;
  background:#0f1721!important;
}
html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-footer-home{
  border-color:#2b3e52!important;
  background:#182534!important;
  box-shadow:0 14px 38px rgba(0,0,0,.22)!important;
}
html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-footer-home__bottom{
  border-top-color:#2b3e52!important;
  background:#111c28!important;
}

/* --------------------------------------------------------------------------
   MOBILE INTERNAL PAGES
   -------------------------------------------------------------------------- */
@media(max-width:720px){
  html:root[data-middle-theme="dark"] body:not(.home):not(.front-page){
    background:#0f1721!important;
  }

  html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-page-head,
  html:root[data-middle-theme="dark"] body.category:not(.category-ads) .middle-page-head.middle-category-head,
  html:root[data-middle-theme="dark"] body.middle-ads-board-page .middle-market-hero,
  html:root[data-middle-theme="dark"] body.middle-ads-board-page .middle-market-results,
  html:root[data-middle-theme="dark"] body.middle-photo-archive-page .middle-photo-archive__hero,
  html:root[data-middle-theme="dark"] body.post-type-archive-middle_organization .middle-org-directory__hero,
  html:root[data-middle-theme="dark"] body.post-type-archive-middle_organization .middle-org-results,
  html:root[data-middle-theme="dark"] body.single-middle_organization .middle-org-single__card{
    border-color:#2b3e52!important;
    background:#182534!important;
    color:#eef4fa!important;
    box-shadow:0 8px 24px rgba(0,0,0,.18)!important;
  }

  html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-post-card,
  html:root[data-middle-theme="dark"] body.middle-ads-board-page .middle-market-card,
  html:root[data-middle-theme="dark"] body.post-type-archive-middle_organization .middle-org-card{
    border-color:#2b3e52!important;
    background:#182534!important;
  }

  html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) h1,
  html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) h2,
  html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) h3{
    color:#f1f6fb!important;
  }

  html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) p,
  html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) small{
    color:#9eafc2!important;
  }

  /* Do not let generic mobile rules turn inputs white again. */
  html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) input,
  html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) textarea,
  html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) select{
    border-color:#30465b!important;
    background:#111e2a!important;
    color:#edf4fb!important;
  }
}


/* ==========================================================================
   Middle Community 0.4.17 — dark mode for Work / Real estate / service pages
   ========================================================================== */

/* --------------------------------------------------------------------------
   SEO service landing pages generated by [middle_ad_landing]:
   Работа, Недвижимость, Авто and all similar city-service pages.
   -------------------------------------------------------------------------- */
html:root[data-middle-theme="dark"] body.middle-service-landing-body{
  background:
    radial-gradient(circle at 82% 0%,rgba(54,94,137,.17),transparent 31%),
    #0f1721!important;
  color:#f1f6fb!important;
}

html:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-layout,
html:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-main,
html:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-service-landing-page,
html:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-service-landing-content,
html:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-seo-landing{
  background:transparent!important;
  color:#f1f6fb!important;
}

html:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-seo-landing__hero{
  border-color:#2b3e52!important;
  background:
    radial-gradient(circle at 92% 0%,rgba(78,148,225,.18),transparent 34%),
    linear-gradient(145deg,#1c2b3b,#152231)!important;
  color:#f1f6fb!important;
  box-shadow:0 14px 38px rgba(0,0,0,.22)!important;
}

html:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-seo-landing__hero>div>span{
  color:#7eb9ff!important;
}

html:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-seo-landing__hero h1{
  color:#f4f7fb!important;
}

html:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-seo-landing__hero p{
  color:#9fb0c2!important;
}

html:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-seo-landing__hero>a{
  border-color:#35506a!important;
  background:#1d3043!important;
  color:#8fc0ff!important;
  box-shadow:none!important;
}

html:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-seo-landing__hero>a:hover{
  border-color:#4a6d91!important;
  background:#243b52!important;
  color:#b8d7ff!important;
}

/* Count / "open full section" row */
html:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-seo-landing__stats{
  color:#dce7f2!important;
}

html:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-seo-landing__stats strong{
  color:#f0f5fa!important;
}

html:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-seo-landing__stats span{
  color:#91a4b8!important;
}

html:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-seo-landing__stats a{
  color:#82baff!important;
}

/* Work / real-estate / auto advert cards */
html:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-seo-ad-card{
  border-color:#2b3e52!important;
  background:#182534!important;
  box-shadow:0 8px 24px rgba(0,0,0,.17)!important;
}

html:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-seo-ad-card:hover{
  border-color:#3b5772!important;
  background:#1d2d3d!important;
  box-shadow:0 15px 34px rgba(0,0,0,.26)!important;
}

html:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-seo-ad-card>a{
  color:#edf4fb!important;
}

html:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-seo-ad-card__media{
  background:
    radial-gradient(circle at 70% 20%,rgba(61,116,174,.14),transparent 40%),
    #223448!important;
}

html:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-seo-ad-card__media i{
  color:#91a7bd!important;
}

html:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-seo-ad-card__body{
  background:#182534!important;
}

html:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-seo-ad-card__body small{
  color:#7fb8fa!important;
}

html:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-seo-ad-card__body strong{
  color:#edf4fb!important;
}

html:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-seo-ad-card__body b{
  color:#9fc8ff!important;
}

/* Empty state */
html:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-seo-landing__empty{
  border-color:#36506a!important;
  background:#172534!important;
  color:#e9f1f8!important;
}

html:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-seo-landing__empty p{
  color:#94a7bb!important;
}

/* Bottom action */
html:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-seo-landing__footer a{
  border:1px solid #3a5d80!important;
  background:#287bd9!important;
  color:#fff!important;
  box-shadow:0 8px 20px rgba(20,93,174,.24)!important;
}

html:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-seo-landing__footer a:hover{
  background:#3489e9!important;
  color:#fff!important;
}

/* --------------------------------------------------------------------------
   Outages / utility service page uses the same body class.
   -------------------------------------------------------------------------- */
html:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-outages-page{
  background:transparent!important;
  color:#f0f5fa!important;
}

html:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-outages-hero{
  border-color:#2b3e52!important;
  background:
    radial-gradient(circle at 92% 0%,rgba(74,143,219,.16),transparent 34%),
    linear-gradient(145deg,#1b2a39,#152231)!important;
  box-shadow:0 14px 38px rgba(0,0,0,.22)!important;
}

html:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-outages-hero h1,
html:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-outages-group h2,
html:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-outages-help h2,
html:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-outage-card h3{
  color:#f0f5fa!important;
}

html:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-outages-hero p,
html:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-outages-group>header>span,
html:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-outage-card__copy,
html:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-outages-help p,
html:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-outages-empty p{
  color:#9eafc2!important;
}

html:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-outages-hero__status,
html:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-outages-group,
html:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-outages-help{
  border-color:#2b3e52!important;
  background:#182534!important;
  box-shadow:0 8px 24px rgba(0,0,0,.17)!important;
}

html:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-outages-hero__status{
  background:#111e2a!important;
}

html:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-outage-card{
  border-color:#30465b!important;
  background:#111e2a!important;
}

html:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-outage-card__icon,
html:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-outages-group>header b{
  background:#223448!important;
  color:#dbe8f5!important;
}

html:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-outage-card__time,
html:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-outage-card__source{
  color:#82baff!important;
}

html:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-outages-empty{
  border-color:#35506a!important;
  background:#172534!important;
  color:#e9f1f8!important;
}

/* --------------------------------------------------------------------------
   City info / weather / transport pages — plugin markup varies, so cover
   both the known wrapper and common card-like child blocks.
   -------------------------------------------------------------------------- */
html:root[data-middle-theme="dark"] body.middle-city-info-body{
  background:#0f1721!important;
  color:#f0f5fa!important;
}

html:root[data-middle-theme="dark"] body.middle-city-info-body .middle-city-info-page{
  background:transparent!important;
  color:#f0f5fa!important;
}

html:root[data-middle-theme="dark"] body.middle-city-info-body .middle-city-info-page .middle-card,
html:root[data-middle-theme="dark"] body.middle-city-info-body .middle-city-info-page [class*="weather"],
html:root[data-middle-theme="dark"] body.middle-city-info-body .middle-city-info-page [class*="bus"],
html:root[data-middle-theme="dark"] body.middle-city-info-body .middle-city-info-page [class*="transport"]{
  border-color:#2b3e52!important;
}

html:root[data-middle-theme="dark"] body.middle-city-info-body .middle-city-info-page .middle-card{
  background:#182534!important;
  color:#eef4fa!important;
}

/* Do not blindly paint photos/maps, only white text containers and panels. */
html:root[data-middle-theme="dark"] body.middle-city-info-body .middle-city-info-page
:is(section,article,aside,header,footer,div)[class*="card"]:not(:has(> img:only-child)){
  border-color:#2b3e52!important;
  background-color:#182534!important;
  color:#eef4fa!important;
}

html:root[data-middle-theme="dark"] body.middle-city-info-body .middle-city-info-page h1,
html:root[data-middle-theme="dark"] body.middle-city-info-body .middle-city-info-page h2,
html:root[data-middle-theme="dark"] body.middle-city-info-body .middle-city-info-page h3{
  color:#f0f5fa!important;
}

/* --------------------------------------------------------------------------
   MOBILE — same service landing dark palette, no white cards returning.
   -------------------------------------------------------------------------- */
@media(max-width:720px){
  html:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-seo-landing__hero,
  html:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-seo-ad-card,
  html:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-seo-landing__empty,
  html:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-outages-hero,
  html:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-outages-group,
  html:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-outages-help,
  html:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-outage-card{
    border-color:#2b3e52!important;
    background-color:#182534!important;
    color:#eef4fa!important;
  }

  html:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-seo-landing__hero{
    background:
      radial-gradient(circle at 88% 0%,rgba(78,148,225,.16),transparent 34%),
      linear-gradient(145deg,#1c2b3b,#152231)!important;
  }

  html:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-seo-ad-card__body{
    background:#182534!important;
  }

  html:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-seo-ad-card__body strong,
  html:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-seo-landing__hero h1,
  html:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-outages-hero h1{
    color:#f1f6fb!important;
  }

  html:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-seo-landing__hero p,
  html:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-outages-hero p{
    color:#9eafc2!important;
  }
}


/* 0.4.18 — dark homepage bus map preview */
:root[data-middle-theme="dark"] .home .middle-exact-bus__map{
  border-color:#2d4358!important;
  background:
    radial-gradient(circle at 84% 18%,rgba(79,146,224,.18),transparent 28%),
    linear-gradient(145deg,#172737,#12202e)!important;
  box-shadow:0 10px 24px rgba(0,0,0,.18)!important;
}
:root[data-middle-theme="dark"] .home .middle-exact-bus__map:hover{
  border-color:#3f5f7d!important;
  box-shadow:0 16px 28px rgba(0,0,0,.24)!important;
}
:root[data-middle-theme="dark"] .home .middle-exact-bus__map-canvas{
  background:
    linear-gradient(180deg,rgba(20,34,49,.24),rgba(20,34,49,.06)),
    linear-gradient(135deg,#22364a 0%,#1b3145 30%,#26384c 31%,#26384c 100%)!important;
}
:root[data-middle-theme="dark"] .home .middle-exact-bus__map-canvas .road{
  background:rgba(236,243,250,.92)!important;
}
:root[data-middle-theme="dark"] .home .middle-exact-bus__map-copy strong{
  color:#edf4fb!important;
}
:root[data-middle-theme="dark"] .home .middle-exact-bus__map-copy em{
  color:#94a7bb!important;
}

/* ========================================================================== 
   Middle Community 0.4.19 — selected homepage blocks
   Ads v6 · Sell v2 · Reader v2 · Problem v5 · Opportunities v3
   ========================================================================== */

.home .middle-selected-ads,
.home .middle-selected-sell,
.home .middle-selected-reader,
.home .middle-selected-problem,
.home .middle-selected-opportunities{
  width:min(var(--mc-home-canvas,1540px),calc(100% - 44px));
  margin:24px auto 0;
  box-sizing:border-box;
}

/* --------------------------------------------------------------------------
   ОБЪЯВЛЕНИЯ РЯДОМ — selected light variant #6
   -------------------------------------------------------------------------- */
.home .middle-selected-ads{
  padding:25px 26px 27px;
  border:1px solid #dfe8f2;
  border-radius:28px;
  background:#fff;
  box-shadow:0 12px 34px rgba(28,62,101,.07);
}
.home .middle-selected-ads__head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:24px;
  margin-bottom:18px;
}
.home .middle-selected-ads__head>div>span{
  display:block;
  margin-bottom:5px;
  color:#2d7fe2;
  font-size:10px;
  line-height:1.2;
  font-weight:850;
  letter-spacing:.12em;
  text-transform:uppercase;
}
.home .middle-selected-ads__head h2{
  margin:0;
  color:#10233d;
  font-size:clamp(31px,2.5vw,45px);
  line-height:.98;
  font-weight:900;
  letter-spacing:-.045em;
}
.home .middle-selected-ads__head h2 em{color:#1675e8;font-style:normal}
.home .middle-selected-ads__head p{
  margin:8px 0 0;
  color:#718198;
  font-size:13px;
}
.home .middle-selected-ads__head>a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  min-height:45px;
  padding:0 18px;
  border-radius:14px;
  background:#14263d;
  color:#fff;
  font-size:11px;
  font-weight:800;
  box-shadow:0 8px 18px rgba(20,38,61,.16);
  white-space:nowrap;
}
.home .middle-selected-ads__tiles{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:12px;
}
.home .middle-selected-ads__tile{
  position:relative;
  min-width:0;
  height:230px;
  overflow:hidden;
  border-radius:20px;
  background:#e9f1f9;
  color:#fff;
  box-shadow:0 8px 22px rgba(29,56,88,.10);
  transform:translateZ(0);
  transition:transform .25s cubic-bezier(.22,.8,.2,1),box-shadow .25s ease;
}
.home .middle-selected-ads__tile:hover{transform:translateY(-5px);box-shadow:0 17px 33px rgba(29,56,88,.17)}
.home .middle-selected-ads__media,
.home .middle-selected-ads__media>img,
.home .middle-selected-ads__media>.middle-ad-placeholder{
  position:absolute;
  inset:0;
  display:block;
  width:100%;
  height:100%;
}
.home .middle-selected-ads__media>img{object-fit:cover}
.home .middle-selected-ads__media>.middle-ad-placeholder{border-radius:0!important}
.home .middle-selected-ads__placeholder{
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  background:linear-gradient(145deg,#eaf3fd,#dbeaff);
}
.home .middle-selected-ads__placeholder img{width:68px;height:68px;object-fit:contain}
.home .middle-selected-ads__tile-shade{
  position:absolute;
  inset:0;
  background:linear-gradient(180deg,rgba(5,18,34,.02) 30%,rgba(5,18,34,.16) 58%,rgba(5,18,34,.84) 100%);
}
.home .middle-selected-ads__tile-copy{
  position:absolute;
  z-index:2;
  left:16px;
  right:46px;
  bottom:15px;
  display:grid;
  gap:4px;
}
.home .middle-selected-ads__tile-copy strong{
  overflow:hidden;
  color:#fff;
  font-size:17px;
  line-height:1.05;
  font-weight:850;
  white-space:nowrap;
  text-overflow:ellipsis;
  text-shadow:0 2px 10px rgba(0,0,0,.22);
}
.home .middle-selected-ads__tile-copy small{
  color:rgba(255,255,255,.82);
  font-size:10px;
  font-weight:650;
}
.home .middle-selected-ads__tile-arrow{
  position:absolute;
  z-index:3;
  right:13px;
  bottom:13px;
  display:grid;
  place-items:center;
  width:30px;
  height:30px;
  border-radius:50%;
  background:#fff;
  color:#17304c;
  font-size:14px;
  font-weight:900;
  box-shadow:0 7px 14px rgba(0,0,0,.12);
}

/* --------------------------------------------------------------------------
   ЕСТЬ ЧТО ПРОДАТЬ? — selected light variant #2
   -------------------------------------------------------------------------- */
.home .middle-selected-sell{
  position:relative;
  display:grid;
  grid-template-columns:minmax(0,1.05fr) minmax(360px,.95fr);
  min-height:310px;
  overflow:hidden;
  border:1px solid #dfe8f2;
  border-radius:30px;
  background:#fff;
  box-shadow:0 14px 38px rgba(29,61,98,.08);
}
.home .middle-selected-sell__copy{
  position:relative;
  z-index:3;
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:34px 38px;
}
.home .middle-selected-sell__copy>span{
  color:#2f5f9b;
  font-size:10px;
  font-weight:850;
  letter-spacing:.12em;
  text-transform:uppercase;
}
.home .middle-selected-sell__copy h2{
  margin:8px 0 10px;
  color:#10233d;
  font-size:clamp(36px,3vw,54px);
  line-height:.96;
  font-weight:900;
  letter-spacing:-.05em;
}
.home .middle-selected-sell__copy h2 em{color:#126fe6;font-style:normal}
.home .middle-selected-sell__copy>p{
  max-width:650px;
  margin:0 0 20px;
  color:#53667f;
  font-size:14px;
  line-height:1.45;
}
.home .middle-selected-sell__copy>a{
  align-self:flex-start;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:49px;
  padding:0 19px;
  border-radius:14px;
  background:linear-gradient(135deg,#2489f5,#126fe6);
  color:#fff;
  font-size:12px;
  font-weight:850;
  box-shadow:0 10px 22px rgba(18,111,230,.22);
}
.home .middle-selected-sell__copy>a b{font-size:17px;line-height:1;font-weight:500}
.home .middle-selected-sell__stats{
  display:flex;
  align-items:center;
  gap:24px;
  margin-top:24px;
}
.home .middle-selected-sell__stats>span{display:grid;gap:2px;min-width:0}
.home .middle-selected-sell__stats b{color:#17304e;font-size:16px;line-height:1.1;font-weight:850}
.home .middle-selected-sell__stats small{color:#8392a4;font-size:9px;line-height:1.2}
.home .middle-selected-sell__visual{
  position:relative;
  min-height:310px;
  overflow:hidden;
  background:linear-gradient(145deg,#f7f1e9,#e9eef4);
}
.home .middle-selected-sell__photo,
.home .middle-selected-sell__photo>img,
.home .middle-selected-sell__photo>.middle-ad-placeholder{
  position:absolute;
  inset:0;
  display:block;
  width:100%;
  height:100%;
}
.home .middle-selected-sell__photo>img{object-fit:cover;object-position:center}
.home .middle-selected-sell__photo>.middle-ad-placeholder{border-radius:0!important}
.home .middle-selected-sell__cat{
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  font-size:100px;
  background:radial-gradient(circle at 50% 45%,#fff 0%,#efe8dd 55%,#d9e1ea 100%);
}
.home .middle-selected-sell__visual::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(90deg,#fff 0%,rgba(255,255,255,.68) 10%,rgba(255,255,255,0) 45%);
  pointer-events:none;
}
.home .middle-selected-sell__box{
  position:absolute;
  z-index:3;
  right:22px;
  bottom:21px;
  display:grid;
  gap:3px;
  width:min(240px,66%);
  padding:15px 17px;
  border:1px solid rgba(129,89,53,.18);
  border-radius:9px 9px 15px 15px;
  background:linear-gradient(150deg,#d7aa76,#c99159);
  color:#3a2a1d;
  box-shadow:0 15px 30px rgba(67,44,24,.20);
  transform:rotate(-2deg);
}
.home .middle-selected-sell__box::before{
  content:"";
  position:absolute;
  left:10%;right:10%;top:-11px;height:19px;
  border-radius:7px 7px 2px 2px;
  background:#e3ba87;
  transform:skewX(-14deg);
  z-index:-1;
}
.home .middle-selected-sell__box b{font-size:15px;font-weight:850}
.home .middle-selected-sell__box small{font-size:11px;line-height:1.25;font-weight:650}

/* --------------------------------------------------------------------------
   ЧЕПЕЦК БЕЗ ПРИКРАС — selected visual banner + slider #2
   -------------------------------------------------------------------------- */
.home .middle-selected-reader{
  display:grid;
  grid-template-columns:minmax(260px,.72fr) minmax(0,1.72fr);
  gap:20px;
  min-height:400px;
  padding:24px;
  overflow:hidden;
  border:1px solid #263847;
  border-radius:30px;
  background:
    radial-gradient(circle at 8% 20%,rgba(224,43,65,.18),transparent 28%),
    linear-gradient(135deg,#111d27 0%,#081119 58%,#121d25 100%);
  box-shadow:0 18px 48px rgba(9,20,31,.20);
}
.home .middle-selected-reader__intro{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:center;
  padding:12px 4px 12px 6px;
}
.home .middle-selected-reader__eye{
  display:grid;
  place-items:center;
  width:72px;
  height:72px;
  margin-bottom:12px;
  border-radius:24px;
  background:rgba(238,47,68,.12);
  box-shadow:inset 0 0 0 1px rgba(255,83,100,.18);
}
.home .middle-selected-reader__eye img{width:58px;height:58px;object-fit:contain}
.home .middle-selected-reader__kicker{
  color:#ff6678;
  font-size:9px;
  font-weight:900;
  letter-spacing:.12em;
  text-transform:uppercase;
}
.home .middle-selected-reader__intro h2{
  margin:8px 0 10px;
  color:#fff;
  font-size:clamp(39px,3.25vw,58px);
  line-height:.88;
  font-weight:900;
  letter-spacing:-.055em;
}
.home .middle-selected-reader__intro p{
  max-width:360px;
  margin:0 0 18px;
  color:#b9c4ce;
  font-size:13px;
  line-height:1.45;
}
.home .middle-selected-reader__report{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:46px;
  padding:0 17px;
  border-radius:13px;
  background:linear-gradient(135deg,#f43f53,#df253b);
  color:#fff;
  font-size:11px;
  font-weight:850;
  box-shadow:0 10px 24px rgba(223,37,59,.24);
}
.home .middle-selected-reader__all{margin-top:12px;color:#72b5ff;font-size:10px;font-weight:800}
.home .middle-selected-reader__slider{display:grid;grid-template-rows:minmax(0,1fr) auto;gap:10px;min-width:0}
.home .middle-selected-reader__stage{position:relative;min-height:300px;overflow:hidden;border-radius:22px;background:#1a2732}
.home .middle-selected-reader__slide{
  position:absolute;
  inset:0;
  opacity:0;
  visibility:hidden;
  transform:scale(1.025);
  transition:opacity .38s ease,visibility .38s ease,transform .5s cubic-bezier(.22,.8,.2,1);
}
.home .middle-selected-reader__slide.is-active{opacity:1;visibility:visible;transform:none;z-index:2}
.home .middle-selected-reader__slide-media,
.home .middle-selected-reader__slide-media>img,
.home .middle-selected-reader__slide-placeholder{
  position:absolute;
  inset:0;
  display:block;
  width:100%;
  height:100%;
}
.home .middle-selected-reader__slide-media>img{object-fit:cover}
.home .middle-selected-reader__slide-placeholder{display:grid;place-items:center;background:linear-gradient(145deg,#223442,#111b23)}
.home .middle-selected-reader__slide-placeholder img{width:72px;height:72px;opacity:.8}
.home .middle-selected-reader__slide-placeholder small{position:absolute;bottom:18px;color:#b9c7d2;font-size:10px}
.home .middle-selected-reader__slide-shade{position:absolute;inset:0;background:linear-gradient(180deg,rgba(4,11,17,0) 24%,rgba(4,11,17,.18) 52%,rgba(4,11,17,.88) 100%);pointer-events:none}
.home .middle-selected-reader__slide-copy{position:absolute;z-index:3;left:19px;right:19px;bottom:17px;display:grid;gap:5px}
.home .middle-selected-reader__slide-copy>span{justify-self:start;padding:5px 9px;border-radius:999px;background:#e52f43;color:#fff;font-size:8px;font-weight:850;text-transform:uppercase;letter-spacing:.05em}
.home .middle-selected-reader__slide-copy h3{margin:0;max-width:780px;font-size:clamp(21px,2vw,32px);line-height:1.02;letter-spacing:-.035em}
.home .middle-selected-reader__slide-copy h3 a{color:#fff;text-shadow:0 2px 16px rgba(0,0,0,.25)}
.home .middle-selected-reader__slide-copy small{color:#c6d0d8;font-size:9px}
.home .middle-selected-reader__thumbs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}
.home .middle-selected-reader__thumb{
  display:grid;
  grid-template-columns:56px minmax(0,1fr);
  align-items:center;
  gap:8px;
  min-width:0;
  min-height:62px;
  padding:6px;
  border:1px solid #283946;
  border-radius:13px;
  background:#14212a;
  color:#dce5eb;
  text-align:left;
  cursor:pointer;
  transition:border-color .2s ease,background .2s ease,transform .2s ease;
}
.home .middle-selected-reader__thumb:hover{transform:translateY(-2px);background:#192933}
.home .middle-selected-reader__thumb.is-active{border-color:#e54557;background:#211b23;box-shadow:0 0 0 2px rgba(229,69,87,.09)}
.home .middle-selected-reader__thumb-media{display:block;width:56px;height:48px;overflow:hidden;border-radius:9px;background:#20313d}
.home .middle-selected-reader__thumb-media img{display:block;width:100%;height:100%;object-fit:cover}
.home .middle-selected-reader__thumb>span:last-child{overflow:hidden;font-size:9px;line-height:1.18;font-weight:750;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}

/* --------------------------------------------------------------------------
   ЕСТЬ НОВОСТИ ИЛИ ПРОБЛЕМА? — selected emotional dark variant #5
   -------------------------------------------------------------------------- */
.home .middle-selected-problem{
  position:relative;
  min-height:310px;
  overflow:hidden;
  border:1px solid #26323e;
  border-radius:30px;
  background:#111922;
  box-shadow:0 17px 45px rgba(9,20,31,.18);
}
.home .middle-selected-problem__media,
.home .middle-selected-problem__media>img,
.home .middle-selected-problem__media>.middle-post-placeholder{
  position:absolute;
  inset:0;
  display:block;
  width:100%;
  height:100%;
}
.home .middle-selected-problem__media>img{object-fit:cover;filter:saturate(.72) brightness(.68)}
.home .middle-selected-problem__shade{
  position:absolute;
  inset:0;
  background:
    linear-gradient(90deg,rgba(5,11,17,.97) 0%,rgba(5,11,17,.82) 38%,rgba(5,11,17,.43) 63%,rgba(5,11,17,.58) 100%),
    linear-gradient(180deg,rgba(9,17,24,.12),rgba(9,17,24,.62));
}
.home .middle-selected-problem__copy{position:relative;z-index:3;max-width:610px;padding:35px 38px 86px}
.home .middle-selected-problem__copy>span{color:#d8e0e8;font-size:9px;font-weight:850;letter-spacing:.14em;text-transform:uppercase}
.home .middle-selected-problem__copy h2{margin:9px 0 11px;color:#fff;font-size:clamp(37px,3.4vw,58px);line-height:.92;font-weight:900;letter-spacing:-.05em}
.home .middle-selected-problem__copy h2 em{color:#f34358;font-style:normal}
.home .middle-selected-problem__copy p{max-width:560px;margin:0 0 18px;color:#c6d0d9;font-size:13px;line-height:1.4}
.home .middle-selected-problem__copy>a{display:inline-flex;align-items:center;justify-content:center;min-height:47px;padding:0 18px;border-radius:13px;background:linear-gradient(135deg,#f43f53,#dc263c);color:#fff;font-size:11px;font-weight:850;box-shadow:0 10px 24px rgba(223,37,59,.25)}
.home .middle-selected-problem__hand{position:absolute;z-index:3;right:7%;top:37%;color:rgba(255,255,255,.88);font-family:"Segoe Print","Bradley Hand",cursive;font-size:22px;line-height:1.25;text-align:center;transform:rotate(-6deg);text-shadow:0 2px 12px rgba(0,0,0,.3)}
.home .middle-selected-problem__steps{position:absolute;z-index:4;left:28px;right:28px;bottom:18px;display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.home .middle-selected-problem__steps>span{display:flex;align-items:center;gap:8px;min-height:48px;padding:8px 12px;border:1px solid rgba(255,255,255,.10);border-radius:13px;background:rgba(14,24,33,.62);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}
.home .middle-selected-problem__steps b{display:grid;place-items:center;width:28px;height:28px;border-radius:9px;background:rgba(244,63,83,.16);color:#ff6174;font-size:13px}
.home .middle-selected-problem__steps small{color:#e6edf3;font-size:9px;font-weight:700}

/* --------------------------------------------------------------------------
   ГОРОДСКИЕ ВОЗМОЖНОСТИ — selected white cards with photo #3
   -------------------------------------------------------------------------- */
.home .middle-selected-opportunities{
  padding:25px 26px 27px;
  border:1px solid #dfe8f2;
  border-radius:28px;
  background:#fff;
  box-shadow:0 12px 34px rgba(28,62,101,.07);
}
.home .middle-selected-opportunities__head{display:flex;align-items:flex-end;justify-content:space-between;gap:22px;margin-bottom:18px}
.home .middle-selected-opportunities__head>div>span{display:block;margin-bottom:5px;color:#2e7dde;font-size:9px;font-weight:850;letter-spacing:.12em;text-transform:uppercase}
.home .middle-selected-opportunities__head h2{margin:0;color:#10233d;font-size:clamp(31px,2.4vw,43px);line-height:1;font-weight:900;letter-spacing:-.045em}
.home .middle-selected-opportunities__head p{margin:7px 0 0;color:#718198;font-size:12px}
.home .middle-selected-opportunities__head>a{display:inline-flex;align-items:center;gap:7px;color:#1673e7;font-size:11px;font-weight:850;white-space:nowrap}
.home .middle-selected-opportunities__grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px}
.home .middle-selected-opportunity{overflow:hidden;border:1px solid #dde7f1;border-radius:20px;background:#fff;box-shadow:0 8px 22px rgba(28,62,101,.06);transition:transform .24s ease,box-shadow .24s ease,border-color .24s ease}
.home .middle-selected-opportunity:hover{transform:translateY(-4px);border-color:#c8dcf2;box-shadow:0 16px 32px rgba(28,62,101,.12)}
.home .middle-selected-opportunity__media{position:relative;display:block;height:168px;overflow:hidden;background:#eaf3fb}
.home .middle-selected-opportunity__media>img,.home .middle-selected-opportunity__media>.middle-ad-placeholder{display:block;width:100%;height:100%;object-fit:cover}
.home .middle-selected-opportunity__media>.middle-ad-placeholder{border-radius:0!important}
.home .middle-selected-opportunity__placeholder{display:grid;place-items:center;width:100%;height:100%;background:linear-gradient(145deg,#edf5fd,#dcecff)}
.home .middle-selected-opportunity__placeholder img{width:68px;height:68px;object-fit:contain}
.home .middle-selected-opportunity__icon{position:absolute;left:13px;bottom:12px;display:grid;place-items:center;width:44px;height:44px;border:4px solid #fff;border-radius:14px;background:#fff;box-shadow:0 8px 18px rgba(20,54,92,.13)}
.home .middle-selected-opportunity__icon img{width:31px;height:31px;object-fit:contain}
.home .middle-selected-opportunity__body{position:relative;min-height:122px;padding:15px 46px 16px 15px}
.home .middle-selected-opportunity__body h3{margin:0 0 5px;color:#142942;font-size:17px;line-height:1.1;font-weight:850}
.home .middle-selected-opportunity__body p{margin:0;color:#6f8094;font-size:10.5px;line-height:1.35}
.home .middle-selected-opportunity__body>a{position:absolute;right:13px;bottom:14px;display:grid;place-items:center;width:31px;height:31px;border-radius:50%;background:#edf6ff;color:#1674e7;font-size:13px;font-weight:900}

/* --------------------------------------------------------------------------
   Responsive polish — keep desktop even and make phone sections feel native.
   -------------------------------------------------------------------------- */
@media(max-width:1180px){
  .home .middle-selected-ads__tiles{grid-template-columns:repeat(5,minmax(150px,1fr));overflow-x:auto;padding-bottom:4px;scroll-snap-type:x proximity}
  .home .middle-selected-ads__tile{min-width:175px;scroll-snap-align:start}
  .home .middle-selected-reader{grid-template-columns:minmax(230px,.7fr) minmax(0,1.55fr)}
  .home .middle-selected-reader__thumb{grid-template-columns:48px minmax(0,1fr)}
  .home .middle-selected-reader__thumb-media{width:48px;height:45px}
}

@media(max-width:900px){
  .home .middle-selected-sell{grid-template-columns:1fr .8fr}
  .home .middle-selected-reader{grid-template-columns:1fr;padding:20px}
  .home .middle-selected-reader__intro{display:grid;grid-template-columns:auto 1fr auto;align-items:center;column-gap:13px;row-gap:5px;padding:0}
  .home .middle-selected-reader__eye{grid-row:1/4;margin:0;width:58px;height:58px;border-radius:18px}
  .home .middle-selected-reader__eye img{width:48px;height:48px}
  .home .middle-selected-reader__kicker{grid-column:2}
  .home .middle-selected-reader__intro h2{grid-column:2;margin:0;font-size:36px;line-height:.95}
  .home .middle-selected-reader__intro p{grid-column:2;margin:0}
  .home .middle-selected-reader__report{grid-column:3;grid-row:1/4}
  .home .middle-selected-reader__all{grid-column:2;margin-top:4px}
  .home .middle-selected-opportunities__grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media(max-width:720px){
  .home .middle-selected-ads,
  .home .middle-selected-sell,
  .home .middle-selected-reader,
  .home .middle-selected-problem,
  .home .middle-selected-opportunities{
    width:calc(100% - 18px)!important;
    margin-top:16px!important;
  }

  .home .middle-selected-ads{padding:17px 14px 15px;border-radius:22px}
  .home .middle-selected-ads__head{align-items:flex-start;margin-bottom:13px}
  .home .middle-selected-ads__head>div>span{font-size:8px}
  .home .middle-selected-ads__head h2{font-size:31px}
  .home .middle-selected-ads__head p{font-size:10.5px}
  .home .middle-selected-ads__head>a{min-height:38px;padding:0 11px;border-radius:12px;font-size:9px}
  .home .middle-selected-ads__tiles{display:flex;gap:9px;margin:0 -14px;padding:0 14px 8px;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none}
  .home .middle-selected-ads__tiles::-webkit-scrollbar{display:none}
  .home .middle-selected-ads__tile{flex:0 0 68%;height:205px;border-radius:18px;scroll-snap-align:start}
  .home .middle-selected-ads__tile-copy strong{font-size:16px}

  .home .middle-selected-sell{display:flex;flex-direction:column;min-height:0;border-radius:23px}
  .home .middle-selected-sell__copy{padding:22px 18px 18px}
  .home .middle-selected-sell__copy>span{font-size:8px}
  .home .middle-selected-sell__copy h2{font-size:37px;margin-top:6px}
  .home .middle-selected-sell__copy>p{font-size:11.5px;margin-bottom:15px}
  .home .middle-selected-sell__copy>a{min-height:45px;font-size:11px}
  .home .middle-selected-sell__stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:17px}
  .home .middle-selected-sell__stats b{font-size:12px}
  .home .middle-selected-sell__stats small{font-size:7.7px}
  .home .middle-selected-sell__visual{min-height:190px}
  .home .middle-selected-sell__visual::after{background:linear-gradient(180deg,#fff 0%,rgba(255,255,255,0) 32%)}
  .home .middle-selected-sell__box{right:13px;bottom:12px;width:55%;padding:12px 13px}
  .home .middle-selected-sell__box b{font-size:12px}.home .middle-selected-sell__box small{font-size:9px}

  .home .middle-selected-reader{padding:15px;border-radius:23px;gap:14px}
  .home .middle-selected-reader__intro{display:flex;align-items:flex-start;padding:2px}
  .home .middle-selected-reader__eye{width:56px;height:56px;margin:0 0 9px}.home .middle-selected-reader__eye img{width:46px;height:46px}
  .home .middle-selected-reader__intro h2{font-size:40px;margin:6px 0 8px}
  .home .middle-selected-reader__intro p{font-size:11.5px;margin-bottom:14px}
  .home .middle-selected-reader__report{min-height:43px;font-size:10px}
  .home .middle-selected-reader__stage{min-height:255px;border-radius:18px}
  .home .middle-selected-reader__slide-copy{left:14px;right:14px;bottom:13px}
  .home .middle-selected-reader__slide-copy h3{font-size:21px}
  .home .middle-selected-reader__thumbs{display:flex;gap:7px;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none}
  .home .middle-selected-reader__thumbs::-webkit-scrollbar{display:none}
  .home .middle-selected-reader__thumb{flex:0 0 72%;grid-template-columns:56px minmax(0,1fr);scroll-snap-align:start}
  .home .middle-selected-reader__thumb-media{width:56px;height:48px}

  .home .middle-selected-problem{min-height:430px;border-radius:23px}
  .home .middle-selected-problem__media>img{object-position:center;filter:saturate(.68) brightness(.62)}
  .home .middle-selected-problem__shade{background:linear-gradient(180deg,rgba(5,11,17,.82) 0%,rgba(5,11,17,.62) 48%,rgba(5,11,17,.91) 100%)}
  .home .middle-selected-problem__copy{padding:23px 18px 145px;max-width:none}
  .home .middle-selected-problem__copy h2{font-size:39px}
  .home .middle-selected-problem__copy p{font-size:11.5px}
  .home .middle-selected-problem__hand{top:auto;right:18px;bottom:121px;font-size:15px}
  .home .middle-selected-problem__steps{left:12px;right:12px;bottom:12px;grid-template-columns:1fr 1fr;gap:7px}
  .home .middle-selected-problem__steps>span{min-height:43px;padding:7px 9px}

  .home .middle-selected-opportunities{padding:17px 14px 15px;border-radius:22px}
  .home .middle-selected-opportunities__head{align-items:flex-start;margin-bottom:13px}
  .home .middle-selected-opportunities__head h2{font-size:31px}
  .home .middle-selected-opportunities__head p{font-size:10.5px}
  .home .middle-selected-opportunities__head>a{font-size:9px}
  .home .middle-selected-opportunities__grid{display:flex;gap:10px;margin:0 -14px;padding:0 14px 7px;overflow-x:auto;scroll-snap-type:x mandatory;scrollbar-width:none}
  .home .middle-selected-opportunities__grid::-webkit-scrollbar{display:none}
  .home .middle-selected-opportunity{flex:0 0 78%;scroll-snap-align:start;border-radius:18px}
  .home .middle-selected-opportunity__media{height:158px}
}

/* --------------------------------------------------------------------------
   Dark theme — selected blocks stay coherent with the rest of the portal.
   -------------------------------------------------------------------------- */
:root[data-middle-theme="dark"] .home .middle-selected-ads,
:root[data-middle-theme="dark"] .home .middle-selected-sell,
:root[data-middle-theme="dark"] .home .middle-selected-opportunities{
  border-color:#2b3e52!important;
  background:#182534!important;
  box-shadow:0 14px 38px rgba(0,0,0,.20)!important;
}
:root[data-middle-theme="dark"] .home .middle-selected-ads__head h2,
:root[data-middle-theme="dark"] .home .middle-selected-sell__copy h2,
:root[data-middle-theme="dark"] .home .middle-selected-opportunities__head h2{color:#f1f6fb!important}
:root[data-middle-theme="dark"] .home .middle-selected-ads__head p,
:root[data-middle-theme="dark"] .home .middle-selected-sell__copy>p,
:root[data-middle-theme="dark"] .home .middle-selected-opportunities__head p{color:#9eafc2!important}
:root[data-middle-theme="dark"] .home .middle-selected-ads__head>a{background:#edf4fb!important;color:#16283f!important}
:root[data-middle-theme="dark"] .home .middle-selected-sell__stats b{color:#eaf1f8!important}
:root[data-middle-theme="dark"] .home .middle-selected-sell__stats small{color:#91a4b8!important}
:root[data-middle-theme="dark"] .home .middle-selected-sell__visual{background:#111e2a!important}
:root[data-middle-theme="dark"] .home .middle-selected-sell__visual::after{background:linear-gradient(90deg,#182534 0%,rgba(24,37,52,.62) 12%,rgba(24,37,52,0) 48%)!important}
:root[data-middle-theme="dark"] .home .middle-selected-opportunity{border-color:#2d4053!important;background:#1b2a39!important;box-shadow:0 8px 24px rgba(0,0,0,.16)!important}
:root[data-middle-theme="dark"] .home .middle-selected-opportunity__icon{border-color:#1b2a39!important;background:#223448!important}
:root[data-middle-theme="dark"] .home .middle-selected-opportunity__body h3{color:#eef4fa!important}
:root[data-middle-theme="dark"] .home .middle-selected-opportunity__body p{color:#9eafc2!important}
:root[data-middle-theme="dark"] .home .middle-selected-opportunity__body>a{background:#1e3855!important;color:#8fc0ff!important}
@media(max-width:720px){
  :root[data-middle-theme="dark"] .home .middle-selected-sell__visual::after{background:linear-gradient(180deg,#182534 0%,rgba(24,37,52,0) 34%)!important}
}


/* ==========================================================================
   Middle Community 0.4.20 — desktop magazine layout for homepage
   Row 1: Today 70% | Weather + buses 30% (existing topzone)
   Row 2: Reader 70% | News/problem 30%
   Row 3: Ads 70% | Sell CTA 30%
   Row 4: Discussed 70% | Attention 30%
   Then Opportunities + Region full width; Useful + Photos 50/50.
   ========================================================================== */

.home .middle-home-pair,
.home .middle-home-bottom-pair{
  width:min(var(--mc-home-canvas,1540px),calc(100% - 44px));
  margin:24px auto 0;
  box-sizing:border-box;
}

@media(min-width:901px){
  .home .middle-home-pair{
    display:grid;
    grid-template-columns:minmax(0,7fr) minmax(320px,3fr);
    gap:18px;
    align-items:stretch;
  }
  .home .middle-home-pair__major,
  .home .middle-home-pair__minor{
    min-width:0;
    display:flex;
  }

  /* Child blocks use the pair column rather than their old full-canvas width. */
  .home .middle-home-pair .middle-selected-reader,
  .home .middle-home-pair .middle-selected-problem,
  .home .middle-home-pair .middle-selected-ads,
  .home .middle-home-pair .middle-selected-sell,
  .home .middle-home-pair .middle-exact-discuss,
  .home .middle-home-pair .middle-exact-attention{
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    box-sizing:border-box!important;
  }

  /* ---------- Row 2: Чепецк без прикрас | Есть новости/проблема ---------- */
  .home .middle-home-pair--reader .middle-selected-reader{
    min-height:430px;
    grid-template-columns:minmax(220px,.62fr) minmax(0,1.6fr);
    padding:20px;
    gap:16px;
  }
  .home .middle-home-pair--reader .middle-selected-reader__intro h2{
    font-size:clamp(34px,2.45vw,50px);
  }
  .home .middle-home-pair--reader .middle-selected-reader__intro p{
    font-size:11.5px;
  }
  .home .middle-home-pair--reader .middle-selected-reader__stage{
    min-height:286px;
  }
  .home .middle-home-pair--reader .middle-selected-reader__thumb{
    grid-template-columns:45px minmax(0,1fr);
    min-height:56px;
  }
  .home .middle-home-pair--reader .middle-selected-reader__thumb-media{
    width:45px;
    height:42px;
  }

  /* The existing wide CTA becomes a compact vertical card in the 30% column. */
  .home .middle-home-pair--reader .middle-selected-problem{
    min-height:430px;
    height:100%;
    border-radius:28px;
  }
  .home .middle-home-pair--reader .middle-selected-problem__shade{
    background:linear-gradient(180deg,rgba(5,11,17,.80) 0%,rgba(5,11,17,.62) 45%,rgba(5,11,17,.94) 100%);
  }
  .home .middle-home-pair--reader .middle-selected-problem__copy{
    max-width:none;
    padding:28px 24px 158px;
  }
  .home .middle-home-pair--reader .middle-selected-problem__copy h2{
    font-size:clamp(31px,2.3vw,43px);
  }
  .home .middle-home-pair--reader .middle-selected-problem__copy p{
    font-size:11px;
  }
  .home .middle-home-pair--reader .middle-selected-problem__hand{
    top:auto;
    right:22px;
    bottom:122px;
    font-size:15px;
  }
  .home .middle-home-pair--reader .middle-selected-problem__steps{
    left:16px;
    right:16px;
    bottom:15px;
    grid-template-columns:1fr 1fr;
    gap:6px;
  }
  .home .middle-home-pair--reader .middle-selected-problem__steps>span{
    min-height:41px;
    padding:6px 8px;
  }

  /* ---------- Row 3: Объявления | Есть что продать ---------- */
  .home .middle-home-pair--ads .middle-selected-ads{
    height:100%;
    padding:22px 22px 24px;
    border-radius:27px;
  }
  .home .middle-home-pair--ads .middle-selected-ads__head h2{
    font-size:clamp(29px,2.15vw,40px);
  }
  .home .middle-home-pair--ads .middle-selected-ads__tiles{
    grid-template-columns:repeat(5,minmax(0,1fr));
    gap:9px;
  }
  .home .middle-home-pair--ads .middle-selected-ads__tile{
    height:205px;
  }
  .home .middle-home-pair--ads .middle-selected-ads__tile-copy{
    left:12px;
    right:38px;
    bottom:12px;
  }
  .home .middle-home-pair--ads .middle-selected-ads__tile-copy strong{
    font-size:14px;
  }

  .home .middle-home-pair--ads .middle-selected-sell{
    display:flex;
    flex-direction:column;
    min-height:0;
    height:100%;
    border-radius:28px;
  }
  .home .middle-home-pair--ads .middle-selected-sell__copy{
    flex:1 1 auto;
    justify-content:flex-start;
    padding:25px 23px 18px;
  }
  .home .middle-home-pair--ads .middle-selected-sell__copy h2{
    font-size:clamp(30px,2.25vw,42px);
  }
  .home .middle-home-pair--ads .middle-selected-sell__copy>p{
    font-size:11px;
    margin-bottom:15px;
  }
  .home .middle-home-pair--ads .middle-selected-sell__copy>a{
    min-height:44px;
    font-size:10.5px;
  }
  .home .middle-home-pair--ads .middle-selected-sell__stats{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:7px;
    margin-top:17px;
  }
  .home .middle-home-pair--ads .middle-selected-sell__stats b{
    font-size:11px;
  }
  .home .middle-home-pair--ads .middle-selected-sell__stats small{
    font-size:7.4px;
  }
  .home .middle-home-pair--ads .middle-selected-sell__visual{
    flex:0 0 154px;
    min-height:154px;
  }
  .home .middle-home-pair--ads .middle-selected-sell__visual::after{
    background:linear-gradient(180deg,#fff 0%,rgba(255,255,255,0) 38%);
  }
  .home .middle-home-pair--ads .middle-selected-sell__box{
    right:12px;
    bottom:11px;
    width:58%;
    padding:10px 11px;
  }
  .home .middle-home-pair--ads .middle-selected-sell__box b{
    font-size:11px;
  }
  .home .middle-home-pair--ads .middle-selected-sell__box small{
    font-size:8px;
  }

  /* ---------- Row 4: Сейчас обсуждают | В центре внимания ---------- */
  .home .middle-home-pair--discussion .middle-exact-discuss{
    min-height:100%;
  }
  .home .middle-home-pair--discussion .middle-exact-discuss__grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:10px!important;
  }
  .home .middle-home-pair--discussion .middle-exact-discuss-card{
    min-height:118px;
  }

  .home .middle-home-pair--discussion .middle-exact-attention{
    padding:17px!important;
    border:1px solid #dfe8f2!important;
    border-radius:22px!important;
    background:#fff!important;
    box-shadow:0 8px 24px rgba(37,60,88,.06)!important;
  }
  .home .middle-home-pair--discussion .middle-exact-attention-featured{
    grid-template-columns:96px minmax(0,1fr)!important;
  }
  .home .middle-home-pair--discussion .middle-exact-attention-featured__media{
    min-height:102px!important;
  }
  .home .middle-home-pair--discussion .middle-exact-attention-featured__copy h3{
    font-size:14px!important;
  }
  .home .middle-home-pair--discussion .middle-exact-attention-item{
    min-height:48px!important;
  }

  /* ---------- Bottom: Полезное | Фото ---------- */
  .home .middle-home-bottom-pair{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:18px;
    align-items:stretch;
  }
  .home .middle-home-bottom-pair__item{
    min-width:0;
    display:flex;
  }
  .home .middle-home-bottom-pair .middle-exact-useful,
  .home .middle-home-bottom-pair .middle-exact-photos{
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    box-sizing:border-box!important;
  }
  .home .middle-home-bottom-pair .middle-exact-useful{
    padding:18px!important;
    border:1px solid #dfe8f2!important;
    border-radius:22px!important;
    background:#fff!important;
    box-shadow:0 8px 24px rgba(37,60,88,.06)!important;
  }
  .home .middle-home-bottom-pair .middle-exact-useful__grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:9px!important;
  }
  .home .middle-home-bottom-pair .middle-exact-useful-card{
    min-height:88px!important;
  }
  .home .middle-home-bottom-pair .middle-exact-photos{
    height:100%;
  }
}

/* Mid-size desktop: keep the magazine idea but avoid crushed 30% columns. */
@media(min-width:901px) and (max-width:1180px){
  .home .middle-home-pair{
    grid-template-columns:minmax(0,1.75fr) minmax(300px,.85fr);
  }
  .home .middle-home-pair--ads .middle-selected-ads__tiles{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    overflow:visible!important;
  }
  .home .middle-home-pair--ads .middle-selected-ads__tile{
    min-width:0!important;
    height:170px!important;
  }
  .home .middle-home-pair--reader .middle-selected-reader{
    grid-template-columns:1fr;
  }
  .home .middle-home-pair--reader .middle-selected-reader__intro{
    display:grid;
    grid-template-columns:auto minmax(0,1fr);
    align-items:center;
    gap:5px 12px;
  }
  .home .middle-home-pair--reader .middle-selected-reader__eye{
    grid-row:1/5;
    margin:0;
  }
}

/* Tablet/mobile: preserve the user's existing visual blocks; stack pairs. */
@media(max-width:900px){
  .home .middle-home-pair,
  .home .middle-home-bottom-pair{
    width:calc(100% - 18px)!important;
    margin-top:16px!important;
    display:flex!important;
    flex-direction:column!important;
    gap:16px!important;
  }
  .home .middle-home-pair__major,
  .home .middle-home-pair__minor,
  .home .middle-home-bottom-pair__item{
    display:block!important;
    width:100%!important;
  }

  .home .middle-home-pair .middle-selected-reader,
  .home .middle-home-pair .middle-selected-problem,
  .home .middle-home-pair .middle-selected-ads,
  .home .middle-home-pair .middle-selected-sell,
  .home .middle-home-pair .middle-exact-discuss,
  .home .middle-home-pair .middle-exact-attention,
  .home .middle-home-bottom-pair .middle-exact-useful,
  .home .middle-home-bottom-pair .middle-exact-photos{
    width:100%!important;
    margin:0!important;
  }

  /* On phones keep logical reading order: content first, action second. */
  .home .middle-home-pair--reader .middle-home-pair__major{order:1}
  .home .middle-home-pair--reader .middle-home-pair__minor{order:2}
  .home .middle-home-pair--ads .middle-home-pair__major{order:1}
  .home .middle-home-pair--ads .middle-home-pair__minor{order:2}
  .home .middle-home-pair--discussion .middle-home-pair__major{order:1}
  .home .middle-home-pair--discussion .middle-home-pair__minor{order:2}
}

/* Dark theme support for the new row wrappers only; block palettes stay unchanged. */
:root[data-middle-theme="dark"] .home .middle-home-pair--discussion .middle-exact-attention,
:root[data-middle-theme="dark"] .home .middle-home-bottom-pair .middle-exact-useful{
  border-color:#2b3e52!important;
  background:#182534!important;
  box-shadow:0 8px 24px rgba(0,0,0,.18)!important;
}
:root[data-middle-theme="dark"] .home .middle-home-pair--ads .middle-selected-sell__visual::after{
  background:linear-gradient(180deg,#182534 0%,rgba(24,37,52,0) 38%)!important;
}


/* ==========================================================================
   Middle Community 0.4.21 — compact first row + region after reader
   Fix visual blank under "Сегодня в Чепецке" by compacting the desktop aside.
   ========================================================================== */

@media(min-width:901px){
  /* Slightly tighter first row so the right aside is closer to the left column height. */
  .home .middle-exact-topzone{
    grid-template-columns:minmax(0,1fr) 320px!important;
    gap:16px!important;
    margin-bottom:18px!important;
  }

  /* Weather widget: make it denser but keep readability. */
  .home .middle-exact-weather{
    padding:14px!important;
  }
  .home .middle-exact-weather__top{
    gap:10px!important;
  }
  .home .middle-exact-weather__sun{
    font-size:34px!important;
  }
  .home .middle-exact-weather__top strong{
    font-size:14px!important;
  }
  .home .middle-exact-weather__top small{
    font-size:9.5px!important;
  }
  .home .middle-exact-weather__live{
    min-height:62px!important;
    margin:8px 0 7px!important;
    padding:8px 10px!important;
    border-radius:13px!important;
  }
  .home .middle-exact-weather__live .middle-header-weather{
    min-height:44px!important;
    gap:10px!important;
  }
  .home .middle-exact-weather__live .middle-header-weather__icon{
    font-size:28px!important;
  }
  .home .middle-exact-weather__live .middle-header-weather strong{
    font-size:28px!important;
  }
  .home .middle-exact-weather__city{
    gap:2px!important;
    padding:2px 2px 7px!important;
  }
  .home .middle-exact-weather__city strong{
    font-size:12px!important;
  }
  .home .middle-exact-weather__city span{
    font-size:9.4px!important;
    line-height:1.32!important;
  }
  .home .middle-exact-weather__link{
    min-height:36px!important;
    padding:0 11px!important;
    border-radius:10px!important;
    font-size:10px!important;
  }

  /* Buses widget: tighter map + rows so the whole aside doesn't push a large blank under the left column. */
  .home .middle-exact-bus{
    padding:14px!important;
  }
  .home .middle-exact-bus header strong{
    font-size:13px!important;
  }
  .home .middle-exact-bus header>a{
    font-size:9px!important;
  }
  .home .middle-exact-bus>small{
    margin:3px 0 6px!important;
    font-size:8.7px!important;
  }
  .home .middle-exact-bus__map{
    min-height:92px!important;
    padding:10px!important;
    border-radius:13px!important;
  }
  .home .middle-exact-bus__map-badge{
    top:9px!important;
    left:10px!important;
    min-height:22px!important;
    padding:0 8px!important;
    font-size:7.8px!important;
  }
  .home .middle-exact-bus__map-canvas{
    min-height:48px!important;
    border-radius:10px!important;
  }
  .home .middle-exact-bus__map-copy{
    gap:2px!important;
  }
  .home .middle-exact-bus__map-copy strong{
    font-size:10px!important;
  }
  .home .middle-exact-bus__map-copy em{
    font-size:7.9px!important;
  }
  .home .middle-exact-bus__row{
    min-height:34px!important;
    gap:7px!important;
    font-size:9.5px!important;
  }
  .home .middle-exact-bus__row>b{
    width:26px!important;
    height:21px!important;
    font-size:10px!important;
  }
  .home .middle-exact-bus__row i{
    font-size:8px!important;
  }
  .home .middle-exact-bus__all{
    min-height:34px!important;
    margin-top:6px!important;
    font-size:9px!important;
  }

  /* Region showcase now follows "Чепецк без прикрас" and should breathe a little. */
  .home .middle-exact-region-showcase{
    margin-top:18px!important;
  }
}

@media(min-width:901px) and (max-width:1180px){
  .home .middle-exact-topzone{
    grid-template-columns:minmax(0,1fr) 300px!important;
  }
}


/* ==========================================================================
   Middle Community 0.4.22 — ONE portal shell everywhere
   Internal pages now use the homepage canvas, header and menu system.
   ========================================================================== */

:root{
  --mc-site-canvas:1540px;
  --mc-home-canvas:var(--mc-site-canvas);
  --mc-page-canvas:var(--mc-site-canvas);
}

body:not(.home):not(.front-page){
  background:#f5f8fc!important;
}

/* Same left/right edges as homepage for all major internal-page shells. */
body:not(.home):not(.front-page) .middle-layout,
body:not(.home):not(.front-page) .middle-layout.middle-layout--portal-full,
body:not(.home):not(.front-page) .middle-ad-zone--top,
body:not(.home):not(.front-page) .middle-footer-home{
  width:min(var(--mc-site-canvas),calc(100% - 44px))!important;
  max-width:none!important;
  margin-left:auto!important;
  margin-right:auto!important;
}

body:not(.home):not(.front-page) .middle-layout.middle-layout--portal-full{
  display:block!important;
  grid-template-columns:none!important;
  gap:0!important;
}

/* --------------------------------------------------------------------------
   DESKTOP HEADER — exact homepage geometry
   -------------------------------------------------------------------------- */
@media(min-width:721px){
  body:not(.home):not(.front-page) .middle-site-header{
    --mc-nav-offset:52px;
    position:sticky!important;
    top:0!important;
    z-index:1200!important;
    height:auto!important;
    min-height:0!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-bottom:0!important;
    background:#fff!important;
    box-shadow:0 1px 0 rgba(18,42,75,.07)!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
    pointer-events:auto!important;
    transition:box-shadow .28s ease,background .28s ease!important;
  }
  body.admin-bar:not(.home):not(.front-page) .middle-site-header{top:32px!important}

  body:not(.home):not(.front-page) .middle-header-row{
    width:min(var(--mc-site-canvas),calc(100% - 44px))!important;
    max-width:none!important;
    min-height:74px!important;
    height:auto!important;
    margin:0 auto!important;
    padding:0!important;
    gap:18px!important;
    align-items:center!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
    transition:min-height .25s ease!important;
  }

  body:not(.home):not(.front-page) .middle-brand{
    flex:0 0 auto!important;
    width:auto!important;
    min-width:245px!important;
    gap:10px!important;
    color:#0e2444!important;
  }
  body:not(.home):not(.front-page) .middle-brand .custom-logo,
  body:not(.home):not(.front-page) .middle-brand__mark--icon img{
    width:auto!important;
    max-height:48px!important;
  }
  body:not(.home):not(.front-page) .middle-brand__text{
    color:#0e2444!important;
    font-size:25px!important;
    line-height:1!important;
    font-weight:850!important;
    letter-spacing:-.035em!important;
  }

  body:not(.home):not(.front-page) .middle-home-header-search{
    display:flex!important;
    align-items:center!important;
    flex:1 1 520px!important;
    width:auto!important;
    max-width:620px!important;
    min-width:300px!important;
    height:46px!important;
    min-height:46px!important;
    margin-left:auto!important;
    margin-right:0!important;
    padding:0 16px!important;
    gap:0!important;
    border:1px solid #e1e8f1!important;
    border-radius:14px!important;
    background:#f3f7fb!important;
    box-shadow:none!important;
  }
  body:not(.home):not(.front-page) .middle-home-header-search svg{
    width:18px!important;height:18px!important;flex:0 0 18px!important;
    fill:none!important;stroke:#7a91af!important;stroke-width:1.8!important;
  }
  body:not(.home):not(.front-page) .middle-home-header-search input{
    width:100%!important;height:100%!important;min-width:0!important;
    margin:0!important;padding:0 0 0 10px!important;border:0!important;outline:0!important;
    background:transparent!important;color:#1c2d44!important;font-size:14px!important;box-shadow:none!important;
  }
  body:not(.home):not(.front-page) .middle-home-header-search input::placeholder{color:#9aacc0!important}

  body:not(.home):not(.front-page) .middle-header-tools{
    position:static!important;
    display:flex!important;
    align-items:center!important;
    gap:9px!important;
    flex:0 0 auto!important;
    width:auto!important;
    height:auto!important;
    min-height:0!important;
    margin-left:0!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;
  }

  /* Same visible controls as homepage. */
  body:not(.home):not(.front-page) .middle-mobile-home-link,
  body:not(.home):not(.front-page) .middle-header-tools>.middle-search-toggle,
  body:not(.home):not(.front-page) .middle-header-tools>.middle-theme-toggle--desktop,
  body:not(.home):not(.front-page) .middle-header-tools>.middle-messages-link,
  body:not(.home):not(.front-page) .middle-header-tools>.middle-write-link{
    display:none!important;
  }

  body:not(.home):not(.front-page) .middle-header-weather{
    order:1!important;display:flex!important;height:44px!important;min-width:112px!important;
    padding:0 9px!important;border:0!important;background:transparent!important;box-shadow:none!important;
  }
  body:not(.home):not(.front-page) .middle-header-weather__icon{font-size:24px!important}
  body:not(.home):not(.front-page) .middle-header-weather strong{font-size:18px!important;color:#11223d!important}

  body:not(.home):not(.front-page) .middle-home-header-bell{
    order:2!important;position:relative!important;display:grid!important;place-items:center!important;
    width:44px!important;height:44px!important;min-width:44px!important;padding:0!important;
    border:1px solid #e1e8f1!important;border-radius:13px!important;background:#fff!important;color:#203653!important;box-shadow:none!important;
  }
  body:not(.home):not(.front-page) .middle-home-header-bell svg{
    width:20px!important;height:20px!important;fill:none!important;stroke:currentColor!important;stroke-width:1.7!important;
  }

  body:not(.home):not(.front-page) .middle-account-link{
    order:3!important;display:inline-flex!important;min-width:104px!important;width:auto!important;
    height:44px!important;min-height:44px!important;padding:0 13px!important;border-radius:12px!important;
    font-size:13px!important;font-weight:750!important;
  }
  body:not(.home):not(.front-page) .middle-account-link--guest{
    border:1px solid #2481ff!important;background:#fff!important;color:#1474ee!important;box-shadow:none!important;
  }
  body:not(.home):not(.front-page) .middle-account-link svg{width:17px!important;height:17px!important}

  body:not(.home):not(.front-page) .middle-header-dropdown--menu{
    order:4!important;position:static!important;width:auto!important;height:auto!important;margin:0!important;padding:0!important;
  }

  /* Exact same hamburger button as homepage. */
  body:not(.home):not(.front-page) .middle-header-tools .middle-header-dropdown--menu>.middle-nav-toggle{
    display:grid!important;place-items:center!important;
    width:44px!important;min-width:44px!important;max-width:44px!important;height:44px!important;min-height:44px!important;
    margin:0!important;padding:0!important;gap:0!important;border:0!important;border-radius:12px!important;
    background:transparent!important;color:#142a46!important;box-shadow:none!important;
  }
  body:not(.home):not(.front-page) .middle-header-tools .middle-header-dropdown--menu>.middle-nav-toggle>svg,
  body:not(.home):not(.front-page) .middle-header-tools .middle-header-dropdown--menu>.middle-nav-toggle>span{
    display:none!important;
  }
  body:not(.home):not(.front-page) .middle-header-tools .middle-header-dropdown--menu>.middle-nav-toggle::before{
    content:"☰"!important;display:block!important;color:currentColor!important;font-size:25px!important;line-height:1!important;font-weight:500!important;
  }

  /* Same second row as homepage. */
  body:not(.home):not(.front-page) .middle-home-topnav{
    display:flex!important;align-items:center!important;
    width:min(var(--mc-site-canvas),calc(100% - 44px))!important;max-width:none!important;
    height:52px!important;margin:0 auto!important;padding:0!important;
    border:0!important;border-top:1px solid #f0f4f8!important;border-bottom:0!important;background:#fff!important;
  }
  body:not(.home):not(.front-page) .middle-home-topnav__scroll{
    display:flex!important;align-items:center!important;justify-content:flex-start!important;
    width:100%!important;max-width:none!important;height:52px!important;margin:0!important;gap:4px!important;
    overflow-x:auto!important;scrollbar-width:none!important;
  }
  body:not(.home):not(.front-page) .middle-home-topnav__scroll::-webkit-scrollbar{display:none!important}
  body:not(.home):not(.front-page) .middle-home-topnav a,
  body:not(.home):not(.front-page) .middle-home-topnav__more{
    display:inline-flex!important;align-items:center!important;justify-content:center!important;flex:0 0 auto!important;
    height:40px!important;min-height:40px!important;margin:0!important;padding:0 12px!important;gap:7px!important;
    border:0!important;border-radius:10px!important;background:transparent!important;color:#14263f!important;
    font-size:12.5px!important;font-weight:720!important;white-space:nowrap!important;transform:none!important;
  }
  body:not(.home):not(.front-page) .middle-home-topnav a:hover,
  body:not(.home):not(.front-page) .middle-home-topnav__more:hover{
    background:#f2f7fd!important;color:#1474ee!important;transform:none!important;
  }
  body:not(.home):not(.front-page) .middle-home-topnav a span{
    display:grid!important;place-items:center!important;width:22px!important;height:22px!important;
  }
  body:not(.home):not(.front-page) .middle-home-topnav a span img{width:20px!important;height:20px!important;object-fit:contain!important}
  body:not(.home):not(.front-page) .middle-home-topnav__more span{
    display:inline!important;width:auto!important;height:auto!important;font-size:16px!important;letter-spacing:1px!important;
  }

  /* Same sticky shrink state. */
  body:not(.home):not(.front-page) .middle-site-header.is-scrolled{
    --mc-nav-offset:46px;
    box-shadow:0 12px 34px rgba(19,47,80,.10)!important;
  }
  body:not(.home):not(.front-page) .middle-site-header.is-scrolled .middle-header-row{min-height:64px!important}
  body:not(.home):not(.front-page) .middle-site-header.is-scrolled .middle-home-topnav,
  body:not(.home):not(.front-page) .middle-site-header.is-scrolled .middle-home-topnav__scroll{height:46px!important}
  body:not(.home):not(.front-page) .middle-site-header.is-scrolled .middle-brand .custom-logo,
  body:not(.home):not(.front-page) .middle-site-header.is-scrolled .middle-brand__mark--icon img{max-height:42px!important}
}

@media(min-width:721px) and (max-width:782px){
  body.admin-bar:not(.home):not(.front-page) .middle-site-header{top:46px!important}
}

/* Same detached right-side drawer everywhere. */
body:not(.home):not(.front-page)>.middle-side-drawer.middle-primary-nav.middle-top-sheet{
  position:fixed!important;z-index:1500!important;top:0!important;right:0!important;bottom:0!important;left:auto!important;
  width:min(430px,92vw)!important;height:100dvh!important;max-height:none!important;margin:0!important;padding:0!important;
  overflow:hidden!important;border:0!important;border-left:1px solid #dce5ef!important;border-radius:26px 0 0 26px!important;
  background:#fff!important;box-shadow:-34px 0 90px rgba(11,31,55,.25)!important;
  opacity:1!important;visibility:hidden!important;pointer-events:none!important;transform:translate3d(105%,0,0)!important;
  filter:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;
}
body:not(.home):not(.front-page)>.middle-side-drawer.middle-primary-nav.middle-top-sheet.is-open{
  visibility:visible!important;pointer-events:auto!important;transform:translate3d(0,0,0)!important;
}
body.admin-bar:not(.home):not(.front-page)>.middle-side-drawer.middle-primary-nav.middle-top-sheet{
  top:32px!important;height:calc(100dvh - 32px)!important;
}

/* Dark desktop header: same geometry, dark palette. */
@media(min-width:721px){
  html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-site-header{
    background:#111c28!important;border:0!important;box-shadow:0 1px 0 rgba(255,255,255,.07)!important;
  }
  html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-brand,
  html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-brand__text{color:#f1f6fb!important}
  html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-home-header-search{
    border-color:#2c4054!important;background:#172432!important;
  }
  html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-home-header-search input{color:#eef4fa!important}
  html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-home-header-search input::placeholder{color:#73879c!important}
  html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-header-weather{background:transparent!important;color:#e8f0f8!important}
  html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-header-weather strong{color:#e8f0f8!important}
  html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-home-header-bell,
  html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-account-link{
    border-color:#2c4054!important;background:#182635!important;color:#dce7f2!important;
  }
  html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-account-link--guest{
    border-color:#3b78bf!important;background:#182635!important;color:#8ec0ff!important;
  }
  html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-header-tools .middle-header-dropdown--menu>.middle-nav-toggle{
    background:transparent!important;color:#dce7f2!important;
  }
  html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-home-topnav{
    border-top-color:#223446!important;background:#111c28!important;
  }
  html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-home-topnav a,
  html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-home-topnav__more{color:#c8d5e3!important}
  html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-home-topnav a:hover,
  html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-home-topnav__more:hover{
    background:#1c3043!important;color:#85bbff!important;
  }
}

/* --------------------------------------------------------------------------
   MOBILE — same approved five-tab app bar as homepage
   -------------------------------------------------------------------------- */
@media(max-width:720px){
  :root{--middle-mobile-nav-height:76px;--middle-mobile-nav-bottom:0px}

  body:not(.home):not(.front-page) .middle-site-header{
    position:relative!important;top:0!important;height:0!important;min-height:0!important;margin:0!important;padding:0!important;
    border:0!important;background:transparent!important;box-shadow:none!important;overflow:visible!important;pointer-events:none!important;
  }
  body:not(.home):not(.front-page) .middle-header-row{
    width:100%!important;max-width:none!important;height:0!important;min-height:0!important;margin:0!important;padding:0!important;gap:0!important;
    border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;overflow:visible!important;pointer-events:none!important;
  }
  body:not(.home):not(.front-page) .middle-brand,
  body:not(.home):not(.front-page) .middle-home-header-search,
  body:not(.home):not(.front-page) .middle-header-weather,
  body:not(.home):not(.front-page) .middle-home-header-bell,
  body:not(.home):not(.front-page) .middle-theme-toggle--desktop,
  body:not(.home):not(.front-page) .middle-home-topnav{display:none!important}

  body:not(.home):not(.front-page) .middle-header-tools{
    position:fixed!important;z-index:270!important;left:0!important;right:0!important;bottom:0!important;
    display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;grid-template-rows:66px!important;
    align-items:stretch!important;justify-items:stretch!important;width:100%!important;max-width:none!important;
    height:calc(76px + env(safe-area-inset-bottom))!important;min-height:76px!important;margin:0!important;
    padding:5px 6px max(5px,env(safe-area-inset-bottom))!important;gap:0!important;
    border:0!important;border-top:1px solid rgba(211,221,234,.96)!important;border-radius:22px 22px 0 0!important;
    background:rgba(255,255,255,.985)!important;box-shadow:0 -10px 32px rgba(24,48,76,.13)!important;
    backdrop-filter:none!important;-webkit-backdrop-filter:none!important;pointer-events:auto!important;overflow:visible!important;
  }

  body:not(.home):not(.front-page) .middle-mobile-home-link{grid-column:1!important;grid-row:1!important}
  body:not(.home):not(.front-page) .middle-header-tools>.middle-search-toggle{grid-column:2!important;grid-row:1!important}
  body:not(.home):not(.front-page) .middle-header-tools>.middle-write-link{grid-column:3!important;grid-row:1!important}
  body:not(.home):not(.front-page) .middle-header-tools>.middle-messages-link,
  body:not(.home):not(.front-page) .middle-header-tools>.middle-account-link:not(.middle-profile-link){grid-column:4!important;grid-row:1!important}
  body:not(.home):not(.front-page) .middle-header-dropdown--menu{grid-column:5!important;grid-row:1!important}
  body:not(.home):not(.front-page) .middle-header-tools>.middle-header-weather,
  body:not(.home):not(.front-page) .middle-header-tools>.middle-theme-toggle--desktop,
  body:not(.home):not(.front-page) .middle-header-tools>.middle-home-header-bell,
  body:not(.home):not(.front-page) .middle-header-tools>.middle-profile-link{display:none!important}

  body:not(.home):not(.front-page) .middle-mobile-home-link,
  body:not(.home):not(.front-page) .middle-header-tools>.middle-search-toggle,
  body:not(.home):not(.front-page) .middle-header-tools>.middle-write-link,
  body:not(.home):not(.front-page) .middle-header-tools>.middle-messages-link,
  body:not(.home):not(.front-page) .middle-header-tools>.middle-account-link:not(.middle-profile-link),
  body:not(.home):not(.front-page) .middle-header-dropdown--menu,
  body:not(.home):not(.front-page) .middle-header-dropdown--menu>.middle-nav-toggle{
    position:relative!important;inset:auto!important;width:100%!important;min-width:0!important;max-width:none!important;
    height:66px!important;min-height:66px!important;margin:0!important;padding:4px 1px 5px!important;
    display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:flex-end!important;gap:5px!important;
    border:0!important;border-radius:15px!important;background:transparent!important;box-shadow:none!important;transform:none!important;
    text-align:center!important;overflow:visible!important;pointer-events:auto!important;
  }

  body:not(.home):not(.front-page) .middle-mobile-home-link__brand,
  body:not(.home):not(.front-page) .middle-header-tools>.middle-search-toggle svg,
  body:not(.home):not(.front-page) .middle-header-tools>.middle-messages-link svg,
  body:not(.home):not(.front-page) .middle-header-tools>.middle-account-link:not(.middle-profile-link) svg,
  body:not(.home):not(.front-page) .middle-header-dropdown--menu>.middle-nav-toggle>.middle-menu-dots-icon{
    width:25px!important;height:25px!important;min-width:25px!important;min-height:25px!important;flex:0 0 25px!important;margin:0 auto!important;
  }
  body:not(.home):not(.front-page) .middle-header-dropdown--menu>.middle-nav-toggle>.middle-menu-dots-icon{
    display:block!important;fill:currentColor!important;stroke:none!important;
  }
  body:not(.home):not(.front-page) .middle-header-dropdown--menu>.middle-nav-toggle>.middle-chevron{display:none!important}

  body:not(.home):not(.front-page) .middle-header-tools>.middle-write-link .middle-publish-plus-icon{
    display:block!important;width:48px!important;height:48px!important;min-width:48px!important;min-height:48px!important;flex:0 0 48px!important;
    margin:-8px auto 0!important;padding:12px!important;border:3px solid #fff!important;border-radius:50%!important;
    background:linear-gradient(145deg,#2f98ff,#1473eb)!important;color:#fff!important;stroke:#fff!important;stroke-width:2.2!important;
    fill:none!important;box-shadow:0 9px 22px rgba(26,118,235,.31)!important;
  }

  body:not(.home):not(.front-page) .middle-mobile-home-link>span,
  body:not(.home):not(.front-page) .middle-header-tools .middle-mobile-nav-label,
  body:not(.home):not(.front-page) .middle-header-tools>.middle-write-link>span,
  body:not(.home):not(.front-page) .middle-header-tools>.middle-account-link:not(.middle-profile-link)>span,
  body:not(.home):not(.front-page) .middle-header-dropdown--menu>.middle-nav-toggle>span{
    display:block!important;position:static!important;visibility:visible!important;opacity:1!important;
    width:100%!important;max-width:100%!important;height:auto!important;min-height:11px!important;margin:0!important;padding:0!important;
    border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;color:#52647b!important;
    font-size:9.2px!important;line-height:1!important;font-weight:650!important;letter-spacing:0!important;text-align:center!important;
    white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;transform:none!important;
  }
  body:not(.home):not(.front-page) .middle-mobile-home-link>span,
  body:not(.home):not(.front-page) .middle-header-tools>.middle-write-link>span{color:#1f78e5!important;font-weight:750!important}

  body:not(.home):not(.front-page) .middle-layout{padding-bottom:calc(98px + env(safe-area-inset-bottom))!important}
  body:not(.home):not(.front-page) .middle-site-footer{padding-bottom:calc(96px + env(safe-area-inset-bottom))!important}
}

@media(max-width:782px){
  body.admin-bar:not(.home):not(.front-page)>.middle-side-drawer.middle-primary-nav.middle-top-sheet{
    top:46px!important;height:calc(100dvh - 46px)!important;
  }
}

@media(max-width:720px){
  html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-header-tools{
    border-top-color:#314458!important;background:rgba(18,28,39,.985)!important;box-shadow:0 -10px 30px rgba(0,0,0,.32)!important;
  }
  html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-mobile-home-link>span,
  html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-header-tools .middle-mobile-nav-label,
  html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-header-tools>.middle-write-link>span,
  html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-header-tools>.middle-account-link:not(.middle-profile-link)>span,
  html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-header-dropdown--menu>.middle-nav-toggle>span{
    color:#c8d6e5!important;
  }
  html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-mobile-home-link>span,
  html:root[data-middle-theme="dark"] body:not(.home):not(.front-page) .middle-header-tools>.middle-write-link>span{
    color:#79b6ff!important;
  }
}


/* ==========================================================================
   Middle Community 0.4.23 — stable header + identical desktop search
   ========================================================================== */

@media(min-width:721px){
  /*
   * The header no longer changes size while scrolling. This prevents the logo
   * from shrinking/shifting and keeps the whole first row visually fixed.
   */
  html body .middle-site-header,
  html body .middle-site-header.is-scrolled{
    --mc-nav-offset:52px!important;
    position:sticky!important;
    top:0!important;
    z-index:1200!important;
    height:auto!important;
    min-height:0!important;
    padding:0!important;
    border:0!important;
    background:#fff!important;
    box-shadow:0 1px 0 rgba(18,42,75,.07)!important;
    transition:box-shadow .18s ease!important;
  }

  html body.admin-bar .middle-site-header,
  html body.admin-bar .middle-site-header.is-scrolled{
    top:32px!important;
  }

  html body .middle-header-row,
  html body .middle-site-header.is-scrolled .middle-header-row{
    width:min(var(--mc-site-canvas,1540px),calc(100% - 44px))!important;
    max-width:none!important;
    height:74px!important;
    min-height:74px!important;
    margin:0 auto!important;
    padding:0!important;
    gap:18px!important;
    align-items:center!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;
    transform:none!important;
    transition:none!important;
  }

  html body .middle-brand,
  html body .middle-site-header.is-scrolled .middle-brand{
    display:flex!important;
    align-items:center!important;
    flex:0 0 auto!important;
    width:auto!important;
    min-width:245px!important;
    margin:0!important;
    padding:0!important;
    gap:10px!important;
    transform:none!important;
    transition:none!important;
  }

  html body .middle-brand .custom-logo,
  html body .middle-brand__mark--icon img,
  html body .middle-site-header.is-scrolled .middle-brand .custom-logo,
  html body .middle-site-header.is-scrolled .middle-brand__mark--icon img{
    display:block!important;
    width:auto!important;
    max-width:none!important;
    max-height:48px!important;
    margin:0!important;
    transform:none!important;
    transition:none!important;
  }

  html body .middle-brand__text,
  html body .middle-site-header.is-scrolled .middle-brand__text{
    margin:0!important;
    color:#0e2444!important;
    font-size:25px!important;
    line-height:1!important;
    font-weight:850!important;
    letter-spacing:-.035em!important;
    transform:none!important;
    transition:none!important;
  }

  /*
   * One search geometry for the homepage and every internal page.
   * overflow/appearance resets remove the odd side edges caused by older form
   * and browser search-input rules.
   */
  html body .middle-home-header-search{
    position:relative!important;
    display:flex!important;
    align-items:center!important;
    flex:1 1 520px!important;
    width:auto!important;
    max-width:620px!important;
    min-width:300px!important;
    height:46px!important;
    min-height:46px!important;
    max-height:46px!important;
    box-sizing:border-box!important;
    margin:0 0 0 auto!important;
    padding:0 16px!important;
    gap:0!important;
    overflow:hidden!important;
    border:1px solid #e1e8f1!important;
    border-radius:14px!important;
    background:#f3f7fb!important;
    background-image:none!important;
    box-shadow:none!important;
    outline:0!important;
    transform:none!important;
  }

  html body .middle-home-header-search::before,
  html body .middle-home-header-search::after{
    content:none!important;
    display:none!important;
  }

  html body .middle-home-header-search svg{
    display:block!important;
    flex:0 0 18px!important;
    width:18px!important;
    height:18px!important;
    margin:0!important;
    fill:none!important;
    stroke:#7a91af!important;
    stroke-width:1.8!important;
    transform:none!important;
  }

  html body .middle-home-header-search input[type="search"]{
    -webkit-appearance:none!important;
    appearance:none!important;
    display:block!important;
    flex:1 1 auto!important;
    width:100%!important;
    min-width:0!important;
    height:44px!important;
    min-height:44px!important;
    margin:0!important;
    padding:0 0 0 10px!important;
    border:0!important;
    border-radius:0!important;
    outline:0!important;
    background:transparent!important;
    background-image:none!important;
    box-shadow:none!important;
    color:#1c2d44!important;
    font-size:14px!important;
    line-height:44px!important;
  }

  html body .middle-home-header-search input[type="search"]::-webkit-search-decoration,
  html body .middle-home-header-search input[type="search"]::-webkit-search-cancel-button,
  html body .middle-home-header-search input[type="search"]::-webkit-search-results-button,
  html body .middle-home-header-search input[type="search"]::-webkit-search-results-decoration{
    -webkit-appearance:none!important;
    appearance:none!important;
    display:none!important;
  }

  html body .middle-home-header-search input[type="search"]::placeholder{
    color:#9aacc0!important;
    opacity:1!important;
  }

  /* Second row stays the same height as well. */
  html body .middle-home-topnav,
  html body .middle-site-header.is-scrolled .middle-home-topnav{
    height:52px!important;
    min-height:52px!important;
    transition:none!important;
  }
  html body .middle-home-topnav__scroll,
  html body .middle-site-header.is-scrolled .middle-home-topnav__scroll{
    height:52px!important;
    min-height:52px!important;
    transition:none!important;
  }

  /* Keep tools vertically fixed relative to the logo/search. */
  html body .middle-header-tools{
    align-self:center!important;
    margin-top:0!important;
    margin-bottom:0!important;
    transform:none!important;
  }
}

/* WordPress mobile admin bar offset. */
@media(min-width:721px) and (max-width:782px){
  html body.admin-bar .middle-site-header,
  html body.admin-bar .middle-site-header.is-scrolled{
    top:46px!important;
  }
}

/* Same stable geometry in dark theme. */
@media(min-width:721px){
  html:root[data-middle-theme="dark"] body .middle-site-header,
  html:root[data-middle-theme="dark"] body .middle-site-header.is-scrolled{
    background:#111c28!important;
    box-shadow:0 1px 0 rgba(255,255,255,.07)!important;
  }

  html:root[data-middle-theme="dark"] body .middle-brand__text,
  html:root[data-middle-theme="dark"] body .middle-site-header.is-scrolled .middle-brand__text{
    color:#f1f6fb!important;
  }

  html:root[data-middle-theme="dark"] body .middle-home-header-search{
    border-color:#2c4054!important;
    background:#172432!important;
  }

  html:root[data-middle-theme="dark"] body .middle-home-header-search input[type="search"]{
    color:#eef4fa!important;
    background:transparent!important;
  }

  html:root[data-middle-theme="dark"] body .middle-home-header-search input[type="search"]::placeholder{
    color:#73879c!important;
  }
}


/* ==========================================================================
   Middle Community 0.4.24 — full-width internal pages on mobile
   ========================================================================== */

@media(max-width:720px){
  html,
  body{
    width:100%!important;
    max-width:100%!important;
    margin:0!important;
    overflow-x:hidden!important;
  }

  /*
   * Some older internal templates still had calc(100% - 16/18px) widths on
   * their outer shells. Force one mobile canvas everywhere, like the homepage.
   */
  body:not(.home):not(.front-page) .middle-layout,
  body:not(.home):not(.front-page) .middle-shell.middle-layout,
  body:not(.home):not(.front-page) .middle-layout.middle-layout--portal-full,
  body.middle-ad-single-page .middle-layout,
  body.middle-ad-single-page .middle-layout--portal-full,
  body.middle-service-landing-body .middle-layout,
  body.middle-city-info-body .middle-layout,
  body.middle-messages-system-page .middle-layout,
  body.middle-advertising-page .middle-layout,
  body.post-type-archive-middle_organization .middle-layout,
  body.single-middle_organization .middle-layout,
  body.middle-ads-board-page .middle-layout{
    display:block!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    margin-left:0!important;
    margin-right:0!important;
    padding:
      8px
      6px
      calc(106px + env(safe-area-inset-bottom))
      6px!important;
    box-sizing:border-box!important;
  }

  body:not(.home):not(.front-page) .middle-main,
  body.middle-ad-single-page .middle-ad-detail,
  body.middle-service-landing-body .middle-service-landing-page,
  body.middle-service-landing-body .middle-seo-landing,
  body.middle-city-info-body .middle-city-info-page,
  body.middle-messages-system-page .middle-messages-app,
  body.middle-advertising-page .middle-advertising,
  body.post-type-archive-middle_organization .middle-org-directory,
  body.single-middle_organization .middle-org-single,
  body.middle-ads-board-page .middle-market,
  body.middle-photo-archive-page .middle-photo-archive{
    display:block!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    margin-left:0!important;
    margin-right:0!important;
    box-sizing:border-box!important;
  }

  /*
   * Direct top-level page surfaces should reach the full inner mobile canvas,
   * rather than keeping their old centered desktop width.
   */
  body:not(.home):not(.front-page) .middle-main > section,
  body:not(.home):not(.front-page) .middle-main > article,
  body:not(.home):not(.front-page) .middle-main > .middle-page-head,
  body:not(.home):not(.front-page) .middle-main > .middle-card,
  body.middle-ads-board-page .middle-market > section,
  body.middle-photo-archive-page .middle-photo-archive > section,
  body.post-type-archive-middle_organization .middle-org-directory > section,
  body.single-middle_organization .middle-org-single > section,
  body.middle-service-landing-body .middle-seo-landing > section,
  body.middle-city-info-body .middle-city-info-page > section{
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    margin-left:0!important;
    margin-right:0!important;
    box-sizing:border-box!important;
  }

  /* Common archive/service wrappers that had their own calc() widths. */
  body:not(.home):not(.front-page) .middle-page-head,
  body:not(.home):not(.front-page) .middle-category-head,
  body.middle-ads-board-page .middle-market-hero,
  body.middle-ads-board-page .middle-market-results,
  body.middle-ads-board-page .middle-market-filter,
  body.middle-photo-archive-page .middle-photo-archive__hero,
  body.post-type-archive-middle_organization .middle-org-directory__hero,
  body.post-type-archive-middle_organization .middle-org-results,
  body.post-type-archive-middle_organization .middle-org-filters,
  body.single-middle_organization .middle-org-single__card,
  body.middle-service-landing-body .middle-seo-landing__hero,
  body.middle-service-landing-body .middle-outages-hero,
  body.middle-service-landing-body .middle-outages-group,
  body.middle-service-landing-body .middle-outages-help,
  body.middle-messages-system-page .middle-messages-app__hero,
  body.middle-messages-system-page .middle-messages-app__body{
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    margin-left:0!important;
    margin-right:0!important;
    box-sizing:border-box!important;
  }

  /* Footer uses the same mobile edges too. */
  body:not(.home):not(.front-page) .middle-footer-home,
  body:not(.home):not(.front-page) .middle-footer-row{
    width:calc(100% - 12px)!important;
    max-width:none!important;
    margin-left:6px!important;
    margin-right:6px!important;
    box-sizing:border-box!important;
  }
}


/* ==========================================================================
   Middle Community 0.4.25 — fixed city-night background for resident blocks
   ========================================================================== */

/*
 * Use one intentional city image instead of accidental post thumbnails /
 * no-photo placeholders in the two connected resident-content blocks.
 */

/* Чепецк без прикрас — the city image becomes the background of the whole
   editorial block, while real post photos can still appear inside the slider. */
.home .middle-selected-reader{
  background:
    linear-gradient(
      90deg,
      rgba(8,14,21,.95) 0%,
      rgba(8,14,21,.90) 24%,
      rgba(9,17,25,.76) 50%,
      rgba(8,15,23,.86) 100%
    ),
    url('../images/home-community-night.jpg') center 54% / cover no-repeat!important;
  border-color:rgba(77,106,132,.54)!important;
}

/* If a resident post has no image, show the same attractive city background
   instead of the old eye-only empty placeholder. */
.home .middle-selected-reader__slide-placeholder{
  position:absolute!important;
  inset:0!important;
  display:grid!important;
  place-items:center!important;
  width:100%!important;
  height:100%!important;
  overflow:hidden!important;
  background:
    linear-gradient(180deg,rgba(5,11,17,.15) 0%,rgba(5,11,17,.38) 48%,rgba(5,11,17,.90) 100%),
    url('../images/home-community-night.jpg') center 52% / cover no-repeat!important;
}
.home .middle-selected-reader__slide-placeholder::after{
  content:""!important;
  position:absolute!important;
  inset:0!important;
  background:linear-gradient(90deg,rgba(8,14,21,.20),rgba(8,14,21,.04))!important;
  pointer-events:none!important;
}
.home .middle-selected-reader__slide-placeholder img,
.home .middle-selected-reader__slide-placeholder small{
  position:relative!important;
  z-index:2!important;
}
.home .middle-selected-reader__slide-placeholder img{
  width:58px!important;
  height:58px!important;
  padding:8px!important;
  border-radius:18px!important;
  background:rgba(16,28,39,.55)!important;
  backdrop-filter:blur(8px)!important;
  -webkit-backdrop-filter:blur(8px)!important;
}

/* Есть новости или проблема? — ALWAYS use the selected city-night image.
   Hide whatever publication image / no-photo placeholder WordPress supplied. */
.home .middle-selected-problem__media{
  position:absolute!important;
  inset:0!important;
  display:block!important;
  width:100%!important;
  height:100%!important;
  background:url('../images/home-community-night.jpg') 67% 50% / cover no-repeat!important;
}
.home .middle-selected-problem__media > *{
  display:none!important;
}

/* Tuned overlay: strong enough for white/red typography, but the city,
   river lights and evening lamp remain clearly visible. */
.home .middle-selected-problem__shade{
  background:
    linear-gradient(90deg,rgba(5,11,17,.94) 0%,rgba(5,11,17,.78) 42%,rgba(5,11,17,.40) 72%,rgba(5,11,17,.36) 100%),
    linear-gradient(180deg,rgba(7,14,21,.16),rgba(7,14,21,.58))!important;
}

/* In the current 70/30 desktop row this is a narrow tall card. Favor the
   illuminated right-hand part of the panorama without losing the skyline. */
@media(min-width:901px){
  .home .middle-home-pair--reader .middle-selected-problem__media{
    background-position:72% 50%!important;
  }

  .home .middle-home-pair--reader .middle-selected-reader{
    background-position:center 56%!important;
  }
}

/* Mobile: use a slightly more central crop so the background still reads as
   a real city panorama instead of just a dark texture. */
@media(max-width:900px){
  .home .middle-selected-reader{
    background:
      linear-gradient(180deg,rgba(7,14,21,.88),rgba(7,14,21,.93)),
      url('../images/home-community-night.jpg') 60% 50% / cover no-repeat!important;
  }

  .home .middle-selected-problem__media{
    background-position:66% 50%!important;
  }

  .home .middle-selected-problem__shade{
    background:
      linear-gradient(180deg,rgba(5,11,17,.72) 0%,rgba(5,11,17,.50) 48%,rgba(5,11,17,.91) 100%)!important;
  }
}

/* Dark theme uses the same image; only the overlay gets a touch deeper. */
:root[data-middle-theme="dark"] .home .middle-selected-reader{
  background:
    linear-gradient(90deg,rgba(5,10,16,.96),rgba(6,12,19,.88) 47%,rgba(6,12,19,.91)),
    url('../images/home-community-night.jpg') center 54% / cover no-repeat!important;
}
:root[data-middle-theme="dark"] .home .middle-selected-problem__shade{
  background:
    linear-gradient(90deg,rgba(3,8,13,.96) 0%,rgba(4,9,15,.82) 44%,rgba(4,9,15,.46) 75%,rgba(4,9,15,.42) 100%),
    linear-gradient(180deg,rgba(5,10,16,.20),rgba(5,10,16,.64))!important;
}


/* ==========================================================================
   Middle Community 0.4.26 — city photo ONLY behind "Чепецк без прикрас" title
   ========================================================================== */

/*
 * Correction: the night panorama is not a post background.
 * The slider/post area keeps its own real post image or normal placeholder.
 * The panorama is used only behind the left branded intro panel.
 */

/* Restore the whole reader block to its original editorial dark surface. */
.home .middle-selected-reader{
  background:
    radial-gradient(circle at 8% 20%,rgba(224,43,65,.18),transparent 28%),
    linear-gradient(135deg,#111d27 0%,#081119 58%,#121d25 100%)!important;
  border-color:#263847!important;
}

/* Photo lives ONLY behind the branded left part: "Чепецк без прикрас". */
.home .middle-selected-reader__intro{
  position:relative!important;
  isolation:isolate!important;
  overflow:hidden!important;
  padding:22px 20px!important;
  border-radius:22px!important;
  background:
    linear-gradient(
      90deg,
      rgba(7,13,20,.90) 0%,
      rgba(8,14,21,.78) 58%,
      rgba(8,14,21,.56) 100%
    ),
    url('../images/home-community-night.jpg') 67% 50% / cover no-repeat!important;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.05),
    0 12px 30px rgba(0,0,0,.14)!important;
}

/* Guarantee the text/buttons remain above the intro background. */
.home .middle-selected-reader__intro > *{
  position:relative!important;
  z-index:2!important;
}

/* Restore post-without-photo placeholder: no city panorama here. */
.home .middle-selected-reader__slide-placeholder{
  position:absolute!important;
  inset:0!important;
  display:grid!important;
  place-items:center!important;
  width:100%!important;
  height:100%!important;
  overflow:hidden!important;
  background:linear-gradient(145deg,#223442,#111b23)!important;
}
.home .middle-selected-reader__slide-placeholder::after{
  content:none!important;
  display:none!important;
}
.home .middle-selected-reader__slide-placeholder img{
  width:72px!important;
  height:72px!important;
  padding:0!important;
  border-radius:0!important;
  background:transparent!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
  opacity:.8!important;
}
.home .middle-selected-reader__slide-placeholder small{
  position:absolute!important;
  bottom:18px!important;
  z-index:2!important;
  color:#b9c7d2!important;
  font-size:10px!important;
}

/* Desktop 70/30 magazine row: make the intro look like a deliberate photo panel. */
@media(min-width:901px){
  .home .middle-home-pair--reader .middle-selected-reader__intro{
    min-height:100%!important;
    justify-content:center!important;
    background-position:70% 50%!important;
  }
}

/* Mobile: same concept — image only behind the title/introduction, never the post. */
@media(max-width:900px){
  .home .middle-selected-reader{
    background:
      radial-gradient(circle at 8% 20%,rgba(224,43,65,.15),transparent 30%),
      linear-gradient(135deg,#111d27,#081119 62%,#121d25)!important;
  }

  .home .middle-selected-reader__intro{
    padding:17px!important;
    background:
      linear-gradient(90deg,rgba(7,13,20,.88),rgba(8,14,21,.62)),
      url('../images/home-community-night.jpg') 68% 50% / cover no-repeat!important;
  }
}

/* Dark mode: retain the same image only in the intro, with a slightly deeper overlay. */
:root[data-middle-theme="dark"] .home .middle-selected-reader{
  background:
    radial-gradient(circle at 8% 20%,rgba(224,43,65,.14),transparent 28%),
    linear-gradient(135deg,#0d1720 0%,#071017 60%,#101921 100%)!important;
}
:root[data-middle-theme="dark"] .home .middle-selected-reader__intro{
  background:
    linear-gradient(90deg,rgba(4,9,15,.93),rgba(5,11,17,.68)),
    url('../images/home-community-night.jpg') 68% 50% / cover no-repeat!important;
}


/* ==========================================================================
   Middle Community 0.4.29 — exact homepage search on EVERY internal page
   ========================================================================== */

/*
 * Internal-page generic form rules were repainting the search INPUT white.
 * That produced the visible white capsule inside the pale homepage search bar.
 * These selectors intentionally outrank those generic form rules.
 */
@media(min-width:721px){
  html body:not(.home):not(.front-page)
  header.middle-site-header
  form.middle-home-header-search{
    position:relative!important;
    display:flex!important;
    align-items:center!important;
    flex:1 1 520px!important;
    width:auto!important;
    max-width:620px!important;
    min-width:300px!important;
    height:46px!important;
    min-height:46px!important;
    max-height:46px!important;
    margin:0 0 0 auto!important;
    padding:0 16px!important;
    gap:0!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
    border:1px solid #e1e8f1!important;
    border-radius:14px!important;
    background:#f3f7fb!important;
    background-image:none!important;
    box-shadow:none!important;
    outline:0!important;
  }

  html body:not(.home):not(.front-page)
  header.middle-site-header
  form.middle-home-header-search svg{
    display:block!important;
    flex:0 0 18px!important;
    width:18px!important;
    height:18px!important;
    margin:0!important;
    padding:0!important;
    fill:none!important;
    stroke:#7a91af!important;
    stroke-width:1.8!important;
  }

  /*
   * Important: repeat all :not() clauses from the generic internal form rule
   * so this selector has greater specificity. The input is fully transparent,
   * exactly as on the homepage.
   */
  html body:not(.home):not(.front-page)
  header.middle-site-header
  form.middle-home-header-search
  input[type="search"]:not([type="checkbox"]):not([type="radio"]):not([type="submit"]){
    -webkit-appearance:none!important;
    appearance:none!important;
    display:block!important;
    flex:1 1 auto!important;
    width:100%!important;
    min-width:0!important;
    height:100%!important;
    min-height:0!important;
    max-height:none!important;
    margin:0!important;
    padding:0 0 0 10px!important;
    box-sizing:border-box!important;
    border:0!important;
    border-color:transparent!important;
    border-radius:0!important;
    outline:0!important;
    background:transparent!important;
    background-color:transparent!important;
    background-image:none!important;
    box-shadow:none!important;
    color:#1c2d44!important;
    font-size:14px!important;
    line-height:normal!important;
  }

  html body:not(.home):not(.front-page)
  header.middle-site-header
  form.middle-home-header-search
  input[type="search"]:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):focus{
    border:0!important;
    border-color:transparent!important;
    outline:0!important;
    background:transparent!important;
    background-color:transparent!important;
    box-shadow:none!important;
  }

  html body:not(.home):not(.front-page)
  header.middle-site-header
  form.middle-home-header-search
  input[type="search"]::placeholder{
    color:#9aacc0!important;
    opacity:1!important;
  }

  html body:not(.home):not(.front-page)
  header.middle-site-header
  form.middle-home-header-search
  input[type="search"]::-webkit-search-decoration,
  html body:not(.home):not(.front-page)
  header.middle-site-header
  form.middle-home-header-search
  input[type="search"]::-webkit-search-cancel-button,
  html body:not(.home):not(.front-page)
  header.middle-site-header
  form.middle-home-header-search
  input[type="search"]::-webkit-search-results-button,
  html body:not(.home):not(.front-page)
  header.middle-site-header
  form.middle-home-header-search
  input[type="search"]::-webkit-search-results-decoration{
    -webkit-appearance:none!important;
    appearance:none!important;
    display:none!important;
  }

  /* Dark theme: identical single-piece geometry, only palette changes. */
  html:root[data-middle-theme="dark"]
  body:not(.home):not(.front-page)
  header.middle-site-header
  form.middle-home-header-search{
    border-color:#2c4054!important;
    background:#172432!important;
  }

  html:root[data-middle-theme="dark"]
  body:not(.home):not(.front-page)
  header.middle-site-header
  form.middle-home-header-search
  input[type="search"]:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
  html:root[data-middle-theme="dark"]
  body:not(.home):not(.front-page)
  header.middle-site-header
  form.middle-home-header-search
  input[type="search"]:focus{
    background:transparent!important;
    background-color:transparent!important;
    color:#eef4fa!important;
  }

  html:root[data-middle-theme="dark"]
  body:not(.home):not(.front-page)
  header.middle-site-header
  form.middle-home-header-search
  input[type="search"]::placeholder{
    color:#73879c!important;
  }
}


/* ==========================================================================
   Middle Community 0.4.30 — lock search to ONE desktop position everywhere
   ========================================================================== */

/*
 * The header used flex before, so the search shifted when page-specific
 * controls, auth state or older styles changed the width of neighboring
 * elements. Desktop header is now a deterministic 3-column grid:
 * logo | search | tools.
 */
@media(min-width:1280px){
  html body .middle-header-row,
  html body .middle-site-header.is-scrolled .middle-header-row{
    display:grid!important;
    grid-template-columns:245px 620px minmax(0,1fr)!important;
    column-gap:18px!important;
    align-items:center!important;
    justify-items:stretch!important;
    width:min(var(--mc-site-canvas,1540px),calc(100% - 44px))!important;
    max-width:none!important;
    height:74px!important;
    min-height:74px!important;
    margin:0 auto!important;
    padding:0!important;
  }

  html body .middle-header-row > .middle-brand{
    grid-column:1!important;
    justify-self:start!important;
    align-self:center!important;
    width:245px!important;
    min-width:245px!important;
    max-width:245px!important;
    margin:0!important;
  }

  html body .middle-header-row > form.middle-home-header-search{
    grid-column:2!important;
    justify-self:stretch!important;
    align-self:center!important;
    width:620px!important;
    min-width:620px!important;
    max-width:620px!important;
    margin:0!important;
  }

  html body .middle-header-row > .middle-header-tools{
    grid-column:3!important;
    justify-self:end!important;
    align-self:center!important;
    width:auto!important;
    min-width:0!important;
    margin:0!important;
  }
}

/* Normal laptops: same column logic, search stretches only inside column 2. */
@media(min-width:1001px) and (max-width:1279px){
  html body .middle-header-row,
  html body .middle-site-header.is-scrolled .middle-header-row{
    display:grid!important;
    grid-template-columns:220px minmax(330px,1fr) auto!important;
    column-gap:14px!important;
    align-items:center!important;
    width:calc(100% - 32px)!important;
    max-width:none!important;
    height:74px!important;
    min-height:74px!important;
    margin:0 auto!important;
    padding:0!important;
  }

  html body .middle-header-row > .middle-brand{
    grid-column:1!important;
    justify-self:start!important;
    width:220px!important;
    min-width:220px!important;
    max-width:220px!important;
    margin:0!important;
  }

  html body .middle-header-row > form.middle-home-header-search{
    grid-column:2!important;
    justify-self:stretch!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    margin:0!important;
  }

  html body .middle-header-row > .middle-header-tools{
    grid-column:3!important;
    justify-self:end!important;
    width:auto!important;
    margin:0!important;
  }
}

/* Small desktop/tablet browser width before mobile navigation takes over. */
@media(min-width:721px) and (max-width:1000px){
  html body .middle-header-row,
  html body .middle-site-header.is-scrolled .middle-header-row{
    display:grid!important;
    grid-template-columns:190px minmax(250px,1fr) auto!important;
    column-gap:10px!important;
    align-items:center!important;
    width:calc(100% - 24px)!important;
    height:70px!important;
    min-height:70px!important;
    margin:0 auto!important;
    padding:0!important;
  }

  html body .middle-header-row > .middle-brand{
    grid-column:1!important;
    width:190px!important;
    min-width:190px!important;
    max-width:190px!important;
    margin:0!important;
  }

  html body .middle-header-row > .middle-brand__text{
    font-size:20px!important;
  }

  html body .middle-header-row > form.middle-home-header-search{
    grid-column:2!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    margin:0!important;
  }

  html body .middle-header-row > .middle-header-tools{
    grid-column:3!important;
    justify-self:end!important;
    width:auto!important;
    gap:6px!important;
    margin:0!important;
  }
}

/* Prevent any page-specific header animation/translation from moving search. */
@media(min-width:721px){
  html body .middle-header-row > form.middle-home-header-search,
  html body .middle-header-row > .middle-brand,
  html body .middle-header-row > .middle-header-tools{
    position:relative!important;
    left:auto!important;
    right:auto!important;
    top:auto!important;
    bottom:auto!important;
    transform:none!important;
    translate:none!important;
  }
}


/* ==========================================================================
   Middle Community 0.4.33 — restore approved homepage header alignment
   ========================================================================== */
@media(min-width:721px){
  body.home .middle-site-header .middle-header-row,
  body.front-page .middle-site-header .middle-header-row{
    width:min(var(--mc-home-canvas,1540px),calc(100% - 44px))!important;
    max-width:none!important;
    margin-left:auto!important;
    margin-right:auto!important;
    transform:none!important;
  }

  body.home .middle-site-header .middle-brand,
  body.front-page .middle-site-header .middle-brand,
  body.home .middle-site-header form.middle-home-header-search,
  body.front-page .middle-site-header form.middle-home-header-search,
  body.home .middle-site-header .middle-header-tools,
  body.front-page .middle-site-header .middle-header-tools{
    transform:none!important;
    translate:none!important;
  }
}


/* ==========================================================================
   Middle Community 0.4.34 — internal header alignment matches homepage
   ========================================================================== */
@media(min-width:1051px){
  body:not(.home):not(.front-page) .middle-header-row{
    width:min(var(--mc-home-canvas,1540px),calc(100% - 44px))!important;
  }

  body:not(.home):not(.front-page) .middle-home-header-search{
    flex:0 1 620px!important;
    width:620px!important;
    min-width:300px!important;
    max-width:620px!important;
    margin-left:0!important;
    margin-right:0!important;
  }

  body:not(.home):not(.front-page) .middle-header-tools{
    margin-left:auto!important;
  }

  body:not(.home):not(.front-page) .middle-home-topnav{
    width:min(var(--mc-home-canvas,1540px),calc(100% - 44px))!important;
  }
}


/* ==========================================================================
   Middle Community 0.4.35 — search aligned right next to weather everywhere
   ========================================================================== */
@media(min-width:1051px){
  body .middle-site-header form.middle-home-header-search{
    flex:0 1 620px!important;
    width:620px!important;
    max-width:620px!important;
    margin-left:auto!important;
    margin-right:0!important;
  }

  body .middle-site-header .middle-header-tools{
    margin-left:8px!important;
    margin-right:0!important;
    gap:8px!important;
  }
}


/* ==========================================================================
   Middle Community 0.4.36 — fixed right tools, search directly before weather
   ========================================================================== */
@media(min-width:1051px){
  body .middle-site-header .middle-header-row{
    display:grid!important;
    grid-template-columns:245px minmax(0,1fr) 620px max-content!important;
    column-gap:8px!important;
    align-items:center!important;
    width:min(var(--mc-home-canvas,1540px),calc(100% - 44px))!important;
  }

  body .middle-site-header .middle-header-row > .middle-brand{
    grid-column:1!important;
    width:245px!important;
    min-width:245px!important;
    max-width:245px!important;
    margin:0!important;
  }

  body .middle-site-header .middle-header-row > form.middle-home-header-search{
    grid-column:3!important;
    width:620px!important;
    min-width:620px!important;
    max-width:620px!important;
    margin:0!important;
  }

  body .middle-site-header .middle-header-row > .middle-header-tools{
    grid-column:4!important;
    justify-self:end!important;
    width:max-content!important;
    min-width:max-content!important;
    margin:0!important;
  }
}


/* ==========================================================================
   Middle Community 0.4.37 — runtime-backed header lock
   ========================================================================== */
@media(min-width:1051px){
  body .middle-site-header .middle-header-row{
    display:flex!important;
    align-items:center!important;
    width:min(1540px,calc(100% - 44px))!important;
    gap:0!important;
  }
  body .middle-site-header .middle-brand{
    flex:0 0 245px!important;
    width:245px!important;
    min-width:245px!important;
    max-width:245px!important;
    margin:0!important;
  }
  body .middle-site-header form.middle-home-header-search{
    flex:0 0 620px!important;
    width:620px!important;
    min-width:620px!important;
    max-width:620px!important;
    margin-left:auto!important;
    margin-right:0!important;
  }
  body .middle-site-header .middle-header-tools{
    flex:0 0 auto!important;
    width:auto!important;
    margin-left:8px!important;
    margin-right:0!important;
    gap:8px!important;
  }
}


/* ==========================================================================
   Middle Community 0.4.39 — remove invisible mobile search sheet from desktop row
   ========================================================================== */
@media(min-width:721px){
  body .middle-site-header .middle-header-row > #middle-header-search{
    display:none!important;
    position:absolute!important;
    width:0!important;
    height:0!important;
    min-width:0!important;
    max-width:0!important;
    margin:0!important;
    padding:0!important;
    overflow:hidden!important;
    pointer-events:none!important;
  }

  /* With the hidden sheet gone, the visible right group can truly reach row edge. */
  body .middle-site-header form.middle-home-header-search{
    margin-left:auto!important;
    margin-right:0!important;
  }
  body .middle-site-header .middle-header-tools{
    margin-left:8px!important;
    margin-right:0!important;
  }
}




/* ==========================================================================
   Middle Community 0.4.41 — canonical direct-sibling desktop header fallback
   ========================================================================== */
@media(min-width:1051px){
  body .middle-site-header > .middle-header-row{
    display:flex!important;
    align-items:center!important;
    width:min(1540px,calc(100% - 44px))!important;
    gap:0!important;
  }
  body .middle-header-row > .middle-brand{
    flex:0 0 245px!important;
    width:245px!important;
  }
  body .middle-header-row > form.middle-home-header-search{
    flex:0 0 620px!important;
    width:620px!important;
    min-width:620px!important;
    max-width:620px!important;
    margin-left:auto!important;
    margin-right:0!important;
  }
  body .middle-header-row > .middle-header-tools{
    display:flex!important;
    align-items:center!important;
    flex:0 0 auto!important;
    width:auto!important;
    margin-left:8px!important;
    margin-right:0!important;
    gap:8px!important;
  }
  body .middle-header-row > #middle-header-search{display:none!important}
}


/* ==========================================================================
   Middle Community 0.4.42 — real flexible spacer before desktop search
   ========================================================================== */
@media(min-width:1051px){
  body .middle-header-row > .middle-desktop-header-spacer{
    display:block!important;
    flex:1 1 auto!important;
    min-width:20px!important;
  }
  body .middle-header-row > form.middle-home-header-search{
    flex:0 0 620px!important;
    width:620px!important;
    min-width:620px!important;
    max-width:620px!important;
    margin:0!important;
  }
  body .middle-header-row > .middle-header-tools{
    flex:0 0 auto!important;
    width:auto!important;
    margin-left:8px!important;
    margin-right:0!important;
  }
}
@media(max-width:720px){
  body .middle-header-row > .middle-desktop-header-spacer{display:none!important}
}


/* ==========================================================================
   Middle Community 0.4.44 — identical desktop tools width on home/internal
   ========================================================================== */
@media(min-width:721px){
  body .middle-header-tools > .middle-profile-link{
    display:inline-flex!important;
    order:3!important;
    align-items:center!important;
    justify-content:center!important;
    width:auto!important;
    min-width:104px!important;
    height:44px!important;
    min-height:44px!important;
    padding:0 13px!important;
    gap:7px!important;
    border-radius:12px!important;
  }
  body .middle-header-tools > .middle-profile-link > span{
    display:inline!important;
    white-space:nowrap!important;
  }
}
@media(max-width:720px){
  body .middle-header-tools > .middle-profile-link{display:none!important}
}


/* ==========================================================================
   Middle Community 0.4.45 — fixed desktop right-side control widths
   ========================================================================== */
@media(min-width:1051px){
  body .middle-header-row > form.middle-home-header-search{
    flex:0 0 620px!important;
    width:620px!important;
    min-width:620px!important;
    max-width:620px!important;
  }
  body .middle-header-row > .middle-header-tools{
    flex:0 0 328px!important;
    width:328px!important;
    min-width:328px!important;
    max-width:328px!important;
    margin-left:8px!important;
    gap:8px!important;
  }
  body .middle-header-tools > .middle-header-weather{
    flex:0 0 112px!important;
    width:112px!important;
    min-width:112px!important;
    max-width:112px!important;
    box-sizing:border-box!important;
  }
  body .middle-header-tools > .middle-home-header-bell{
    flex:0 0 44px!important;
    width:44px!important;
    min-width:44px!important;
    max-width:44px!important;
  }
  body .middle-header-tools > .middle-account-link,
  body .middle-header-tools > .middle-profile-link{
    flex:0 0 104px!important;
    width:104px!important;
    min-width:104px!important;
    max-width:104px!important;
  }
  body .middle-header-tools > .middle-header-dropdown--menu{
    flex:0 0 44px!important;
    width:44px!important;
    min-width:44px!important;
    max-width:44px!important;
  }
}


/* ==========================================================================
   Middle Community 0.4.46 — header logo rendered like footer
   ========================================================================== */
@media(min-width:721px){
  body .middle-header-row > .middle-brand .middle-brand__logo-icon{
    width:48px!important;
    min-width:48px!important;
    max-width:48px!important;
    height:48px!important;
    min-height:48px!important;
    max-height:48px!important;
    object-fit:contain!important;
    object-position:center!important;
    border-radius:13px!important;
    overflow:visible!important;
  }
  body .middle-header-row > .middle-brand .middle-brand__text{
    display:block!important;
    color:#0e2444!important;
    font-size:25px!important;
    line-height:1!important;
    font-weight:850!important;
    white-space:nowrap!important;
  }
}


/* ==========================================================================
   Middle Community 0.4.47 — exact footer logo image in desktop header
   ========================================================================== */
@media(min-width:721px){
  body .middle-header-row > .middle-brand > img.middle-header-brand-logo{
    display:block!important;
    width:54px!important;
    min-width:54px!important;
    max-width:54px!important;
    height:54px!important;
    min-height:54px!important;
    max-height:54px!important;
    object-fit:contain!important;
    object-position:center!important;
    border-radius:15px!important;
    clip-path:none!important;
    overflow:visible!important;
    transform:none!important;
  }
}


/* ==========================================================================
   Middle Community 0.4.49 — advertising links in header drawer
   ========================================================================== */

.middle-side-drawer__utility-item--advertising{
  color:#245f9e!important;
  background:linear-gradient(180deg,#f7fbff,#f1f7fd)!important;
  border-color:#d7e6f5!important;
}

.middle-side-drawer__utility-item--vk{
  color:#1769c9!important;
  background:linear-gradient(180deg,#f7fbff,#eef6ff)!important;
  border-color:#d5e6f8!important;
}

.middle-side-drawer__utility-vk{
  display:grid!important;
  place-items:center!important;
  flex:0 0 19px!important;
  width:19px!important;
  height:19px!important;
  margin:0!important;
  border-radius:6px!important;
  background:#2787f5!important;
  color:#fff!important;
  font-size:7px!important;
  line-height:1!important;
  font-weight:900!important;
  letter-spacing:-.04em!important;
}

.middle-side-drawer__utility-item--advertising:hover,
.middle-side-drawer__utility-item--vk:hover{
  transform:translateY(-1px)!important;
  box-shadow:0 7px 18px rgba(33,91,151,.10)!important;
}

:root[data-middle-theme="dark"] .middle-side-drawer__utility-item--advertising,
:root[data-middle-theme="dark"] .middle-side-drawer__utility-item--vk{
  color:#9ac8ff!important;
  background:#17283a!important;
  border-color:#2f465d!important;
}

@media(max-width:720px){
  .middle-side-drawer__utility{
    grid-template-columns:1fr 1fr!important;
  }
  .middle-side-drawer__utility-item{
    min-width:0!important;
    text-align:center!important;
  }
}


/* ==========================================================================
   Middle Community 0.4.50 — polished VK advertising link in header drawer
   ========================================================================== */

.middle-side-drawer__utility-item--promo{
  justify-content:flex-start!important;
  align-items:center!important;
  gap:10px!important;
  min-height:58px!important;
  padding:10px 12px!important;
  text-align:left!important;
}

.middle-side-drawer__utility-icon{
  display:grid!important;
  place-items:center!important;
  flex:0 0 30px!important;
  width:30px!important;
  height:30px!important;
  border-radius:10px!important;
  box-shadow:0 10px 18px rgba(45,96,160,.14)!important;
}

.middle-side-drawer__utility-icon svg{
  width:17px!important;
  height:17px!important;
  fill:none!important;
  stroke:currentColor!important;
}

.middle-side-drawer__utility-icon--advertising{
  background:linear-gradient(180deg,#ffffff,#eef5ff)!important;
  color:#2f6db8!important;
}

.middle-side-drawer__utility-icon--vk{
  background:linear-gradient(180deg,#37a7ff,#1976f2)!important;
  color:#fff!important;
  font-size:10px!important;
  line-height:1!important;
  font-weight:900!important;
  letter-spacing:-.03em!important;
}

.middle-side-drawer__utility-copy{
  display:flex!important;
  flex-direction:column!important;
  align-items:flex-start!important;
  justify-content:center!important;
  gap:3px!important;
  min-width:0!important;
}

.middle-side-drawer__utility-title{
  display:block!important;
  max-width:100%!important;
  color:currentColor!important;
  font-size:12px!important;
  line-height:1.1!important;
  font-weight:800!important;
  white-space:normal!important;
}

.middle-side-drawer__utility-note{
  display:block!important;
  max-width:100%!important;
  color:#6b81a0!important;
  font-size:10px!important;
  line-height:1.15!important;
  font-weight:650!important;
  white-space:normal!important;
}

.middle-side-drawer__utility-item--advertising{
  color:#245f9e!important;
  background:linear-gradient(180deg,#f8fbff,#eef5fd)!important;
  border-color:#d7e6f5!important;
}

.middle-side-drawer__utility-item--vk{
  color:#175cb6!important;
  background:linear-gradient(180deg,#f7fbff 0%,#eef6ff 56%,#e8f2ff 100%)!important;
  border-color:#cfe1fb!important;
  box-shadow:0 14px 24px rgba(39,135,245,.08)!important;
  position:relative!important;
  overflow:hidden!important;
}

.middle-side-drawer__utility-item--vk::after{
  content:""!important;
  position:absolute!important;
  top:-24px!important;
  right:-16px!important;
  width:72px!important;
  height:72px!important;
  border-radius:50%!important;
  background:radial-gradient(circle at center, rgba(39,135,245,.16), rgba(39,135,245,0) 68%)!important;
  pointer-events:none!important;
}

.middle-side-drawer__utility-item--advertising:hover,
.middle-side-drawer__utility-item--vk:hover{
  transform:translateY(-1px)!important;
  box-shadow:0 9px 22px rgba(33,91,151,.11)!important;
}

:root[data-middle-theme="dark"] .middle-side-drawer__utility-item--advertising,
:root[data-middle-theme="dark"] .middle-side-drawer__utility-item--vk{
  background:#17283a!important;
  border-color:#2f465d!important;
}

:root[data-middle-theme="dark"] .middle-side-drawer__utility-item--advertising{
  color:#9ac8ff!important;
}

:root[data-middle-theme="dark"] .middle-side-drawer__utility-item--vk{
  color:#9ed0ff!important;
  box-shadow:0 10px 22px rgba(0,0,0,.18)!important;
}

:root[data-middle-theme="dark"] .middle-side-drawer__utility-item--vk::after{
  background:radial-gradient(circle at center, rgba(73,149,255,.22), rgba(73,149,255,0) 68%)!important;
}

:root[data-middle-theme="dark"] .middle-side-drawer__utility-note{
  color:#7f98b6!important;
}

@media(max-width:720px){
  .middle-side-drawer__utility-item--promo{
    min-height:62px!important;
    padding:10px 10px!important;
    gap:8px!important;
  }
  .middle-side-drawer__utility-icon{
    width:28px!important;
    height:28px!important;
    flex-basis:28px!important;
    border-radius:9px!important;
  }
  .middle-side-drawer__utility-title{
    font-size:11px!important;
  }
  .middle-side-drawer__utility-note{
    font-size:9px!important;
  }
}


/* ==========================================================================
   Middle Community 0.4.57 — /payment/ true full-width + title reset
   portal-unified.css loads after page CSS, so these rules MUST live here.
   ========================================================================== */

/* /payment/ had no sidebar in PHP, but the global desktop grid still reserved
   a 318px sidebar column. That squeezed the whole VK page into the first track. */
body.middle-vk-advertising-page .middle-layout{
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  width:min(var(--mc-page-canvas),calc(100% - 44px))!important;
  max-width:none!important;
  margin:0 auto!important;
  padding:28px 0 58px!important;
  gap:0!important;
}

body.middle-vk-advertising-page .middle-main,
body.middle-vk-advertising-page .middle-vk-advertising-main{
  display:block!important;
  grid-column:1 / -1!important;
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  margin:0!important;
}

body.middle-vk-advertising-page .middle-vk-advertising{
  width:100%!important;
  max-width:none!important;
  margin:0!important;
}

/* The global internal-page `.middle-content h3` rule was overriding card titles
   with 23px article typography. Reset it specifically for pricing cards. */
body.middle-vk-advertising-page .middle-content .middle-vk-advertising__price-card-title{
  display:block!important;
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
  margin:0!important;
  padding:0!important;
  color:#15375f!important;
  font-size:16px!important;
  line-height:1.35!important;
  font-weight:850!important;
  letter-spacing:-.01em!important;
  word-break:normal!important;
  overflow-wrap:normal!important;
  hyphens:none!important;
  white-space:normal!important;
}

body.middle-vk-advertising-page .middle-content .middle-vk-advertising__price-card-title a{
  display:inline!important;
  color:#176fd5!important;
  font:inherit!important;
  line-height:inherit!important;
  letter-spacing:inherit!important;
  text-decoration:none!important;
  word-break:normal!important;
  overflow-wrap:normal!important;
  hyphens:none!important;
}

body.middle-vk-advertising-page .middle-content .middle-vk-advertising__price-card-title a:hover{
  text-decoration:underline!important;
}

/* Wider desktop: three real cards; medium screens: two; mobile: one. */
@media(min-width:1181px){
  body.middle-vk-advertising-page .middle-vk-advertising__editorial-grid{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:18px!important;
  }
}

@media(min-width:821px) and (max-width:1180px){
  body.middle-vk-advertising-page .middle-vk-advertising__editorial-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:16px!important;
  }
}

@media(max-width:820px){
  body.middle-vk-advertising-page .middle-layout{
    display:block!important;
    width:100%!important;
    padding:14px 9px calc(108px + env(safe-area-inset-bottom))!important;
  }

  body.middle-vk-advertising-page .middle-vk-advertising__editorial-grid{
    grid-template-columns:1fr!important;
  }

  body.middle-vk-advertising-page .middle-content .middle-vk-advertising__price-card-title{
    font-size:14px!important;
    line-height:1.35!important;
  }
}

/* Dark mode title reset after the global dark internal-page heading rule. */
html:root[data-middle-theme="dark"] body.middle-vk-advertising-page .middle-content .middle-vk-advertising__price-card-title{
  color:#eef6ff!important;
}
html:root[data-middle-theme="dark"] body.middle-vk-advertising-page .middle-content .middle-vk-advertising__price-card-title a{
  color:#96c9ff!important;
}


/* ==========================================================================
   Middle Community 0.4.58 — /payment/ clean premium redesign
   ========================================================================== */

/* A wider but still readable canvas. */
body.middle-vk-advertising-page .middle-layout{
  width:min(1380px,calc(100% - 44px))!important;
  grid-template-columns:minmax(0,1fr)!important;
  padding:28px 0 64px!important;
}

body.middle-vk-advertising-page .middle-vk-advertising{
  width:100%!important;
  max-width:none!important;
  gap:20px!important;
}

/* The editor banner should look like an intentional hero, not an image sitting
   in a huge empty blue rectangle. */
body.middle-vk-advertising-page .middle-vk-advertising__media{
  display:block!important;
  width:min(100%,1040px)!important;
  max-width:1040px!important;
  margin:6px auto 24px!important;
  padding:0!important;
  overflow:hidden!important;
  border:0!important;
  border-radius:24px!important;
  background:transparent!important;
  box-shadow:0 18px 42px rgba(26,63,102,.12)!important;
}

body.middle-vk-advertising-page .middle-vk-advertising__media figure,
body.middle-vk-advertising-page .middle-vk-advertising__media .wp-block-image,
body.middle-vk-advertising-page .middle-vk-advertising__media a{
  display:block!important;
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  padding:0!important;
}

body.middle-vk-advertising-page .middle-vk-advertising__media img,
body.middle-vk-advertising-page .middle-vk-advertising__media a > img{
  display:block!important;
  width:100%!important;
  min-width:100%!important;
  max-width:none!important;
  height:auto!important;
  max-height:none!important;
  margin:0!important;
  border-radius:24px!important;
  object-fit:contain!important;
}

/* Intro line under the picture. */
body.middle-vk-advertising-page .middle-vk-advertising__editorial-intro{
  margin:0 0 16px!important;
  padding:15px 18px!important;
  border:1px solid #dce8f5!important;
  border-radius:18px!important;
  background:#fff!important;
  box-shadow:0 8px 22px rgba(31,70,110,.045)!important;
  color:#536b88!important;
  font-size:14px!important;
  line-height:1.55!important;
}

/* Two substantial cards are much more readable for a price list than three
   narrow columns. */
body.middle-vk-advertising-page .middle-vk-advertising__editorial-grid{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:16px!important;
  align-items:stretch!important;
  margin:0!important;
}

body.middle-vk-advertising-page .middle-vk-advertising__price-card{
  display:flex!important;
  flex-direction:column!important;
  min-width:0!important;
  min-height:0!important;
  margin:0!important;
  padding:0!important;
  overflow:hidden!important;
  border:1px solid #d7e4f3!important;
  border-radius:22px!important;
  background:#fff!important;
  box-shadow:0 12px 30px rgba(28,70,112,.065)!important;
}

/* MAX becomes a wide accent card because it is a separate platform. */
body.middle-vk-advertising-page .middle-vk-advertising__price-card--max{
  grid-column:1 / -1!important;
}

/* Compact, horizontal card header. */
body.middle-vk-advertising-page .middle-vk-advertising__price-card-head{
  display:flex!important;
  align-items:center!important;
  gap:12px!important;
  min-height:72px!important;
  margin:0!important;
  padding:14px 16px!important;
  border-bottom:1px solid #e1ebf5!important;
  background:linear-gradient(180deg,#f8fbff,#f0f6fd)!important;
}

body.middle-vk-advertising-page .middle-vk-advertising__price-card-number{
  position:static!important;
  display:grid!important;
  place-items:center!important;
  flex:0 0 38px!important;
  width:38px!important;
  min-width:38px!important;
  max-width:38px!important;
  height:38px!important;
  min-height:38px!important;
  max-height:38px!important;
  margin:0!important;
  padding:0!important;
  border-radius:12px!important;
  background:linear-gradient(180deg,#36a6ff,#1976f2)!important;
  color:#fff!important;
  font-size:13px!important;
  line-height:1!important;
  font-weight:900!important;
  box-shadow:0 8px 17px rgba(25,118,242,.2)!important;
}

body.middle-vk-advertising-page .middle-vk-advertising__price-card--max .middle-vk-advertising__price-card-number{
  flex-basis:58px!important;
  width:58px!important;
  min-width:58px!important;
  max-width:58px!important;
  font-size:12px!important;
}

/* Plain div title avoids the site's global article H3 rules completely. */
body.middle-vk-advertising-page .middle-vk-advertising__price-card-title{
  display:block!important;
  flex:1 1 auto!important;
  min-width:0!important;
  width:auto!important;
  margin:0!important;
  padding:0!important;
  color:#173858!important;
  font-size:17px!important;
  line-height:1.32!important;
  font-weight:850!important;
  letter-spacing:-.015em!important;
  white-space:normal!important;
  word-break:keep-all!important;
  overflow-wrap:normal!important;
  hyphens:none!important;
}

body.middle-vk-advertising-page .middle-vk-advertising__price-card-title a{
  display:inline!important;
  margin:0!important;
  padding:0!important;
  color:#176fd5!important;
  font:inherit!important;
  line-height:inherit!important;
  letter-spacing:inherit!important;
  text-decoration:none!important;
  white-space:normal!important;
  word-break:keep-all!important;
  overflow-wrap:normal!important;
  hyphens:none!important;
}

body.middle-vk-advertising-page .middle-vk-advertising__price-card-title a:hover{
  text-decoration:underline!important;
}

/* Price lines become calm rows rather than a wall of text. */
body.middle-vk-advertising-page .middle-vk-advertising__price-card-lines{
  display:flex!important;
  flex-direction:column!important;
  flex:1 1 auto!important;
  gap:0!important;
  padding:6px 16px 16px!important;
}

body.middle-vk-advertising-page .middle-vk-advertising__price-line{
  display:block!important;
  margin:0!important;
  padding:11px 2px!important;
  border:0!important;
  border-bottom:1px solid #edf2f7!important;
  background:transparent!important;
  color:#526a87!important;
  font-size:13.5px!important;
  line-height:1.58!important;
}

body.middle-vk-advertising-page .middle-vk-advertising__price-line:last-child{
  border-bottom:0!important;
}

body.middle-vk-advertising-page .middle-vk-advertising__price-line--package-title{
  margin:9px 0 0!important;
  padding:10px 12px 5px!important;
  border:0!important;
  border-radius:14px 14px 0 0!important;
  background:#f3f8fd!important;
  color:#244e83!important;
  font-size:12.5px!important;
  font-weight:850!important;
}

body.middle-vk-advertising-page .middle-vk-advertising__price-line--packages{
  margin:0!important;
  padding:5px 12px 11px!important;
  border:0!important;
  border-radius:0 0 14px 14px!important;
  background:#f3f8fd!important;
  color:#596f8c!important;
  font-size:12.5px!important;
  line-height:1.62!important;
}

/* Notes under the price cards. */
body.middle-vk-advertising-page .middle-vk-advertising__editorial-notes{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:14px!important;
  margin:16px 0 0!important;
}

body.middle-vk-advertising-page .middle-vk-advertising__editorial-note{
  margin:0!important;
  padding:17px 18px!important;
  border:1px solid #d8e6f5!important;
  border-radius:18px!important;
  background:#fff!important;
  color:#536b88!important;
  font-size:13.5px!important;
  line-height:1.65!important;
  box-shadow:0 8px 22px rgba(31,70,110,.045)!important;
}

body.middle-vk-advertising-page .middle-vk-advertising__editorial-note--accent{
  border-color:#cfe1f5!important;
  background:linear-gradient(180deg,#f7fbff,#eef6ff)!important;
  color:#315f94!important;
}

/* Keep the extra lower blocks visually separated from the user's price list. */
body.middle-vk-advertising-page .middle-vk-advertising__section--highlights{
  margin-top:4px!important;
}

/* Dark theme. */
html:root[data-middle-theme="dark"] body.middle-vk-advertising-page .middle-vk-advertising__editorial-intro,
html:root[data-middle-theme="dark"] body.middle-vk-advertising-page .middle-vk-advertising__price-card,
html:root[data-middle-theme="dark"] body.middle-vk-advertising-page .middle-vk-advertising__editorial-note{
  background:#182b41!important;
  border-color:#31506d!important;
  box-shadow:none!important;
}

html:root[data-middle-theme="dark"] body.middle-vk-advertising-page .middle-vk-advertising__price-card-head{
  background:#1b3149!important;
  border-bottom-color:#31506d!important;
}

html:root[data-middle-theme="dark"] body.middle-vk-advertising-page .middle-vk-advertising__price-card-title{
  color:#edf6ff!important;
}

html:root[data-middle-theme="dark"] body.middle-vk-advertising-page .middle-vk-advertising__price-card-title a{
  color:#96c9ff!important;
}

html:root[data-middle-theme="dark"] body.middle-vk-advertising-page .middle-vk-advertising__price-line{
  color:#a9bed6!important;
  border-bottom-color:#29445f!important;
}

html:root[data-middle-theme="dark"] body.middle-vk-advertising-page .middle-vk-advertising__price-line--package-title,
html:root[data-middle-theme="dark"] body.middle-vk-advertising-page .middle-vk-advertising__price-line--packages{
  background:#1f3750!important;
}

html:root[data-middle-theme="dark"] body.middle-vk-advertising-page .middle-vk-advertising__price-line--package-title{
  color:#afd4ff!important;
}

html:root[data-middle-theme="dark"] body.middle-vk-advertising-page .middle-vk-advertising__editorial-intro,
html:root[data-middle-theme="dark"] body.middle-vk-advertising-page .middle-vk-advertising__editorial-note{
  color:#a9bed6!important;
}

html:root[data-middle-theme="dark"] body.middle-vk-advertising-page .middle-vk-advertising__editorial-note--accent{
  background:#1a334d!important;
  border-color:#3c648d!important;
  color:#afd4ff!important;
}

/* Tablet/mobile. */
@media(max-width:900px){
  body.middle-vk-advertising-page .middle-vk-advertising__editorial-grid,
  body.middle-vk-advertising-page .middle-vk-advertising__editorial-notes{
    grid-template-columns:1fr!important;
  }

  body.middle-vk-advertising-page .middle-vk-advertising__price-card--max{
    grid-column:auto!important;
  }
}

@media(max-width:720px){
  body.middle-vk-advertising-page .middle-layout{
    width:100%!important;
    padding:14px 9px calc(108px + env(safe-area-inset-bottom))!important;
  }

  body.middle-vk-advertising-page .middle-vk-advertising__media{
    width:100%!important;
    margin:2px auto 16px!important;
    border-radius:18px!important;
  }

  body.middle-vk-advertising-page .middle-vk-advertising__media img,
  body.middle-vk-advertising-page .middle-vk-advertising__media a > img{
    border-radius:18px!important;
  }

  body.middle-vk-advertising-page .middle-vk-advertising__price-card{
    border-radius:18px!important;
  }

  body.middle-vk-advertising-page .middle-vk-advertising__price-card-head{
    min-height:62px!important;
    gap:10px!important;
    padding:12px 13px!important;
  }

  body.middle-vk-advertising-page .middle-vk-advertising__price-card-number{
    flex-basis:34px!important;
    width:34px!important;
    min-width:34px!important;
    max-width:34px!important;
    height:34px!important;
    min-height:34px!important;
    max-height:34px!important;
    border-radius:10px!important;
  }

  body.middle-vk-advertising-page .middle-vk-advertising__price-card--max .middle-vk-advertising__price-card-number{
    flex-basis:51px!important;
    width:51px!important;
    min-width:51px!important;
    max-width:51px!important;
  }

  body.middle-vk-advertising-page .middle-vk-advertising__price-card-title{
    font-size:14px!important;
    line-height:1.34!important;
  }

  body.middle-vk-advertising-page .middle-vk-advertising__price-card-lines{
    padding:4px 13px 12px!important;
  }

  body.middle-vk-advertising-page .middle-vk-advertising__price-line{
    padding:9px 1px!important;
    font-size:12.5px!important;
  }

  body.middle-vk-advertising-page .middle-vk-advertising__editorial-note{
    padding:14px!important;
    border-radius:16px!important;
    font-size:12.5px!important;
  }
}


/* ==========================================================================
   Middle Community 0.4.59 — animated seller cat in "Есть что продать?"
   Keeps the user's existing card structure; replaces only the lower photo.
   ========================================================================== */

.home .middle-home-pair--ads .middle-selected-sell__visual{
  position:relative!important;
  flex:0 0 168px!important;
  min-height:168px!important;
  overflow:hidden!important;
  background:linear-gradient(145deg,#edf5ff,#e5eef8)!important;
}

.home .middle-selected-sell__photo--seller-cat{
  position:absolute!important;
  inset:0!important;
  display:block!important;
  width:100%!important;
  height:100%!important;
  overflow:hidden!important;
  background:#edf5fb!important;
}

.home .middle-selected-sell__seller-cat{
  position:absolute!important;
  left:-2%!important;
  top:-8%!important;
  display:block!important;
  width:104%!important;
  height:116%!important;
  max-width:none!important;
  object-fit:cover!important;
  object-position:52% 46%!important;
  transform-origin:52% 48%!important;
  animation:middleSellCatAlive 5.8s ease-in-out infinite alternate!important;
  will-change:transform!important;
}

/* Softer blend into the text block above. */
.home .middle-home-pair--ads .middle-selected-sell__visual::after{
  content:""!important;
  position:absolute!important;
  inset:0!important;
  z-index:2!important;
  background:
    linear-gradient(180deg,#fff 0%,rgba(255,255,255,.68) 13%,rgba(255,255,255,0) 40%),
    linear-gradient(90deg,rgba(238,246,255,.18),rgba(238,246,255,0) 48%)!important;
  pointer-events:none!important;
}

/* Existing cardboard note becomes a neat marketplace label. */
.home .middle-home-pair--ads .middle-selected-sell__box{
  z-index:4!important;
  right:13px!important;
  bottom:12px!important;
  width:auto!important;
  min-width:154px!important;
  max-width:58%!important;
  padding:10px 13px!important;
  border:1px solid rgba(50,91,138,.16)!important;
  border-radius:13px!important;
  background:rgba(255,255,255,.92)!important;
  color:#193858!important;
  box-shadow:0 10px 24px rgba(30,65,105,.14)!important;
  backdrop-filter:blur(8px)!important;
  -webkit-backdrop-filter:blur(8px)!important;
  transform:rotate(-1deg)!important;
  animation:middleSellTagFloat 4.6s ease-in-out infinite!important;
}

.home .middle-home-pair--ads .middle-selected-sell__box::before{
  display:none!important;
}

.home .middle-home-pair--ads .middle-selected-sell__box b{
  color:#173858!important;
  font-size:11.5px!important;
  line-height:1.1!important;
}

.home .middle-home-pair--ads .middle-selected-sell__box small{
  color:#6f8198!important;
  font-size:8px!important;
  line-height:1.25!important;
}

@keyframes middleSellCatAlive{
  0%{
    transform:translate3d(-2px,2px,0) scale(1.025);
  }
  48%{
    transform:translate3d(2px,-2px,0) scale(1.045);
  }
  100%{
    transform:translate3d(-1px,-4px,0) scale(1.035);
  }
}

@keyframes middleSellTagFloat{
  0%,100%{
    transform:translateY(0) rotate(-1deg);
  }
  50%{
    transform:translateY(-4px) rotate(.35deg);
  }
}

@media (prefers-reduced-motion:reduce){
  .home .middle-selected-sell__seller-cat,
  .home .middle-home-pair--ads .middle-selected-sell__box{
    animation:none!important;
  }
}

:root[data-middle-theme="dark"] .home .middle-selected-sell__photo--seller-cat{
  background:#142538!important;
}

:root[data-middle-theme="dark"] .home .middle-home-pair--ads .middle-selected-sell__visual::after{
  background:
    linear-gradient(180deg,#182534 0%,rgba(24,37,52,.62) 15%,rgba(24,37,52,0) 42%),
    linear-gradient(90deg,rgba(20,36,52,.16),rgba(20,36,52,0) 48%)!important;
}

:root[data-middle-theme="dark"] .home .middle-home-pair--ads .middle-selected-sell__box{
  background:rgba(24,42,61,.92)!important;
  border-color:#31506d!important;
  color:#eef6ff!important;
}

:root[data-middle-theme="dark"] .home .middle-home-pair--ads .middle-selected-sell__box b{
  color:#eef6ff!important;
}

:root[data-middle-theme="dark"] .home .middle-home-pair--ads .middle-selected-sell__box small{
  color:#9eb1c7!important;
}

@media(max-width:720px){
  .home .middle-home-pair--ads .middle-selected-sell__visual{
    flex-basis:178px!important;
    min-height:178px!important;
  }

  .home .middle-selected-sell__seller-cat{
    left:-5%!important;
    top:-4%!important;
    width:110%!important;
    height:112%!important;
    object-position:52% 45%!important;
  }

  .home .middle-home-pair--ads .middle-selected-sell__box{
    right:10px!important;
    bottom:10px!important;
    min-width:145px!important;
    max-width:62%!important;
  }
}


/* ==========================================================================
   Middle Community 0.4.61 — prominent "Создать пост" in header + menu
   ========================================================================== */

.middle-side-drawer__create-wrap{
  margin:0 0 14px!important;
}

.middle-side-drawer__create-post{
  position:relative!important;
  display:grid!important;
  grid-template-columns:42px minmax(0,1fr) 20px!important;
  gap:11px!important;
  align-items:center!important;
  min-height:68px!important;
  width:100%!important;
  margin:0!important;
  padding:12px 13px!important;
  overflow:hidden!important;
  border:1px solid #1d7cf2!important;
  border-radius:18px!important;
  background:linear-gradient(135deg,#2588f7 0%,#1672e7 58%,#0f63cf 100%)!important;
  color:#fff!important;
  text-decoration:none!important;
  box-shadow:0 14px 28px rgba(21,112,224,.22)!important;
}

.middle-side-drawer__create-post::after{
  content:""!important;
  position:absolute!important;
  top:-34px!important;
  right:-18px!important;
  width:100px!important;
  height:100px!important;
  border-radius:50%!important;
  background:radial-gradient(circle,rgba(255,255,255,.22),rgba(255,255,255,0) 68%)!important;
  pointer-events:none!important;
}

.middle-side-drawer__create-icon{
  display:grid!important;
  place-items:center!important;
  width:42px!important;
  height:42px!important;
  border-radius:13px!important;
  background:rgba(255,255,255,.16)!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.16)!important;
}

.middle-side-drawer__create-icon svg{
  width:21px!important;
  height:21px!important;
  fill:none!important;
  stroke:#fff!important;
  stroke-width:2.1!important;
  stroke-linecap:round!important;
}

.middle-side-drawer__create-copy{
  display:flex!important;
  flex-direction:column!important;
  align-items:flex-start!important;
  gap:4px!important;
  min-width:0!important;
}

.middle-side-drawer__create-copy strong{
  color:#fff!important;
  font-size:14px!important;
  line-height:1.05!important;
  font-weight:850!important;
}

.middle-side-drawer__create-copy small{
  color:rgba(255,255,255,.78)!important;
  font-size:9.5px!important;
  line-height:1.25!important;
  font-weight:650!important;
}

.middle-side-drawer__create-arrow{
  width:18px!important;
  height:18px!important;
  fill:none!important;
  stroke:rgba(255,255,255,.9)!important;
  stroke-width:1.9!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
}

.middle-side-drawer__create-post:hover,
.middle-side-drawer__create-post:focus-visible{
  background:linear-gradient(135deg,#1d83f6 0%,#106ce0 62%,#0a5fc9 100%)!important;
  box-shadow:0 16px 32px rgba(21,112,224,.28)!important;
  transform:translateY(-1px)!important;
}

/* Mobile app navigation: existing center publication action remains in its
   correct slot, but is now clearly named "Создать". */
@media(max-width:720px){
  body .middle-header-tools > .middle-write-link{
    color:#1675e5!important;
  }

  body .middle-header-tools > .middle-write-link .middle-publish-plus-icon{
    background:linear-gradient(180deg,#2f91ff,#1675ed)!important;
    border-color:#1675ed!important;
    color:#fff!important;
    stroke:#fff!important;
    box-shadow:0 7px 15px rgba(22,117,237,.20)!important;
  }

  body .middle-header-tools > .middle-write-link > span{
    color:#1675e5!important;
    font-weight:800!important;
  }

  .middle-side-drawer__create-wrap{
    margin-bottom:12px!important;
  }

  .middle-side-drawer__create-post{
    min-height:64px!important;
    grid-template-columns:38px minmax(0,1fr) 18px!important;
    gap:10px!important;
    padding:11px 12px!important;
    border-radius:16px!important;
  }

  .middle-side-drawer__create-icon{
    width:38px!important;
    height:38px!important;
    border-radius:12px!important;
  }

  .middle-side-drawer__create-copy strong{
    font-size:13px!important;
  }

  .middle-side-drawer__create-copy small{
    font-size:9px!important;
  }
}

html:root[data-middle-theme="dark"] body .middle-side-drawer__create-post{
  border-color:#2786f4!important;
  background:linear-gradient(135deg,#237fe7,#1269d3 65%,#0c59b8)!important;
  box-shadow:0 14px 28px rgba(0,0,0,.25)!important;
}


/* ==========================================================================
   Middle Community 0.4.62 — stronger visible create-post drawer card
   ========================================================================== */
body>.middle-side-drawer .middle-side-drawer__create-wrap{
  margin:0 0 14px!important;
}

body>.middle-side-drawer .middle-side-drawer__create-post{
  position:relative!important;
  display:grid!important;
  grid-template-columns:42px minmax(0,1fr) 20px!important;
  gap:11px!important;
  align-items:center!important;
  width:100%!important;
  min-height:68px!important;
  margin:0!important;
  padding:12px 13px!important;
  overflow:hidden!important;
  box-sizing:border-box!important;
  border:1px solid #b9d5fb!important;
  border-radius:18px!important;
  background:linear-gradient(135deg,#f6fbff 0%,#edf6ff 56%,#e5f1ff 100%)!important;
  color:#163a63!important;
  text-decoration:none!important;
  box-shadow:0 12px 24px rgba(19,83,155,.10)!important;
}

body>.middle-side-drawer .middle-side-drawer__create-post::before{
  content:""!important;
  position:absolute!important;
  inset:0!important;
  border-radius:inherit!important;
  background:linear-gradient(90deg,rgba(38,129,245,.08),rgba(38,129,245,0) 46%)!important;
  pointer-events:none!important;
}

body>.middle-side-drawer .middle-side-drawer__create-post::after{
  content:""!important;
  position:absolute!important;
  top:-34px!important;
  right:-18px!important;
  width:100px!important;
  height:100px!important;
  border-radius:50%!important;
  background:radial-gradient(circle,rgba(68,145,245,.16),rgba(68,145,245,0) 68%)!important;
  pointer-events:none!important;
}

body>.middle-side-drawer .middle-side-drawer__create-icon{
  position:relative!important;
  z-index:1!important;
  display:grid!important;
  place-items:center!important;
  width:42px!important;
  height:42px!important;
  border-radius:13px!important;
  background:linear-gradient(180deg,#2f91ff,#1675ed)!important;
  box-shadow:0 8px 18px rgba(22,117,237,.22)!important;
}

body>.middle-side-drawer .middle-side-drawer__create-icon svg{
  width:21px!important;
  height:21px!important;
  fill:none!important;
  stroke:#fff!important;
  stroke-width:2.1!important;
  stroke-linecap:round!important;
}

body>.middle-side-drawer .middle-side-drawer__create-copy{
  position:relative!important;
  z-index:1!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:flex-start!important;
  gap:4px!important;
  min-width:0!important;
}

body>.middle-side-drawer .middle-side-drawer__create-copy strong{
  display:block!important;
  color:#163558!important;
  font-size:14px!important;
  line-height:1.05!important;
  font-weight:850!important;
}

body>.middle-side-drawer .middle-side-drawer__create-copy small{
  display:block!important;
  color:#5d7390!important;
  font-size:9.5px!important;
  line-height:1.25!important;
  font-weight:700!important;
}

body>.middle-side-drawer .middle-side-drawer__create-arrow{
  position:relative!important;
  z-index:1!important;
  width:18px!important;
  height:18px!important;
  fill:none!important;
  stroke:#1c75de!important;
  stroke-width:1.9!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
}

body>.middle-side-drawer .middle-side-drawer__create-post:hover,
body>.middle-side-drawer .middle-side-drawer__create-post:focus-visible{
  border-color:#8dbcf7!important;
  background:linear-gradient(135deg,#f0f8ff 0%,#e5f1ff 60%,#dcebff 100%)!important;
  box-shadow:0 14px 28px rgba(19,83,155,.14)!important;
  transform:translateY(-1px)!important;
}

@media(max-width:720px){
  body>.middle-side-drawer .middle-side-drawer__create-post{
    min-height:64px!important;
    grid-template-columns:38px minmax(0,1fr) 18px!important;
    gap:10px!important;
    padding:11px 12px!important;
    border-radius:16px!important;
  }

  body>.middle-side-drawer .middle-side-drawer__create-icon{
    width:38px!important;
    height:38px!important;
    border-radius:12px!important;
  }

  body>.middle-side-drawer .middle-side-drawer__create-copy strong{
    font-size:13px!important;
  }

  body>.middle-side-drawer .middle-side-drawer__create-copy small{
    font-size:9px!important;
  }
}

html:root[data-middle-theme="dark"] body>.middle-side-drawer .middle-side-drawer__create-post{
  border-color:#2b5181!important;
  background:linear-gradient(135deg,#10233a 0%,#132b47 58%,#173458 100%)!important;
  color:#eef6ff!important;
  box-shadow:0 16px 30px rgba(0,0,0,.26)!important;
}

html:root[data-middle-theme="dark"] body>.middle-side-drawer .middle-side-drawer__create-post::before{
  background:linear-gradient(90deg,rgba(48,140,255,.16),rgba(48,140,255,0) 46%)!important;
}

html:root[data-middle-theme="dark"] body>.middle-side-drawer .middle-side-drawer__create-post::after{
  background:radial-gradient(circle,rgba(78,156,255,.17),rgba(78,156,255,0) 68%)!important;
}

html:root[data-middle-theme="dark"] body>.middle-side-drawer .middle-side-drawer__create-copy strong{
  color:#ffffff!important;
}

html:root[data-middle-theme="dark"] body>.middle-side-drawer .middle-side-drawer__create-copy small{
  color:rgba(228,239,255,.76)!important;
}

html:root[data-middle-theme="dark"] body>.middle-side-drawer .middle-side-drawer__create-arrow{
  stroke:#83bcff!important;
}


/* Middle Community 0.4.63 — compact post interaction row fallback */
.middle-comments-action__icon{fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.middle-post-actions{gap:6px!important}
@media(max-width:720px){.middle-post-actions{gap:5px!important}}


/* ==========================================================================
   0.4.64 — "Чепецк без прикрас" archive intro now feels like the homepage:
   stronger branded intro, city-night photo inside the copy block, and a clean
   CTA area on the right.
   ========================================================================== */
body.category .middle-page-head.middle-category-head.middle-category-head--reader{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:center!important;
  gap:24px!important;
  min-height:194px!important;
  padding:18px!important;
  border-radius:30px!important;
  border:1px solid #d8e6f5!important;
  background:
    radial-gradient(circle at 100% 0, rgba(81,146,255,.14), rgba(81,146,255,0) 42%),
    linear-gradient(135deg,#f8fbff 0%,#eef5fc 100%)!important;
  box-shadow:0 18px 40px rgba(28,58,95,.08)!important;
  overflow:hidden!important;
}

body.category .middle-page-head.middle-category-head.middle-category-head--reader::after{
  content:""!important;
  position:absolute!important;
  inset:auto -48px -52px auto!important;
  width:240px!important;
  height:240px!important;
  border-radius:50%!important;
  border:1px solid rgba(90,145,230,.12)!important;
  background:radial-gradient(circle,rgba(255,255,255,.55),rgba(255,255,255,0) 72%)!important;
  pointer-events:none!important;
}

body.category .middle-page-head.middle-category-head.middle-category-head--reader .middle-page-head__copy{
  position:relative!important;
  z-index:1!important;
  min-width:0!important;
  min-height:156px!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
  padding:24px 30px!important;
  border-radius:24px!important;
  overflow:hidden!important;
  background:
    linear-gradient(110deg,rgba(10,24,39,.82) 0%, rgba(14,34,54,.76) 52%, rgba(16,38,60,.58) 100%),
    url('../images/home-community-night.jpg') 64% 50% / cover no-repeat!important;
  box-shadow:0 14px 34px rgba(12,26,43,.18)!important;
}

body.category .middle-page-head.middle-category-head.middle-category-head--reader .middle-page-head__copy::before{
  content:""!important;
  position:absolute!important;
  inset:0!important;
  background:
    radial-gradient(circle at 78% 18%, rgba(255,149,120,.20), rgba(255,149,120,0) 26%),
    radial-gradient(circle at 14% 12%, rgba(91,167,255,.24), rgba(91,167,255,0) 28%)!important;
  pointer-events:none!important;
}

body.category .middle-page-head.middle-category-head.middle-category-head--reader .middle-category-head__kicker{
  position:relative!important;
  z-index:1!important;
  color:#dcecff!important;
}

body.category .middle-page-head.middle-category-head.middle-category-head--reader .middle-category-head__icon{
  background:rgba(255,255,255,.14)!important;
  backdrop-filter:blur(10px)!important;
  -webkit-backdrop-filter:blur(10px)!important;
}

body.category .middle-page-head.middle-category-head.middle-category-head--reader .middle-category-head__kicker small{
  background:rgba(255,255,255,.14)!important;
  color:#eef6ff!important;
}

body.category .middle-page-head.middle-category-head.middle-category-head--reader h1{
  position:relative!important;
  z-index:1!important;
  margin:12px 0 8px!important;
  color:#ffffff!important;
  font-size:34px!important;
  line-height:1.02!important;
  letter-spacing:-.03em!important;
}

body.category .middle-page-head.middle-category-head.middle-category-head--reader .middle-muted{
  position:relative!important;
  z-index:1!important;
  max-width:760px!important;
  margin-top:0!important;
  color:rgba(235,244,255,.86)!important;
  font-size:14px!important;
  line-height:1.55!important;
}

body.category .middle-page-head.middle-category-head.middle-category-head--reader > .middle-btn{
  position:relative!important;
  z-index:1!important;
  align-self:center!important;
  justify-self:end!important;
  min-width:198px!important;
  height:54px!important;
  padding:0 24px!important;
  border:1px solid #6fb0ff!important;
  border-radius:16px!important;
  background:linear-gradient(135deg,#5aa7ff 0%,#2f84f4 100%)!important;
  color:#fff!important;
  font-size:16px!important;
  font-weight:800!important;
  box-shadow:0 16px 28px rgba(52,122,222,.22)!important;
}

body.category .middle-page-head.middle-category-head.middle-category-head--reader > .middle-btn:hover,
body.category .middle-page-head.middle-category-head.middle-category-head--reader > .middle-btn:focus-visible{
  transform:translateY(-1px)!important;
  box-shadow:0 18px 32px rgba(52,122,222,.26)!important;
}

@media(max-width:980px){
  body.category .middle-page-head.middle-category-head.middle-category-head--reader{
    grid-template-columns:minmax(0,1fr)!important;
    gap:14px!important;
  }
  body.category .middle-page-head.middle-category-head.middle-category-head--reader > .middle-btn{
    justify-self:start!important;
  }
}

@media(max-width:720px){
  body.category .middle-page-head.middle-category-head.middle-category-head--reader{
    padding:12px!important;
    gap:12px!important;
    min-height:0!important;
    border-radius:23px!important;
  }

  body.category .middle-page-head.middle-category-head.middle-category-head--reader .middle-page-head__copy{
    min-height:138px!important;
    padding:18px 18px 20px!important;
    border-radius:18px!important;
    background:
      linear-gradient(125deg,rgba(10,24,39,.84) 0%, rgba(14,34,54,.80) 54%, rgba(18,40,60,.62) 100%),
      url('../images/home-community-night.jpg') 62% 50% / cover no-repeat!important;
  }

  body.category .middle-page-head.middle-category-head.middle-category-head--reader .middle-category-head__kicker{
    gap:8px!important;
    font-size:8.7px!important;
  }

  body.category .middle-page-head.middle-category-head.middle-category-head--reader .middle-category-head__icon{
    width:30px!important;
    height:30px!important;
    flex-basis:30px!important;
    border-radius:10px!important;
  }

  body.category .middle-page-head.middle-category-head.middle-category-head--reader .middle-category-head__kicker small{
    min-width:24px!important;
    height:20px!important;
    font-size:8px!important;
  }

  body.category .middle-page-head.middle-category-head.middle-category-head--reader h1{
    margin:10px 0 7px!important;
    font-size:24px!important;
  }

  body.category .middle-page-head.middle-category-head.middle-category-head--reader .middle-muted{
    font-size:12px!important;
    line-height:1.45!important;
  }

  body.category .middle-page-head.middle-category-head.middle-category-head--reader > .middle-btn{
    width:100%!important;
    min-width:0!important;
    height:48px!important;
    justify-self:stretch!important;
    border-radius:14px!important;
    font-size:14px!important;
  }
}

html:root[data-middle-theme="dark"] body.category .middle-page-head.middle-category-head.middle-category-head--reader{
  border-color:#28425c!important;
  background:
    radial-gradient(circle at 100% 0, rgba(89,160,255,.16), rgba(89,160,255,0) 42%),
    linear-gradient(135deg,#162536 0%,#1b2d40 100%)!important;
  box-shadow:0 20px 44px rgba(0,0,0,.24)!important;
}

html:root[data-middle-theme="dark"] body.category .middle-page-head.middle-category-head.middle-category-head--reader::after{
  border-color:rgba(136,182,235,.12)!important;
  background:radial-gradient(circle,rgba(255,255,255,.03),rgba(255,255,255,0) 72%)!important;
}


/* ======================================================================
   0.4.65 — use the approved illustrated city panorama as the dark branded
   background for the reader blocks on the homepage and reader archive.
   ====================================================================== */

/* Главная — Чепецк без прикрас: image only behind the branded title panel. */
.home .middle-selected-reader__intro{
  background:
    linear-gradient(100deg,
      rgba(10,18,28,.92) 0%,
      rgba(11,22,34,.86) 48%,
      rgba(11,23,36,.68) 100%),
    url('../images/reader-city-cartoon-dark.jpg') 58% 46% / cover no-repeat!important;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.06),
    0 14px 34px rgba(5,12,21,.18)!important;
}
.home .middle-selected-reader__intro::before{
  content:""!important;
  position:absolute!important;
  inset:0!important;
  background:
    radial-gradient(circle at 14% 12%, rgba(255,90,90,.14), rgba(255,90,90,0) 24%),
    radial-gradient(circle at 86% 18%, rgba(94,158,255,.16), rgba(94,158,255,0) 26%)!important;
  pointer-events:none!important;
  z-index:1!important;
}

/* Главная — Есть новости или проблема?: the same image as a full-card background. */
.home .middle-selected-problem__media{
  background:
    linear-gradient(118deg, rgba(9,16,25,.18), rgba(9,16,25,.18)),
    url('../images/reader-city-cartoon-dark.jpg') 60% 48% / cover no-repeat!important;
}
.home .middle-selected-problem__shade{
  background:
    linear-gradient(100deg,
      rgba(8,15,23,.94) 0%,
      rgba(9,16,25,.80) 42%,
      rgba(9,16,25,.50) 74%,
      rgba(9,16,25,.46) 100%),
    linear-gradient(180deg, rgba(7,14,21,.12), rgba(7,14,21,.58))!important;
}

/* Страница рубрики — Чепецк без прикрас: same illustration in the top hero. */
body.category .middle-page-head.middle-category-head.middle-category-head--reader .middle-page-head__copy{
  background:
    linear-gradient(108deg,
      rgba(10,20,31,.88) 0%,
      rgba(12,24,37,.78) 50%,
      rgba(12,24,37,.60) 100%),
    url('../images/reader-city-cartoon-dark.jpg') 58% 46% / cover no-repeat!important;
}
body.category .middle-page-head.middle-category-head.middle-category-head--reader .middle-page-head__copy::before{
  background:
    radial-gradient(circle at 80% 16%, rgba(255,163,103,.15), rgba(255,163,103,0) 26%),
    radial-gradient(circle at 14% 12%, rgba(91,167,255,.20), rgba(91,167,255,0) 28%)!important;
}

@media(min-width:901px){
  .home .middle-home-pair--reader .middle-selected-problem__media,
  .home .middle-selected-reader__intro,
  body.category .middle-page-head.middle-category-head.middle-category-head--reader .middle-page-head__copy{
    background-position:58% 46%!important;
  }
}

@media(max-width:900px){
  .home .middle-selected-reader__intro{
    background:
      linear-gradient(180deg, rgba(10,18,28,.90), rgba(11,22,34,.84)),
      url('../images/reader-city-cartoon-dark.jpg') 56% 46% / cover no-repeat!important;
  }
  .home .middle-selected-problem__media{
    background-position:56% 46%!important;
  }
  .home .middle-selected-problem__shade{
    background:
      linear-gradient(180deg, rgba(8,15,23,.72) 0%, rgba(8,15,23,.50) 46%, rgba(8,15,23,.90) 100%)!important;
  }
  body.category .middle-page-head.middle-category-head.middle-category-head--reader .middle-page-head__copy{
    background:
      linear-gradient(126deg, rgba(10,20,31,.88) 0%, rgba(12,24,37,.82) 54%, rgba(12,24,37,.66) 100%),
      url('../images/reader-city-cartoon-dark.jpg') 56% 46% / cover no-repeat!important;
  }
}

html:root[data-middle-theme="dark"] .home .middle-selected-reader__intro{
  background:
    linear-gradient(100deg,
      rgba(6,12,19,.94) 0%,
      rgba(8,15,23,.88) 50%,
      rgba(8,15,23,.72) 100%),
    url('../images/reader-city-cartoon-dark.jpg') 58% 46% / cover no-repeat!important;
}
html:root[data-middle-theme="dark"] .home .middle-selected-problem__shade{
  background:
    linear-gradient(100deg,
      rgba(4,9,14,.96) 0%,
      rgba(6,12,18,.84) 44%,
      rgba(6,12,18,.58) 75%,
      rgba(6,12,18,.52) 100%),
    linear-gradient(180deg, rgba(5,10,16,.18), rgba(5,10,16,.66))!important;
}
html:root[data-middle-theme="dark"] body.category .middle-page-head.middle-category-head.middle-category-head--reader .middle-page-head__copy{
  background:
    linear-gradient(108deg,
      rgba(6,13,20,.92) 0%,
      rgba(8,17,26,.84) 52%,
      rgba(8,17,26,.70) 100%),
    url('../images/reader-city-cartoon-dark.jpg') 58% 46% / cover no-repeat!important;
}

/* ======================================================================
   0.4.66 — reader posts without photos get the approved dark illustrated
   fallback on the homepage; reader archive CTA matches the reader block.
   ====================================================================== */

/* Homepage reader stage: use the approved illustrated background only for
   posts without a featured image (the existing placeholder markup). */
.home .middle-selected-reader__slide-placeholder{
  position:relative!important;
  display:grid!important;
  place-items:center!important;
  overflow:hidden!important;
  background:
    linear-gradient(118deg,
      rgba(6,14,22,.94) 0%,
      rgba(9,19,30,.82) 46%,
      rgba(9,19,30,.70) 100%),
    url('../images/reader-city-cartoon-dark.jpg') 58% 46% / cover no-repeat!important;
}
.home .middle-selected-reader__slide-placeholder::before{
  content:""!important;
  position:absolute!important;
  inset:0!important;
  background:
    radial-gradient(circle at 16% 14%, rgba(255,84,104,.16), rgba(255,84,104,0) 24%),
    radial-gradient(circle at 82% 18%, rgba(96,164,255,.16), rgba(96,164,255,0) 26%),
    linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,0))!important;
  pointer-events:none!important;
}
.home .middle-selected-reader__slide-placeholder::after{
  content:""!important;
  position:absolute!important;
  inset:14px!important;
  border-radius:18px!important;
  border:1px solid rgba(255,255,255,.08)!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.02)!important;
  pointer-events:none!important;
}
.home .middle-selected-reader__slide-placeholder img{
  position:relative!important;
  z-index:1!important;
  width:84px!important;
  height:84px!important;
  padding:14px!important;
  border-radius:22px!important;
  background:rgba(255,56,82,.16)!important;
  box-shadow:0 10px 26px rgba(0,0,0,.18)!important;
  opacity:1!important;
}
.home .middle-selected-reader__slide-placeholder small{
  position:relative!important;
  z-index:1!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:26px!important;
  padding:0 12px!important;
  border-radius:999px!important;
  background:rgba(9,17,27,.62)!important;
  color:#f1f6ff!important;
  font-size:10px!important;
  font-weight:700!important;
  letter-spacing:.04em!important;
  text-transform:uppercase!important;
  backdrop-filter:blur(10px)!important;
  -webkit-backdrop-filter:blur(10px)!important;
}

/* Homepage reader thumbs: keep real photos untouched, but make the no-photo
   thumb use the same branded fallback behind the eye icon. */
.home .middle-selected-reader__thumb-media{
  background:
    linear-gradient(120deg, rgba(9,17,27,.92), rgba(12,24,38,.82)),
    url('../images/reader-city-cartoon-dark.jpg') 58% 46% / cover no-repeat!important;
}
.home .middle-selected-reader__thumb-media > img[src*='home-eye.svg']{
  width:100%!important;
  height:100%!important;
  object-fit:contain!important;
  padding:10px!important;
  border-radius:9px!important;
  background:rgba(255,62,89,.12)!important;
}

/* Reader archive button: match the red/dark branded style of the block. */
body.category .middle-page-head.middle-category-head.middle-category-head--reader > .middle-btn,
body.category .middle-page-head.middle-category-head.middle-category-head--reader > .middle-btn.middle-publish-toggle{
  border:1px solid rgba(255,106,128,.40)!important;
  background:linear-gradient(135deg,#ff4b63 0%,#ef304b 52%,#d31f39 100%)!important;
  color:#fff!important;
  box-shadow:
    0 18px 34px rgba(211,31,57,.24),
    inset 0 1px 0 rgba(255,255,255,.18)!important;
}
body.category .middle-page-head.middle-category-head.middle-category-head--reader > .middle-btn:hover,
body.category .middle-page-head.middle-category-head.middle-category-head--reader > .middle-btn:focus-visible,
body.category .middle-page-head.middle-category-head.middle-category-head--reader > .middle-btn.middle-publish-toggle:hover,
body.category .middle-page-head.middle-category-head.middle-category-head--reader > .middle-btn.middle-publish-toggle:focus-visible{
  transform:translateY(-1px)!important;
  box-shadow:
    0 20px 36px rgba(211,31,57,.28),
    inset 0 1px 0 rgba(255,255,255,.22)!important;
}

html:root[data-middle-theme='dark'] body.category .middle-page-head.middle-category-head.middle-category-head--reader > .middle-btn,
html:root[data-middle-theme='dark'] body.category .middle-page-head.middle-category-head.middle-category-head--reader > .middle-btn.middle-publish-toggle{
  border-color:rgba(255,118,138,.46)!important;
  background:linear-gradient(135deg,#ff5b71 0%,#f13a52 54%,#d8243f 100%)!important;
  box-shadow:
    0 18px 34px rgba(0,0,0,.26),
    0 14px 28px rgba(216,36,63,.22),
    inset 0 1px 0 rgba(255,255,255,.14)!important;
}


/* ==========================================================================
   Middle Community 0.4.67 — mobile Variant 2:
   sticky search on top + weather at the right; Ads replaces bottom Search.
   ========================================================================== */

.middle-mobile-sticky-search{display:none}

@media(max-width:720px){
  /* On the homepage this bar replaces the old empty mobile header area and
     remains visible while the user scrolls. */
  body.home .middle-mobile-sticky-search,
  body.front-page .middle-mobile-sticky-search{
    position:sticky!important;
    top:0!important;
    z-index:1250!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    align-items:center!important;
    gap:8px!important;
    width:100%!important;
    min-height:60px!important;
    margin:0!important;
    padding:8px 9px!important;
    box-sizing:border-box!important;
    border:0!important;
    border-bottom:1px solid rgba(210,222,236,.86)!important;
    background:rgba(248,251,255,.94)!important;
    box-shadow:0 8px 24px rgba(28,58,94,.07)!important;
    backdrop-filter:blur(18px) saturate(1.12)!important;
    -webkit-backdrop-filter:blur(18px) saturate(1.12)!important;
  }

  body.admin-bar.home .middle-mobile-sticky-search,
  body.admin-bar.front-page .middle-mobile-sticky-search{
    top:46px!important;
  }

  .middle-mobile-sticky-search__form{
    display:flex!important;
    align-items:center!important;
    min-width:0!important;
    height:44px!important;
    margin:0!important;
    padding:0 13px!important;
    gap:9px!important;
    border:1px solid #dbe6f2!important;
    border-radius:14px!important;
    background:#fff!important;
    box-shadow:0 4px 14px rgba(26,63,101,.045)!important;
  }

  .middle-mobile-sticky-search__form svg{
    display:block!important;
    flex:0 0 18px!important;
    width:18px!important;
    height:18px!important;
    margin:0!important;
    fill:none!important;
    stroke:#6e88a7!important;
    stroke-width:1.9!important;
    stroke-linecap:round!important;
  }

  .middle-mobile-sticky-search__form input[type='search']{
    -webkit-appearance:none!important;
    appearance:none!important;
    display:block!important;
    flex:1 1 auto!important;
    width:100%!important;
    min-width:0!important;
    height:42px!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    outline:0!important;
    background:transparent!important;
    box-shadow:none!important;
    color:#172e4d!important;
    font-size:14px!important;
    line-height:1!important;
    font-weight:600!important;
  }

  .middle-mobile-sticky-search__form input[type='search']::placeholder{
    color:#9aacc0!important;
    opacity:1!important;
  }

  .middle-mobile-sticky-search__form input[type='search']::-webkit-search-cancel-button{
    opacity:.45!important;
  }

  .middle-mobile-sticky-search__weather{
    display:block!important;
    min-width:0!important;
  }

  .middle-mobile-sticky-search__weather .middle-header-weather{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:5px!important;
    width:auto!important;
    min-width:78px!important;
    max-width:90px!important;
    height:44px!important;
    min-height:44px!important;
    margin:0!important;
    padding:0 10px!important;
    box-sizing:border-box!important;
    border:1px solid #dbe6f2!important;
    border-radius:14px!important;
    background:#fff!important;
    color:#183655!important;
    box-shadow:0 4px 14px rgba(26,63,101,.045)!important;
    text-decoration:none!important;
    white-space:nowrap!important;
  }

  .middle-mobile-sticky-search__weather .middle-header-weather__icon{
    display:block!important;
    flex:0 0 auto!important;
    margin:0!important;
    font-size:19px!important;
    line-height:1!important;
  }

  .middle-mobile-sticky-search__weather .middle-header-weather strong{
    display:block!important;
    margin:0!important;
    color:#183655!important;
    font-size:13px!important;
    line-height:1!important;
    font-weight:850!important;
  }

  /* Slot 2 is now Ads instead of Search. */
  .middle-header-tools>.middle-mobile-ads-link{
    grid-column:2!important;
    grid-row:1!important;
    order:unset!important;
    position:relative!important;
    inset:auto!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:flex-end!important;
    gap:5px!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    height:66px!important;
    min-height:66px!important;
    margin:0!important;
    padding:4px 2px 6px!important;
    border:0!important;
    border-radius:15px!important;
    background:transparent!important;
    color:#52647b!important;
    box-shadow:none!important;
    text-decoration:none!important;
    box-sizing:border-box!important;
  }

  .middle-header-tools>.middle-mobile-ads-link svg{
    display:block!important;
    flex:0 0 25px!important;
    width:25px!important;
    height:25px!important;
    min-width:25px!important;
    min-height:25px!important;
    margin:0 auto!important;
    fill:none!important;
    stroke:currentColor!important;
    stroke-width:1.85!important;
    stroke-linecap:round!important;
    stroke-linejoin:round!important;
  }

  .middle-header-tools>.middle-mobile-ads-link .middle-mobile-nav-label{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    margin:0!important;
    padding:0 1px!important;
    overflow:hidden!important;
    color:#52647b!important;
    font-size:9.2px!important;
    line-height:1!important;
    font-weight:650!important;
    text-align:center!important;
    white-space:nowrap!important;
    text-overflow:ellipsis!important;
    opacity:1!important;
  }

  .middle-header-tools>.middle-search-toggle{
    display:none!important;
  }

  /* Ensure the remaining five slots stay exactly aligned. */
  .middle-mobile-home-link{grid-column:1!important;grid-row:1!important}
  .middle-header-tools>.middle-write-link{grid-column:3!important;grid-row:1!important}
  .middle-header-tools>.middle-messages-link,
  .middle-header-tools>.middle-account-link:not(.middle-profile-link){grid-column:4!important;grid-row:1!important}
  .middle-header-dropdown--menu{grid-column:5!important;grid-row:1!important}

  /* The hero starts immediately after the sticky search bar. */
  body.home .middle-exact-hero-zone,
  body.front-page .middle-exact-hero-zone{
    margin-top:0!important;
  }

  html:root[data-middle-theme='dark'] body.home .middle-mobile-sticky-search,
  html:root[data-middle-theme='dark'] body.front-page .middle-mobile-sticky-search{
    border-bottom-color:#2d4359!important;
    background:rgba(19,31,44,.95)!important;
    box-shadow:0 8px 24px rgba(0,0,0,.18)!important;
  }

  html:root[data-middle-theme='dark'] .middle-mobile-sticky-search__form,
  html:root[data-middle-theme='dark'] .middle-mobile-sticky-search__weather .middle-header-weather{
    border-color:#324b64!important;
    background:#182b3e!important;
    box-shadow:none!important;
  }

  html:root[data-middle-theme='dark'] .middle-mobile-sticky-search__form input[type='search'],
  html:root[data-middle-theme='dark'] .middle-mobile-sticky-search__weather .middle-header-weather,
  html:root[data-middle-theme='dark'] .middle-mobile-sticky-search__weather .middle-header-weather strong{
    color:#eef6ff!important;
  }

  html:root[data-middle-theme='dark'] .middle-mobile-sticky-search__form input[type='search']::placeholder{
    color:#8298af!important;
  }

  html:root[data-middle-theme='dark'] .middle-mobile-sticky-search__form svg{
    stroke:#9fb6cc!important;
  }
}


/* ==========================================================================
   Middle Community 0.4.69 — approved mobile top layout, hard fixed on ALL pages
   + truly uncropped homepage hero and exact top-left city plate.
   ========================================================================== */
@media(max-width:720px){
  /* The top row behaves like the bottom app navigation: fixed, not sticky.
     It is intentionally outside the collapsed site header. */
  html body .middle-mobile-sticky-search{
    position:fixed!important;
    top:0!important;
    left:0!important;
    right:0!important;
    z-index:1250!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) 122px!important;
    align-items:center!important;
    gap:8px!important;
    width:100%!important;
    min-width:0!important;
    height:68px!important;
    min-height:68px!important;
    margin:0!important;
    padding:10px 9px!important;
    box-sizing:border-box!important;
    border:0!important;
    border-bottom:1px solid rgba(210,222,236,.88)!important;
    background:rgba(248,251,255,.965)!important;
    box-shadow:0 8px 24px rgba(28,58,94,.08)!important;
    backdrop-filter:blur(20px) saturate(1.14)!important;
    -webkit-backdrop-filter:blur(20px) saturate(1.14)!important;
    transform:none!important;
  }

  /* Reserve real space for the fixed strip on homepage and every internal page.
     These selectors deliberately outrank the older homepage padding reset. */
  html body.home,
  html body.front-page,
  html body:not(.home):not(.front-page){
    padding-top:68px!important;
  }

  /* Homepage hides the WP toolbar itself, so its search strip must stay at 0. */
  html.middle-home-adminbar-reset body.admin-bar .middle-mobile-sticky-search{
    top:0!important;
  }
  html.middle-home-adminbar-reset body.admin-bar.home,
  html.middle-home-adminbar-reset body.admin-bar.front-page{
    padding-top:68px!important;
  }

  /* On internal pages where WP's mobile admin bar is actually visible,
     keep our row directly below it. */
  html:not(.middle-home-adminbar-reset) body.admin-bar .middle-mobile-sticky-search{
    top:46px!important;
  }
  html:not(.middle-home-adminbar-reset) body.admin-bar:not(.home):not(.front-page){
    padding-top:114px!important;
  }

  html body .middle-mobile-sticky-search__form{
    display:flex!important;
    align-items:center!important;
    min-width:0!important;
    width:100%!important;
    height:48px!important;
    margin:0!important;
    padding:0 14px!important;
    gap:10px!important;
    border:1px solid #d9e5f1!important;
    border-radius:16px!important;
    background:#fff!important;
    box-shadow:0 5px 16px rgba(26,63,101,.055)!important;
  }
  html body .middle-mobile-sticky-search__form svg{
    flex:0 0 20px!important;
    width:20px!important;
    height:20px!important;
    stroke:#6e88a7!important;
    stroke-width:1.9!important;
  }
  html body .middle-mobile-sticky-search__form input[type='search']{
    display:block!important;
    flex:1 1 auto!important;
    width:100%!important;
    min-width:0!important;
    height:46px!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    outline:0!important;
    background:transparent!important;
    box-shadow:none!important;
    color:#172e4d!important;
    font-size:14px!important;
    line-height:1!important;
    font-weight:600!important;
  }
  html body .middle-mobile-sticky-search__form input[type='search']::placeholder{
    color:#91a4ba!important;
    opacity:1!important;
  }

  html body .middle-mobile-sticky-search__weather{
    display:block!important;
    width:122px!important;
    min-width:122px!important;
    max-width:122px!important;
  }
  html body .middle-mobile-sticky-search__weather .middle-header-weather{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:7px!important;
    width:122px!important;
    min-width:122px!important;
    max-width:122px!important;
    height:48px!important;
    min-height:48px!important;
    margin:0!important;
    padding:0 10px!important;
    box-sizing:border-box!important;
    border:1px solid #d9e5f1!important;
    border-radius:16px!important;
    background:#fff!important;
    color:#173553!important;
    box-shadow:0 5px 16px rgba(26,63,101,.055)!important;
    text-decoration:none!important;
    overflow:hidden!important;
    white-space:nowrap!important;
  }
  html body .middle-mobile-sticky-search__weather .middle-header-weather__icon{
    flex:0 0 auto!important;
    font-size:22px!important;
    line-height:1!important;
  }
  html body .middle-mobile-sticky-search__weather .middle-header-weather strong{
    color:#173553!important;
    font-size:16px!important;
    line-height:1!important;
    font-weight:850!important;
  }

  /* Approved homepage hero: use the actual image's intrinsic aspect ratio.
     No fixed height, no cover crop, no vertical clipping. */
  html body.home .middle-exact-hero-zone,
  html body.front-page .middle-exact-hero-zone{
    display:block!important;
    width:calc(100% - 18px)!important;
    margin:10px auto 0!important;
    padding:0!important;
  }
  html body.home .middle-exact-hero-zone>.middle-exact-hero,
  html body.front-page .middle-exact-hero-zone>.middle-exact-hero{
    position:relative!important;
    display:block!important;
    width:100%!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    aspect-ratio:auto!important;
    margin:0!important;
    padding:0!important;
    overflow:hidden!important;
    border:0!important;
    border-radius:19px!important;
    background:#dcecf6!important;
    box-shadow:0 10px 28px rgba(31,63,96,.09)!important;
  }
  html body.home .middle-exact-hero__picture,
  html body.front-page .middle-exact-hero__picture{
    position:relative!important;
    inset:auto!important;
    display:block!important;
    width:100%!important;
    height:auto!important;
    min-height:0!important;
    margin:0!important;
    padding:0!important;
    line-height:0!important;
  }
  html body.home .middle-exact-hero__image,
  html body.front-page .middle-exact-hero__image{
    position:relative!important;
    inset:auto!important;
    display:block!important;
    width:100%!important;
    height:auto!important;
    min-height:0!important;
    max-width:100%!important;
    max-height:none!important;
    margin:0!important;
    padding:0!important;
    object-fit:contain!important;
    object-position:center center!important;
    transform:none!important;
    filter:none!important;
    border:0!important;
    background:transparent!important;
    box-shadow:none!important;
  }

  /* No full-image dark overlay: the selected design uses only the small plate. */
  html body.home .middle-exact-hero-zone .middle-exact-hero__shade,
  html body.front-page .middle-exact-hero-zone .middle-exact-hero__shade{
    display:none!important;
  }

  /* Exact copy from the approved concept: top-left dark translucent plate. */
  html body.home .middle-exact-hero-zone .middle-exact-hero__copy,
  html body.front-page .middle-exact-hero-zone .middle-exact-hero__copy{
    position:absolute!important;
    z-index:3!important;
    top:12px!important;
    left:12px!important;
    right:auto!important;
    bottom:auto!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:flex-start!important;
    justify-content:center!important;
    gap:4px!important;
    width:auto!important;
    min-width:0!important;
    max-width:47%!important;
    min-height:0!important;
    margin:0!important;
    padding:11px 14px 12px!important;
    border:1px solid rgba(255,255,255,.18)!important;
    border-radius:17px!important;
    background:rgba(20,49,69,.72)!important;
    color:#fff!important;
    box-shadow:0 8px 22px rgba(0,0,0,.13)!important;
    backdrop-filter:blur(10px) saturate(1.06)!important;
    -webkit-backdrop-filter:blur(10px) saturate(1.06)!important;
  }
  html body.home .middle-exact-hero-zone .middle-exact-hero__copy::after,
  html body.front-page .middle-exact-hero-zone .middle-exact-hero__copy::after,
  html body.home .middle-exact-hero-zone .middle-exact-hero h1,
  html body.front-page .middle-exact-hero-zone .middle-exact-hero h1,
  html body.home .middle-exact-hero-zone .middle-exact-hero__copy>p,
  html body.front-page .middle-exact-hero-zone .middle-exact-hero__copy>p{
    display:none!important;
  }
  html body.home .middle-exact-hero-zone .middle-exact-hero__city,
  html body.front-page .middle-exact-hero-zone .middle-exact-hero__city{
    display:block!important;
    margin:0!important;
    color:#fff!important;
    font-size:15px!important;
    line-height:1.05!important;
    font-weight:850!important;
    letter-spacing:-.015em!important;
    text-transform:none!important;
  }
  html body.home .middle-exact-hero__mobile-subtitle,
  html body.front-page .middle-exact-hero__mobile-subtitle{
    display:block!important;
    margin:0!important;
    color:rgba(255,255,255,.88)!important;
    font-size:11.5px!important;
    line-height:1.18!important;
    font-weight:560!important;
  }

  html body.home .middle-exact-services,
  html body.front-page .middle-exact-services{
    margin-top:12px!important;
  }

  /* Keep the five bottom slots from 0.4.67: Home / Ads / Create / Alerts / Menu. */
  html body .middle-header-tools>.middle-search-toggle{display:none!important}
  html body .middle-header-tools>.middle-mobile-ads-link{
    display:flex!important;
    grid-column:2!important;
    grid-row:1!important;
  }

  html:root[data-middle-theme='dark'] body .middle-mobile-sticky-search{
    border-bottom-color:#2d4359!important;
    background:rgba(19,31,44,.965)!important;
    box-shadow:0 8px 24px rgba(0,0,0,.20)!important;
  }
  html:root[data-middle-theme='dark'] body .middle-mobile-sticky-search__form,
  html:root[data-middle-theme='dark'] body .middle-mobile-sticky-search__weather .middle-header-weather{
    border-color:#324b64!important;
    background:#182b3e!important;
    box-shadow:none!important;
  }
  html:root[data-middle-theme='dark'] body .middle-mobile-sticky-search__form input[type='search'],
  html:root[data-middle-theme='dark'] body .middle-mobile-sticky-search__weather .middle-header-weather,
  html:root[data-middle-theme='dark'] body .middle-mobile-sticky-search__weather .middle-header-weather strong{
    color:#eef6ff!important;
  }
}

@media(max-width:390px){
  html body .middle-mobile-sticky-search{
    grid-template-columns:minmax(0,1fr) 108px!important;
    gap:7px!important;
    padding-left:8px!important;
    padding-right:8px!important;
  }
  html body .middle-mobile-sticky-search__weather,
  html body .middle-mobile-sticky-search__weather .middle-header-weather{
    width:108px!important;
    min-width:108px!important;
    max-width:108px!important;
  }
  html body.home .middle-exact-hero-zone .middle-exact-hero__copy,
  html body.front-page .middle-exact-hero-zone .middle-exact-hero__copy{
    top:10px!important;
    left:10px!important;
    max-width:49%!important;
    padding:9px 12px 10px!important;
    border-radius:15px!important;
  }
  html body.home .middle-exact-hero-zone .middle-exact-hero__city,
  html body.front-page .middle-exact-hero-zone .middle-exact-hero__city{font-size:13.5px!important}
  html body.home .middle-exact-hero__mobile-subtitle,
  html body.front-page .middle-exact-hero__mobile-subtitle{font-size:10.5px!important}
}

/* ==========================================================================
   Middle Community 0.4.72 — mobile overlays adapted to fixed top search bar
   Menu / Publish / Auth now live cleanly BETWEEN the fixed top and bottom bars.
   ========================================================================== */
@media(max-width:720px){
  :root{
    --mc-mobile-topbar-h:68px;
    --mc-mobile-bottomnav-h:80px;
    --mc-mobile-overlay-gap:8px;
  }

  /* --------------------------------------------------------------
     Shared overlay backdrop: leave Search/Weather and bottom app nav visible.
     -------------------------------------------------------------- */
  html body .middle-sheet-backdrop{
    position:fixed!important;
    z-index:1490!important;
    top:var(--mc-mobile-topbar-h)!important;
    right:0!important;
    bottom:calc(var(--mc-mobile-bottomnav-h) + env(safe-area-inset-bottom))!important;
    left:0!important;
    height:auto!important;
    background:rgba(9,22,37,.42)!important;
    backdrop-filter:blur(5px)!important;
    -webkit-backdrop-filter:blur(5px)!important;
  }

  /* Internal pages can have the WP mobile admin bar. */
  html:not(.middle-home-adminbar-reset) body.admin-bar .middle-sheet-backdrop{
    top:calc(46px + var(--mc-mobile-topbar-h))!important;
  }

  /* --------------------------------------------------------------
     SIDE MENU — real floating right drawer under Search/Weather.
     -------------------------------------------------------------- */
  html body>.middle-side-drawer.middle-primary-nav.middle-top-sheet{
    position:fixed!important;
    z-index:1500!important;
    top:calc(var(--mc-mobile-topbar-h) + var(--mc-mobile-overlay-gap))!important;
    right:8px!important;
    bottom:calc(var(--mc-mobile-bottomnav-h) + env(safe-area-inset-bottom) + var(--mc-mobile-overlay-gap))!important;
    left:auto!important;
    width:min(88vw,360px)!important;
    height:auto!important;
    max-height:none!important;
    margin:0!important;
    padding:0!important;
    overflow:hidden!important;
    border:1px solid #d8e5f2!important;
    border-radius:23px!important;
    background:#fff!important;
    box-shadow:-18px 20px 58px rgba(13,37,66,.23)!important;
    transform:translate3d(calc(100% + 22px),0,0)!important;
    transform-origin:right center!important;
    opacity:1!important;
    visibility:hidden!important;
    pointer-events:none!important;
    transition:transform .28s cubic-bezier(.22,.8,.2,1),visibility .28s ease!important;
  }

  html body>.middle-side-drawer.middle-primary-nav.middle-top-sheet.is-open{
    visibility:visible!important;
    pointer-events:auto!important;
    transform:translate3d(0,0,0)!important;
  }

  html body>.middle-side-drawer .middle-side-drawer__head{
    min-height:64px!important;
    height:64px!important;
    padding:10px 10px 10px 13px!important;
    border-bottom:1px solid #e6edf5!important;
    background:rgba(255,255,255,.98)!important;
  }

  html body>.middle-side-drawer .middle-side-drawer__brand>.middle-mobile-home-link__brand{
    flex-basis:34px!important;
    width:34px!important;
    height:34px!important;
  }

  html body>.middle-side-drawer .middle-side-drawer__brand strong{
    font-size:13px!important;
  }
  html body>.middle-side-drawer .middle-side-drawer__brand small{
    font-size:8px!important;
  }

  html body>.middle-side-drawer .middle-side-drawer__theme,
  html body>.middle-side-drawer .middle-side-drawer__close{
    width:36px!important;
    height:36px!important;
    min-width:36px!important;
    border-radius:11px!important;
  }

  html body>.middle-side-drawer .middle-side-drawer__body{
    height:calc(100% - 64px)!important;
    max-height:none!important;
    padding:11px 10px 15px!important;
    overflow-y:auto!important;
    overscroll-behavior:contain!important;
    background:#fff!important;
  }

  html body>.middle-side-drawer .middle-side-drawer__intro{
    padding:2px 4px 10px!important;
  }
  html body>.middle-side-drawer .middle-side-drawer__intro strong{
    font-size:15px!important;
  }

  html body>.middle-side-drawer .middle-side-drawer__nav{
    gap:5px!important;
  }
  html body>.middle-side-drawer .middle-side-drawer__nav>a{
    grid-template-columns:39px minmax(0,1fr) 17px!important;
    gap:9px!important;
    min-height:52px!important;
    padding:5px 8px 5px 6px!important;
    border-radius:14px!important;
  }
  html body>.middle-side-drawer .middle-side-drawer__icon{
    width:39px!important;
    height:39px!important;
    border-radius:12px!important;
  }
  html body>.middle-side-drawer .middle-side-drawer__icon img{
    width:26px!important;
    height:26px!important;
  }
  html body>.middle-side-drawer .middle-side-drawer__copy strong{
    font-size:11.5px!important;
  }
  html body>.middle-side-drawer .middle-side-drawer__copy small{
    font-size:8px!important;
  }
  html body>.middle-side-drawer .middle-side-drawer__utility{
    margin-top:10px!important;
    padding-top:10px!important;
    gap:7px!important;
  }

  html:not(.middle-home-adminbar-reset) body.admin-bar>.middle-side-drawer.middle-primary-nav.middle-top-sheet{
    top:calc(46px + var(--mc-mobile-topbar-h) + var(--mc-mobile-overlay-gap))!important;
  }

  /* --------------------------------------------------------------
     AUTH + PUBLISH — app-like cards between fixed bars.
     No more old top-sheet animation colliding with Search/Weather.
     -------------------------------------------------------------- */
  html body .middle-auth-modal,
  html body .middle-publish-modal{
    position:fixed!important;
    z-index:1600!important;
    top:var(--mc-mobile-topbar-h)!important;
    right:0!important;
    bottom:calc(var(--mc-mobile-bottomnav-h) + env(safe-area-inset-bottom))!important;
    left:0!important;
    width:auto!important;
    height:auto!important;
    padding:9px!important;
    display:flex!important;
    align-items:flex-start!important;
    justify-content:center!important;
    overflow:hidden!important;
  }

  html body .middle-auth-modal__backdrop,
  html body .middle-publish-modal__backdrop{
    position:absolute!important;
    inset:0!important;
    border:0!important;
    background:rgba(9,22,37,.44)!important;
    backdrop-filter:blur(6px)!important;
    -webkit-backdrop-filter:blur(6px)!important;
  }

  html body .middle-auth-modal__panel,
  html body .middle-publish-modal__panel,
  html body .middle-publish-modal.is-step-2 .middle-publish-modal__panel{
    position:relative!important;
    z-index:1!important;
    top:auto!important;
    right:auto!important;
    bottom:auto!important;
    left:auto!important;
    width:100%!important;
    max-width:520px!important;
    height:auto!important;
    max-height:100%!important;
    margin:0 auto!important;
    padding:17px!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    overscroll-behavior:contain!important;
    border:1px solid #d9e6f2!important;
    border-radius:23px!important;
    background:rgba(255,255,255,.985)!important;
    box-shadow:0 22px 64px rgba(12,34,59,.25)!important;
    transform:translateY(14px) scale(.985)!important;
    opacity:0!important;
    transition:transform .24s cubic-bezier(.22,.8,.2,1),opacity .18s ease!important;
    -webkit-overflow-scrolling:touch!important;
  }

  html body .middle-auth-modal.is-open .middle-auth-modal__panel,
  html body .middle-publish-modal.is-open .middle-publish-modal__panel{
    transform:none!important;
    opacity:1!important;
  }

  html body .middle-auth-modal__head,
  html body .middle-publish-modal__head{
    position:sticky!important;
    z-index:5!important;
    top:-17px!important;
    display:flex!important;
    align-items:flex-start!important;
    justify-content:space-between!important;
    gap:12px!important;
    margin:-17px -17px 15px!important;
    padding:15px 15px 12px 17px!important;
    border-bottom:1px solid #e8eef5!important;
    background:rgba(255,255,255,.97)!important;
    backdrop-filter:blur(14px)!important;
    -webkit-backdrop-filter:blur(14px)!important;
  }

  html body .middle-auth-modal__head .middle-kicker,
  html body .middle-publish-modal__head .middle-kicker{
    display:inline-flex!important;
    align-items:center!important;
    min-height:22px!important;
    margin:0!important;
    padding:0 8px!important;
    border-radius:999px!important;
    background:#eaf4ff!important;
    color:#1675e5!important;
    font-size:8px!important;
    line-height:1!important;
    font-weight:850!important;
    letter-spacing:.08em!important;
    text-transform:uppercase!important;
  }

  html body .middle-auth-modal__head h2,
  html body .middle-publish-modal__head h2{
    margin:7px 0 0!important;
    color:#152d4a!important;
    font-size:22px!important;
    line-height:1.08!important;
    letter-spacing:-.03em!important;
    font-weight:800!important;
  }

  html body .middle-auth-close,
  html body .middle-publish-close{
    display:grid!important;
    place-items:center!important;
    flex:0 0 38px!important;
    width:38px!important;
    height:38px!important;
    min-width:38px!important;
    min-height:38px!important;
    margin:0!important;
    padding:0!important;
    border:1px solid #dce6f0!important;
    border-radius:12px!important;
    background:#f5f8fc!important;
    color:#34506e!important;
    font-size:25px!important;
    line-height:1!important;
    box-shadow:none!important;
  }

  /* Publication form density adapted to mobile viewport between both bars. */
  html body .middle-publish-lead{
    margin-bottom:13px!important;
    font-size:12px!important;
    line-height:1.45!important;
  }
  html body .middle-publish-progress{
    margin-bottom:12px!important;
  }
  html body .middle-publish-field{
    margin-bottom:12px!important;
  }
  html body .middle-publish-field>span{
    margin-bottom:6px!important;
    font-size:11.5px!important;
    font-weight:700!important;
  }
  html body .middle-publish-field input,
  html body .middle-publish-field select,
  html body .middle-publish-field textarea{
    width:100%!important;
    border:1px solid #dbe6f1!important;
    border-radius:13px!important;
    background:#f7faff!important;
    color:#17304f!important;
    box-shadow:none!important;
    font-size:16px!important;
  }
  html body .middle-publish-field input,
  html body .middle-publish-field select{
    min-height:46px!important;
    height:46px!important;
    padding:0 12px!important;
  }
  html body .middle-publish-field textarea{
    min-height:155px!important;
    padding:12px!important;
    line-height:1.5!important;
  }
  html body .middle-publish-media{
    margin-bottom:13px!important;
    padding:11px!important;
    border-radius:15px!important;
  }
  html body .middle-publish-upload{
    min-height:62px!important;
    border-radius:12px!important;
  }
  html body .middle-publish-summary{
    margin-bottom:12px!important;
    padding:11px 12px!important;
    border-radius:14px!important;
  }
  html body .middle-publish-next,
  html body .middle-publish-actions .middle-btn{
    min-height:46px!important;
    border-radius:13px!important;
  }
  html body .middle-publish-actions{
    position:sticky!important;
    z-index:4!important;
    bottom:-17px!important;
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:7px!important;
    margin:14px -17px -17px!important;
    padding:11px 17px 17px!important;
    border-top:1px solid #e8eef5!important;
    background:rgba(255,255,255,.98)!important;
    backdrop-filter:blur(14px)!important;
    -webkit-backdrop-filter:blur(14px)!important;
  }
  html body .middle-publish-actions .middle-publish-submit{
    order:1!important;
    min-width:0!important;
  }
  html body .middle-publish-actions .middle-btn--ghost{
    order:2!important;
  }

  /* Auth shortcode: neutralize older wide desktop controls inside our card. */
  html body .middle-auth-modal__content{
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    color:#17304f!important;
  }
  html body .middle-auth-modal__content input:not([type='checkbox']):not([type='radio']),
  html body .middle-auth-modal__content select,
  html body .middle-auth-modal__content textarea{
    width:100%!important;
    min-height:46px!important;
    padding:0 12px!important;
    border:1px solid #dbe6f1!important;
    border-radius:13px!important;
    background:#f7faff!important;
    color:#17304f!important;
    box-shadow:none!important;
    font-size:16px!important;
  }
  html body .middle-auth-modal__content button,
  html body .middle-auth-modal__content input[type='submit']{
    min-height:46px!important;
    border-radius:13px!important;
  }

  /* Correct admin-bar offset without touching homepage's hidden admin bar. */
  html:not(.middle-home-adminbar-reset) body.admin-bar .middle-auth-modal,
  html:not(.middle-home-adminbar-reset) body.admin-bar .middle-publish-modal{
    top:calc(46px + var(--mc-mobile-topbar-h))!important;
  }

  /* --------------------------------------------------------------
     DARK THEME
     -------------------------------------------------------------- */
  html:root[data-middle-theme='dark'] body>.middle-side-drawer.middle-primary-nav.middle-top-sheet,
  html:root[data-middle-theme='dark'] body>.middle-side-drawer .middle-side-drawer__head,
  html:root[data-middle-theme='dark'] body>.middle-side-drawer .middle-side-drawer__body{
    border-color:#30485f!important;
    background:#17283a!important;
  }

  html:root[data-middle-theme='dark'] body .middle-auth-modal__panel,
  html:root[data-middle-theme='dark'] body .middle-publish-modal__panel,
  html:root[data-middle-theme='dark'] body .middle-auth-modal__head,
  html:root[data-middle-theme='dark'] body .middle-publish-modal__head,
  html:root[data-middle-theme='dark'] body .middle-publish-actions{
    border-color:#30485f!important;
    background:rgba(23,40,58,.985)!important;
    color:#eef6ff!important;
  }
  html:root[data-middle-theme='dark'] body .middle-auth-modal__head h2,
  html:root[data-middle-theme='dark'] body .middle-publish-modal__head h2,
  html:root[data-middle-theme='dark'] body .middle-auth-modal__content{
    color:#eef6ff!important;
  }
  html:root[data-middle-theme='dark'] body .middle-auth-modal__head .middle-kicker,
  html:root[data-middle-theme='dark'] body .middle-publish-modal__head .middle-kicker{
    background:#1c3956!important;
    color:#8fc5ff!important;
  }
  html:root[data-middle-theme='dark'] body .middle-auth-close,
  html:root[data-middle-theme='dark'] body .middle-publish-close{
    border-color:#365069!important;
    background:#1c3147!important;
    color:#d9eaff!important;
  }
  html:root[data-middle-theme='dark'] body .middle-publish-field input,
  html:root[data-middle-theme='dark'] body .middle-publish-field select,
  html:root[data-middle-theme='dark'] body .middle-publish-field textarea,
  html:root[data-middle-theme='dark'] body .middle-auth-modal__content input:not([type='checkbox']):not([type='radio']),
  html:root[data-middle-theme='dark'] body .middle-auth-modal__content select,
  html:root[data-middle-theme='dark'] body .middle-auth-modal__content textarea{
    border-color:#365069!important;
    background:#1b3045!important;
    color:#eef6ff!important;
  }
}

@media(max-width:390px){
  html body>.middle-side-drawer.middle-primary-nav.middle-top-sheet{
    width:calc(100% - 18px)!important;
  }
  html body .middle-auth-modal,
  html body .middle-publish-modal{
    padding:7px!important;
  }
  html body .middle-auth-modal__panel,
  html body .middle-publish-modal__panel,
  html body .middle-publish-modal.is-step-2 .middle-publish-modal__panel{
    padding:15px!important;
    border-radius:21px!important;
  }
  html body .middle-auth-modal__head,
  html body .middle-publish-modal__head{
    top:-15px!important;
    margin:-15px -15px 13px!important;
    padding:13px 13px 11px 15px!important;
  }
  html body .middle-auth-modal__head h2,
  html body .middle-publish-modal__head h2{
    font-size:20px!important;
  }
}

/* ======================================================================
   0.4.73 — iPhone search-focus stabilization.
   iOS zooms focused inputs smaller than 16px; that made the fixed search bar
   visually slide/expand and pushed the weather card off-screen. Keep the
   viewport scale unchanged and style focus on the form instead of the input.
   ====================================================================== */
@media(max-width:720px){
  html body .middle-mobile-sticky-search{
    overflow:visible!important;
    contain:layout style!important;
  }

  html body .middle-mobile-sticky-search__form{
    min-width:0!important;
    max-width:100%!important;
    overflow:hidden!important;
    transition:border-color .16s ease,box-shadow .16s ease,background .16s ease!important;
    -webkit-tap-highlight-color:transparent!important;
  }

  html body .middle-mobile-sticky-search__form:focus-within{
    border-color:#8dbcf7!important;
    background:#fff!important;
    box-shadow:
      0 0 0 3px rgba(31,126,242,.10),
      0 5px 16px rgba(26,63,101,.06)!important;
  }

  html body .middle-mobile-sticky-search__form input[type='search'],
  html body .middle-mobile-sticky-search__form input[type='search']:focus,
  html body .middle-mobile-sticky-search__form input[type='search']:focus-visible{
    -webkit-appearance:none!important;
    appearance:none!important;
    display:block!important;
    flex:1 1 auto!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    height:46px!important;
    min-height:46px!important;
    margin:0!important;
    padding:0!important;
    border:0!important;
    border-radius:0!important;
    outline:0!important;
    background:transparent!important;
    box-shadow:none!important;
    color:#172e4d!important;
    font-family:inherit!important;
    font-size:16px!important;
    line-height:1.2!important;
    font-weight:600!important;
    letter-spacing:0!important;
    transform:none!important;
    zoom:1!important;
    touch-action:manipulation!important;
    -webkit-tap-highlight-color:transparent!important;
  }

  html body .middle-mobile-sticky-search__form input[type='search']::placeholder{
    color:#91a4ba!important;
    opacity:1!important;
    font-size:16px!important;
  }

  html body .middle-mobile-sticky-search__weather{
    flex:0 0 122px!important;
    width:122px!important;
    min-width:122px!important;
    max-width:122px!important;
    overflow:hidden!important;
  }

  html body .middle-mobile-sticky-search__weather .middle-header-weather{
    width:122px!important;
    min-width:122px!important;
    max-width:122px!important;
  }

  html:root[data-middle-theme='dark'] body .middle-mobile-sticky-search__form:focus-within{
    border-color:#3f79b2!important;
    background:#182b3e!important;
    box-shadow:
      0 0 0 3px rgba(76,151,238,.10),
      0 5px 16px rgba(0,0,0,.10)!important;
  }

  html:root[data-middle-theme='dark'] body .middle-mobile-sticky-search__form input[type='search'],
  html:root[data-middle-theme='dark'] body .middle-mobile-sticky-search__form input[type='search']:focus{
    color:#eef6ff!important;
    background:transparent!important;
  }
}

@media(max-width:390px){
  html body .middle-mobile-sticky-search__form input[type='search'],
  html body .middle-mobile-sticky-search__form input[type='search']:focus{
    font-size:16px!important;
  }
  html body .middle-mobile-sticky-search__form input[type='search']::placeholder{
    font-size:15.5px!important;
  }
}


/* ======================================================================
   Middle Community 0.4.74 — the Ads shortcut is mobile-nav only.
   Hide its megaphone icon from tablet/desktop header while keeping it as
   the second item in the mobile bottom navigation.
   ====================================================================== */
@media(min-width:721px){
  html body .middle-header-tools > .middle-mobile-ads-link{
    display:none!important;
  }
}

/* ======================================================================
   0.4.78 — organizations template refresh + publication modal fixes.
   ====================================================================== */
html body .middle-publish-modal{z-index:1800!important}
html body .middle-publish-modal__panel{z-index:1!important}

/* Directory cards are intentionally larger and image-led, like the approved mockup. */
body.post-type-archive-middle_organization .middle-org-directory__layout{
  grid-template-columns:minmax(0,1fr) minmax(360px,410px)!important;
  gap:20px!important;
}
body.post-type-archive-middle_organization .middle-org-results{
  padding:22px!important;
  border-radius:25px!important;
}
body.post-type-archive-middle_organization .middle-org-cards{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:16px!important;
}
body.post-type-archive-middle_organization .middle-org-card{
  display:flex!important;
  flex-direction:column!important;
  min-height:360px!important;
  overflow:hidden!important;
  border-radius:23px!important;
  background:var(--middle-surface-strong)!important;
  box-shadow:0 10px 28px rgba(23,58,94,.06)!important;
}
body.post-type-archive-middle_organization .middle-org-card__media{
  display:grid!important;
  place-items:center!important;
  width:auto!important;
  min-height:190px!important;
  height:190px!important;
  margin:10px 10px 0!important;
  overflow:hidden!important;
  border-radius:18px!important;
  background:var(--middle-bg-soft)!important;
}
body.post-type-archive-middle_organization .middle-org-card__media img{
  width:100%!important;
  height:100%!important;
  object-fit:contain!important;
  border-radius:18px!important;
  background:var(--middle-bg-soft)!important;
}
body.post-type-archive-middle_organization .middle-org-card__body{padding:16px 17px 17px!important}
body.post-type-archive-middle_organization .middle-org-card__category{font-size:9px!important;margin-bottom:7px!important}
body.post-type-archive-middle_organization .middle-org-card h3{font-size:18px!important;line-height:1.18!important;margin-bottom:10px!important}
body.post-type-archive-middle_organization .middle-org-card__line{font-size:11px!important;line-height:1.45!important;margin-bottom:7px!important}
body.post-type-archive-middle_organization .middle-org-card__line svg{width:15px!important;height:15px!important}
body.post-type-archive-middle_organization .middle-org-card__actions{margin-top:10px!important;padding-top:12px!important}
body.post-type-archive-middle_organization .middle-org-card__actions a,
body.post-type-archive-middle_organization .middle-org-card__actions button{font-size:11px!important}

/* Homepage organization rows are easier to scan and no longer look miniature. */
.home .middle-home-organizations,.front-page .middle-home-organizations{padding:26px!important;border-radius:26px!important}
.home .middle-home-organizations__grid,.front-page .middle-home-organizations__grid{gap:16px!important}
.home .middle-home-org-panel,.front-page .middle-home-org-panel{padding:17px!important;border-radius:21px!important}
.home .middle-home-org-row,.front-page .middle-home-org-row{
  grid-template-columns:62px minmax(0,1fr) 31px!important;
  gap:12px!important;
  min-height:76px!important;
  padding:8px!important;
  border-radius:16px!important;
}
.home .middle-home-org-row__media,.front-page .middle-home-org-row__media{
  width:62px!important;height:62px!important;border-radius:15px!important;
}
.home .middle-home-org-row__media img,.front-page .middle-home-org-row__media img{object-fit:contain!important;background:var(--middle-surface-strong)!important}
.home .middle-home-org-row__copy strong,.front-page .middle-home-org-row__copy strong{font-size:13.5px!important}
.home .middle-home-org-row__copy small,.front-page .middle-home-org-row__copy small{font-size:10.5px!important}

/* Single organization — larger rounded full photo and clearer information blocks. */
body.single-middle_organization .middle-org-single__card{border-radius:30px!important;box-shadow:0 18px 52px rgba(21,55,88,.08)!important}
body.single-middle_organization .middle-org-single__head{
  grid-template-columns:minmax(360px,470px) minmax(0,1fr)!important;
  gap:34px!important;padding:32px!important;
}
body.single-middle_organization .middle-org-single__media{
  min-height:300px!important;padding:0!important;border-radius:25px!important;
  background:var(--middle-bg-soft)!important;box-shadow:inset 0 0 0 1px var(--middle-border)!important;
}
body.single-middle_organization .middle-org-single__media img{
  width:100%!important;height:100%!important;max-height:500px!important;object-fit:contain!important;
  border-radius:25px!important;background:var(--middle-bg-soft)!important;
}
body.single-middle_organization .middle-org-single__intro h1{font-size:clamp(34px,4vw,52px)!important}
body.single-middle_organization .middle-org-single__primary-actions{margin-top:24px!important}
body.single-middle_organization .middle-org-single__primary-actions .middle-btn,
body.single-middle_organization .middle-org-outline-btn{min-height:49px!important;padding:0 20px!important;border-radius:14px!important;font-size:12px!important}
body.single-middle_organization .middle-org-single__layout{grid-template-columns:minmax(0,1fr) 440px!important;gap:26px!important;padding:32px!important}
body.single-middle_organization .middle-org-single__details{gap:12px!important}
body.single-middle_organization .middle-org-single__details>div{padding:16px!important;border-radius:16px!important}
body.single-middle_organization .middle-org-map--single{height:440px!important;border-radius:22px!important}
body.single-middle_organization .middle-org-hours-public span{padding:11px 8px!important;border-radius:12px!important}

/* User publication: compact weekly hours editor with one-click fill for all days. */
.middle-publish-org-hours-field{margin-bottom:15px}
.middle-publish-hours{overflow:hidden;border:1px solid var(--middle-border);border-radius:17px;background:var(--middle-surface-strong)}
.middle-publish-hours__quick{display:grid;grid-template-columns:minmax(160px,1fr) 112px 112px auto;gap:9px;align-items:end;padding:12px;background:color-mix(in srgb,var(--middle-accent-soft) 48%,var(--middle-surface-strong));border-bottom:1px solid var(--middle-border)}
.middle-publish-hours__quick>div strong,.middle-publish-hours__quick>div small{display:block}.middle-publish-hours__quick>div strong{font-size:11px}.middle-publish-hours__quick>div small{margin-top:3px;color:var(--middle-muted);font-size:9px;line-height:1.35}
.middle-publish-hours__quick label{display:grid;gap:4px}.middle-publish-hours__quick label>span{font-size:9px;font-weight:750;color:var(--middle-muted)}
.middle-publish-hours__quick input,.middle-publish-hours__day input[type=time]{width:100%;min-height:38px;padding:0 8px;border:1px solid var(--middle-border);border-radius:10px;background:var(--middle-bg-soft);color:var(--middle-text);font-size:12px}
.middle-publish-hours__apply{min-height:38px!important;padding:0 12px!important;border-radius:10px!important;font-size:10px!important;white-space:nowrap}
.middle-publish-hours__days{display:grid;padding:6px 12px 10px}
.middle-publish-hours__day{display:grid;grid-template-columns:32px 82px minmax(86px,1fr) 12px minmax(86px,1fr);gap:7px;align-items:center;min-height:48px;border-bottom:1px solid var(--middle-border)}
.middle-publish-hours__day:last-child{border-bottom:0}.middle-publish-hours__day>strong{font-size:10px}.middle-publish-hours__closed{display:flex;align-items:center;gap:5px;font-size:9px;color:var(--middle-muted)}.middle-publish-hours__closed input{width:auto!important;min-height:0!important}.middle-publish-hours__dash{text-align:center;color:var(--middle-muted)}
.middle-publish-hours__day.is-closed input[type=time]{opacity:.38}

@media(max-width:1050px){
  body.post-type-archive-middle_organization .middle-org-directory__layout{grid-template-columns:minmax(0,1fr) 340px!important}
  body.post-type-archive-middle_organization .middle-org-cards{grid-template-columns:1fr!important}
  body.single-middle_organization .middle-org-single__layout{grid-template-columns:minmax(0,1fr) 360px!important}
}
@media(max-width:820px){
  body.post-type-archive-middle_organization .middle-org-directory__layout{grid-template-columns:1fr!important}
  body.post-type-archive-middle_organization .middle-org-cards{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.single-middle_organization .middle-org-single__head{grid-template-columns:1fr!important}
  body.single-middle_organization .middle-org-single__layout{grid-template-columns:1fr!important}
  .middle-publish-hours__quick{grid-template-columns:1fr 1fr!important}.middle-publish-hours__quick>div,.middle-publish-hours__apply{grid-column:1/-1!important}
}
@media(max-width:620px){
  body.post-type-archive-middle_organization .middle-org-results{padding:12px!important}
  body.post-type-archive-middle_organization .middle-org-cards{grid-template-columns:1fr!important;gap:12px!important}
  body.post-type-archive-middle_organization .middle-org-card{min-height:0!important;border-radius:20px!important}
  body.post-type-archive-middle_organization .middle-org-card__media{height:180px!important;min-height:180px!important;margin:8px 8px 0!important;border-radius:16px!important}
  body.post-type-archive-middle_organization .middle-org-card__media img{border-radius:16px!important}
  body.post-type-archive-middle_organization .middle-org-card h3{font-size:17px!important}
  .home .middle-home-organizations,.front-page .middle-home-organizations{padding:17px!important;border-radius:20px!important}
  .home .middle-home-org-row,.front-page .middle-home-org-row{grid-template-columns:56px minmax(0,1fr) 28px!important;min-height:70px!important}
  .home .middle-home-org-row__media,.front-page .middle-home-org-row__media{width:56px!important;height:56px!important}
  body.single-middle_organization .middle-org-single__head{padding:17px!important;gap:19px!important}
  body.single-middle_organization .middle-org-single__media{min-height:220px!important;border-radius:20px!important}
  body.single-middle_organization .middle-org-single__media img{border-radius:20px!important;max-height:390px!important}
  body.single-middle_organization .middle-org-single__layout{padding:17px!important;gap:18px!important}
  body.single-middle_organization .middle-org-map--single{height:310px!important}
  .middle-publish-hours{border-radius:14px!important}
  .middle-publish-hours__quick{grid-template-columns:1fr 1fr!important;padding:10px!important}
  .middle-publish-hours__quick>div,.middle-publish-hours__apply{grid-column:1/-1!important}
  .middle-publish-hours__days{padding:5px 9px 8px!important}
  .middle-publish-hours__day{grid-template-columns:28px 70px minmax(70px,1fr) 8px minmax(70px,1fr)!important;gap:5px!important;min-height:47px!important}
  .middle-publish-hours__day input[type=time]{min-width:0!important;padding:0 4px!important;font-size:11px!important}
  .middle-publish-hours__closed span{font-size:8px!important}
}


/* 0.4.79 — hard refresh for organization UI and publish-hours layout. */
/* The hours editor must never share a two-column row with phone/contact fields. */
.middle-publish-organization--step2 .middle-publish-org-hours-field{
  grid-column:1 / -1!important;
  width:100%!important;
  min-width:0!important;
}
.middle-publish-organization--step2 .middle-publish-hours{
  width:100%!important;
  overflow:visible!important;
  border-radius:16px!important;
}
.middle-publish-organization--step2 .middle-publish-hours__quick{
  grid-template-columns:minmax(150px,1fr) 108px 108px auto!important;
  align-items:end!important;
}
.middle-publish-organization--step2 .middle-publish-hours__days{
  grid-template-columns:1fr!important;
}
.middle-publish-organization--step2 .middle-publish-hours__day{
  grid-template-columns:38px 92px minmax(105px,1fr) 16px minmax(105px,1fr)!important;
}

/* Directory: prominent, image-led cards. */
body.post-type-archive-middle_organization .middle-org-card--large{
  border:1px solid color-mix(in srgb,var(--middle-border) 78%,transparent)!important;
  box-shadow:0 10px 30px rgba(26,61,97,.08)!important;
}
body.post-type-archive-middle_organization .middle-org-card--large .middle-org-card__media{
  height:230px!important;
  min-height:230px!important;
  margin:12px 12px 0!important;
  border-radius:20px!important;
  background:var(--middle-bg-soft)!important;
}
body.post-type-archive-middle_organization .middle-org-card--large .middle-org-card__media img{
  width:100%!important;
  height:100%!important;
  object-fit:contain!important;
  padding:0!important;
  border-radius:20px!important;
}
body.post-type-archive-middle_organization .middle-org-card--large .middle-org-card__body{
  padding:18px 19px 19px!important;
}
body.post-type-archive-middle_organization .middle-org-card--large h3{
  font-size:21px!important;
  letter-spacing:-.02em!important;
}
body.post-type-archive-middle_organization .middle-org-card--large .middle-org-card__category{
  display:inline-flex!important;
  width:max-content!important;
  padding:6px 9px!important;
  border-radius:999px!important;
  background:var(--middle-accent-soft)!important;
  color:var(--middle-accent)!important;
  font-weight:800!important;
}
body.post-type-archive-middle_organization .middle-org-card--large .middle-org-card__actions{
  display:flex!important;
  justify-content:space-between!important;
  align-items:center!important;
  gap:10px!important;
}
body.post-type-archive-middle_organization .middle-org-card--large .middle-org-card__actions a{
  min-height:40px!important;
  padding:0 14px!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  border-radius:12px!important;
  background:var(--middle-accent)!important;
  color:#fff!important;
}

/* Single organization: real profile card, not a plain post page. */
body.single-middle_organization .middle-org-profile{
  overflow:hidden!important;
  border:1px solid color-mix(in srgb,var(--middle-border) 78%,transparent)!important;
  border-radius:30px!important;
  background:var(--middle-surface-strong)!important;
}
body.single-middle_organization .middle-org-profile__hero{
  display:grid!important;
  grid-template-columns:minmax(360px,46%) minmax(0,1fr)!important;
  gap:30px!important;
  padding:28px!important;
  background:linear-gradient(145deg,color-mix(in srgb,var(--middle-accent-soft) 42%,var(--middle-surface-strong)),var(--middle-surface-strong) 55%)!important;
  border-bottom:1px solid var(--middle-border)!important;
}
body.single-middle_organization .middle-org-profile .middle-org-single__media-wrap{
  min-width:0!important;
}
body.single-middle_organization .middle-org-profile .middle-org-single__media{
  height:360px!important;
  min-height:360px!important;
  padding:0!important;
  overflow:hidden!important;
  border-radius:26px!important;
  background:var(--middle-bg-soft)!important;
  box-shadow:0 12px 32px rgba(22,57,91,.10)!important;
}
body.single-middle_organization .middle-org-profile .middle-org-single__media img{
  width:100%!important;
  height:100%!important;
  object-fit:contain!important;
  border-radius:26px!important;
  background:var(--middle-bg-soft)!important;
}
body.single-middle_organization .middle-org-profile__intro{
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
  min-width:0!important;
}
body.single-middle_organization .middle-org-profile__intro h1{
  margin:8px 0 14px!important;
  font-size:clamp(32px,4vw,52px)!important;
  line-height:1.02!important;
  letter-spacing:-.04em!important;
}
body.single-middle_organization .middle-org-profile__intro>p{
  max-width:680px!important;
  font-size:15px!important;
  line-height:1.6!important;
}
body.single-middle_organization .middle-org-profile .middle-org-single__categories a{
  display:inline-flex!important;
  padding:7px 10px!important;
  border-radius:999px!important;
  background:var(--middle-accent-soft)!important;
  color:var(--middle-accent)!important;
  font-weight:800!important;
}
body.single-middle_organization .middle-org-profile .middle-org-single__primary-actions{
  display:flex!important;
  flex-wrap:wrap!important;
  gap:10px!important;
  margin-top:22px!important;
}
body.single-middle_organization .middle-org-profile .middle-org-single__primary-actions a{
  min-height:48px!important;
  border-radius:14px!important;
}
body.single-middle_organization .middle-org-profile__layout{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(360px,430px)!important;
  gap:24px!important;
  padding:28px!important;
}
body.single-middle_organization .middle-org-profile .middle-org-single__content{
  min-width:0!important;
}
body.single-middle_organization .middle-org-profile .middle-org-single__content>h2,
body.single-middle_organization .middle-org-profile .middle-org-single__description>h2{
  font-size:20px!important;
  margin-bottom:14px!important;
}
body.single-middle_organization .middle-org-profile .middle-org-single__details{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:12px!important;
}
body.single-middle_organization .middle-org-profile .middle-org-single__details>div{
  min-width:0!important;
  padding:16px!important;
  border:1px solid var(--middle-border)!important;
  border-radius:16px!important;
  background:var(--middle-bg-soft)!important;
}
body.single-middle_organization .middle-org-profile .middle-org-single__details dt{
  margin-bottom:6px!important;
  font-size:10px!important;
  font-weight:800!important;
  color:var(--middle-muted)!important;
  text-transform:uppercase!important;
  letter-spacing:.05em!important;
}
body.single-middle_organization .middle-org-profile .middle-org-single__details dd{
  margin:0!important;
  font-size:14px!important;
  font-weight:700!important;
  overflow-wrap:anywhere!important;
}
body.single-middle_organization .middle-org-profile .middle-org-single__hours{
  grid-column:1 / -1!important;
}
body.single-middle_organization .middle-org-profile .middle-org-hours-public{
  display:grid!important;
  grid-template-columns:repeat(7,minmax(0,1fr))!important;
  gap:7px!important;
}
body.single-middle_organization .middle-org-profile .middle-org-hours-public span{
  display:grid!important;
  gap:4px!important;
  text-align:center!important;
  padding:10px 6px!important;
  border-radius:12px!important;
  background:var(--middle-surface-strong)!important;
  border:1px solid var(--middle-border)!important;
}
body.single-middle_organization .middle-org-profile .middle-org-hours-public b{font-size:10px!important}
body.single-middle_organization .middle-org-profile .middle-org-hours-public em{font-size:10px!important;font-style:normal!important}
body.single-middle_organization .middle-org-profile .middle-org-single__description{
  margin-top:18px!important;
  padding:18px!important;
  border-radius:18px!important;
  background:var(--middle-bg-soft)!important;
}
body.single-middle_organization .middle-org-profile .middle-org-single__map-wrap{
  position:sticky!important;
  top:92px!important;
  align-self:start!important;
}
body.single-middle_organization .middle-org-profile .middle-org-map--single{
  height:430px!important;
  border-radius:22px!important;
  overflow:hidden!important;
  box-shadow:0 10px 28px rgba(24,58,93,.08)!important;
}

@media(max-width:900px){
  body.single-middle_organization .middle-org-profile__hero{grid-template-columns:1fr!important}
  body.single-middle_organization .middle-org-profile .middle-org-single__media{height:320px!important;min-height:320px!important}
  body.single-middle_organization .middle-org-profile__layout{grid-template-columns:1fr!important}
  body.single-middle_organization .middle-org-profile .middle-org-single__map-wrap{position:static!important}
}
@media(max-width:680px){
  .middle-publish-organization--step2 .middle-publish-org-grid{grid-template-columns:1fr!important}
  .middle-publish-organization--step2 .middle-publish-org-hours-field{grid-column:1!important}
  .middle-publish-organization--step2 .middle-publish-hours__quick{grid-template-columns:1fr 1fr!important;padding:10px!important}
  .middle-publish-organization--step2 .middle-publish-hours__quick>div,
  .middle-publish-organization--step2 .middle-publish-hours__apply{grid-column:1 / -1!important}
  .middle-publish-organization--step2 .middle-publish-hours__day{
    grid-template-columns:30px 74px minmax(0,1fr) 8px minmax(0,1fr)!important;
    gap:5px!important;
  }
  .middle-publish-organization--step2 .middle-publish-hours__day input[type=time]{min-width:0!important;padding:0 4px!important;font-size:10px!important}
  body.single-middle_organization .middle-org-profile{border-radius:22px!important}
  body.single-middle_organization .middle-org-profile__hero{padding:14px!important;gap:16px!important}
  body.single-middle_organization .middle-org-profile .middle-org-single__media{height:235px!important;min-height:235px!important;border-radius:18px!important}
  body.single-middle_organization .middle-org-profile .middle-org-single__media img{border-radius:18px!important}
  body.single-middle_organization .middle-org-profile__intro h1{font-size:29px!important}
  body.single-middle_organization .middle-org-profile__layout{padding:14px!important;gap:16px!important}
  body.single-middle_organization .middle-org-profile .middle-org-single__details{grid-template-columns:1fr!important}
  body.single-middle_organization .middle-org-profile .middle-org-hours-public{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body.single-middle_organization .middle-org-profile .middle-org-single__hours{grid-column:1!important}
  body.single-middle_organization .middle-org-profile .middle-org-map--single{height:300px!important}
  body.post-type-archive-middle_organization .middle-org-card--large .middle-org-card__media{height:205px!important;min-height:205px!important}
}

/* 0.4.80 — organization profile rebuilt to match the approved directory mockup. */
body.single-middle_organization .middle-org-single--profile-v2{
  width:min(calc(100% - 48px),1420px)!important;
  max-width:1420px!important;
  margin:26px auto 46px!important;
}
body.single-middle_organization .middle-org-single--profile-v2 .middle-org-single__breadcrumbs{
  margin:0 4px 14px!important;
  font-size:12px!important;
  gap:7px!important;
}
body.single-middle_organization .middle-org-profile-v2{
  overflow:hidden!important;
  border:1px solid color-mix(in srgb,var(--middle-border) 88%,transparent)!important;
  border-radius:28px!important;
  background:var(--middle-surface-strong)!important;
  box-shadow:0 24px 70px rgba(24,58,93,.10)!important;
}
body.single-middle_organization .middle-org-profile-v2__hero{
  display:grid!important;
  grid-template-columns:minmax(420px,46%) minmax(0,1fr)!important;
  gap:38px!important;
  align-items:stretch!important;
  padding:26px!important;
  background:linear-gradient(135deg,color-mix(in srgb,var(--middle-accent-soft) 42%,#fff),#fff 58%)!important;
  border-bottom:1px solid var(--middle-border)!important;
}
body.single-middle_organization .middle-org-profile-v2__photo-column{min-width:0!important}
body.single-middle_organization .middle-org-profile-v2__photo{
  min-height:320px!important;
  height:auto!important;
  display:grid!important;
  place-items:center!important;
  overflow:hidden!important;
  border-radius:24px!important;
  background:linear-gradient(145deg,var(--middle-bg-soft),color-mix(in srgb,var(--middle-accent-soft) 35%,#fff))!important;
  box-shadow:0 14px 34px rgba(25,61,98,.11)!important;
}
body.single-middle_organization .middle-org-profile-v2__photo img{
  display:block!important;
  width:100%!important;
  height:auto!important;
  max-height:520px!important;
  object-fit:contain!important;
  object-position:center!important;
  background:#fff!important;
}
body.single-middle_organization .middle-org-profile-v2__placeholder{
  display:grid!important;place-items:center!important;width:100%!important;height:100%!important;
  font-size:92px!important;font-weight:900!important;color:var(--middle-accent)!important;
}
body.single-middle_organization .middle-org-profile-v2__credit{margin:8px 4px 0!important;color:var(--middle-muted)!important;font-size:10px!important;line-height:1.45!important}
body.single-middle_organization .middle-org-profile-v2__credit a{color:var(--middle-accent)!important}
body.single-middle_organization .middle-org-profile-v2__intro{
  min-width:0!important;display:flex!important;flex-direction:column!important;justify-content:center!important;padding:10px 12px 10px 0!important;
}
body.single-middle_organization .middle-org-profile-v2__categories{display:flex!important;gap:7px!important;flex-wrap:wrap!important;margin-bottom:13px!important}
body.single-middle_organization .middle-org-profile-v2__categories a{
  display:inline-flex!important;align-items:center!important;min-height:28px!important;padding:0 11px!important;border-radius:999px!important;
  background:var(--middle-accent-soft)!important;color:var(--middle-accent)!important;font-size:10px!important;font-weight:850!important;text-transform:uppercase!important;letter-spacing:.04em!important;
}
body.single-middle_organization .middle-org-profile-v2__intro h1{
  margin:0!important;font-size:clamp(40px,4.4vw,64px)!important;line-height:.98!important;letter-spacing:-.055em!important;color:var(--middle-text)!important;
}
body.single-middle_organization .middle-org-profile-v2__lead{
  max-width:720px!important;margin:16px 0 0!important;color:var(--middle-muted)!important;font-size:16px!important;line-height:1.65!important;
}
body.single-middle_organization .middle-org-profile-v2__quick-meta{display:flex!important;flex-wrap:wrap!important;gap:8px 16px!important;margin-top:18px!important}
body.single-middle_organization .middle-org-profile-v2__quick-meta span{display:inline-flex!important;align-items:center!important;gap:6px!important;color:var(--middle-muted)!important;font-size:13px!important;font-weight:650!important}
body.single-middle_organization .middle-org-profile-v2__quick-meta .is-open{color:#169449!important}
body.single-middle_organization .middle-org-profile-v2__quick-meta .is-closed{color:#b64646!important}
body.single-middle_organization .middle-org-profile-v2__actions{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:10px!important;margin-top:28px!important}
body.single-middle_organization .middle-org-profile-v2__action{
  min-height:50px!important;padding:0 16px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;
  border:1px solid color-mix(in srgb,var(--middle-accent) 42%,var(--middle-border))!important;border-radius:14px!important;background:#fff!important;color:var(--middle-accent)!important;
  font-size:13px!important;font-weight:800!important;text-align:center!important;box-shadow:0 7px 18px rgba(28,88,160,.05)!important;
}
body.single-middle_organization .middle-org-profile-v2__action.is-primary{background:var(--middle-accent)!important;border-color:var(--middle-accent)!important;color:#fff!important;box-shadow:0 12px 24px color-mix(in srgb,var(--middle-accent) 22%,transparent)!important}
body.single-middle_organization .middle-org-profile-v2__body{
  display:grid!important;grid-template-columns:minmax(0,1fr) 420px!important;gap:24px!important;padding:26px!important;background:#fff!important;
}
body.single-middle_organization .middle-org-profile-v2__main{min-width:0!important}
body.single-middle_organization .middle-org-profile-v2__section-head{display:flex!important;align-items:flex-end!important;justify-content:space-between!important;gap:20px!important;margin-bottom:14px!important}
body.single-middle_organization .middle-org-profile-v2__section-head span{display:block!important;margin-bottom:4px!important;color:var(--middle-accent)!important;font-size:10px!important;font-weight:850!important;text-transform:uppercase!important;letter-spacing:.09em!important}
body.single-middle_organization .middle-org-profile-v2__section-head h2{margin:0!important;font-size:22px!important;line-height:1.15!important;letter-spacing:-.025em!important}
body.single-middle_organization .middle-org-profile-v2__section-head.is-compact{align-items:center!important;margin-bottom:13px!important}
body.single-middle_organization .middle-org-profile-v2__contacts{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
body.single-middle_organization .middle-org-profile-v2__contact{
  min-width:0!important;display:grid!important;grid-template-columns:42px minmax(0,1fr)!important;gap:12px!important;align-items:center!important;
  min-height:78px!important;padding:13px 15px!important;border:1px solid var(--middle-border)!important;border-radius:17px!important;background:var(--middle-bg-soft)!important;
}
body.single-middle_organization .middle-org-profile-v2__contact i{
  width:42px!important;height:42px!important;display:grid!important;place-items:center!important;border-radius:13px!important;background:#fff!important;color:var(--middle-accent)!important;
  font-size:18px!important;font-style:normal!important;box-shadow:0 5px 14px rgba(25,61,98,.06)!important;
}
body.single-middle_organization .middle-org-profile-v2__contact small{display:block!important;margin-bottom:5px!important;color:var(--middle-muted)!important;font-size:9px!important;font-weight:800!important;text-transform:uppercase!important;letter-spacing:.05em!important}
body.single-middle_organization .middle-org-profile-v2__contact strong{display:block!important;font-size:13px!important;line-height:1.35!important;overflow-wrap:anywhere!important}
body.single-middle_organization .middle-org-profile-v2__contact a{color:var(--middle-text)!important;text-decoration:none!important}
body.single-middle_organization .middle-org-profile-v2__contact a:hover{color:var(--middle-accent)!important}
body.single-middle_organization .middle-org-profile-v2__hours-card,
body.single-middle_organization .middle-org-profile-v2__description{
  margin-top:18px!important;padding:18px!important;border:1px solid var(--middle-border)!important;border-radius:19px!important;background:var(--middle-bg-soft)!important;
}
body.single-middle_organization .middle-org-profile-v2__today{display:inline-flex!important;align-items:center!important;min-height:30px!important;padding:0 10px!important;border-radius:999px!important;background:#fff!important;color:var(--middle-muted)!important;font-size:10px!important}
body.single-middle_organization .middle-org-profile-v2__today.is-open{background:#eaf8ef!important;color:#168e46!important}
body.single-middle_organization .middle-org-profile-v2__today.is-closed{background:#fff0f0!important;color:#b44747!important}
body.single-middle_organization .middle-org-profile-v2__week{display:grid!important;grid-template-columns:repeat(7,minmax(0,1fr))!important;gap:7px!important}
body.single-middle_organization .middle-org-profile-v2__day{
  display:grid!important;gap:5px!important;min-width:0!important;padding:10px 7px!important;text-align:center!important;border:1px solid var(--middle-border)!important;border-radius:13px!important;background:#fff!important;
}
body.single-middle_organization .middle-org-profile-v2__day b{font-size:10px!important;color:var(--middle-muted)!important}
body.single-middle_organization .middle-org-profile-v2__day span{font-size:10px!important;font-weight:750!important;white-space:nowrap!important}
body.single-middle_organization .middle-org-profile-v2__day.is-today{border-color:color-mix(in srgb,var(--middle-accent) 42%,var(--middle-border))!important;background:color-mix(in srgb,var(--middle-accent-soft) 40%,#fff)!important}
body.single-middle_organization .middle-org-profile-v2__day.is-today b{color:var(--middle-accent)!important}
body.single-middle_organization .middle-org-profile-v2__legacy-hours{margin:0!important;font-size:14px!important;font-weight:700!important}
body.single-middle_organization .middle-org-profile-v2__description .middle-content{font-size:14px!important;line-height:1.7!important}
body.single-middle_organization .middle-org-profile-v2__source{margin:16px 0 0!important;color:var(--middle-muted)!important;font-size:9px!important;line-height:1.55!important}
body.single-middle_organization .middle-org-profile-v2__map-card{
  position:sticky!important;top:92px!important;align-self:start!important;overflow:hidden!important;border:1px solid var(--middle-border)!important;border-radius:20px!important;background:#fff!important;box-shadow:0 14px 34px rgba(25,61,98,.08)!important;
}
body.single-middle_organization .middle-org-profile-v2__map-head{padding:15px 16px!important;border-bottom:1px solid var(--middle-border)!important;background:linear-gradient(135deg,var(--middle-accent-soft),#fff)!important}
body.single-middle_organization .middle-org-profile-v2__map-head span{display:block!important;margin-bottom:3px!important;color:var(--middle-accent)!important;font-size:9px!important;font-weight:850!important;text-transform:uppercase!important;letter-spacing:.08em!important}
body.single-middle_organization .middle-org-profile-v2__map-head strong{display:block!important;font-size:15px!important}
body.single-middle_organization .middle-org-profile-v2__map-head small{display:block!important;margin-top:4px!important;color:var(--middle-muted)!important;font-size:11px!important}
body.single-middle_organization .middle-org-profile-v2__map-card .middle-org-map--single{height:430px!important;border:0!important;border-radius:0!important;box-shadow:none!important}
body.single-middle_organization .middle-org-profile-v2__route{
  min-height:48px!important;margin:12px!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;border-radius:13px!important;background:var(--middle-accent-soft)!important;color:var(--middle-accent)!important;font-size:12px!important;font-weight:850!important;
}
@media(max-width:1100px){
  body.single-middle_organization .middle-org-profile-v2__hero{grid-template-columns:minmax(350px,44%) minmax(0,1fr)!important;gap:26px!important}
  body.single-middle_organization .middle-org-profile-v2__photo{min-height:290px!important;height:auto!important}
  body.single-middle_organization .middle-org-profile-v2__body{grid-template-columns:minmax(0,1fr) 360px!important}
  body.single-middle_organization .middle-org-profile-v2__actions{grid-template-columns:1fr!important}
  body.single-middle_organization .middle-org-profile-v2__week{grid-template-columns:repeat(4,minmax(0,1fr))!important}
}
@media(max-width:860px){
  body.single-middle_organization .middle-org-single--profile-v2{width:min(calc(100% - 28px),760px)!important;margin-top:18px!important}
  body.single-middle_organization .middle-org-profile-v2__hero{grid-template-columns:1fr!important;padding:18px!important}
  body.single-middle_organization .middle-org-profile-v2__photo{min-height:0!important;height:auto!important}
  body.single-middle_organization .middle-org-profile-v2__intro{padding:2px 2px 0!important}
  body.single-middle_organization .middle-org-profile-v2__body{grid-template-columns:1fr!important;padding:18px!important}
  body.single-middle_organization .middle-org-profile-v2__map-card{position:static!important}
  body.single-middle_organization .middle-org-profile-v2__actions{grid-template-columns:repeat(3,minmax(0,1fr))!important}
}
@media(max-width:620px){
  body.single-middle_organization .middle-org-single--profile-v2{width:calc(100% - 18px)!important;margin:12px auto 88px!important}
  body.single-middle_organization .middle-org-single--profile-v2 .middle-org-single__breadcrumbs{margin:0 2px 10px!important;font-size:9px!important}
  body.single-middle_organization .middle-org-profile-v2{border-radius:21px!important}
  body.single-middle_organization .middle-org-profile-v2__hero{padding:11px!important;gap:14px!important}
  body.single-middle_organization .middle-org-profile-v2__photo{min-height:0!important;height:auto!important;border-radius:17px!important}
  body.single-middle_organization .middle-org-profile-v2__photo img{border-radius:17px!important}
  body.single-middle_organization .middle-org-profile-v2__intro h1{font-size:34px!important;line-height:1.02!important}
  body.single-middle_organization .middle-org-profile-v2__lead{margin-top:10px!important;font-size:13px!important;line-height:1.55!important}
  body.single-middle_organization .middle-org-profile-v2__quick-meta{margin-top:12px!important;display:grid!important;gap:7px!important}
  body.single-middle_organization .middle-org-profile-v2__quick-meta span{font-size:11px!important}
  body.single-middle_organization .middle-org-profile-v2__actions{grid-template-columns:1fr!important;margin-top:16px!important}
  body.single-middle_organization .middle-org-profile-v2__action{min-height:46px!important}
  body.single-middle_organization .middle-org-profile-v2__body{padding:11px!important;gap:14px!important}
  body.single-middle_organization .middle-org-profile-v2__section-head h2{font-size:18px!important}
  body.single-middle_organization .middle-org-profile-v2__contacts{grid-template-columns:1fr!important}
  body.single-middle_organization .middle-org-profile-v2__contact{min-height:68px!important;padding:11px 12px!important}
  body.single-middle_organization .middle-org-profile-v2__hours-card,
  body.single-middle_organization .middle-org-profile-v2__description{padding:13px!important;border-radius:16px!important}
  body.single-middle_organization .middle-org-profile-v2__section-head.is-compact{align-items:flex-start!important;flex-direction:column!important;gap:7px!important}
  body.single-middle_organization .middle-org-profile-v2__week{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important}
  body.single-middle_organization .middle-org-profile-v2__day:last-child{grid-column:1 / -1!important}
  body.single-middle_organization .middle-org-profile-v2__map-card{border-radius:17px!important}
  body.single-middle_organization .middle-org-profile-v2__map-card .middle-org-map--single{height:310px!important}
}

/* 0.4.81 — organization photo must never be cropped */
body.single-middle_organization .middle-org-profile-v2__photo img{height:auto!important;max-height:none!important;object-fit:contain!important;object-position:center!important}
@media(min-width:861px){body.single-middle_organization .middle-org-profile-v2__photo img{max-height:520px!important}}
@media(max-width:860px){body.single-middle_organization .middle-org-profile-v2__photo{min-height:0!important}body.single-middle_organization .middle-org-profile-v2__photo img{width:100%!important;height:auto!important;max-height:none!important}}


/* 0.4.82 — elegant full-photo presentation: complete image over a soft blurred backdrop */
body.single-middle_organization .middle-org-profile-v2__photo{
  position:relative!important;
  isolation:isolate!important;
  min-height:360px!important;
  height:clamp(360px,31vw,470px)!important;
  padding:18px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  overflow:hidden!important;
  background:color-mix(in srgb,var(--middle-bg-soft) 88%,#fff)!important;
  border:1px solid color-mix(in srgb,var(--middle-border) 78%,transparent)!important;
  border-radius:26px!important;
  box-shadow:0 16px 40px rgba(20,48,80,.12)!important;
}
body.single-middle_organization .middle-org-profile-v2__photo::before{
  content:""!important;
  position:absolute!important;
  inset:-34px!important;
  z-index:-2!important;
  background-image:var(--middle-org-photo)!important;
  background-position:center!important;
  background-size:cover!important;
  background-repeat:no-repeat!important;
  filter:blur(24px) saturate(.88)!important;
  transform:scale(1.09)!important;
  opacity:.46!important;
}
body.single-middle_organization .middle-org-profile-v2__photo::after{
  content:""!important;
  position:absolute!important;
  inset:0!important;
  z-index:-1!important;
  background:linear-gradient(135deg,rgba(255,255,255,.36),rgba(255,255,255,.12) 52%,rgba(18,46,76,.10))!important;
  pointer-events:none!important;
}
body.single-middle_organization .middle-org-profile-v2__photo img{
  position:relative!important;
  z-index:1!important;
  display:block!important;
  width:auto!important;
  max-width:100%!important;
  height:auto!important;
  max-height:100%!important;
  object-fit:contain!important;
  object-position:center!important;
  background:transparent!important;
  border-radius:19px!important;
  box-shadow:0 12px 32px rgba(13,38,68,.22)!important;
}
@media(max-width:860px){
  body.single-middle_organization .middle-org-profile-v2__photo{
    min-height:300px!important;
    height:min(68vw,440px)!important;
    padding:13px!important;
    border-radius:21px!important;
  }
  body.single-middle_organization .middle-org-profile-v2__photo img{max-height:100%!important;border-radius:15px!important}
}
@media(max-width:560px){
  body.single-middle_organization .middle-org-profile-v2__photo{
    min-height:270px!important;
    height:min(82vw,390px)!important;
    padding:10px!important;
  }
}

/* 0.4.83 — organization page rebuilt 1:1 around approved “map + contacts” mockup. */
body.single-middle_organization .middle-org-single--profile-v3{width:min(calc(100% - 42px),1540px)!important;max-width:1540px!important;margin:22px auto 48px!important}
body.single-middle_organization .middle-org-v3__breadcrumbs{display:flex!important;align-items:center!important;gap:7px!important;flex-wrap:wrap!important;margin:0 4px 14px!important;color:var(--middle-muted)!important;font-size:12px!important}
body.single-middle_organization .middle-org-v3__breadcrumbs a{color:var(--middle-accent)!important;text-decoration:none!important}
body.single-middle_organization .middle-org-v3__breadcrumbs b{color:var(--middle-text)!important}
body.single-middle_organization .middle-org-v3{display:grid!important;gap:18px!important}
body.single-middle_organization .middle-org-v3__top{display:grid!important;grid-template-columns:minmax(0,1.1fr) minmax(420px,1.05fr) 400px!important;gap:16px!important;align-items:stretch!important}
body.single-middle_organization .middle-org-v3__gallery,
body.single-middle_organization .middle-org-v3__summary,
body.single-middle_organization .middle-org-v3__map-card,
body.single-middle_organization .middle-org-v3__panel,
body.single-middle_organization .middle-org-v3__related{border:1px solid color-mix(in srgb,var(--middle-border) 86%,transparent)!important;border-radius:24px!important;background:#fff!important;box-shadow:0 16px 44px rgba(20,56,94,.07)!important}
body.single-middle_organization .middle-org-v3__gallery{padding:16px!important;min-width:0!important}
body.single-middle_organization .middle-org-v3__main-photo{position:relative!important;isolation:isolate!important;height:410px!important;display:flex!important;align-items:center!important;justify-content:center!important;overflow:hidden!important;border-radius:18px!important;background:var(--middle-bg-soft)!important}
body.single-middle_organization .middle-org-v3__main-photo::before{content:""!important;position:absolute!important;inset:-32px!important;z-index:-2!important;background:var(--middle-org-photo) center/cover no-repeat!important;filter:blur(24px) saturate(.9)!important;transform:scale(1.09)!important;opacity:.46!important}
body.single-middle_organization .middle-org-v3__main-photo::after{content:""!important;position:absolute!important;inset:0!important;z-index:-1!important;background:linear-gradient(135deg,rgba(255,255,255,.28),rgba(255,255,255,.08) 50%,rgba(16,43,72,.12))!important}
body.single-middle_organization .middle-org-v3__main-image{display:block!important;width:auto!important;max-width:100%!important;height:auto!important;max-height:100%!important;object-fit:contain!important;border-radius:13px!important;box-shadow:0 12px 30px rgba(12,35,64,.19)!important}
body.single-middle_organization .middle-org-v3__placeholder{display:grid!important;place-items:center!important;width:100%!important;height:100%!important;color:var(--middle-accent)!important;font-size:96px!important;font-weight:900!important;background:linear-gradient(135deg,var(--middle-accent-soft),#fff)!important}
body.single-middle_organization .middle-org-v3__photo-count{position:absolute!important;right:12px!important;bottom:12px!important;padding:6px 10px!important;border-radius:999px!important;background:rgba(10,25,45,.72)!important;color:#fff!important;font-size:11px!important;font-weight:800!important;backdrop-filter:blur(8px)!important}
body.single-middle_organization .middle-org-v3__thumbs{display:flex!important;gap:8px!important;margin-top:10px!important;overflow-x:auto!important;scrollbar-width:thin!important}
body.single-middle_organization .middle-org-v3__thumb{flex:0 0 76px!important;height:62px!important;padding:0!important;overflow:hidden!important;border:2px solid transparent!important;border-radius:12px!important;background:var(--middle-bg-soft)!important;cursor:pointer!important}
body.single-middle_organization .middle-org-v3__thumb.is-active{border-color:var(--middle-accent)!important;box-shadow:0 0 0 2px color-mix(in srgb,var(--middle-accent) 13%,transparent)!important}
body.single-middle_organization .middle-org-v3__thumb img{width:100%!important;height:100%!important;object-fit:cover!important}
body.single-middle_organization .middle-org-v3__credit{margin:8px 2px 0!important;color:var(--middle-muted)!important;font-size:9px!important}.middle-org-v3__credit a{color:var(--middle-accent)!important}
body.single-middle_organization .middle-org-v3__summary{display:flex!important;flex-direction:column!important;padding:24px!important;min-width:0!important}
body.single-middle_organization .middle-org-v3__categories{display:flex!important;gap:7px!important;flex-wrap:wrap!important;margin-bottom:10px!important}
body.single-middle_organization .middle-org-v3__categories a{display:inline-flex!important;align-items:center!important;min-height:27px!important;padding:0 10px!important;border-radius:999px!important;background:var(--middle-accent-soft)!important;color:var(--middle-accent)!important;font-size:10px!important;font-weight:850!important;text-transform:uppercase!important;letter-spacing:.04em!important;text-decoration:none!important}
body.single-middle_organization .middle-org-v3__summary h1{margin:0!important;color:var(--middle-text)!important;font-size:clamp(36px,3.2vw,54px)!important;line-height:1!important;letter-spacing:-.05em!important}
body.single-middle_organization .middle-org-v3__lead{margin:14px 0 0!important;color:var(--middle-muted)!important;font-size:15px!important;line-height:1.6!important}
body.single-middle_organization .middle-org-v3__status{display:inline-flex!important;align-items:center!important;gap:8px!important;align-self:flex-start!important;margin-top:15px!important;color:var(--middle-muted)!important;font-size:13px!important;font-weight:760!important}
body.single-middle_organization .middle-org-v3__status span,.middle-org-v3__today-note span{width:8px!important;height:8px!important;border-radius:50%!important;background:#a3acb9!important}.middle-org-v3__status.is-open,.middle-org-v3__today-note.is-open{color:#139148!important}.middle-org-v3__status.is-open span,.middle-org-v3__today-note.is-open span{background:#19b85b!important}.middle-org-v3__status.is-closed,.middle-org-v3__today-note.is-closed{color:#b04b4b!important}.middle-org-v3__status.is-closed span,.middle-org-v3__today-note.is-closed span{background:#d95c5c!important}
body.single-middle_organization .middle-org-v3__actions{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important;margin-top:20px!important}
body.single-middle_organization .middle-org-v3__actions a{min-height:48px!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:7px!important;padding:0 12px!important;border:1px solid color-mix(in srgb,var(--middle-accent) 42%,var(--middle-border))!important;border-radius:12px!important;background:#fff!important;color:var(--middle-accent)!important;font-size:12px!important;font-weight:850!important;text-decoration:none!important;text-align:center!important}.middle-org-v3__actions a.is-primary{background:var(--middle-accent)!important;border-color:var(--middle-accent)!important;color:#fff!important;box-shadow:0 10px 20px color-mix(in srgb,var(--middle-accent) 20%,transparent)!important}
body.single-middle_organization .middle-org-v3__facts{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important;margin-top:18px!important}
body.single-middle_organization .middle-org-v3__facts>div{min-width:0!important;display:grid!important;grid-template-columns:38px minmax(0,1fr)!important;gap:10px!important;align-items:center!important;min-height:72px!important;padding:10px 12px!important;border:1px solid var(--middle-border)!important;border-radius:14px!important;background:var(--middle-bg-soft)!important}
body.single-middle_organization .middle-org-v3__facts i{display:grid!important;place-items:center!important;width:38px!important;height:38px!important;border-radius:11px!important;background:#fff!important;color:var(--middle-accent)!important;font-style:normal!important;font-size:17px!important;box-shadow:0 5px 14px rgba(20,56,94,.06)!important}.middle-org-v3__facts small{display:block!important;margin-bottom:4px!important;color:var(--middle-muted)!important;font-size:9px!important;font-weight:800!important;text-transform:uppercase!important}.middle-org-v3__facts strong{display:block!important;color:var(--middle-text)!important;font-size:12px!important;line-height:1.35!important;overflow-wrap:anywhere!important}.middle-org-v3__facts a{color:inherit!important;text-decoration:none!important}
body.single-middle_organization .middle-org-v3__map-card{position:relative!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;min-width:0!important;padding:12px!important}
body.single-middle_organization .middle-org-v3__map-tabs{padding:0 0 10px!important}.middle-org-v3__map-tabs b{display:inline-flex!important;align-items:center!important;min-height:34px!important;padding:0 14px!important;border-radius:10px!important;background:var(--middle-accent)!important;color:#fff!important;font-size:12px!important}
body.single-middle_organization .middle-org-v3__map-card .middle-org-map--single{height:360px!important;border:0!important;border-radius:16px!important;box-shadow:none!important}
body.single-middle_organization .middle-org-v3__map-caption{display:grid!important;gap:2px!important;padding:12px 4px 0!important}.middle-org-v3__map-caption strong{font-size:14px!important}.middle-org-v3__map-caption span{color:var(--middle-muted)!important;font-size:11px!important}
body.single-middle_organization .middle-org-v3__route{min-height:46px!important;margin-top:auto!important;margin-top:12px!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;border-radius:12px!important;background:var(--middle-accent-soft)!important;color:var(--middle-accent)!important;font-size:12px!important;font-weight:850!important;text-decoration:none!important}
body.single-middle_organization .middle-org-v3__lower{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(420px,.9fr)!important;gap:16px!important}.middle-org-v3__lower:has(.middle-org-v3__panel:only-child){grid-template-columns:1fr!important}
body.single-middle_organization .middle-org-v3__panel{padding:20px!important}.middle-org-v3__panel h2{margin:0 0 12px!important;font-size:20px!important;line-height:1.15!important}.middle-org-v3__about .middle-content{font-size:14px!important;line-height:1.7!important;color:var(--middle-text)!important}.middle-org-v3__about .middle-content>*:first-child{margin-top:0!important}.middle-org-v3__about .middle-content>*:last-child{margin-bottom:0!important}
body.single-middle_organization .middle-org-v3__week{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:7px!important}.middle-org-v3__day{display:grid!important;gap:4px!important;min-width:0!important;padding:10px 7px!important;border:1px solid var(--middle-border)!important;border-radius:12px!important;background:var(--middle-bg-soft)!important;text-align:center!important}.middle-org-v3__day b{color:var(--middle-muted)!important;font-size:10px!important}.middle-org-v3__day span{font-size:11px!important;font-weight:800!important;white-space:nowrap!important}.middle-org-v3__day.is-today{border-color:color-mix(in srgb,var(--middle-accent) 45%,var(--middle-border))!important;background:color-mix(in srgb,var(--middle-accent-soft) 48%,#fff)!important}.middle-org-v3__day.is-today b{color:var(--middle-accent)!important}.middle-org-v3__today-note{display:flex!important;align-items:center!important;gap:7px!important;margin:12px 0 0!important;font-size:11px!important;font-weight:800!important}
body.single-middle_organization .middle-org-v3__source{grid-column:1/-1!important;margin:0 4px!important;color:var(--middle-muted)!important;font-size:9px!important;line-height:1.5!important}.middle-org-v3__source a{color:var(--middle-accent)!important}
body.single-middle_organization .middle-org-v3__related{padding:18px!important}.middle-org-v3__related-head{display:flex!important;justify-content:space-between!important;align-items:center!important;gap:16px!important;margin-bottom:12px!important}.middle-org-v3__related-head h2{margin:0!important;font-size:20px!important}.middle-org-v3__related-head a{color:var(--middle-accent)!important;font-size:12px!important;font-weight:800!important;text-decoration:none!important}.middle-org-v3__related-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:10px!important}.middle-org-v3__related-card{display:grid!important;grid-template-columns:92px minmax(0,1fr)!important;gap:11px!important;align-items:center!important;min-width:0!important;padding:8px!important;border:1px solid var(--middle-border)!important;border-radius:15px!important;background:#fff!important;color:var(--middle-text)!important;text-decoration:none!important;transition:transform .18s ease,box-shadow .18s ease!important}.middle-org-v3__related-card:hover{transform:translateY(-2px)!important;box-shadow:0 10px 24px rgba(20,56,94,.08)!important}.middle-org-v3__related-photo{display:grid!important;place-items:center!important;width:92px!important;height:70px!important;overflow:hidden!important;border-radius:11px!important;background:var(--middle-accent-soft)!important;color:var(--middle-accent)!important}.middle-org-v3__related-photo img{width:100%!important;height:100%!important;object-fit:cover!important}.middle-org-v3__related-photo b{font-size:28px!important}.middle-org-v3__related-copy{min-width:0!important;display:grid!important;gap:4px!important}.middle-org-v3__related-copy strong{font-size:13px!important;line-height:1.25!important}.middle-org-v3__related-copy small{color:var(--middle-muted)!important;font-size:10px!important;line-height:1.35!important}
@media(max-width:1280px){body.single-middle_organization .middle-org-v3__top{grid-template-columns:minmax(360px,.9fr) minmax(0,1fr)!important}.middle-org-v3__map-card{grid-column:1/-1!important}.middle-org-v3__map-card .middle-org-map--single{height:320px!important}.middle-org-v3__related-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:900px){body.single-middle_organization .middle-org-single--profile-v3{width:min(calc(100% - 24px),760px)!important}.middle-org-v3__top,.middle-org-v3__lower{grid-template-columns:1fr!important}.middle-org-v3__map-card{grid-column:auto!important}.middle-org-v3__main-photo{height:min(68vw,500px)!important}.middle-org-v3__actions{grid-template-columns:1fr!important}.middle-org-v3__facts{grid-template-columns:1fr 1fr!important}.middle-org-v3__week{grid-template-columns:repeat(4,minmax(0,1fr))!important}}
@media(max-width:620px){body.single-middle_organization .middle-org-single--profile-v3{width:calc(100% - 16px)!important;margin:10px auto 86px!important}.middle-org-v3__breadcrumbs{font-size:9px!important;margin:0 2px 9px!important}.middle-org-v3{gap:10px!important}.middle-org-v3__top{gap:10px!important}.middle-org-v3__gallery,.middle-org-v3__summary,.middle-org-v3__map-card,.middle-org-v3__panel,.middle-org-v3__related{border-radius:18px!important}.middle-org-v3__gallery{padding:9px!important}.middle-org-v3__main-photo{height:min(82vw,390px)!important;border-radius:14px!important}.middle-org-v3__main-image{border-radius:10px!important}.middle-org-v3__thumb{flex-basis:64px!important;height:52px!important}.middle-org-v3__summary{padding:15px!important}.middle-org-v3__summary h1{font-size:34px!important}.middle-org-v3__lead{font-size:13px!important}.middle-org-v3__actions{margin-top:14px!important}.middle-org-v3__facts{grid-template-columns:1fr!important;margin-top:12px!important}.middle-org-v3__facts>div{min-height:64px!important}.middle-org-v3__map-card{padding:9px!important}.middle-org-v3__map-card .middle-org-map--single{height:290px!important}.middle-org-v3__panel{padding:14px!important}.middle-org-v3__week{grid-template-columns:repeat(2,minmax(0,1fr))!important}.middle-org-v3__day:last-child{grid-column:1/-1!important}.middle-org-v3__related{padding:12px!important}.middle-org-v3__related-grid{grid-template-columns:1fr!important}.middle-org-v3__related-card{grid-template-columns:82px minmax(0,1fr)!important}.middle-org-v3__related-photo{width:82px!important;height:64px!important}}

/* ======================================================================
   Middle Community 0.4.84 — organizations archive, approved layout #1.
   Exact portal-style list + sticky map composition from the chosen mockup.
   ====================================================================== */
body.post-type-archive-middle_organization{
  --mc-org-blue:#1677ff;
  --mc-org-blue-soft:#eaf4ff;
  --mc-org-green:#0aa44a;
  --mc-org-border:#dce8f4;
  --mc-org-text:#102646;
  --mc-org-muted:#70849c;
}
body.post-type-archive-middle_organization .middle-org-directory{
  width:min(1420px,calc(100% - 48px))!important;
  margin:26px auto 62px!important;
}
body.post-type-archive-middle_organization .middle-org-directory__hero{
  min-height:132px!important;
  align-items:center!important;
  padding:20px 24px!important;
  border:1px solid var(--mc-org-border)!important;
  border-radius:20px!important;
  background:linear-gradient(110deg,#f8fbff 0%,#f6fbff 68%,#eef7ff 100%)!important;
  box-shadow:none!important;
}
body.post-type-archive-middle_organization .middle-org-directory__hero:after{
  right:7%!important;top:-155px!important;width:330px!important;height:330px!important;
  border-color:rgba(22,119,255,.07)!important;
  box-shadow:0 0 0 38px rgba(22,119,255,.022),0 0 0 78px rgba(22,119,255,.016)!important;
}
body.post-type-archive-middle_organization .middle-org-directory__breadcrumbs{
  display:flex;align-items:center;gap:7px;margin:0 0 10px;color:#8093aa;font-size:11px;line-height:1;
}
body.post-type-archive-middle_organization .middle-org-directory__breadcrumbs a{color:#6e8eb7;text-decoration:none}
body.post-type-archive-middle_organization .middle-org-directory__breadcrumbs b{color:#6b7f98;font-weight:600}
body.post-type-archive-middle_organization .middle-org-directory__hero h1{
  max-width:none!important;margin:0 0 7px!important;color:var(--mc-org-text)!important;
  font-size:clamp(28px,2.4vw,40px)!important;line-height:1.05!important;letter-spacing:-.035em!important;
}
body.post-type-archive-middle_organization .middle-org-directory__hero p{
  max-width:820px!important;margin:0!important;color:#687f99!important;font-size:13px!important;line-height:1.45!important;
}
body.post-type-archive-middle_organization .middle-org-directory__count{
  min-width:112px!important;padding:14px 17px!important;border:1px solid #cfe0f0!important;border-radius:15px!important;
  background:rgba(255,255,255,.82)!important;box-shadow:none!important;text-align:center!important;
}
body.post-type-archive-middle_organization .middle-org-directory__count strong{font-size:25px!important;color:var(--mc-org-text)!important;line-height:1!important}
body.post-type-archive-middle_organization .middle-org-directory__count small{margin-top:5px!important;font-size:10px!important;color:#8090a5!important}

body.post-type-archive-middle_organization .middle-org-search{
  display:block!important;margin:12px 0 10px!important;padding:0!important;background:transparent!important;
}
body.post-type-archive-middle_organization .middle-org-search__field{
  width:100%!important;height:46px!important;border:1px solid #d3e2f1!important;border-radius:14px!important;
  background:#fff!important;box-shadow:0 2px 10px rgba(29,65,106,.025)!important;
}
body.post-type-archive-middle_organization .middle-org-search__field svg{width:17px!important;height:17px!important;color:var(--mc-org-blue)!important}
body.post-type-archive-middle_organization .middle-org-search__field input{font-size:13px!important;color:var(--mc-org-text)!important}
body.post-type-archive-middle_organization .middle-org-search__field input::placeholder{color:#8ca0b7!important}
body.post-type-archive-middle_organization .middle-org-search__map-toggle{display:none!important}

body.post-type-archive-middle_organization .middle-org-filters{
  display:flex!important;align-items:center!important;gap:7px!important;overflow-x:auto!important;margin:0 0 10px!important;
  padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;scrollbar-width:none!important;
}
body.post-type-archive-middle_organization .middle-org-filters::-webkit-scrollbar{display:none}
body.post-type-archive-middle_organization .middle-org-filters button{
  flex:0 0 auto!important;min-height:38px!important;padding:0 16px!important;border:1px solid #d9e5f1!important;border-radius:999px!important;
  background:#f8fbff!important;color:#213a59!important;font-size:11px!important;font-weight:650!important;box-shadow:none!important;
}
body.post-type-archive-middle_organization .middle-org-filters button span{display:none!important}
body.post-type-archive-middle_organization .middle-org-filters button.is-active{
  border-color:var(--mc-org-blue)!important;background:var(--mc-org-blue)!important;color:#fff!important;
}

body.post-type-archive-middle_organization .middle-org-directory__layout{
  display:grid!important;grid-template-columns:minmax(0,1.9fr) minmax(390px,.95fr)!important;gap:12px!important;margin-top:0!important;
}
body.post-type-archive-middle_organization .middle-org-results{
  padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;
}
body.post-type-archive-middle_organization .middle-org-results__head{
  min-height:44px!important;margin:0 0 7px!important;padding:0 4px!important;border:0!important;
}
body.post-type-archive-middle_organization .middle-org-results__head>div{display:flex!important;align-items:baseline!important;gap:8px!important}
body.post-type-archive-middle_organization .middle-org-results__head span{
  margin:0!important;color:#6b82a0!important;font-size:10px!important;font-weight:750!important;letter-spacing:.08em!important;
}
body.post-type-archive-middle_organization .middle-org-results__head h2{
  margin:0!important;color:var(--mc-org-text)!important;font-size:13px!important;font-weight:750!important;
}
body.post-type-archive-middle_organization .middle-org-results__head select{
  min-height:35px!important;padding:0 31px 0 12px!important;border:1px solid #d9e5f1!important;border-radius:10px!important;
  background:#fff!important;color:#526982!important;font-size:10px!important;
}
body.post-type-archive-middle_organization .middle-org-cards{
  display:grid!important;grid-template-columns:1fr!important;gap:8px!important;
}
body.post-type-archive-middle_organization .middle-org-card--large{
  display:grid!important;grid-template-columns:290px minmax(0,1fr)!important;min-height:154px!important;height:auto!important;
  overflow:hidden!important;border:1px solid var(--mc-org-border)!important;border-radius:17px!important;background:#fff!important;
  box-shadow:0 5px 18px rgba(32,74,118,.035)!important;transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease!important;
}
body.post-type-archive-middle_organization .middle-org-card--large:hover{
  transform:translateY(-1px)!important;border-color:#bfd8f1!important;box-shadow:0 9px 24px rgba(32,74,118,.07)!important;
}
body.post-type-archive-middle_organization .middle-org-card--large .middle-org-card__media{
  display:block!important;width:auto!important;height:138px!important;min-height:138px!important;margin:8px!important;overflow:hidden!important;
  border-radius:12px!important;background:#eef4fa!important;
}
body.post-type-archive-middle_organization .middle-org-card--large .middle-org-card__media img{
  display:block!important;width:100%!important;height:100%!important;object-fit:cover!important;border-radius:12px!important;background:#eef4fa!important;
}
body.post-type-archive-middle_organization .middle-org-card--large .middle-org-card__media>span{
  display:grid!important;place-items:center!important;width:100%!important;height:100%!important;color:#5792d4!important;font-size:38px!important;font-weight:800!important;
  background:linear-gradient(135deg,#edf7ff,#f5f8fc)!important;
}
body.post-type-archive-middle_organization .middle-org-card--large .middle-org-card__body{
  display:flex!important;flex-direction:column!important;justify-content:center!important;min-width:0!important;padding:14px 18px 12px 8px!important;
}
body.post-type-archive-middle_organization .middle-org-card--large .middle-org-card__category{
  align-self:flex-start!important;margin:0 0 5px!important;padding:4px 8px!important;border-radius:999px!important;
  background:#e9f4ff!important;color:#1680f3!important;font-size:8px!important;font-weight:800!important;letter-spacing:.04em!important;text-transform:uppercase!important;
}
body.post-type-archive-middle_organization .middle-org-card--large h3{
  margin:0 0 7px!important;font-size:18px!important;line-height:1.15!important;letter-spacing:-.015em!important;
}
body.post-type-archive-middle_organization .middle-org-card--large h3 a{color:var(--mc-org-text)!important;text-decoration:none!important}
body.post-type-archive-middle_organization .middle-org-card--large .middle-org-card__line{
  display:flex!important;align-items:center!important;gap:7px!important;min-height:20px!important;margin:0 0 2px!important;
  color:#536b86!important;font-size:10.5px!important;line-height:1.3!important;
}
body.post-type-archive-middle_organization .middle-org-card--large .middle-org-card__line svg{
  flex:0 0 auto!important;width:14px!important;height:14px!important;fill:none!important;stroke:#1677ff!important;stroke-width:1.8!important;
}
body.post-type-archive-middle_organization .middle-org-card--large .middle-org-card__line--hours{color:var(--mc-org-green)!important;font-weight:700!important}
body.post-type-archive-middle_organization .middle-org-card--large .middle-org-card__line--hours svg{stroke:var(--mc-org-green)!important}
body.post-type-archive-middle_organization .middle-org-card--large .middle-org-card__line--phone a{color:#244260!important;text-decoration:none!important;font-weight:650!important}
body.post-type-archive-middle_organization .middle-org-card--large .middle-org-card__line--phone svg{stroke:var(--mc-org-green)!important}
body.post-type-archive-middle_organization .middle-org-card--large .middle-org-card__actions{
  display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;margin-top:5px!important;padding:0!important;border:0!important;
}
body.post-type-archive-middle_organization .middle-org-card--large .middle-org-card__actions a{
  display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;min-height:35px!important;padding:0 14px!important;
  border:1px solid #1680ff!important;border-radius:9px!important;background:#fff!important;color:#1175e7!important;font-size:10px!important;font-weight:750!important;text-decoration:none!important;
}
body.post-type-archive-middle_organization .middle-org-card--large .middle-org-card__actions button{
  margin-left:auto!important;padding:6px 0!important;border:0!important;background:transparent!important;color:#71869d!important;font-size:9px!important;font-weight:650!important;
}

body.post-type-archive-middle_organization .middle-org-map-panel{
  position:sticky!important;top:110px!important;overflow:hidden!important;margin-top:51px!important;border:1px solid var(--mc-org-border)!important;
  border-radius:17px!important;background:#fff!important;box-shadow:0 5px 18px rgba(32,74,118,.04)!important;
}
.admin-bar body.post-type-archive-middle_organization .middle-org-map-panel{top:142px!important}
body.post-type-archive-middle_organization .middle-org-map-panel__top{
  display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;padding:8px!important;border:0!important;background:#fff!important;
}
body.post-type-archive-middle_organization .middle-org-map-panel__tabs{display:flex!important;align-items:center!important;gap:4px!important}
body.post-type-archive-middle_organization .middle-org-map-panel__tabs span{
  display:inline-flex!important;align-items:center!important;justify-content:center!important;min-height:36px!important;padding:0 18px!important;border-radius:10px!important;
  color:#566e88!important;font-size:10px!important;font-weight:700!important;
}
body.post-type-archive-middle_organization .middle-org-map-panel__tabs span.is-active{background:var(--mc-org-blue)!important;color:#fff!important}
body.post-type-archive-middle_organization .middle-org-map-panel__count{margin-left:auto!important;color:#7b8ea5!important;font-size:9px!important;font-weight:650!important}
body.post-type-archive-middle_organization .middle-org-map-panel__top button{display:none!important}
body.post-type-archive-middle_organization .middle-org-map{
  height:600px!important;margin:0 8px!important;width:calc(100% - 16px)!important;overflow:hidden!important;border-radius:12px!important;background:#eef5fb!important;
}
body.post-type-archive-middle_organization .middle-org-map-panel__show-all{
  display:flex!important;align-items:center!important;justify-content:center!important;width:calc(100% - 16px)!important;min-height:42px!important;margin:8px!important;
  border:0!important;border-radius:10px!important;background:#eaf4ff!important;color:#1477ed!important;font-size:10px!important;font-weight:750!important;cursor:pointer!important;
}
body.post-type-archive-middle_organization .middle-org-map-panel__credit{padding:0 10px 8px!important;border:0!important;color:#a0adba!important;font-size:7px!important}

@media(max-width:1180px){
  body.post-type-archive-middle_organization .middle-org-directory__layout{grid-template-columns:minmax(0,1fr) 340px!important}
  body.post-type-archive-middle_organization .middle-org-card--large{grid-template-columns:235px minmax(0,1fr)!important}
  body.post-type-archive-middle_organization .middle-org-map{height:540px!important}
}
@media(max-width:900px){
  body.post-type-archive-middle_organization .middle-org-directory{width:min(100% - 28px,1420px)!important}
  body.post-type-archive-middle_organization .middle-org-directory__layout{grid-template-columns:1fr!important}
  body.post-type-archive-middle_organization .middle-org-search{display:flex!important;gap:8px!important}
  body.post-type-archive-middle_organization .middle-org-search__map-toggle{display:inline-flex!important;flex:0 0 auto!important}
  body.post-type-archive-middle_organization .middle-org-map-panel{
    position:fixed!important;z-index:1900!important;inset:auto 12px 16px 12px!important;top:auto!important;margin:0!important;max-height:calc(100vh - 90px)!important;
    transform:translateY(calc(100% + 30px))!important;opacity:0!important;visibility:hidden!important;transition:transform .25s ease,opacity .25s ease,visibility .25s!important;
  }
  body.post-type-archive-middle_organization .middle-org-map-panel.is-open{transform:none!important;opacity:1!important;visibility:visible!important}
  body.post-type-archive-middle_organization .middle-org-map-panel__top button{display:grid!important;place-items:center!important;width:32px!important;height:32px!important}
  body.post-type-archive-middle_organization .middle-org-map{height:min(62vh,540px)!important}
}
@media(max-width:620px){
  body.post-type-archive-middle_organization .middle-org-directory{width:calc(100% - 20px)!important;margin:16px auto 34px!important}
  body.post-type-archive-middle_organization .middle-org-directory__hero{display:block!important;min-height:0!important;padding:17px!important;border-radius:17px!important}
  body.post-type-archive-middle_organization .middle-org-directory__breadcrumbs{margin-bottom:8px!important;font-size:9px!important}
  body.post-type-archive-middle_organization .middle-org-directory__hero h1{font-size:27px!important;line-height:1.08!important}
  body.post-type-archive-middle_organization .middle-org-directory__hero p{font-size:11px!important;line-height:1.5!important}
  body.post-type-archive-middle_organization .middle-org-directory__count{display:inline-flex!important;align-items:baseline!important;gap:5px!important;margin-top:12px!important;min-width:0!important;padding:8px 11px!important}
  body.post-type-archive-middle_organization .middle-org-directory__count strong{font-size:18px!important}
  body.post-type-archive-middle_organization .middle-org-search{position:sticky!important;top:84px!important;z-index:24!important;margin-top:8px!important;padding:5px 0!important;background:rgba(244,248,252,.92)!important;backdrop-filter:blur(12px)!important}
  .admin-bar body.post-type-archive-middle_organization .middle-org-search{top:130px!important}
  body.post-type-archive-middle_organization .middle-org-search__field{height:45px!important}
  body.post-type-archive-middle_organization .middle-org-search__map-toggle{height:45px!important;border-radius:13px!important}
  body.post-type-archive-middle_organization .middle-org-filters button{min-height:35px!important;padding:0 13px!important;font-size:10px!important}
  body.post-type-archive-middle_organization .middle-org-results__head{min-height:38px!important}
  body.post-type-archive-middle_organization .middle-org-card--large{grid-template-columns:112px minmax(0,1fr)!important;min-height:126px!important;border-radius:15px!important}
  body.post-type-archive-middle_organization .middle-org-card--large .middle-org-card__media{height:110px!important;min-height:110px!important;margin:7px!important;border-radius:10px!important}
  body.post-type-archive-middle_organization .middle-org-card--large .middle-org-card__media img{border-radius:10px!important}
  body.post-type-archive-middle_organization .middle-org-card--large .middle-org-card__body{padding:10px 10px 9px 2px!important}
  body.post-type-archive-middle_organization .middle-org-card--large .middle-org-card__category{margin-bottom:4px!important;padding:3px 6px!important;font-size:7px!important}
  body.post-type-archive-middle_organization .middle-org-card--large h3{margin-bottom:5px!important;font-size:15px!important}
  body.post-type-archive-middle_organization .middle-org-card--large .middle-org-card__line{gap:5px!important;min-height:17px!important;margin-bottom:1px!important;font-size:8.5px!important}
  body.post-type-archive-middle_organization .middle-org-card--large .middle-org-card__line svg{width:11px!important;height:11px!important}
  body.post-type-archive-middle_organization .middle-org-card--large .middle-org-card__actions{margin-top:3px!important}
  body.post-type-archive-middle_organization .middle-org-card--large .middle-org-card__actions a{min-height:29px!important;padding:0 9px!important;border-radius:8px!important;font-size:8px!important}
  body.post-type-archive-middle_organization .middle-org-card--large .middle-org-card__actions button{font-size:7.5px!important}
  body.post-type-archive-middle_organization .middle-org-map-panel{inset:auto 7px 76px 7px!important;border-radius:16px!important}
  body.post-type-archive-middle_organization .middle-org-map{height:min(58vh,480px)!important}
}

html:root[data-middle-theme="dark"] body.post-type-archive-middle_organization .middle-org-directory__hero,
html:root[data-middle-theme="dark"] body.post-type-archive-middle_organization .middle-org-card--large,
html:root[data-middle-theme="dark"] body.post-type-archive-middle_organization .middle-org-map-panel,
html:root[data-middle-theme="dark"] body.post-type-archive-middle_organization .middle-org-search__field{
  background:#15283a!important;border-color:#29455f!important;
}
html:root[data-middle-theme="dark"] body.post-type-archive-middle_organization .middle-org-directory__hero h1,
html:root[data-middle-theme="dark"] body.post-type-archive-middle_organization .middle-org-card--large h3 a{color:#eef6ff!important}
html:root[data-middle-theme="dark"] body.post-type-archive-middle_organization .middle-org-card--large .middle-org-card__line,
html:root[data-middle-theme="dark"] body.post-type-archive-middle_organization .middle-org-directory__hero p{color:#9fb0c2!important}
html:root[data-middle-theme="dark"] body.post-type-archive-middle_organization .middle-org-filters button{background:#172b3e!important;border-color:#2d4861!important;color:#dce9f6!important}
html:root[data-middle-theme="dark"] body.post-type-archive-middle_organization .middle-org-filters button.is-active{background:#2180ed!important;color:#fff!important;border-color:#2180ed!important}

/* ======================================================================
   Middle Community 0.4.85 — organization detail: dedicated mobile layout.
   Keeps the approved desktop v6 design, but rebuilds spacing/order/controls
   for phones and small tablets instead of merely shrinking desktop cards.
   ====================================================================== */
@media (max-width: 760px){
  body.single-middle_organization .middle-main.middle-org-single--profile-v3{
    width:100%!important;
    max-width:none!important;
    margin:0 auto 94px!important;
    padding:10px 10px 0!important;
    box-sizing:border-box!important;
    overflow:visible!important;
  }
  body.single-middle_organization .middle-org-v3__breadcrumbs{
    margin:0 2px 9px!important;
    padding:0 2px!important;
    gap:5px!important;
    font-size:10px!important;
    line-height:1.35!important;
    white-space:nowrap!important;
    overflow-x:auto!important;
    flex-wrap:nowrap!important;
    scrollbar-width:none!important;
  }
  body.single-middle_organization .middle-org-v3__breadcrumbs::-webkit-scrollbar{display:none!important}
  body.single-middle_organization .middle-org-v3__breadcrumbs b{flex:0 0 auto!important}
  body.single-middle_organization .middle-org-v3{gap:10px!important}
  body.single-middle_organization .middle-org-v3__top,
  body.single-middle_organization .middle-org-v3__lower{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:10px!important;
  }
  body.single-middle_organization .middle-org-v3__gallery,
  body.single-middle_organization .middle-org-v3__summary,
  body.single-middle_organization .middle-org-v3__map-card,
  body.single-middle_organization .middle-org-v3__panel,
  body.single-middle_organization .middle-org-v3__related{
    width:100%!important;
    min-width:0!important;
    border-radius:20px!important;
    box-shadow:0 8px 26px rgba(20,56,94,.07)!important;
    box-sizing:border-box!important;
  }

  /* Photo first: full image, no crop, comfortable portrait/landscape handling. */
  body.single-middle_organization .middle-org-v3__gallery{padding:10px!important}
  body.single-middle_organization .middle-org-v3__main-photo{
    width:100%!important;
    height:clamp(250px,74vw,390px)!important;
    min-height:0!important;
    border-radius:16px!important;
  }
  body.single-middle_organization .middle-org-v3__main-photo::before{
    inset:-24px!important;
    filter:blur(22px) saturate(.9)!important;
    opacity:.42!important;
  }
  body.single-middle_organization .middle-org-v3__main-image{
    width:auto!important;
    max-width:100%!important;
    height:auto!important;
    max-height:100%!important;
    object-fit:contain!important;
    border-radius:12px!important;
    box-shadow:0 8px 22px rgba(12,35,64,.17)!important;
  }
  body.single-middle_organization .middle-org-v3__photo-count{
    right:10px!important;
    bottom:10px!important;
    padding:5px 9px!important;
    font-size:10px!important;
  }
  body.single-middle_organization .middle-org-v3__thumbs{
    gap:7px!important;
    margin:8px -1px 0!important;
    padding:0 1px 2px!important;
    scroll-snap-type:x proximity!important;
  }
  body.single-middle_organization .middle-org-v3__thumb{
    flex:0 0 68px!important;
    width:68px!important;
    height:54px!important;
    border-radius:10px!important;
    scroll-snap-align:start!important;
  }
  body.single-middle_organization .middle-org-v3__credit{font-size:9px!important;line-height:1.35!important}

  /* Summary is rebuilt as a phone card, not a compressed desktop column. */
  body.single-middle_organization .middle-org-v3__summary{padding:17px 15px 15px!important}
  body.single-middle_organization .middle-org-v3__categories{margin-bottom:9px!important;gap:6px!important}
  body.single-middle_organization .middle-org-v3__categories a{
    min-height:25px!important;
    padding:0 9px!important;
    font-size:9px!important;
  }
  body.single-middle_organization .middle-org-v3__summary h1{
    font-size:clamp(30px,9vw,40px)!important;
    line-height:1.02!important;
    letter-spacing:-.045em!important;
    overflow-wrap:anywhere!important;
  }
  body.single-middle_organization .middle-org-v3__lead{
    margin-top:9px!important;
    font-size:13px!important;
    line-height:1.5!important;
  }
  body.single-middle_organization .middle-org-v3__status{
    margin-top:11px!important;
    font-size:12px!important;
    line-height:1.35!important;
  }
  body.single-middle_organization .middle-org-v3__actions{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:8px!important;
    margin-top:15px!important;
  }
  body.single-middle_organization .middle-org-v3__actions a{
    min-width:0!important;
    min-height:46px!important;
    padding:0 9px!important;
    border-radius:12px!important;
    font-size:11px!important;
    line-height:1.2!important;
  }
  body.single-middle_organization .middle-org-v3__actions a.is-primary{
    grid-column:1/-1!important;
    min-height:50px!important;
    font-size:12px!important;
  }
  body.single-middle_organization .middle-org-v3__facts{
    grid-template-columns:1fr!important;
    gap:7px!important;
    margin-top:12px!important;
  }
  body.single-middle_organization .middle-org-v3__facts>div{
    grid-template-columns:34px minmax(0,1fr)!important;
    gap:9px!important;
    min-height:58px!important;
    padding:9px 10px!important;
    border-radius:12px!important;
  }
  body.single-middle_organization .middle-org-v3__facts i{
    width:34px!important;
    height:34px!important;
    border-radius:10px!important;
    font-size:15px!important;
  }
  body.single-middle_organization .middle-org-v3__facts small{font-size:8px!important;margin-bottom:2px!important}
  body.single-middle_organization .middle-org-v3__facts strong{font-size:12px!important;line-height:1.3!important}

  /* Map becomes a proper full-width touch block. */
  body.single-middle_organization .middle-org-v3__map-card{grid-column:auto!important;padding:10px!important}
  body.single-middle_organization .middle-org-v3__map-tabs{padding-bottom:8px!important}
  body.single-middle_organization .middle-org-v3__map-tabs b{min-height:32px!important;padding:0 12px!important;font-size:11px!important}
  body.single-middle_organization .middle-org-v3__map-card .middle-org-map--single{
    width:100%!important;
    height:300px!important;
    min-height:300px!important;
    border-radius:14px!important;
    touch-action:pan-x pan-y!important;
  }
  body.single-middle_organization .middle-org-v3__map-caption{padding:10px 3px 0!important}
  body.single-middle_organization .middle-org-v3__map-caption strong{font-size:13px!important}
  body.single-middle_organization .middle-org-v3__map-caption span{font-size:10px!important}
  body.single-middle_organization .middle-org-v3__route{
    min-height:46px!important;
    margin-top:10px!important;
    border-radius:12px!important;
    font-size:12px!important;
  }

  /* Content/hours are easy to scan with one thumb. */
  body.single-middle_organization .middle-org-v3__panel{padding:15px!important}
  body.single-middle_organization .middle-org-v3__panel h2{margin-bottom:10px!important;font-size:19px!important}
  body.single-middle_organization .middle-org-v3__about .middle-content{font-size:13px!important;line-height:1.62!important}
  body.single-middle_organization .middle-org-v3__week{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:7px!important;
  }
  body.single-middle_organization .middle-org-v3__day{
    padding:10px 6px!important;
    border-radius:11px!important;
  }
  body.single-middle_organization .middle-org-v3__day b{font-size:9px!important}
  body.single-middle_organization .middle-org-v3__day span{font-size:11px!important}
  body.single-middle_organization .middle-org-v3__day:last-child{grid-column:1/-1!important}
  body.single-middle_organization .middle-org-v3__today-note{font-size:11px!important;line-height:1.35!important}
  body.single-middle_organization .middle-org-v3__source{
    margin:0 2px!important;
    padding:0 2px!important;
    font-size:8px!important;
    line-height:1.45!important;
    overflow-wrap:anywhere!important;
  }

  /* Related organizations become a horizontal mobile rail. */
  body.single-middle_organization .middle-org-v3__related{padding:14px 0 14px 14px!important;overflow:hidden!important}
  body.single-middle_organization .middle-org-v3__related-head{padding-right:14px!important;margin-bottom:10px!important}
  body.single-middle_organization .middle-org-v3__related-head h2{font-size:18px!important}
  body.single-middle_organization .middle-org-v3__related-head a{font-size:11px!important;white-space:nowrap!important}
  body.single-middle_organization .middle-org-v3__related-grid{
    display:flex!important;
    gap:9px!important;
    overflow-x:auto!important;
    padding:0 14px 4px 0!important;
    scroll-snap-type:x mandatory!important;
    scrollbar-width:none!important;
  }
  body.single-middle_organization .middle-org-v3__related-grid::-webkit-scrollbar{display:none!important}
  body.single-middle_organization .middle-org-v3__related-card{
    flex:0 0 min(84vw,330px)!important;
    grid-template-columns:92px minmax(0,1fr)!important;
    gap:10px!important;
    min-height:84px!important;
    padding:7px!important;
    border-radius:14px!important;
    scroll-snap-align:start!important;
  }
  body.single-middle_organization .middle-org-v3__related-photo{width:92px!important;height:68px!important;border-radius:10px!important}
  body.single-middle_organization .middle-org-v3__related-copy strong{font-size:13px!important}
  body.single-middle_organization .middle-org-v3__related-copy small{font-size:10px!important}
}

@media (max-width: 390px){
  body.single-middle_organization .middle-main.middle-org-single--profile-v3{padding-left:8px!important;padding-right:8px!important}
  body.single-middle_organization .middle-org-v3__main-photo{height:clamp(235px,78vw,340px)!important}
  body.single-middle_organization .middle-org-v3__summary h1{font-size:30px!important}
  body.single-middle_organization .middle-org-v3__actions{grid-template-columns:1fr!important}
  body.single-middle_organization .middle-org-v3__actions a.is-primary{grid-column:auto!important}
  body.single-middle_organization .middle-org-v3__week{grid-template-columns:1fr!important}
  body.single-middle_organization .middle-org-v3__day:last-child{grid-column:auto!important}
  body.single-middle_organization .middle-org-v3__map-card .middle-org-map--single{height:270px!important;min-height:270px!important}
}

/* ========================================================================== 
   Middle Community 0.4.87 — same crisp side menu on every mobile page
   Fixes internal-page specificity conflicts without changing homepage menu.
   ========================================================================== */
@media(max-width:720px){
  /* Internal templates used older, more-specific top-sheet rules. Override
     only those rules and keep the current homepage side drawer 1:1. */
  body:not(.home):not(.front-page)>.middle-side-drawer.middle-primary-nav.middle-top-sheet,
  body.admin-bar:not(.home):not(.front-page)>.middle-side-drawer.middle-primary-nav.middle-top-sheet{
    position:fixed!important;
    z-index:1500!important;
    top:0!important;
    right:0!important;
    bottom:0!important;
    left:auto!important;
    inset:auto 0 0 auto!important;
    display:block!important;
    width:min(88vw,360px)!important;
    height:100dvh!important;
    max-height:none!important;
    margin:0!important;
    padding:0!important;
    overflow:hidden!important;
    border:0!important;
    border-left:1px solid #dce5ef!important;
    border-radius:22px 0 0 22px!important;
    background:#fff!important;
    box-shadow:-34px 0 90px rgba(11,31,55,.25)!important;
    filter:none!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
    opacity:1!important;
    visibility:hidden!important;
    pointer-events:none!important;
    transform:translate3d(105%,0,0)!important;
    transform-origin:center right!important;
    clip-path:none!important;
    animation:none!important;
    transition:transform .32s cubic-bezier(.22,.8,.2,1),visibility .32s ease!important;
    isolation:isolate!important;
  }
  body:not(.home):not(.front-page)>.middle-side-drawer.middle-primary-nav.middle-top-sheet.is-open,
  body.admin-bar:not(.home):not(.front-page)>.middle-side-drawer.middle-primary-nav.middle-top-sheet.is-open{
    opacity:1!important;
    visibility:visible!important;
    pointer-events:auto!important;
    transform:translate3d(0,0,0)!important;
  }
  body:not(.home):not(.front-page)>.middle-side-drawer .middle-side-drawer__head{
    min-height:72px!important;
    padding:12px 11px 11px 14px!important;
    background:#fff!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
  }
  body:not(.home):not(.front-page)>.middle-side-drawer .middle-side-drawer__body{
    height:calc(100dvh - 72px)!important;
    max-height:none!important;
    padding:12px 10px calc(94px + env(safe-area-inset-bottom))!important;
    overflow-y:auto!important;
    background:#fff!important;
    overscroll-behavior:contain!important;
    -webkit-overflow-scrolling:touch!important;
  }

  /* The homepage menu deliberately uses a dark translucent overlay, not a
     blurred screen. Make internal pages identical. */
  body:not(.home):not(.front-page) .middle-sheet-backdrop{
    position:fixed!important;
    z-index:1490!important;
    inset:0!important;
    background:rgba(12,24,39,.42)!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
  }
  body:not(.home):not(.front-page) .middle-sheet-backdrop.is-open{
    opacity:1!important;
    visibility:visible!important;
    pointer-events:auto!important;
  }

  /* WordPress toolbar offsets the drawer, but must not change its geometry. */
  body.admin-bar:not(.home):not(.front-page)>.middle-side-drawer.middle-primary-nav.middle-top-sheet{
    top:46px!important;
    bottom:auto!important;
    height:calc(100dvh - 46px)!important;
  }
  body.admin-bar:not(.home):not(.front-page)>.middle-side-drawer .middle-side-drawer__body{
    height:calc(100dvh - 118px)!important;
  }

  :root[data-middle-theme="dark"] body:not(.home):not(.front-page)>.middle-side-drawer.middle-primary-nav.middle-top-sheet,
  :root[data-middle-theme="dark"] body:not(.home):not(.front-page)>.middle-side-drawer .middle-side-drawer__head,
  :root[data-middle-theme="dark"] body:not(.home):not(.front-page)>.middle-side-drawer .middle-side-drawer__body{
    background:#1b2027!important;
    border-color:#35404d!important;
  }
}


/* ========================================================================== 
   Middle Community 0.4.88 — internal mobile menu now matches homepage 1:1
   On inner pages use the same floating app-card drawer, geometry and blurred
   backdrop that the user approved on the homepage.
   ========================================================================== */
@media(max-width:720px){
  html body:not(.home):not(.front-page) .middle-sheet-backdrop{
    position:fixed!important;
    z-index:1490!important;
    top:var(--mc-mobile-topbar-h)!important;
    right:0!important;
    bottom:calc(var(--mc-mobile-bottomnav-h) + env(safe-area-inset-bottom))!important;
    left:0!important;
    height:auto!important;
    background:rgba(9,22,37,.42)!important;
    backdrop-filter:blur(5px)!important;
    -webkit-backdrop-filter:blur(5px)!important;
  }

  html:not(.middle-home-adminbar-reset) body.admin-bar:not(.home):not(.front-page) .middle-sheet-backdrop{
    top:calc(46px + var(--mc-mobile-topbar-h))!important;
  }

  html body:not(.home):not(.front-page)>.middle-side-drawer.middle-primary-nav.middle-top-sheet,
  html body.admin-bar:not(.home):not(.front-page)>.middle-side-drawer.middle-primary-nav.middle-top-sheet{
    position:fixed!important;
    z-index:1500!important;
    top:calc(var(--mc-mobile-topbar-h) + var(--mc-mobile-overlay-gap))!important;
    right:8px!important;
    bottom:calc(var(--mc-mobile-bottomnav-h) + env(safe-area-inset-bottom) + var(--mc-mobile-overlay-gap))!important;
    left:auto!important;
    width:min(88vw,360px)!important;
    height:auto!important;
    max-height:none!important;
    margin:0!important;
    padding:0!important;
    overflow:hidden!important;
    border:1px solid #d8e5f2!important;
    border-radius:23px!important;
    background:#fff!important;
    box-shadow:-18px 20px 58px rgba(13,37,66,.23)!important;
    transform:translate3d(calc(100% + 22px),0,0)!important;
    transform-origin:right center!important;
    opacity:1!important;
    visibility:hidden!important;
    pointer-events:none!important;
    transition:transform .28s cubic-bezier(.22,.8,.2,1),visibility .28s ease!important;
    filter:none!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
  }

  html body:not(.home):not(.front-page)>.middle-side-drawer.middle-primary-nav.middle-top-sheet.is-open,
  html body.admin-bar:not(.home):not(.front-page)>.middle-side-drawer.middle-primary-nav.middle-top-sheet.is-open{
    visibility:visible!important;
    pointer-events:auto!important;
    transform:translate3d(0,0,0)!important;
  }

  html body:not(.home):not(.front-page)>.middle-side-drawer .middle-side-drawer__head{
    min-height:64px!important;
    height:64px!important;
    padding:10px 10px 10px 13px!important;
    border-bottom:1px solid #e6edf5!important;
    background:rgba(255,255,255,.98)!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
  }

  html body:not(.home):not(.front-page)>.middle-side-drawer .middle-side-drawer__brand>.middle-mobile-home-link__brand{
    flex-basis:34px!important;
    width:34px!important;
    height:34px!important;
  }
  html body:not(.home):not(.front-page)>.middle-side-drawer .middle-side-drawer__brand strong{font-size:13px!important}
  html body:not(.home):not(.front-page)>.middle-side-drawer .middle-side-drawer__brand small{font-size:8px!important}

  html body:not(.home):not(.front-page)>.middle-side-drawer .middle-side-drawer__theme,
  html body:not(.home):not(.front-page)>.middle-side-drawer .middle-side-drawer__close{
    width:36px!important;
    height:36px!important;
    min-width:36px!important;
    border-radius:11px!important;
  }

  html body:not(.home):not(.front-page)>.middle-side-drawer .middle-side-drawer__body{
    height:calc(100% - 64px)!important;
    max-height:none!important;
    padding:11px 10px 15px!important;
    overflow-y:auto!important;
    overscroll-behavior:contain!important;
    background:#fff!important;
    -webkit-overflow-scrolling:touch!important;
  }

  html body:not(.home):not(.front-page)>.middle-side-drawer .middle-side-drawer__intro{padding:2px 4px 10px!important}
  html body:not(.home):not(.front-page)>.middle-side-drawer .middle-side-drawer__intro strong{font-size:15px!important}
  html body:not(.home):not(.front-page)>.middle-side-drawer .middle-side-drawer__nav{gap:5px!important}
  html body:not(.home):not(.front-page)>.middle-side-drawer .middle-side-drawer__nav>a{
    grid-template-columns:39px minmax(0,1fr) 17px!important;
    gap:9px!important;
    min-height:52px!important;
    padding:5px 8px 5px 6px!important;
    border-radius:14px!important;
  }
  html body:not(.home):not(.front-page)>.middle-side-drawer .middle-side-drawer__icon{
    width:39px!important;
    height:39px!important;
    border-radius:12px!important;
  }
  html body:not(.home):not(.front-page)>.middle-side-drawer .middle-side-drawer__icon img{width:26px!important;height:26px!important}
  html body:not(.home):not(.front-page)>.middle-side-drawer .middle-side-drawer__copy strong{font-size:11.5px!important}
  html body:not(.home):not(.front-page)>.middle-side-drawer .middle-side-drawer__copy small{font-size:8px!important}
  html body:not(.home):not(.front-page)>.middle-side-drawer .middle-side-drawer__utility{
    margin-top:10px!important;
    padding-top:10px!important;
    gap:7px!important;
  }

  html:not(.middle-home-adminbar-reset) body.admin-bar:not(.home):not(.front-page)>.middle-side-drawer.middle-primary-nav.middle-top-sheet{
    top:calc(46px + var(--mc-mobile-topbar-h) + var(--mc-mobile-overlay-gap))!important;
  }

  html:root[data-middle-theme='dark'] body:not(.home):not(.front-page)>.middle-side-drawer.middle-primary-nav.middle-top-sheet,
  html:root[data-middle-theme='dark'] body:not(.home):not(.front-page)>.middle-side-drawer .middle-side-drawer__head,
  html:root[data-middle-theme='dark'] body:not(.home):not(.front-page)>.middle-side-drawer .middle-side-drawer__body{
    border-color:#30485f!important;
    background:#17283a!important;
  }
}
@media(max-width:390px){
  html body:not(.home):not(.front-page)>.middle-side-drawer.middle-primary-nav.middle-top-sheet{
    width:calc(100% - 18px)!important;
  }
}


/* ========================================================================== 
   Middle Community 0.4.89 — adaptive desktop authentication modal
   The signed-out login window fits normal desktop/laptop browser viewports
   without requiring a vertical scroll in its default (registration closed)
   state. On shorter screens the social and password login cards become two
   columns. The modal itself sits above the fixed site header.
   ========================================================================== */
@media(min-width:721px){
  html body .middle-auth-modal{
    z-index:2147483000!important;
    display:grid!important;
    place-items:center!important;
    padding:clamp(12px,2vh,24px)!important;
  }
  html body .middle-auth-modal__backdrop{
    z-index:0!important;
  }
  html body .middle-auth-modal__panel{
    position:relative!important;
    z-index:1!important;
    width:min(860px,calc(100vw - 36px))!important;
    max-height:calc(100dvh - clamp(24px,4vh,48px))!important;
    padding:18px!important;
    overflow:auto!important;
    overscroll-behavior:contain!important;
    border-radius:27px!important;
    scrollbar-width:thin!important;
  }
  html body .middle-auth-modal__head{
    align-items:center!important;
    min-height:46px!important;
    margin:0 0 12px!important;
  }
  html body .middle-auth-modal__head .middle-kicker{
    min-height:20px!important;
    padding:0 8px!important;
    font-size:8px!important;
  }
  html body .middle-auth-modal__head h2{
    max-width:none!important;
    margin:4px 0 0!important;
    font-size:clamp(24px,2.2vw,30px)!important;
    line-height:1.05!important;
  }
  html body .middle-auth-close{
    width:40px!important;
    height:40px!important;
    min-width:40px!important;
    flex-basis:40px!important;
  }
  html body .middle-auth-modal__content{
    width:100%!important;
    max-width:none!important;
    margin:0!important;
  }

  /* Default desktop: use the width of the browser to save vertical space. */
  html body .middle-auth-modal .middle-auth{
    display:grid!important;
    grid-template-columns:minmax(0,.92fr) minmax(0,1.08fr)!important;
    gap:14px!important;
    align-items:start!important;
    width:100%!important;
  }
  html body .middle-auth-modal .middle-social-login{
    grid-column:1!important;
    grid-row:1!important;
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    padding:14px!important;
    border-radius:18px!important;
  }
  html body .middle-auth-modal .middle-auth__stack{
    grid-column:2!important;
    grid-row:1!important;
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    gap:10px!important;
  }
  html body .middle-auth-modal .middle-auth-form{
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    padding:15px!important;
    border-radius:18px!important;
  }
  html body .middle-auth-modal .middle-auth-form h3{
    margin:0 0 10px!important;
    font-size:18px!important;
  }
  html body .middle-auth-modal .middle-auth-form>label{
    margin-bottom:8px!important;
    font-size:12px!important;
  }
  html body .middle-auth-modal .middle-auth-form input:not([type=checkbox]){
    min-height:42px!important;
    height:42px!important;
    margin-top:4px!important;
    padding:8px 11px!important;
    border-radius:12px!important;
  }
  html body .middle-auth-modal .middle-auth-form__row{
    margin:0 0 8px!important;
    font-size:11.5px!important;
  }
  html body .middle-auth-modal .middle-auth-form .middle-core-button{
    min-height:42px!important;
    height:42px!important;
  }
  html body .middle-auth-modal .middle-captcha-wrap{
    margin:8px 0!important;
    border-radius:12px!important;
  }
  html body .middle-auth-modal .middle-social-login__label{
    margin-bottom:8px!important;
    font-size:10px!important;
  }
  html body .middle-auth-modal .middle-social-login__privacy{
    margin:0 0 8px!important;
  }
  html body .middle-auth-modal .middle-social-login__privacy span,
  html body .middle-auth-modal .middle-social-login__consent{
    font-size:10px!important;
    line-height:1.35!important;
  }
  html body .middle-auth-modal .middle-social-btn{
    min-height:42px!important;
    height:42px!important;
  }
  html body .middle-auth-modal .middle-auth-register__toggle{
    min-height:43px!important;
    height:43px!important;
    padding:0 14px!important;
    border-radius:14px!important;
    font-size:13px!important;
  }
  html body .middle-auth-modal .middle-auth-register__panel-wrap{
    padding-top:8px!important;
  }

  /* If registration is opened, scrolling remains only as a safety fallback. */
  html body .middle-auth-modal .middle-auth-register:not([open]) + *{
    margin-top:0!important;
  }
}

/* On very narrow desktop/tablet widths keep one column, but still compact. */
@media(min-width:721px) and (max-width:759px){
  html body .middle-auth-modal__panel{
    width:min(500px,calc(100vw - 24px))!important;
  }
  html body .middle-auth-modal .middle-auth{
    grid-template-columns:1fr!important;
  }
  html body .middle-auth-modal .middle-social-login,
  html body .middle-auth-modal .middle-auth__stack{
    grid-column:1!important;
    grid-row:auto!important;
  }
}

/* Short laptop windows: tighten the chrome another step. */
@media(min-width:760px) and (max-height:760px){
  html body .middle-auth-modal{padding:8px!important}
  html body .middle-auth-modal__panel{
    max-height:calc(100dvh - 16px)!important;
    padding:13px!important;
    border-radius:22px!important;
  }
  html body .middle-auth-modal__head{
    min-height:38px!important;
    margin-bottom:8px!important;
  }
  html body .middle-auth-modal__head h2{font-size:22px!important}
  html body .middle-auth-close{width:36px!important;height:36px!important;min-width:36px!important;flex-basis:36px!important}
  html body .middle-auth-modal .middle-auth{gap:10px!important}
  html body .middle-auth-modal .middle-social-login,
  html body .middle-auth-modal .middle-auth-form{padding:11px!important}
  html body .middle-auth-modal .middle-auth-form>label{margin-bottom:6px!important}
  html body .middle-auth-modal .middle-auth-form input:not([type=checkbox]){min-height:38px!important;height:38px!important}
  html body .middle-auth-modal .middle-auth-form .middle-core-button,
  html body .middle-auth-modal .middle-social-btn{min-height:39px!important;height:39px!important}
  html body .middle-auth-modal .middle-auth-register__toggle{min-height:39px!important;height:39px!important}
}

/* ========================================================================== 
   Middle Community 0.4.90 — auth layout v5 (meaningful split)
   Desktop: login on the left, registration/benefits on the right.
   Mobile: the same visual language becomes a single, comfortable vertical flow.
   ========================================================================== */
@media(min-width:721px){
  html body .middle-auth-modal{
    z-index:2147483000!important;
    padding:18px!important;
  }
  html body .middle-auth-modal__panel{
    width:min(1040px,calc(100vw - 44px))!important;
    max-height:calc(100dvh - 36px)!important;
    padding:0!important;
    overflow:hidden!important;
    border:1px solid #d9e5f1!important;
    border-radius:28px!important;
    background:#fff!important;
    box-shadow:0 34px 100px rgba(13,34,57,.27)!important;
  }
  html body .middle-auth-modal__head{
    min-height:68px!important;
    margin:0!important;
    padding:15px 18px 13px 20px!important;
    border-bottom:1px solid #e8eef5!important;
    background:#fff!important;
  }
  html body .middle-auth-modal__head .middle-kicker{
    display:inline-flex!important;
    min-height:20px!important;
    margin:0!important;
    padding:0 8px!important;
    border-radius:999px!important;
    background:#eaf4ff!important;
    color:#1877e8!important;
    font-size:8px!important;
    font-weight:850!important;
    letter-spacing:.08em!important;
    text-transform:uppercase!important;
  }
  html body .middle-auth-modal__head h2{
    margin:4px 0 0!important;
    font-size:24px!important;
    line-height:1.08!important;
    letter-spacing:-.03em!important;
    color:#152d4a!important;
  }
  html body .middle-auth-modal__content{
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    padding:18px!important;
    overflow:hidden!important;
  }
  html body .middle-auth-modal .middle-auth{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) minmax(0,.96fr)!important;
    grid-template-rows:auto 1fr!important;
    gap:14px 16px!important;
    align-items:stretch!important;
    width:100%!important;
    max-width:none!important;
    margin:0!important;
  }
  html body .middle-auth-modal .middle-auth__stack{
    display:contents!important;
  }
  html body .middle-auth-modal .middle-auth-form--login{
    grid-column:1!important;
    grid-row:1!important;
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    padding:16px!important;
    border:1px solid #dce7f2!important;
    border-radius:20px!important;
    background:linear-gradient(180deg,#fff 0%,#fbfdff 100%)!important;
    box-shadow:0 12px 30px rgba(22,63,105,.06)!important;
  }
  html body .middle-auth-modal .middle-social-login{
    grid-column:1!important;
    grid-row:2!important;
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    padding:14px!important;
    align-self:start!important;
    border:1px solid #dce7f2!important;
    border-radius:20px!important;
    background:linear-gradient(135deg,#f4f9ff,#eef6ff)!important;
    box-shadow:none!important;
  }
  html body .middle-auth-modal .middle-auth-register{
    grid-column:2!important;
    grid-row:1 / span 2!important;
    display:flex!important;
    flex-direction:column!important;
    width:100%!important;
    max-width:none!important;
    min-height:100%!important;
    margin:0!important;
    padding:0!important;
    overflow:hidden!important;
    border:1px solid #dce7f2!important;
    border-radius:22px!important;
    background:linear-gradient(155deg,#f8fbff 0%,#f1f7ff 55%,#fff 100%)!important;
    box-shadow:0 14px 38px rgba(24,83,145,.08)!important;
  }
  html body .middle-auth-modal .middle-auth-register__toggle{
    display:flex!important;
    flex:1 1 auto!important;
    flex-direction:column!important;
    align-items:stretch!important;
    justify-content:space-between!important;
    gap:14px!important;
    min-height:100%!important;
    height:auto!important;
    padding:19px!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    color:#17304f!important;
    box-shadow:none!important;
    text-align:left!important;
    transform:none!important;
  }
  html body .middle-auth-modal .middle-auth-register__toggle::after{content:none!important;display:none!important}
  html body .middle-auth-modal .middle-auth-register__pitch{
    display:block!important;
    width:100%!important;
    margin:0!important;
    color:#17304f!important;
  }
  html body .middle-auth-modal .middle-auth-register__eyebrow{
    display:inline-flex!important;
    align-items:center!important;
    min-height:23px!important;
    padding:0 9px!important;
    border-radius:999px!important;
    background:#e3f1ff!important;
    color:#1676e4!important;
    font-size:9px!important;
    font-weight:850!important;
    letter-spacing:.07em!important;
    text-transform:uppercase!important;
  }
  html body .middle-auth-modal .middle-auth-register__pitch h3{
    margin:12px 0 6px!important;
    color:#132b48!important;
    font-size:26px!important;
    line-height:1.05!important;
    letter-spacing:-.035em!important;
  }
  html body .middle-auth-modal .middle-auth-register__pitch>p{
    max-width:390px!important;
    margin:0 0 15px!important;
    color:#60748c!important;
    font-size:12px!important;
    line-height:1.48!important;
  }
  html body .middle-auth-modal .middle-auth-register__pitch ul{
    display:grid!important;
    gap:8px!important;
    margin:0!important;
    padding:0!important;
    list-style:none!important;
  }
  html body .middle-auth-modal .middle-auth-register__pitch li{
    display:grid!important;
    grid-template-columns:30px minmax(0,1fr)!important;
    align-items:center!important;
    gap:9px!important;
    min-height:42px!important;
    margin:0!important;
    padding:6px 9px!important;
    border:1px solid rgba(207,224,241,.85)!important;
    border-radius:13px!important;
    background:rgba(255,255,255,.72)!important;
    color:#29445f!important;
    font-size:11.5px!important;
    font-weight:650!important;
  }
  html body .middle-auth-modal .middle-auth-register__pitch li>span{
    display:grid!important;
    place-items:center!important;
    width:30px!important;
    height:30px!important;
    border-radius:10px!important;
    background:#e9f4ff!important;
    color:#1879e9!important;
    font-size:14px!important;
    font-weight:850!important;
  }
  html body .middle-auth-modal .middle-auth-register__cta{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:9px!important;
    width:100%!important;
    min-height:45px!important;
    margin-top:auto!important;
    padding:0 15px!important;
    border-radius:14px!important;
    background:linear-gradient(135deg,#2f98ff,#1474ec)!important;
    color:#fff!important;
    box-shadow:0 10px 23px rgba(22,117,235,.22)!important;
    font-size:13px!important;
    font-weight:800!important;
    text-align:center!important;
  }
  html body .middle-auth-modal .middle-auth-register__cta-arrow{
    font-size:17px!important;
    line-height:1!important;
    transition:transform .2s ease!important;
  }
  html body .middle-auth-modal .middle-auth-register[open] .middle-auth-register__cta-arrow{transform:rotate(90deg)!important}
  html body .middle-auth-modal .middle-auth-register[open] .middle-auth-register__toggle{
    flex:0 0 auto!important;
    min-height:0!important;
    padding:14px 16px!important;
    border-bottom:1px solid #dce7f2!important;
    background:#f5f9fe!important;
  }
  html body .middle-auth-modal .middle-auth-register[open] .middle-auth-register__pitch{
    display:none!important;
  }
  html body .middle-auth-modal .middle-auth-register[open] .middle-auth-register__cta{
    min-height:38px!important;
    margin:0!important;
    border:1px solid #d7e6f5!important;
    background:#fff!important;
    color:#2279df!important;
    box-shadow:none!important;
  }
  html body .middle-auth-modal .middle-auth-register__panel-wrap{
    flex:1 1 auto!important;
    min-height:0!important;
    padding:12px!important;
    overflow:auto!important;
    scrollbar-width:thin!important;
  }
  html body .middle-auth-modal .middle-auth-form--register{
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    padding:14px!important;
    border:0!important;
    border-radius:16px!important;
    background:#fff!important;
    box-shadow:none!important;
  }
  html body .middle-auth-modal .middle-auth-form h3{
    margin:0 0 10px!important;
    font-size:18px!important;
    color:#162f4c!important;
  }
  html body .middle-auth-modal .middle-auth-form>label{
    margin-bottom:7px!important;
    font-size:11.5px!important;
  }
  html body .middle-auth-modal .middle-auth-form input:not([type=checkbox]){
    min-height:40px!important;
    height:40px!important;
    margin-top:4px!important;
    padding:7px 11px!important;
    border-radius:11px!important;
  }
  html body .middle-auth-modal .middle-auth-form__row{
    margin-bottom:7px!important;
    font-size:11px!important;
  }
  html body .middle-auth-modal .middle-auth-form .middle-core-button,
  html body .middle-auth-modal .middle-social-btn{
    min-height:41px!important;
    height:41px!important;
    border-radius:12px!important;
  }
  html body .middle-auth-modal .middle-captcha-wrap{margin:7px 0!important}
  html body .middle-auth-modal .middle-social-login__privacy{margin-bottom:7px!important}
  html body .middle-auth-modal .middle-social-login__privacy span,
  html body .middle-auth-modal .middle-social-login__consent{
    font-size:9.8px!important;
    line-height:1.35!important;
  }
}

/* Smaller desktop / tablet browser widths: keep the concept, stack the two cards. */
@media(min-width:721px) and (max-width:899px){
  html body .middle-auth-modal__panel{width:min(560px,calc(100vw - 24px))!important;overflow:auto!important}
  html body .middle-auth-modal__content{overflow:visible!important}
  html body .middle-auth-modal .middle-auth{grid-template-columns:1fr!important;display:grid!important}
  html body .middle-auth-modal .middle-auth__stack{display:contents!important}
  html body .middle-auth-modal .middle-auth-form--login{grid-column:1!important;grid-row:1!important}
  html body .middle-auth-modal .middle-social-login{grid-column:1!important;grid-row:2!important}
  html body .middle-auth-modal .middle-auth-register{grid-column:1!important;grid-row:3!important;min-height:0!important}
  html body .middle-auth-modal .middle-auth-register__toggle{min-height:0!important}
}

/* Mobile adaptation of option 5: same cards, one column, no side-by-side squeeze. */
@media(max-width:720px){
  html body .middle-auth-modal__panel,
  html body .middle-auth-modal.is-open .middle-auth-modal__panel{
    padding:0!important;
    border-radius:23px!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    background:#fff!important;
  }
  html body .middle-auth-modal__head{
    position:sticky!important;
    top:0!important;
    z-index:8!important;
    min-height:62px!important;
    margin:0!important;
    padding:11px 11px 10px 14px!important;
    border-bottom:1px solid #e8eef5!important;
    background:rgba(255,255,255,.98)!important;
  }
  html body .middle-auth-modal__head .middle-kicker{
    min-height:19px!important;
    padding:0 7px!important;
    font-size:7.5px!important;
  }
  html body .middle-auth-modal__head h2{
    margin:4px 0 0!important;
    font-size:20px!important;
    line-height:1.08!important;
  }
  html body .middle-auth-modal__content{
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    padding:11px!important;
  }
  html body .middle-auth-modal .middle-auth{
    display:flex!important;
    flex-direction:column!important;
    gap:10px!important;
    width:100%!important;
    max-width:none!important;
    margin:0!important;
  }
  html body .middle-auth-modal .middle-auth__stack{
    display:contents!important;
  }
  html body .middle-auth-modal .middle-auth-form--login{order:1!important}
  html body .middle-auth-modal .middle-social-login{order:2!important}
  html body .middle-auth-modal .middle-auth-register{order:3!important}
  html body .middle-auth-modal .middle-auth-form--login,
  html body .middle-auth-modal .middle-social-login,
  html body .middle-auth-modal .middle-auth-register{
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    border:1px solid #dce7f2!important;
    border-radius:17px!important;
    box-shadow:none!important;
  }
  html body .middle-auth-modal .middle-auth-form--login,
  html body .middle-auth-modal .middle-social-login{
    padding:12px!important;
    background:#fff!important;
  }
  html body .middle-auth-modal .middle-social-login{background:#f5f9fe!important}
  html body .middle-auth-modal .middle-auth-register{
    display:block!important;
    overflow:hidden!important;
    background:linear-gradient(155deg,#f8fbff,#f1f7ff)!important;
  }
  html body .middle-auth-modal .middle-auth-register__toggle{
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    gap:10px!important;
    min-height:0!important;
    height:auto!important;
    padding:13px!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    color:#17304f!important;
    box-shadow:none!important;
    text-align:left!important;
    transform:none!important;
  }
  html body .middle-auth-modal .middle-auth-register__toggle::after{content:none!important;display:none!important}
  html body .middle-auth-modal .middle-auth-register__pitch{display:block!important}
  html body .middle-auth-modal .middle-auth-register__eyebrow{
    display:inline-flex!important;
    width:max-content!important;
    min-height:20px!important;
    padding:0 7px!important;
    border-radius:999px!important;
    background:#e4f1ff!important;
    color:#1676e4!important;
    font-size:8px!important;
    font-weight:850!important;
    text-transform:uppercase!important;
  }
  html body .middle-auth-modal .middle-auth-register__pitch h3{
    margin:8px 0 4px!important;
    font-size:20px!important;
    line-height:1.08!important;
    color:#142e4b!important;
  }
  html body .middle-auth-modal .middle-auth-register__pitch>p{
    margin:0 0 9px!important;
    color:#65788d!important;
    font-size:10.5px!important;
    line-height:1.4!important;
  }
  html body .middle-auth-modal .middle-auth-register__pitch ul{
    display:grid!important;
    grid-template-columns:1fr 1fr!important;
    gap:6px!important;
    margin:0!important;
    padding:0!important;
    list-style:none!important;
  }
  html body .middle-auth-modal .middle-auth-register__pitch li{
    display:flex!important;
    align-items:center!important;
    gap:6px!important;
    min-height:36px!important;
    padding:6px 7px!important;
    border-radius:11px!important;
    background:rgba(255,255,255,.76)!important;
    color:#314a63!important;
    font-size:9px!important;
    line-height:1.2!important;
    font-weight:650!important;
  }
  html body .middle-auth-modal .middle-auth-register__pitch li>span{
    display:grid!important;
    place-items:center!important;
    flex:0 0 24px!important;
    width:24px!important;
    height:24px!important;
    border-radius:8px!important;
    background:#eaf4ff!important;
    color:#1677e8!important;
    font-size:11px!important;
  }
  html body .middle-auth-modal .middle-auth-register__cta{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:8px!important;
    width:100%!important;
    min-height:42px!important;
    margin-top:1px!important;
    padding:0 12px!important;
    border-radius:12px!important;
    background:linear-gradient(135deg,#2e97ff,#1473ec)!important;
    color:#fff!important;
    font-size:12px!important;
    font-weight:800!important;
  }
  html body .middle-auth-modal .middle-auth-register[open] .middle-auth-register__pitch{display:none!important}
  html body .middle-auth-modal .middle-auth-register[open] .middle-auth-register__toggle{
    padding:9px 11px!important;
    border-bottom:1px solid #dce7f2!important;
  }
  html body .middle-auth-modal .middle-auth-register[open] .middle-auth-register__cta{
    min-height:37px!important;
    background:#fff!important;
    color:#247bdd!important;
    border:1px solid #d7e5f3!important;
  }
  html body .middle-auth-modal .middle-auth-register__panel-wrap{
    padding:9px!important;
  }
  html body .middle-auth-modal .middle-auth-form--register{
    margin:0!important;
    padding:11px!important;
    border:0!important;
    border-radius:13px!important;
    background:#fff!important;
  }
  html body .middle-auth-modal .middle-auth-form h3{margin-bottom:8px!important;font-size:17px!important}
  html body .middle-auth-modal .middle-auth-form>label{margin-bottom:6px!important;font-size:11px!important}
  html body .middle-auth-modal .middle-auth-form input:not([type=checkbox]){min-height:40px!important;height:40px!important}
  html body .middle-auth-modal .middle-auth-form .middle-core-button,
  html body .middle-auth-modal .middle-social-btn{min-height:41px!important;height:41px!important}
}

@media(max-width:380px){
  html body .middle-auth-modal .middle-auth-register__pitch ul{grid-template-columns:1fr!important}
}

/* Dark palette for the redesigned auth experience. */
@media(max-width:9999px){
  html:root[data-middle-theme='dark'] body .middle-auth-modal__panel,
  html:root[data-middle-theme='dark'] body .middle-auth-modal__head,
  html:root[data-middle-theme='dark'] body .middle-auth-modal .middle-auth-form--login,
  html:root[data-middle-theme='dark'] body .middle-auth-modal .middle-auth-form--register{
    border-color:#30485f!important;
    background:#17283a!important;
    color:#eef6ff!important;
  }
  html:root[data-middle-theme='dark'] body .middle-auth-modal .middle-social-login,
  html:root[data-middle-theme='dark'] body .middle-auth-modal .middle-auth-register{
    border-color:#30485f!important;
    background:#1a2d40!important;
  }
  html:root[data-middle-theme='dark'] body .middle-auth-modal .middle-auth-register__toggle,
  html:root[data-middle-theme='dark'] body .middle-auth-modal .middle-auth-register__pitch,
  html:root[data-middle-theme='dark'] body .middle-auth-modal .middle-auth-register__pitch h3,
  html:root[data-middle-theme='dark'] body .middle-auth-modal .middle-auth-form h3{
    color:#eef6ff!important;
  }
  html:root[data-middle-theme='dark'] body .middle-auth-modal .middle-auth-register__pitch>p{color:#a9bacb!important}
  html:root[data-middle-theme='dark'] body .middle-auth-modal .middle-auth-register__pitch li{
    border-color:#30485f!important;
    background:#20364b!important;
    color:#d7e5f2!important;
  }
  html:root[data-middle-theme='dark'] body .middle-auth-modal .middle-auth-register[open] .middle-auth-register__toggle{
    border-color:#30485f!important;
    background:#1a2d40!important;
  }
}


/* ========================================================================== 
   Middle Community 0.4.91 — publication viewport fit + mobile profile repair
   ========================================================================== */

/* Own profile: keep account exit close to the top instead of burying it after
   all publications/bookmarks/privacy blocks. */
.middle-core-profile{
  display:flex!important;
  flex-direction:column!important;
  min-width:0!important;
}
.middle-core-profile>*{order:3}
.middle-core-profile>.middle-core-profile__top{order:1}
.middle-core-profile>.middle-core-profile-session{order:2;margin-top:12px!important}
.middle-core-profile-session__row{min-width:0!important}
.middle-core-logout-button{visibility:visible!important;opacity:1!important}

@media(min-width:721px){
  /* Step 2 uses browser width instead of growing vertically. */
  html body .middle-publish-modal.is-step-2{
    z-index:2147483000!important;
    padding:12px!important;
  }
  html body .middle-publish-modal.is-step-2 .middle-publish-modal__panel{
    display:flex!important;
    flex-direction:column!important;
    width:min(1060px,calc(100vw - 24px))!important;
    height:auto!important;
    max-height:calc(100dvh - 24px)!important;
    padding:15px 17px 14px!important;
    overflow:hidden!important;
    border-radius:24px!important;
  }
  html body .middle-publish-modal.is-step-2 .middle-publish-modal__head{
    flex:0 0 auto!important;
    min-height:48px!important;
    margin:0 0 9px!important;
    align-items:center!important;
  }
  html body .middle-publish-modal.is-step-2 .middle-publish-modal__head h2{
    margin-top:4px!important;
    font-size:25px!important;
  }
  html body .middle-publish-modal.is-step-2 .middle-publish-close{
    width:38px!important;height:38px!important;min-width:38px!important;flex-basis:38px!important;
  }
  html body .middle-publish-modal.is-step-2 .middle-publish-wizard{
    flex:1 1 auto!important;
    min-height:0!important;
    width:100%!important;
  }
  html body .middle-publish-modal.is-step-2 .middle-publish-step--two:not([hidden]){
    display:grid!important;
    grid-template-columns:minmax(0,1.16fr) minmax(360px,.84fr)!important;
    grid-template-areas:
      "progress progress"
      "summary summary"
      "content advert"
      "content media"
      "consent consent"
      "actions actions"!important;
    grid-auto-rows:auto!important;
    column-gap:14px!important;
    row-gap:8px!important;
    align-items:start!important;
    min-width:0!important;
    min-height:0!important;
    overflow:visible!important;
  }
  html body .middle-publish-step--two>.middle-publish-progress{grid-area:progress!important;margin:0 0 1px!important}
  html body .middle-publish-step--two>.middle-publish-summary{grid-area:summary!important;margin:0!important;padding:8px 11px!important;min-height:54px!important}
  html body .middle-publish-step--two>.middle-publish-field--content{grid-area:content!important;min-width:0!important;margin:0!important}
  html body .middle-publish-step--two>.middle-publish-field--content textarea{
    display:block!important;
    height:238px!important;
    min-height:238px!important;
    max-height:238px!important;
    resize:none!important;
    padding:12px 13px!important;
  }
  html body .middle-publish-step--two>.middle-publish-ad-phone{grid-area:advert!important;min-width:0!important;margin:0!important}
  html body .middle-publish-step--two>.middle-publish-media{grid-area:media!important;min-width:0!important;margin:0!important;padding:9px 10px!important}
  html body .middle-publish-step--two>.middle-publish-consent-card{grid-area:consent!important;min-width:0!important;margin:0!important;padding:8px 9px!important}
  html body .middle-publish-step--two>.middle-publish-actions{grid-area:actions!important}

  /* Phone / price / condition: no squeezed or clipped controls. */
  html body .middle-publish-step--two .middle-publish-ad-phone.is-visible{
    display:block!important;
    width:100%!important;
    max-width:none!important;
    max-height:none!important;
    overflow:visible!important;
    opacity:1!important;
    transform:none!important;
  }
  html body .middle-publish-step--two .middle-publish-ad-phone>.middle-publish-field--phone{
    width:100%!important;
    min-width:0!important;
    margin:0 0 8px!important;
    padding:9px 10px!important;
  }
  html body .middle-publish-step--two .middle-publish-ad-properties{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    width:100%!important;
    min-width:0!important;
    gap:8px!important;
    overflow:visible!important;
  }
  html body .middle-publish-step--two .middle-publish-ad-properties.is-single-property{grid-template-columns:1fr!important}
  html body .middle-publish-step--two .middle-publish-ad-properties .middle-publish-field{
    min-width:0!important;
    width:100%!important;
  }
  html body .middle-publish-step--two .middle-publish-ad-properties input,
  html body .middle-publish-step--two .middle-publish-ad-properties select{
    display:block!important;
    box-sizing:border-box!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    height:43px!important;
    min-height:43px!important;
    padding-left:10px!important;
    padding-right:30px!important;
    font-size:13px!important;
  }
  html body .middle-publish-step--two .middle-publish-media__head{margin-bottom:5px!important}
  html body .middle-publish-step--two .middle-publish-media__buttons{gap:7px!important}
  html body .middle-publish-step--two .middle-publish-upload{min-height:52px!important;padding:6px 8px!important}
  html body .middle-publish-step--two .middle-publish-upload>span{width:28px!important;height:28px!important}

  /* Put required confirmations side by side to save height. */
  html body .middle-publish-step--two .middle-publish-consent-list{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:6px!important;
  }
  html body .middle-publish-step--two .middle-publish-consent-row{
    min-width:0!important;
    padding:7px 8px!important;
    font-size:10.5px!important;
    line-height:1.28!important;
  }
  html body .middle-publish-step--two .middle-publish-consent-row b{font-size:10.5px!important}
  html body .middle-publish-step--two .middle-publish-consent-row small{display:none!important}
  html body .middle-publish-step--two .middle-publish-dissemination-row{grid-column:1/-1!important}
  html body .middle-publish-step--two .middle-publish-consent-details{margin-top:5px!important}
  html body .middle-publish-step--two .middle-publish-consent-details summary{font-size:9.5px!important}

  html body .middle-publish-modal.is-step-2 .middle-publish-actions{
    position:static!important;
    display:flex!important;
    justify-content:flex-end!important;
    gap:8px!important;
    margin:0!important;
    padding:2px 0 0!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
  }
  html body .middle-publish-modal.is-step-2 .middle-publish-actions .middle-btn{
    width:auto!important;
    min-width:132px!important;
    min-height:42px!important;
    height:42px!important;
  }
  html body .middle-publish-modal.is-step-2 .middle-publish-actions .middle-publish-submit{min-width:205px!important}

  /* Organization publishing contains a weekly editor and legitimately needs
     more vertical content. Keep it wide and only use scrolling as fallback. */
  html body .middle-publish-modal.is-step-2 .middle-publish-step--two:has(.middle-publish-organization--step2:not([hidden])){
    display:block!important;
    overflow:auto!important;
    max-height:calc(100dvh - 104px)!important;
    padding-right:4px!important;
  }
  html body .middle-publish-modal.is-step-2 .middle-publish-step--two:has(.middle-publish-organization--step2:not([hidden]))>.middle-publish-field--content textarea{
    height:130px!important;min-height:130px!important;max-height:130px!important;
  }
}

/* Short laptop/browser heights: still no full-form scrollbar for ordinary posts/ads. */
@media(min-width:721px) and (max-height:760px){
  html body .middle-publish-modal.is-step-2{padding:7px!important}
  html body .middle-publish-modal.is-step-2 .middle-publish-modal__panel{max-height:calc(100dvh - 14px)!important;padding:10px 13px!important}
  html body .middle-publish-modal.is-step-2 .middle-publish-modal__head{min-height:40px!important;margin-bottom:6px!important}
  html body .middle-publish-modal.is-step-2 .middle-publish-modal__head h2{font-size:21px!important}
  html body .middle-publish-step--two>.middle-publish-field--content textarea{height:190px!important;min-height:190px!important;max-height:190px!important}
  html body .middle-publish-step--two>.middle-publish-summary{min-height:47px!important;padding:6px 9px!important}
  html body .middle-publish-step--two .middle-publish-consent-row{padding:5px 7px!important}
  html body .middle-publish-step--two .middle-publish-media{padding:7px 8px!important}
  html body .middle-publish-step--two .middle-publish-upload{min-height:46px!important}
  html body .middle-publish-modal.is-step-2 .middle-publish-actions .middle-btn{height:38px!important;min-height:38px!important}
}

@media(max-width:720px){
  /* Mobile publish modal fills only the space between top search and bottom nav.
     Header/actions stay visible; only the compact form body can move when the
     category adds extra controls. */
  html body .middle-publish-modal{
    padding:6px!important;
    overflow:hidden!important;
  }
  html body .middle-publish-modal__panel,
  html body .middle-publish-modal.is-step-2 .middle-publish-modal__panel{
    display:flex!important;
    flex-direction:column!important;
    width:100%!important;
    height:100%!important;
    max-height:100%!important;
    min-height:0!important;
    padding:12px!important;
    overflow:hidden!important;
    border-radius:20px!important;
  }
  html body .middle-publish-modal__head{
    position:relative!important;
    top:auto!important;
    flex:0 0 auto!important;
    min-height:44px!important;
    margin:0 0 7px!important;
    padding:0!important;
    border:0!important;
    background:transparent!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
  }
  html body .middle-publish-modal__head h2{margin-top:3px!important;font-size:20px!important}
  html body .middle-publish-close{width:36px!important;height:36px!important;min-width:36px!important;flex-basis:36px!important}
  html body .middle-publish-wizard{
    display:flex!important;
    flex:1 1 auto!important;
    min-height:0!important;
    width:100%!important;
  }
  html body .middle-publish-step:not([hidden]){
    width:100%!important;
    min-width:0!important;
    min-height:0!important;
  }
  html body .middle-publish-step--two:not([hidden]){
    display:flex!important;
    flex-direction:column!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    overscroll-behavior:contain!important;
    -webkit-overflow-scrolling:touch!important;
    padding-right:2px!important;
  }
  html body .middle-publish-step--two .middle-publish-progress{flex:0 0 auto!important;margin-bottom:7px!important}
  html body .middle-publish-step--two .middle-publish-summary{flex:0 0 auto!important;margin-bottom:7px!important;padding:8px 10px!important}
  html body .middle-publish-step--two .middle-publish-field{min-width:0!important;margin-bottom:8px!important}
  html body .middle-publish-step--two .middle-publish-field--content textarea{
    min-height:105px!important;
    height:105px!important;
    max-height:105px!important;
    padding:10px 11px!important;
    resize:none!important;
  }
  html body .middle-publish-step--two .middle-publish-ad-phone.is-visible{
    display:block!important;
    flex:0 0 auto!important;
    width:100%!important;
    min-width:0!important;
    max-height:none!important;
    margin:0 0 7px!important;
    overflow:visible!important;
  }
  html body .middle-publish-step--two .middle-publish-ad-phone>.middle-publish-field--phone{
    width:100%!important;min-width:0!important;margin:0 0 7px!important;padding:8px 9px!important;
  }
  html body .middle-publish-step--two .middle-publish-ad-properties{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:7px!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    overflow:visible!important;
  }
  html body .middle-publish-step--two .middle-publish-ad-properties.is-single-property{grid-template-columns:1fr!important}
  html body .middle-publish-step--two .middle-publish-ad-properties .middle-publish-field{
    width:100%!important;min-width:0!important;max-width:100%!important;margin:0!important;
  }
  html body .middle-publish-step--two .middle-publish-ad-properties input,
  html body .middle-publish-step--two .middle-publish-ad-properties select{
    box-sizing:border-box!important;
    display:block!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    height:42px!important;
    min-height:42px!important;
    padding-left:9px!important;
    padding-right:26px!important;
    font-size:12px!important;
  }
  html body .middle-publish-step--two .middle-publish-media{flex:0 0 auto!important;margin:0 0 7px!important;padding:8px!important}
  html body .middle-publish-step--two .middle-publish-media__buttons{gap:6px!important}
  html body .middle-publish-step--two .middle-publish-upload{min-width:0!important;min-height:48px!important;padding:6px 7px!important}
  html body .middle-publish-step--two .middle-publish-consent-card{flex:0 0 auto!important;margin:0 0 7px!important;padding:8px!important}
  html body .middle-publish-step--two .middle-publish-consent-row{padding:7px!important;font-size:10.5px!important;line-height:1.3!important}
  html body .middle-publish-step--two .middle-publish-consent-row b{font-size:10.5px!important}
  html body .middle-publish-step--two .middle-publish-consent-row small{font-size:9px!important}
  html body .middle-publish-step--two .middle-publish-actions{
    position:sticky!important;
    z-index:6!important;
    bottom:-1px!important;
    flex:0 0 auto!important;
    grid-template-columns:minmax(0,.72fr) minmax(0,1.28fr)!important;
    margin:5px -2px -2px!important;
    padding:7px 2px 2px!important;
    border-radius:0!important;
    background:linear-gradient(180deg,rgba(255,255,255,0),rgba(255,255,255,.98) 24%,#fff)!important;
  }
  html body .middle-publish-step--two .middle-publish-actions .middle-btn{min-width:0!important;width:100%!important;min-height:42px!important}

  /* Profile: full-width nickname editor and immediately visible logout area. */
  html body .middle-core-profile__top{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:11px!important;
    min-width:0!important;
    overflow:visible!important;
  }
  html body .middle-core-profile__avatar-area{
    width:82px!important;
    max-width:82px!important;
    flex-basis:82px!important;
  }
  html body .middle-core-profile__avatar,
  html body .middle-core-profile__avatar img{width:82px!important;height:82px!important}
  html body .middle-core-profile__identity{
    grid-column:1!important;
    width:100%!important;
    min-width:0!important;
    padding-top:0!important;
  }
  html body .middle-core-profile__identity h1{overflow-wrap:anywhere!important;font-size:24px!important}
  html body .middle-core-profile-account-line{
    display:grid!important;
    grid-template-columns:1fr!important;
    width:100%!important;
    min-width:0!important;
    gap:8px!important;
    margin-top:9px!important;
  }
  html body .middle-core-profile-login{width:100%!important;min-width:0!important;box-sizing:border-box!important}
  html body .middle-core-profile-name-form{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    gap:6px!important;
  }
  html body .middle-core-profile-name-form label{grid-column:1!important}
  html body .middle-core-profile-name-form input{
    grid-column:1!important;
    box-sizing:border-box!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
  }
  html body .middle-core-profile-name-form .middle-core-button{
    grid-column:1!important;
    width:100%!important;
    min-width:0!important;
  }
  html body .middle-core-profile>.middle-core-profile-session{
    width:100%!important;
    margin-top:10px!important;
    padding:10px!important;
  }
  html body .middle-core-profile-session__row{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:8px!important;
    width:100%!important;
    min-width:0!important;
    padding:10px!important;
  }
  html body .middle-core-profile-session__row p{font-size:11px!important}
  html body .middle-core-logout-button{display:flex!important;width:100%!important;min-height:44px!important}
}

@media(max-width:380px){
  html body .middle-publish-step--two .middle-publish-ad-properties{grid-template-columns:1fr!important}
}

:root[data-middle-theme='dark'] .middle-publish-step--two .middle-publish-actions{
  background:linear-gradient(180deg,rgba(23,40,58,0),rgba(23,40,58,.98) 24%,#17283a)!important;
}


/* ========================================================================== 
   Middle Community 0.4.92 — profile exit + consent order + compact mobile step 1
   ========================================================================== */

/* Restore the profile's natural document order. The account/session block is
   already rendered last by Middle Core, which is where the Logout action
   belongs. 0.4.91 temporarily pulled it under the profile header. */
.middle-core-profile{
  display:block!important;
  min-width:0!important;
}
.middle-core-profile>*{order:initial!important}
.middle-core-profile>.middle-core-profile-session{
  margin-top:18px!important;
  margin-bottom:0!important;
}

/* Logout must remain visibly a logout action even though the theme has a
   generic blue !important style for .middle-core-button. */
html body .middle-core-profile .middle-core-logout-button{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  min-height:44px!important;
  padding:10px 16px!important;
  border:1px solid rgba(202,61,61,.28)!important;
  border-radius:12px!important;
  background:rgba(202,61,61,.09)!important;
  color:#b33030!important;
  box-shadow:none!important;
  opacity:1!important;
  visibility:visible!important;
  text-decoration:none!important;
}
html body .middle-core-profile .middle-core-logout-button span{
  display:inline!important;
  width:auto!important;
  height:auto!important;
  margin:0!important;
  padding:0!important;
  color:inherit!important;
  font-size:13px!important;
  line-height:1.2!important;
  font-weight:750!important;
  opacity:1!important;
  visibility:visible!important;
  text-indent:0!important;
  white-space:nowrap!important;
}
html body .middle-core-profile .middle-core-logout-button svg{
  display:block!important;
  flex:0 0 18px!important;
  width:18px!important;
  height:18px!important;
  color:inherit!important;
}
html body .middle-core-profile .middle-core-logout-button:hover{
  border-color:rgba(202,61,61,.42)!important;
  background:rgba(202,61,61,.15)!important;
  color:#982626!important;
}

/* Required publication confirmations always run top-to-bottom in the same
   logical order as they are rendered by Middle Core. */
html body .middle-publish-step--two .middle-publish-consent-list{
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  gap:6px!important;
}
html body .middle-publish-step--two .middle-publish-consent-row,
html body .middle-publish-step--two .middle-publish-dissemination-row{
  grid-column:1!important;
  width:100%!important;
  min-width:0!important;
}

@media(max-width:720px){
  /* Step 1 should be a content-height card. Previously the 0.4.91 full-height
     panel reserved a blank strip before a rubric was even selected. */
  html body .middle-publish-modal:not(.is-step-2){
    align-items:flex-start!important;
    overflow:hidden!important;
  }
  html body .middle-publish-modal:not(.is-step-2) .middle-publish-modal__panel{
    display:block!important;
    width:100%!important;
    height:auto!important;
    min-height:0!important;
    max-height:calc(100% - 2px)!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
  }
  html body .middle-publish-modal:not(.is-step-2) .middle-publish-wizard{
    display:block!important;
    width:100%!important;
    height:auto!important;
    min-height:0!important;
    flex:none!important;
  }
  html body .middle-publish-modal:not(.is-step-2) .middle-publish-step--one:not([hidden]){
    display:block!important;
    width:100%!important;
    height:auto!important;
    min-height:0!important;
  }

  /* The session section stays at the bottom on mobile too; keep its action
     readable and comfortably tappable. */
  html body .middle-core-profile>.middle-core-profile-session{
    margin-top:16px!important;
    padding:10px!important;
  }
  html body .middle-core-profile .middle-core-logout-button{
    width:100%!important;
    min-height:46px!important;
  }
}

:root[data-middle-theme='dark'] body .middle-core-profile .middle-core-logout-button{
  border-color:rgba(244,117,117,.34)!important;
  background:rgba(202,61,61,.13)!important;
  color:#ffaaaa!important;
}
:root[data-middle-theme='dark'] body .middle-core-profile .middle-core-logout-button:hover{
  border-color:rgba(244,117,117,.5)!important;
  background:rgba(202,61,61,.2)!important;
  color:#ffc0c0!important;
}


/* ========================================================================== 
   Middle Community 0.4.94 — swap mobile publish action positions
   Back stays on the left; Submit occupies the previous Submit-side position.
   ========================================================================== */
@media(max-width:720px){
  html body .middle-publish-step--two .middle-publish-actions{
    grid-template-columns:minmax(0,.72fr) minmax(0,1.28fr)!important;
  }
  html body .middle-publish-step--two .middle-publish-actions .middle-btn--ghost{
    order:1!important;
    grid-column:1!important;
  }
  html body .middle-publish-step--two .middle-publish-actions .middle-publish-submit{
    order:2!important;
    grid-column:2!important;
  }
}


/* ========================================================================== 
   Middle Community 0.4.95 — stop iPhone zoom/layout jump on price focus
   iOS Safari automatically zooms focused controls whose computed font-size is
   below 16px. The compact ad controls from 0.4.91 used 12px, so tapping Price
   enlarged the visual viewport and made the publication modal look broken.
   ========================================================================== */
@media(max-width:720px){
  html body .middle-publish-modal input:not([type='checkbox']):not([type='radio']):not([type='file']),
  html body .middle-publish-modal select,
  html body .middle-publish-modal textarea,
  html body .middle-publish-step--two .middle-publish-ad-properties input,
  html body .middle-publish-step--two .middle-publish-ad-properties select,
  html body .middle-publish-step--two .middle-publish-price{
    box-sizing:border-box!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    font-size:16px!important;
    line-height:1.2!important;
    -webkit-text-size-adjust:100%!important;
  }

  html body .middle-publish-step--two .middle-publish-ad-properties{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    overflow:hidden!important;
  }
  html body .middle-publish-step--two .middle-publish-ad-properties .middle-publish-field{
    min-width:0!important;
    max-width:100%!important;
    overflow:hidden!important;
  }
  html body .middle-publish-step--two .middle-publish-ad-properties input[type='number']{
    appearance:textfield!important;
    -moz-appearance:textfield!important;
  }
  html body .middle-publish-step--two .middle-publish-ad-properties input[type='number']::-webkit-outer-spin-button,
  html body .middle-publish-step--two .middle-publish-ad-properties input[type='number']::-webkit-inner-spin-button{
    margin:0!important;
    -webkit-appearance:none!important;
  }

  /* Keep the modal anchored to the usable viewport while the soft keyboard is
     visible. No horizontal growth is allowed when a numeric field receives focus. */
  html body .middle-publish-modal,
  html body .middle-publish-modal__panel,
  html body .middle-publish-wizard,
  html body .middle-publish-step--two:not([hidden]){
    max-width:100vw!important;
    overflow-x:hidden!important;
  }
}


/* ========================================================================== 
   Middle Community 0.4.96 — /payment/ CTA hover + mobile mail icon polish
   ========================================================================== */
body.middle-vk-advertising-page .middle-vk-advertising__button--primary,
body.middle-vk-advertising-page .middle-vk-advertising__button--primary:visited,
body.middle-vk-advertising-page .middle-vk-advertising__button--primary:hover,
body.middle-vk-advertising-page .middle-vk-advertising__button--primary:focus,
body.middle-vk-advertising-page .middle-vk-advertising__button--primary:focus-visible{
  color:#fff!important;
  text-decoration:none!important;
}
body.middle-vk-advertising-page .middle-vk-advertising__button--primary:hover,
body.middle-vk-advertising-page .middle-vk-advertising__button--primary:focus-visible{
  background:linear-gradient(180deg,#2398f8,#126bdc)!important;
  box-shadow:0 17px 32px rgba(25,118,242,.28)!important;
}
body.middle-vk-advertising-page .middle-vk-advertising__button--primary > span{
  color:inherit!important;
}
body.middle-vk-advertising-page .middle-vk-advertising__button--secondary,
body.middle-vk-advertising-page .middle-vk-advertising__button--secondary:visited,
body.middle-vk-advertising-page .middle-vk-advertising__button--secondary:hover,
body.middle-vk-advertising-page .middle-vk-advertising__button--secondary:focus-visible{
  color:#245f9e!important;
  text-decoration:none!important;
}
body.middle-vk-advertising-page .middle-vk-advertising__button--secondary:hover,
body.middle-vk-advertising-page .middle-vk-advertising__button--secondary:focus-visible{
  background:#f5f9ff!important;
  border-color:#bfd7f4!important;
}
body.middle-vk-advertising-page .middle-vk-advertising__button--secondary svg{
  display:block!important;
  flex:0 0 20px!important;
  width:20px!important;
  height:20px!important;
  min-width:20px!important;
  min-height:20px!important;
  margin:0!important;
  padding:0!important;
  color:currentColor!important;
}

/* The contact e-mail icon used to inherit only `display:block`, so on narrow
   screens it could look undersized / oddly aligned. Give it a deliberate
   icon tile just like the VK badge. */
body.middle-vk-advertising-page .middle-vk-advertising__contact-links a[href^="mailto:"]{
  grid-template-columns:44px minmax(0,1fr)!important;
  column-gap:12px!important;
}
body.middle-vk-advertising-page .middle-vk-advertising__contact-links a[href^="mailto:"] > svg{
  grid-row:1 / span 2!important;
  align-self:center!important;
  justify-self:center!important;
  display:block!important;
  box-sizing:border-box!important;
  width:38px!important;
  height:38px!important;
  min-width:38px!important;
  min-height:38px!important;
  margin:0!important;
  padding:9px!important;
  border:1px solid #d8e7f7!important;
  border-radius:12px!important;
  background:linear-gradient(180deg,#f5faff,#eaf4ff)!important;
  color:#2478d7!important;
  stroke:currentColor!important;
  stroke-width:1.8!important;
}
body.middle-vk-advertising-page .middle-vk-advertising__contact-links a[href^="mailto:"]:hover > svg,
body.middle-vk-advertising-page .middle-vk-advertising__contact-links a[href^="mailto:"]:focus-visible > svg{
  border-color:#bfd9f5!important;
  background:#e8f3ff!important;
  color:#146fd6!important;
}

html:root[data-middle-theme="dark"] body.middle-vk-advertising-page .middle-vk-advertising__button--primary,
html:root[data-middle-theme="dark"] body.middle-vk-advertising-page .middle-vk-advertising__button--primary:hover,
html:root[data-middle-theme="dark"] body.middle-vk-advertising-page .middle-vk-advertising__button--primary:focus-visible{
  color:#fff!important;
}
html:root[data-middle-theme="dark"] body.middle-vk-advertising-page .middle-vk-advertising__contact-links a[href^="mailto:"] > svg{
  border-color:#31506d!important;
  background:#1d3751!important;
  color:#9dccff!important;
}

@media(max-width:720px){
  body.middle-vk-advertising-page .middle-vk-advertising__contact-links a[href^="mailto:"]{
    grid-template-columns:42px minmax(0,1fr)!important;
    column-gap:11px!important;
    align-items:center!important;
    min-height:68px!important;
    padding:12px 13px!important;
  }
  body.middle-vk-advertising-page .middle-vk-advertising__contact-links a[href^="mailto:"] > svg{
    width:36px!important;
    height:36px!important;
    min-width:36px!important;
    min-height:36px!important;
    padding:8px!important;
    border-radius:11px!important;
  }
  body.middle-vk-advertising-page .middle-vk-advertising__contact-links a[href^="mailto:"] > strong,
  body.middle-vk-advertising-page .middle-vk-advertising__contact-links a[href^="mailto:"] > span{
    min-width:0!important;
    overflow-wrap:anywhere!important;
  }
}


/* ========================================================================== 
   Middle Community 0.4.97 — compact mobile gap before footer
   Keep clearance for the fixed bottom app bar inside the footer itself,
   instead of reserving another ~100px after page content.
   ========================================================================== */
@media(max-width:720px){
  /* Internal pages: content should end naturally just above the footer. */
  html body:not(.home):not(.front-page) .middle-layout,
  html body.middle-service-landing-body .middle-layout,
  html body.middle-messages-system-page .middle-layout,
  html body.middle-advertising-page .middle-layout,
  html body.post-type-archive-middle_organization .middle-layout,
  html body.single-middle_organization .middle-layout,
  html body.middle-ads-board-page .middle-layout,
  html body.middle-photo-archive-page .middle-layout,
  html body.middle-city-info-body .middle-layout,
  html body.category .middle-layout,
  html body.single .middle-layout,
  html body.page .middle-layout{
    padding-bottom:16px!important;
  }

  html body:not(.home):not(.front-page) .middle-site-footer--portal{
    margin-top:6px!important;
  }
}


/* ========================================================================== 
   Middle Community 0.4.98 — remove the real mobile dead zone before footer
   0.4.97 only reduced inner-page layout padding. The remaining gap could be
   produced by homepage/legacy shells and by the last sidebar/card margins.
   Keep the fixed app-nav clearance inside the footer, not before it.
   ========================================================================== */
@media(max-width:720px){
  /* Every page shell must finish where its actual content finishes. */
  html body .middle-layout,
  html body.home .middle-layout,
  html body.front-page .middle-layout,
  html body.home .middle-layout--exact-home,
  html body.front-page .middle-layout--exact-home{
    min-height:0!important;
    height:auto!important;
    padding-bottom:8px!important;
    margin-bottom:0!important;
  }

  html body.home .middle-layout--exact-home>.middle-main,
  html body.front-page .middle-layout--exact-home>.middle-main,
  html body .middle-main,
  html body .middle-sidebar{
    min-height:0!important;
    height:auto!important;
    padding-bottom:0!important;
    margin-bottom:0!important;
  }

  /* Do not let the final card/widget leave a desktop-sized trailing margin. */
  html body .middle-main> :last-child,
  html body .middle-sidebar> :last-child,
  html body.home main.middle-exact-home> :last-child,
  html body.front-page main.middle-exact-home> :last-child{
    margin-bottom:0!important;
  }

  /* Footer begins immediately after the final visible block. */
  html body .middle-site-footer.middle-site-footer--portal,
  html body.home .middle-site-footer,
  html body.front-page .middle-site-footer{
    margin-top:8px!important;
    padding-top:0!important;
  }

  /* The fixed bottom navigation still needs clearance, but only AFTER the
     footer content. This does not create a blank strip before the footer. */
  html body .middle-site-footer.middle-site-footer--portal{
    padding-bottom:calc(var(--middle-mobile-nav-height,76px) + env(safe-area-inset-bottom) + 10px)!important;
  }

  /* Some old templates wrap sidebar content in an extra shell. Collapse any
     trailing empty vertical space there as well. */
  html body .middle-sidebar{
    align-content:start!important;
    grid-auto-rows:max-content!important;
  }
}


/* ========================================================================== 
   Middle Community 0.4.99 — iOS/mobile footer dead-zone runtime companion
   Force flow containers to natural height. JS below removes any residual
   empty strip left by legacy layout rules without touching desktop.
   ========================================================================== */
@media(max-width:720px){
  html body .middle-layout{
    min-height:0!important;
    height:auto!important;
    padding-bottom:0!important;
    margin-bottom:0!important;
  }
  html body .middle-main,
  html body .middle-sidebar{
    min-height:0!important;
    height:auto!important;
    margin-bottom:0!important;
    padding-bottom:0!important;
  }
  html body .middle-site-footer.middle-site-footer--portal{
    margin-top:8px!important;
  }
}

/* ========================================================================== 
   Middle Community 0.5.00 — guest classifieds without registration
   Immediate publication with explicit consent categories + anti-spam UI.
   ========================================================================== */
.middle-publish-guest-honeypot{
  position:absolute!important;
  left:-10000px!important;
  top:auto!important;
  width:1px!important;
  height:1px!important;
  overflow:hidden!important;
  opacity:0!important;
  pointer-events:none!important;
}
.middle-publish-guest-note{
  display:grid;
  gap:6px;
  margin:0 0 14px;
  padding:13px 15px;
  border:1px solid #cfe3fa;
  border-radius:15px;
  background:linear-gradient(135deg,#f2f8ff,#f8fbff);
  color:#27425f;
}
.middle-publish-guest-note strong{color:#155fae;font-size:13px;line-height:1.25}
.middle-publish-guest-note p{margin:0;font-size:11.5px;line-height:1.45;color:#5b6f86}
.middle-publish-guest-note a{width:max-content;max-width:100%;font-size:11.5px;font-weight:750;color:#1675e5;text-decoration:none}
.middle-publish-category.is-guest-fixed{
  background:#f5f9fe!important;
  color:#27425f!important;
}
.middle-publish-guest-security{
  display:grid;
  gap:7px;
  margin:0 0 10px;
  padding:12px 14px;
  border:1px solid #dce7f2;
  border-radius:15px;
  background:#f8fbfe;
}
.middle-publish-guest-security>strong{font-size:12px;color:#294866}
.middle-publish-guest-security>small{font-size:10.5px;line-height:1.4;color:#6d7f92}
.middle-publish-guest-security .middle-captcha-wrap{margin:2px 0 0!important;max-width:100%!important}
.middle-publish-guest-media-consent[hidden]{display:none!important}
.middle-publish-guest-media-consent.is-visible{display:flex!important}
.middle-ad-seller__person--guest .middle-ad-seller__privacy-avatar{
  background:linear-gradient(145deg,#eef6ff,#e4f0ff)!important;
  border-color:#cfdef0!important;
}
.middle-ad-seller__guest-note{
  margin:10px 0 0;
  padding:10px 11px;
  border:1px solid #e1e8f0;
  border-radius:12px;
  background:#f8fafc;
  color:#607286;
  font-size:11px;
  line-height:1.4;
}
.middle-ad-phone-button.is-disabled{cursor:default!important;opacity:.74!important}

:root[data-middle-theme="dark"] .middle-publish-guest-note{
  border-color:#31506d;background:linear-gradient(135deg,#18314a,#172a3e);color:#ddebfa;
}
:root[data-middle-theme="dark"] .middle-publish-guest-note strong{color:#8fc5ff}
:root[data-middle-theme="dark"] .middle-publish-guest-note p{color:#a8bacd}
:root[data-middle-theme="dark"] .middle-publish-guest-security,
:root[data-middle-theme="dark"] .middle-ad-seller__guest-note{border-color:#30485f;background:#17283a;color:#b5c5d5}
:root[data-middle-theme="dark"] .middle-publish-guest-security>strong{color:#e8f3ff}
:root[data-middle-theme="dark"] .middle-publish-guest-security>small{color:#a5b7c9}

@media(min-width:721px){
  .middle-publish-modal--guest .middle-publish-modal__panel{max-width:min(920px,calc(100vw - 48px))!important}
  .middle-publish-modal--guest.is-step-2 .middle-publish-modal__panel{max-height:calc(100dvh - 34px)!important}
}
@media(max-width:720px){
  .middle-publish-guest-note{margin-bottom:10px;padding:11px 12px;border-radius:13px}
  .middle-publish-guest-note p{font-size:10.8px}
  .middle-publish-guest-note a{font-size:10.8px}
  .middle-publish-guest-security{padding:10px 11px;border-radius:13px}
  .middle-publish-modal--guest .middle-publish-category.is-guest-fixed{pointer-events:none!important}
  .middle-publish-modal--guest .middle-publish-step--one{padding-bottom:4px!important}
  .middle-publish-modal--guest .middle-publish-consent-list{gap:7px!important}
  .middle-publish-modal--guest .middle-publish-consent-row{align-items:flex-start!important}
}


/* ========================================================================== 
   Middle Community 0.5.01 — guest publish order + desktop guest CTA fit
   ========================================================================== */
@media(min-width:721px){
  /* Guest CTA uses a compact label and a slightly wider pill so the text is
     never clipped in the desktop header. */
  html body .middle-header-tools > .middle-create-post-header--guest{
    flex-basis:122px!important;
    width:122px!important;
    min-width:122px!important;
    max-width:122px!important;
    padding-left:10px!important;
    padding-right:10px!important;
  }
  html body .middle-header-tools > .middle-create-post-header--guest span{
    display:inline!important;
    white-space:nowrap!important;
  }
}
@media(min-width:1051px) and (max-width:1350px){
  /* Keep the pre-existing compact icon-only state on narrower desktops. */
  html body .middle-header-tools > .middle-create-post-header--guest{
    flex-basis:44px!important;
    width:44px!important;
    min-width:44px!important;
    max-width:44px!important;
    padding:0!important;
  }
  html body .middle-header-tools > .middle-create-post-header--guest span{display:none!important}
}

@media(min-width:721px){
  /* The ordinary confirmations are first, SmartCaptcha is second and the
     submit/back actions are always the final row. */
  html body .middle-publish-step--two{
    grid-template-areas:
      "progress progress"
      "summary summary"
      "content advert"
      "content media"
      "consent consent"
      "security security"
      "actions actions"!important;
  }
  html body .middle-publish-step--two>.middle-publish-guest-security{
    grid-area:security!important;
    width:100%!important;
    min-width:0!important;
    margin:0!important;
  }
}
@media(max-width:720px){
  /* On phones DOM order is used: confirmations -> captcha -> buttons. */
  html body .middle-publish-step--two>.middle-publish-guest-security{
    order:90!important;
    width:100%!important;
    margin:0!important;
  }
  html body .middle-publish-step--two>.middle-publish-actions{order:100!important}
}


/* ========================================================================== 
   Middle Community 0.5.02 — direct guest advert CTAs across the portal
   Homepage sell card, advert board and Work/Real Estate/Auto service pages.
   ========================================================================== */
body.middle-service-landing-body .middle-seo-landing__actions{
  display:flex!important;
  flex:0 0 auto!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:10px!important;
}
body.middle-service-landing-body .middle-seo-landing__actions>a{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:44px!important;
  padding:0 17px!important;
  border:1px solid var(--middle-border)!important;
  border-radius:13px!important;
  background:var(--middle-bg)!important;
  color:var(--middle-text)!important;
  font-size:12px!important;
  font-weight:800!important;
  line-height:1.15!important;
  text-decoration:none!important;
  white-space:nowrap!important;
  transition:transform .18s ease,box-shadow .18s ease,background .18s ease!important;
}
body.middle-service-landing-body .middle-seo-landing__actions>a:hover{transform:translateY(-1px)!important}
body.middle-service-landing-body .middle-seo-landing__actions>a.middle-seo-landing__publish{
  border-color:#2187f6!important;
  background:linear-gradient(135deg,#2f9bff,#1475ec)!important;
  color:#fff!important;
  box-shadow:0 10px 24px rgba(31,126,239,.22)!important;
}
body.middle-service-landing-body .middle-seo-landing__actions>a.middle-seo-landing__publish:hover,
body.middle-service-landing-body .middle-seo-landing__actions>a.middle-seo-landing__publish:focus{
  color:#fff!important;
  background:linear-gradient(135deg,#258ff4,#0e6dde)!important;
}
body.middle-service-landing-body .middle-seo-landing__actions>a b{margin-left:8px!important}

@media(max-width:720px){
  body.middle-service-landing-body .middle-seo-landing__hero{
    display:block!important;
  }
  body.middle-service-landing-body .middle-seo-landing__actions{
    display:grid!important;
    grid-template-columns:1fr!important;
    width:100%!important;
    margin-top:16px!important;
    gap:8px!important;
  }
  body.middle-service-landing-body .middle-seo-landing__actions>a{
    width:100%!important;
    min-height:46px!important;
    margin:0!important;
    padding:0 14px!important;
    font-size:13px!important;
  }
  body.middle-ads-board-page .middle-market-publish,
  body.middle-ads-board-page .middle-ads-board__publish{
    width:100%!important;
    min-height:46px!important;
    justify-content:center!important;
  }
  .middle-selected-sell a.middle-publish-toggle{
    min-height:46px!important;
    justify-content:center!important;
    text-align:center!important;
  }
}

:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-seo-landing__actions>a:not(.middle-seo-landing__publish){
  border-color:#365069!important;
  background:#1b3045!important;
  color:#eaf4ff!important;
}


/* ========================================================================== 
   Middle Community 0.5.03 — stable mobile footer + themed service CTA
   - remove the runtime negative-margin footer pull that could briefly paint
     footer content over homepage cards while iOS Safari was scrolling;
   - keep the footer in normal document flow with a compact intentional gap;
   - restyle the service-page bottom CTA to match the blue portal UI.
   ========================================================================== */
@media(max-width:720px){
  html body .middle-site-footer.middle-site-footer--portal,
  html body.home .middle-site-footer,
  html body.front-page .middle-site-footer{
    position:relative!important;
    z-index:1!important;
    margin-top:8px!important;
    transform:none!important;
  }

  html body.home main.middle-exact-home,
  html body.front-page main.middle-exact-home,
  html body.home .middle-layout--exact-home>.middle-main,
  html body.front-page .middle-layout--exact-home>.middle-main{
    padding-bottom:0!important;
    margin-bottom:0!important;
  }
}

body.middle-service-landing-body .middle-seo-landing__footer{
  margin-top:22px!important;
  text-align:center!important;
}
body.middle-service-landing-body .middle-seo-landing__footer a{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  min-height:46px!important;
  padding:0 19px!important;
  border:1px solid #bfdbf7!important;
  border-radius:14px!important;
  background:linear-gradient(180deg,#f7fbff,#edf6ff)!important;
  color:#1675e5!important;
  box-shadow:0 8px 22px rgba(25,112,218,.10)!important;
  font-size:12.5px!important;
  font-weight:800!important;
  line-height:1.2!important;
  text-decoration:none!important;
  transition:background .18s ease,border-color .18s ease,color .18s ease,transform .18s ease,box-shadow .18s ease!important;
}
body.middle-service-landing-body .middle-seo-landing__footer a:hover,
body.middle-service-landing-body .middle-seo-landing__footer a:focus-visible{
  border-color:#2187f6!important;
  background:linear-gradient(135deg,#2f9bff,#1475ec)!important;
  color:#fff!important;
  transform:translateY(-1px)!important;
  box-shadow:0 10px 25px rgba(31,126,239,.20)!important;
}
@media(max-width:720px){
  body.middle-service-landing-body .middle-seo-landing__footer{
    margin-top:16px!important;
    padding:0 14px!important;
  }
  body.middle-service-landing-body .middle-seo-landing__footer a{
    width:100%!important;
    min-height:48px!important;
    padding:0 14px!important;
    border-radius:14px!important;
    font-size:13px!important;
  }
}
:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-seo-landing__footer a{
  border-color:#365b82!important;
  background:#1a334c!important;
  color:#8fc5ff!important;
  box-shadow:none!important;
}
:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-seo-landing__footer a:hover,
:root[data-middle-theme="dark"] body.middle-service-landing-body .middle-seo-landing__footer a:focus-visible{
  border-color:#348ff1!important;
  background:#176fcf!important;
  color:#fff!important;
}


/* ========================================================================== 
   Middle Community 0.5.05 — classifieds: force two cards per row on mobile
   The generic internal-page mobile rule in this file was overriding the
   classifieds-specific 2-column grid from ads-market.css. Keep the board at
   two columns on phones, with compact cards that cannot overflow the viewport.
   ========================================================================== */
@media(max-width:720px){
  html body.middle-ads-board-page .middle-market-results{
    padding:12px!important;
  }
  html body.middle-ads-board-page .middle-market-grid.middle-ads-grid,
  html body.middle-ads-board-page .middle-market-grid,
  html body.middle-ads-board-page .middle-ads-grid{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
    width:100%!important;
    min-width:0!important;
  }
  html body.middle-ads-board-page .middle-market-card{
    width:auto!important;
    min-width:0!important;
    max-width:100%!important;
    margin:0!important;
  }
  html body.middle-ads-board-page .middle-market-card__link{
    display:flex!important;
    min-width:0!important;
    height:100%!important;
    flex-direction:column!important;
    overflow:hidden!important;
  }
  html body.middle-ads-board-page .middle-market-card__media{
    width:100%!important;
    min-width:0!important;
    aspect-ratio:4/3!important;
  }
  html body.middle-ads-board-page .middle-market-card__content{
    min-width:0!important;
    padding:9px 9px 10px!important;
  }
  html body.middle-ads-board-page .middle-market-card__content h3{
    font-size:13px!important;
    line-height:1.22!important;
  }
  html body.middle-ads-board-page .middle-market-card__excerpt{
    display:-webkit-box!important;
    overflow:hidden!important;
    -webkit-box-orient:vertical!important;
    -webkit-line-clamp:2!important;
    margin-top:5px!important;
    font-size:9.5px!important;
    line-height:1.32!important;
  }
  html body.middle-ads-board-page .middle-market-card__location{
    min-width:0!important;
    margin-top:6px!important;
    overflow:hidden!important;
    font-size:8.5px!important;
    white-space:nowrap!important;
    text-overflow:ellipsis!important;
  }
  html body.middle-ads-board-page .middle-market-card__bottom{
    min-width:0!important;
    gap:5px!important;
  }
  html body.middle-ads-board-page .middle-market-card__price{
    min-width:0!important;
    font-size:12.5px!important;
    white-space:nowrap!important;
  }
}
@media(max-width:390px){
  html body.middle-ads-board-page .middle-market-results{padding:9px!important}
  html body.middle-ads-board-page .middle-market-grid.middle-ads-grid,
  html body.middle-ads-board-page .middle-market-grid,
  html body.middle-ads-board-page .middle-ads-grid{gap:7px!important}
  html body.middle-ads-board-page .middle-market-card__content{padding:8px!important}
  html body.middle-ads-board-page .middle-market-card__content h3{font-size:12px!important}
  html body.middle-ads-board-page .middle-market-card__excerpt{font-size:8.8px!important}
  html body.middle-ads-board-page .middle-market-card__location{font-size:8px!important}
  html body.middle-ads-board-page .middle-market-card__price{font-size:11.5px!important}
}


/* ========================================================================== 
   Middle Community 0.5.06 — Work / Real estate / Auto cards match classifieds
   - show compact description and city in service landing cards;
   - keep two advertisement cards per row on mobile, including narrow iPhones;
   - compact price/condition so cards cannot overflow.
   ========================================================================== */
body.middle-service-landing-body .middle-seo-ad-card>a{
  display:flex!important;
  height:100%!important;
  flex-direction:column!important;
}
body.middle-service-landing-body .middle-seo-ad-card__body{
  display:flex!important;
  flex:1!important;
  min-width:0!important;
  flex-direction:column!important;
}
body.middle-service-landing-body .middle-seo-ad-card__excerpt{
  display:-webkit-box!important;
  overflow:hidden!important;
  -webkit-box-orient:vertical!important;
  -webkit-line-clamp:2!important;
  margin-top:7px!important;
  color:var(--middle-muted)!important;
  font-size:10.5px!important;
  line-height:1.4!important;
}
body.middle-service-landing-body .middle-seo-ad-card__location{
  display:flex!important;
  align-items:center!important;
  gap:5px!important;
  min-width:0!important;
  margin-top:8px!important;
  overflow:hidden!important;
  color:var(--middle-muted)!important;
  font-size:9.5px!important;
  font-weight:650!important;
  line-height:1.2!important;
  white-space:nowrap!important;
  text-overflow:ellipsis!important;
}
body.middle-service-landing-body .middle-seo-ad-card__location>span{
  flex:0 0 auto!important;
  color:var(--middle-accent)!important;
  font-size:13px!important;
}
body.middle-service-landing-body .middle-seo-ad-card__bottom{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:7px!important;
  min-width:0!important;
  margin-top:auto!important;
  padding-top:10px!important;
}
body.middle-service-landing-body .middle-seo-ad-card__condition{
  display:inline-flex!important;
  align-items:center!important;
  min-height:22px!important;
  max-width:52%!important;
  padding:0 7px!important;
  overflow:hidden!important;
  border-radius:7px!important;
  background:var(--middle-bg-soft)!important;
  color:var(--middle-muted)!important;
  font-size:8px!important;
  font-weight:700!important;
  white-space:nowrap!important;
  text-overflow:ellipsis!important;
}
body.middle-service-landing-body .middle-seo-ad-card__bottom b{
  min-width:0!important;
  margin:0!important;
  color:var(--middle-text)!important;
  font-size:14px!important;
  white-space:nowrap!important;
}

@media(max-width:720px){
  html body.middle-service-landing-body .middle-seo-landing__grid{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
    width:100%!important;
    min-width:0!important;
  }
  html body.middle-service-landing-body .middle-seo-ad-card{
    width:auto!important;
    min-width:0!important;
    max-width:100%!important;
    margin:0!important;
    border-radius:14px!important;
  }
  html body.middle-service-landing-body .middle-seo-ad-card>a{
    min-width:0!important;
    height:100%!important;
    overflow:hidden!important;
  }
  html body.middle-service-landing-body .middle-seo-ad-card__media{
    width:100%!important;
    min-width:0!important;
    aspect-ratio:4/3!important;
  }
  html body.middle-service-landing-body .middle-seo-ad-card__body{
    min-width:0!important;
    padding:9px 9px 10px!important;
  }
  html body.middle-service-landing-body .middle-seo-ad-card__body small{
    margin-bottom:5px!important;
    overflow:hidden!important;
    font-size:7.5px!important;
    white-space:nowrap!important;
    text-overflow:ellipsis!important;
  }
  html body.middle-service-landing-body .middle-seo-ad-card__body strong{
    display:-webkit-box!important;
    overflow:hidden!important;
    -webkit-box-orient:vertical!important;
    -webkit-line-clamp:2!important;
    font-size:12.5px!important;
    line-height:1.25!important;
  }
  html body.middle-service-landing-body .middle-seo-ad-card__excerpt{
    margin-top:5px!important;
    font-size:9px!important;
    line-height:1.32!important;
  }
  html body.middle-service-landing-body .middle-seo-ad-card__location{
    gap:4px!important;
    margin-top:6px!important;
    font-size:8px!important;
  }
  html body.middle-service-landing-body .middle-seo-ad-card__location>span{
    font-size:10px!important;
  }
  html body.middle-service-landing-body .middle-seo-ad-card__bottom{
    gap:5px!important;
    padding-top:8px!important;
  }
  html body.middle-service-landing-body .middle-seo-ad-card__condition{
    min-height:19px!important;
    max-width:48%!important;
    padding:0 5px!important;
    border-radius:6px!important;
    font-size:7px!important;
  }
  html body.middle-service-landing-body .middle-seo-ad-card__bottom b{
    font-size:11.5px!important;
  }
}
@media(max-width:390px){
  html body.middle-service-landing-body .middle-seo-landing__grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:7px!important;
  }
  html body.middle-service-landing-body .middle-seo-ad-card__body{padding:8px!important}
  html body.middle-service-landing-body .middle-seo-ad-card__body strong{font-size:11.8px!important}
  html body.middle-service-landing-body .middle-seo-ad-card__excerpt{font-size:8.5px!important}
  html body.middle-service-landing-body .middle-seo-ad-card__location{font-size:7.6px!important}
  html body.middle-service-landing-body .middle-seo-ad-card__bottom b{font-size:11px!important}
}


/* ========================================================================== 
   Middle Community 0.5.07 — guest author name in classifieds
   ========================================================================== */
.middle-publish-ad-phone>.middle-publish-field--guest-name{
  width:100%;
  min-width:0;
  box-sizing:border-box;
}
.middle-publish-ad-phone>.middle-publish-field--guest-name input{
  width:100%;
  min-width:0;
  box-sizing:border-box;
}
@media(min-width:721px){
  html body .middle-publish-step--two .middle-publish-ad-phone>.middle-publish-field--guest-name{
    margin:0 0 8px!important;
    padding:9px 10px!important;
  }
}
@media(max-width:720px){
  html body .middle-publish-step--two .middle-publish-ad-phone>.middle-publish-field--guest-name{
    width:100%!important;
    min-width:0!important;
    margin:0 0 7px!important;
    padding:8px 9px!important;
  }
  html body .middle-publish-step--two .middle-publish-guest-name{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    font-size:16px!important;
  }
}


/* ========================================================================== 
   Middle Community 0.5.08 — stable desktop guest-ad layout
   Guest name added one more field to the right column. Lock the desktop form
   to an explicit two-column grid so captcha/actions can never fall into a
   half-column or leave a large empty area.
   ========================================================================== */
@media(min-width:721px){
  html body .middle-publish-modal--guest.is-step-2{
    padding:12px!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-modal__panel{
    width:min(1120px,calc(100vw - 28px))!important;
    max-width:min(1120px,calc(100vw - 28px))!important;
    max-height:calc(100dvh - 24px)!important;
    overflow:hidden!important;
    padding:14px 16px 13px!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-step--two:not([hidden]){
    display:grid!important;
    grid-template-columns:minmax(0,1.08fr) minmax(390px,.92fr)!important;
    grid-template-areas:none!important;
    grid-auto-flow:row!important;
    column-gap:14px!important;
    row-gap:8px!important;
    width:100%!important;
    min-width:0!important;
    min-height:0!important;
    overflow:visible!important;
    align-items:start!important;
  }

  html body .middle-publish-modal--guest.is-step-2 .middle-publish-step--two>.middle-publish-progress{
    grid-column:1 / -1!important;grid-row:1!important;margin:0!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-step--two>.middle-publish-summary{
    grid-column:1 / -1!important;grid-row:2!important;margin:0!important;min-height:54px!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-step--two>.middle-publish-field--content{
    grid-column:1!important;grid-row:3 / span 2!important;min-width:0!important;margin:0!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-step--two>.middle-publish-field--content textarea{
    width:100%!important;
    height:236px!important;
    min-height:236px!important;
    max-height:236px!important;
    resize:none!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-step--two>.middle-publish-ad-phone{
    grid-column:2!important;grid-row:3!important;display:block!important;width:100%!important;min-width:0!important;
    max-height:none!important;margin:0!important;overflow:visible!important;opacity:1!important;transform:none!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-step--two>.middle-publish-media{
    grid-column:2!important;grid-row:4!important;width:100%!important;min-width:0!important;margin:0!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-step--two>.middle-publish-consent-card{
    grid-column:1 / -1!important;grid-row:5!important;width:100%!important;min-width:0!important;margin:0!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-step--two>.middle-publish-guest-security{
    grid-column:1 / -1!important;grid-row:6!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr) minmax(320px,380px)!important;
    grid-template-rows:auto auto!important;
    column-gap:16px!important;
    row-gap:3px!important;
    align-items:center!important;
    width:100%!important;
    min-width:0!important;
    margin:0!important;
    padding:9px 11px!important;
    box-sizing:border-box!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-guest-security>strong{
    grid-column:1!important;grid-row:1!important;margin:0!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-guest-security>small{
    grid-column:1!important;grid-row:2!important;margin:0!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-guest-security .middle-captcha-wrap{
    grid-column:2!important;grid-row:1 / span 2!important;
    justify-self:end!important;
    width:100%!important;
    max-width:380px!important;
    margin:0!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-step--two>.middle-publish-actions{
    grid-column:1 / -1!important;grid-row:7!important;
    position:static!important;
    display:flex!important;
    justify-content:flex-end!important;
    gap:8px!important;
    width:100%!important;
    margin:0!important;
    padding:1px 0 0!important;
    background:transparent!important;
    border:0!important;
  }

  /* Name and phone are compact full-width cards in the right column. */
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-ad-phone>.middle-publish-field--guest-name,
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-ad-phone>.middle-publish-field--phone{
    width:100%!important;
    min-width:0!important;
    margin:0 0 7px!important;
    padding:8px 10px!important;
    box-sizing:border-box!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-ad-phone>.middle-publish-field>small{
    margin-top:4px!important;
    font-size:9.5px!important;
    line-height:1.3!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-ad-properties{
    gap:7px!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-ad-properties input,
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-ad-properties select{
    height:41px!important;
    min-height:41px!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-media{
    padding:8px 9px!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-upload{
    min-height:48px!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-consent-list{
    gap:5px!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-consent-row{
    padding:6px 8px!important;
    font-size:10px!important;
    line-height:1.25!important;
  }
}

@media(min-width:721px) and (max-height:760px){
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-modal__panel{
    padding:10px 13px!important;
    max-height:calc(100dvh - 14px)!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-modal__head{
    min-height:39px!important;margin-bottom:5px!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-step--two>.middle-publish-field--content textarea{
    height:170px!important;min-height:170px!important;max-height:170px!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-summary{
    min-height:46px!important;padding:6px 9px!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-consent-row{
    padding:4px 7px!important;font-size:9.5px!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-guest-security{
    padding:6px 9px!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-guest-security>small{
    display:none!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-guest-security .middle-captcha-wrap{
    grid-row:1!important;
  }
}

/* Very short desktop windows get a safe inner scroll instead of breaking the
   grid. Normal desktop/laptop heights remain fully fitted without scrolling. */
@media(min-width:721px) and (max-height:650px){
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-modal__panel{
    overflow-y:auto!important;
    overflow-x:hidden!important;
  }
}


/* ========================================================================== 
   Middle Community 0.5.09 — guest ad desktop viewport fit
   Keep the whole second step visible on normal desktop/laptop windows and
   retain an inner-scroll fallback only when the browser is genuinely short.
   ========================================================================== */
@media(min-width:721px){
  html body .middle-publish-modal--guest.is-step-2{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    padding:10px!important;
    overflow:hidden!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-modal__panel{
    width:min(1120px,calc(100vw - 24px))!important;
    max-width:min(1120px,calc(100vw - 24px))!important;
    height:auto!important;
    max-height:calc(100dvh - 20px)!important;
    padding:11px 14px 10px!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    overscroll-behavior:contain!important;
    scrollbar-gutter:stable!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-modal__head{
    min-height:39px!important;
    margin:0 0 5px!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-modal__head .middle-kicker{
    min-height:19px!important;
    padding:0 7px!important;
    font-size:7.5px!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-modal__head h2{
    margin-top:2px!important;
    font-size:22px!important;
    line-height:1.04!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-close{
    width:34px!important;
    height:34px!important;
    min-width:34px!important;
    flex-basis:34px!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-step--two:not([hidden]){
    grid-template-columns:minmax(0,1.08fr) minmax(390px,.92fr)!important;
    column-gap:12px!important;
    row-gap:5px!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-step--two>.middle-publish-progress{
    min-height:25px!important;
    margin:0!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-step--two>.middle-publish-summary{
    min-height:44px!important;
    padding:6px 9px!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-summary__category{
    margin-bottom:2px!important;
    font-size:8px!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-summary__title{
    font-size:13px!important;
    line-height:1.2!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-summary small{
    margin-top:2px!important;
    font-size:8px!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-step--two>.middle-publish-field--content>span{
    margin-bottom:4px!important;
    font-size:10.5px!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-step--two>.middle-publish-field--content textarea{
    height:178px!important;
    min-height:178px!important;
    max-height:178px!important;
    padding:9px 10px!important;
    line-height:1.42!important;
    font-size:13px!important;
  }

  /* Compact the right-hand contact block without hiding any fields. */
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-ad-phone>.middle-publish-field--guest-name,
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-ad-phone>.middle-publish-field--phone{
    margin:0 0 5px!important;
    padding:6px 8px!important;
    border-radius:12px!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-ad-phone>.middle-publish-field>span{
    margin-bottom:4px!important;
    font-size:9.5px!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-ad-phone>.middle-publish-field input{
    height:38px!important;
    min-height:38px!important;
    padding:0 10px!important;
    font-size:12px!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-ad-phone>.middle-publish-field>small{
    margin-top:3px!important;
    font-size:8px!important;
    line-height:1.2!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-ad-properties{
    gap:6px!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-ad-properties .middle-publish-field>span{
    margin-bottom:4px!important;
    font-size:9.5px!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-ad-properties input,
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-ad-properties select{
    height:38px!important;
    min-height:38px!important;
    font-size:12px!important;
  }

  html body .middle-publish-modal--guest.is-step-2 .middle-publish-step--two>.middle-publish-media{
    padding:6px 8px!important;
    border-radius:12px!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-media__head{
    margin-bottom:3px!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-media__head strong{
    font-size:10px!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-media__head small{
    font-size:7.5px!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-media__buttons{
    gap:5px!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-upload{
    min-height:42px!important;
    padding:4px 6px!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-upload>span{
    width:24px!important;
    height:24px!important;
  }

  /* Confirmations stay in legal order but consume substantially less height. */
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-step--two>.middle-publish-consent-card{
    padding:5px 7px!important;
    border-radius:12px!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-consent-list{
    gap:3px!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-consent-row{
    min-height:27px!important;
    padding:4px 6px!important;
    font-size:9px!important;
    line-height:1.17!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-consent-row b{
    font-size:9px!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-consent-row input[type='checkbox']{
    flex:0 0 16px!important;
    width:16px!important;
    height:16px!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-consent-details{
    margin-top:2px!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-consent-details summary{
    font-size:8px!important;
  }

  /* CAPTCHA remains after the confirmations, but as a compact horizontal row. */
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-step--two>.middle-publish-guest-security{
    min-height:78px!important;
    grid-template-columns:minmax(170px,1fr) minmax(300px,360px)!important;
    padding:6px 8px!important;
    column-gap:12px!important;
    border-radius:12px!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-guest-security>strong{
    font-size:9.5px!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-guest-security>small{
    font-size:7.5px!important;
    line-height:1.2!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-guest-security .middle-captcha-wrap{
    max-width:360px!important;
    overflow:hidden!important;
  }

  html body .middle-publish-modal--guest.is-step-2 .middle-publish-step--two>.middle-publish-actions{
    min-height:36px!important;
    padding-top:0!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-actions .middle-btn{
    min-height:36px!important;
    height:36px!important;
    border-radius:10px!important;
    font-size:11px!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-actions .middle-publish-submit{
    min-width:190px!important;
  }
}

/* The usual 768px-high laptop/browser window should still fit without the
   user having to scroll. If the actual viewport is shorter, the panel itself
   remains scrollable instead of clipping CAPTCHA/actions. */
@media(min-width:721px) and (max-height:760px){
  html body .middle-publish-modal--guest.is-step-2{
    padding:6px!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-modal__panel{
    max-height:calc(100dvh - 12px)!important;
    padding:8px 11px 7px!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-modal__head{
    min-height:34px!important;
    margin-bottom:3px!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-modal__head h2{font-size:19px!important}
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-step--two:not([hidden]){row-gap:3px!important}
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-step--two>.middle-publish-field--content textarea{
    height:138px!important;
    min-height:138px!important;
    max-height:138px!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-ad-phone>.middle-publish-field--guest-name,
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-ad-phone>.middle-publish-field--phone{
    padding:4px 7px!important;
    margin-bottom:3px!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-ad-phone>.middle-publish-field>small{display:none!important}
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-media__head small{display:none!important}
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-upload{min-height:38px!important}
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-consent-row{
    min-height:24px!important;
    padding:3px 5px!important;
    font-size:8.5px!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-step--two>.middle-publish-guest-security{
    min-height:70px!important;
    padding:4px 7px!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-guest-security>small{display:none!important}
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-actions .middle-btn{
    min-height:34px!important;
    height:34px!important;
  }
}


/* ========================================================================== 
   Middle Community 0.5.10 — stable SmartCaptcha inside guest ads on mobile
   Reserve Yandex widget height before it loads, remove clipping inherited
   from Middle Core and keep the CAPTCHA clear of the sticky submit bar.
   ========================================================================== */
@media(max-width:720px){
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-guest-security{
    display:block!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    margin:0 0 7px!important;
    padding:9px!important;
    overflow:visible!important;
    contain:none!important;
    box-sizing:border-box!important;
  }

  html body .middle-publish-modal--guest.is-step-2 .middle-publish-guest-security>strong{
    display:block!important;
    margin:0 0 2px!important;
    font-size:11px!important;
    line-height:1.25!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-guest-security>small{
    display:block!important;
    margin:0 0 7px!important;
    font-size:9px!important;
    line-height:1.32!important;
  }

  /* Yandex documents that the regular widget sets its container to 100px
     after loading. Reserving that space up front prevents the modal from
     jumping/repositioning on iOS Safari. */
  html body .middle-publish-modal--guest.is-step-2 .middle-guest-publish-captcha,
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-guest-security .middle-captcha-wrap{
    position:relative!important;
    display:block!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    min-height:100px!important;
    height:100px!important;
    margin:0!important;
    padding:0!important;
    overflow:visible!important;
    border-radius:12px!important;
    box-sizing:border-box!important;
    scroll-margin-top:88px!important;
    scroll-margin-bottom:78px!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-guest-publish-captcha .smart-captcha,
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-guest-security .smart-captcha{
    display:block!important;
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    min-height:100px!important;
    height:100px!important;
    margin:0!important;
    overflow:visible!important;
    box-sizing:border-box!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-guest-publish-captcha iframe,
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-guest-security .smart-captcha iframe{
    max-width:100%!important;
  }

  /* Keep the sticky action row visually separate from CAPTCHA. */
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-step--two>.middle-publish-actions{
    margin-top:1px!important;
  }
}

@media(max-width:380px){
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-guest-security{
    padding:7px!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-guest-security>small{
    font-size:8.5px!important;
  }
}


/* ========================================================================== 
   Middle Community 0.5.11 — invisible SmartCaptcha for guest advertisements
   Removes the visible/red widget state. The challenge appears only when
   SmartCaptcha considers the request suspicious.
   ========================================================================== */
html body .middle-publish-modal--guest .middle-guest-publish-captcha--invisible,
html body .middle-publish-modal--guest .middle-publish-guest-security .middle-guest-publish-captcha--invisible{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  min-width:0!important;
  min-height:0!important;
  max-width:1px!important;
  max-height:1px!important;
  margin:0!important;
  padding:0!important;
  overflow:hidden!important;
  opacity:0!important;
  pointer-events:none!important;
  border:0!important;
}
html body .middle-publish-modal--guest .middle-publish-guest-security{
  min-height:0!important;
  height:auto!important;
}
@media(max-width:720px){
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-guest-security{
    margin:0 0 7px!important;
    padding:8px 10px!important;
    overflow:visible!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-guest-security>small{
    margin-bottom:0!important;
  }
  html body .middle-publish-modal--guest.is-step-2 .middle-guest-publish-captcha--invisible,
  html body .middle-publish-modal--guest.is-step-2 .middle-publish-guest-security .middle-guest-publish-captcha--invisible{
    position:absolute!important;
    width:1px!important;
    height:1px!important;
    min-height:0!important;
    max-height:1px!important;
  }
}


/* ========================================================================== 
   Middle Community 0.5.12 — “Городские возможности”, вариант №6
   Light cityscape banner with four illustrated service cards.
   ========================================================================== */
.home .middle-selected-opportunities--v6,
.front-page .middle-selected-opportunities--v6{
  position:relative;
  isolation:isolate;
  overflow:hidden;
  padding:27px 28px 30px!important;
  border:1px solid #d6e8f7!important;
  border-radius:28px!important;
  background:linear-gradient(180deg,#dff2ff 0%,#eef8ff 54%,#e6f3fb 100%)!important;
  box-shadow:0 14px 34px rgba(33,86,131,.10)!important;
}
.home .middle-selected-opportunities--v6::before,
.front-page .middle-selected-opportunities--v6::before{
  content:"";
  position:absolute;
  z-index:-2;
  left:0;right:0;bottom:-8%;
  height:82%;
  background-image:linear-gradient(180deg,rgba(230,246,255,.20),rgba(218,238,249,.60)),url('../images/home-hero-chepetsk.jpg');
  background-size:cover;
  background-position:center 62%;
  opacity:.32;
  filter:saturate(.82) contrast(.92) brightness(1.13);
  transform:scale(1.03);
}
.home .middle-selected-opportunities--v6::after,
.front-page .middle-selected-opportunities--v6::after{
  content:"";
  position:absolute;
  z-index:-1;
  inset:0;
  pointer-events:none;
  background:linear-gradient(180deg,rgba(239,249,255,.96) 0%,rgba(235,248,255,.72) 31%,rgba(235,248,255,.18) 64%,rgba(224,241,250,.36) 100%);
}
.home .middle-selected-opportunities--v6 .middle-selected-opportunities__head,
.front-page .middle-selected-opportunities--v6 .middle-selected-opportunities__head{
  position:relative;
  z-index:2;
  align-items:flex-start!important;
  margin-bottom:58px!important;
}
.home .middle-selected-opportunities--v6 .middle-selected-opportunities__head>div>span,
.front-page .middle-selected-opportunities--v6 .middle-selected-opportunities__head>div>span{
  margin-bottom:6px!important;
  color:#277ed8!important;
  font-size:9px!important;
  letter-spacing:.14em!important;
}
.home .middle-selected-opportunities--v6 .middle-selected-opportunities__head h2,
.front-page .middle-selected-opportunities--v6 .middle-selected-opportunities__head h2{
  color:#112b4b!important;
  font-size:clamp(31px,2.5vw,44px)!important;
  line-height:1!important;
  letter-spacing:-.045em!important;
}
.home .middle-selected-opportunities--v6 .middle-selected-opportunities__head p,
.front-page .middle-selected-opportunities--v6 .middle-selected-opportunities__head p{
  max-width:630px;
  margin-top:8px!important;
  color:#56728e!important;
  font-size:12px!important;
}
.home .middle-selected-opportunities--v6 .middle-selected-opportunities__head>a,
.front-page .middle-selected-opportunities--v6 .middle-selected-opportunities__head>a{
  min-height:39px;
  padding:0 15px;
  border:1px solid rgba(49,133,220,.20);
  border-radius:999px;
  background:rgba(255,255,255,.78);
  color:#1976df!important;
  box-shadow:0 7px 18px rgba(52,111,169,.08);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
}
.home .middle-selected-opportunities--v6 .middle-selected-opportunities__city-note,
.front-page .middle-selected-opportunities--v6 .middle-selected-opportunities__city-note{
  position:absolute;
  z-index:1;
  top:92px;
  right:42px;
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  color:#2573b9;
  font-family:"Segoe Print","Comic Sans MS",cursive;
  font-style:italic;
  line-height:1.05;
  transform:rotate(-4deg);
  opacity:.92;
}
.home .middle-selected-opportunities--v6 .middle-selected-opportunities__city-note b,
.front-page .middle-selected-opportunities--v6 .middle-selected-opportunities__city-note b{font-size:17px;font-weight:700}
.home .middle-selected-opportunities--v6 .middle-selected-opportunities__city-note span,
.front-page .middle-selected-opportunities--v6 .middle-selected-opportunities__city-note span{font-size:13px}
.home .middle-selected-opportunities--v6 .middle-selected-opportunities__grid,
.front-page .middle-selected-opportunities--v6 .middle-selected-opportunities__grid{
  position:relative;
  z-index:2;
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:13px!important;
  margin:0!important;
  padding:0!important;
  overflow:visible!important;
}
.home .middle-selected-opportunities--v6 .middle-selected-opportunity,
.front-page .middle-selected-opportunities--v6 .middle-selected-opportunity{
  overflow:visible!important;
  min-width:0!important;
  border:1px solid rgba(207,224,239,.94)!important;
  border-radius:20px!important;
  background:rgba(255,255,255,.94)!important;
  box-shadow:0 10px 26px rgba(29,73,113,.09)!important;
  transition:transform .22s ease,box-shadow .22s ease,border-color .22s ease!important;
}
.home .middle-selected-opportunities--v6 .middle-selected-opportunity:hover,
.front-page .middle-selected-opportunities--v6 .middle-selected-opportunity:hover{
  transform:translateY(-4px)!important;
  border-color:#bedcf4!important;
  box-shadow:0 16px 32px rgba(29,73,113,.15)!important;
}
.home .middle-selected-opportunities--v6 .middle-selected-opportunity__whole-link,
.front-page .middle-selected-opportunities--v6 .middle-selected-opportunity__whole-link{
  position:relative;
  display:grid;
  grid-template-columns:52px minmax(0,1fr) 34px;
  align-items:center;
  gap:12px;
  min-height:126px;
  padding:17px 14px 16px;
  color:inherit;
  text-decoration:none;
}
.home .middle-selected-opportunities--v6 .middle-selected-opportunity__icon,
.front-page .middle-selected-opportunities--v6 .middle-selected-opportunity__icon{
  position:static!important;
  display:grid!important;
  place-items:center!important;
  width:52px!important;
  height:52px!important;
  border:0!important;
  border-radius:16px!important;
  background:#edf5ff!important;
  box-shadow:none!important;
}
.home .middle-selected-opportunities--v6 .middle-selected-opportunity--work .middle-selected-opportunity__icon,
.front-page .middle-selected-opportunities--v6 .middle-selected-opportunity--work .middle-selected-opportunity__icon{background:#e6f1ff!important}
.home .middle-selected-opportunities--v6 .middle-selected-opportunity--realestate .middle-selected-opportunity__icon,
.front-page .middle-selected-opportunities--v6 .middle-selected-opportunity--realestate .middle-selected-opportunity__icon{background:#e7f8ef!important}
.home .middle-selected-opportunities--v6 .middle-selected-opportunity--auto .middle-selected-opportunity__icon,
.front-page .middle-selected-opportunities--v6 .middle-selected-opportunity--auto .middle-selected-opportunity__icon{background:#fff0ef!important}
.home .middle-selected-opportunities--v6 .middle-selected-opportunity--organizations .middle-selected-opportunity__icon,
.front-page .middle-selected-opportunities--v6 .middle-selected-opportunity--organizations .middle-selected-opportunity__icon{background:#efeaff!important}
.home .middle-selected-opportunities--v6 .middle-selected-opportunity__icon img,
.front-page .middle-selected-opportunities--v6 .middle-selected-opportunity__icon img{
  width:34px!important;
  height:34px!important;
  object-fit:contain!important;
}
.home .middle-selected-opportunities--v6 .middle-selected-opportunity__content,
.front-page .middle-selected-opportunities--v6 .middle-selected-opportunity__content{display:block;min-width:0}
.home .middle-selected-opportunities--v6 .middle-selected-opportunity__content strong,
.front-page .middle-selected-opportunities--v6 .middle-selected-opportunity__content strong{
  display:block;
  margin-bottom:5px;
  color:#122944;
  font-size:16px;
  line-height:1.08;
  font-weight:850;
}
.home .middle-selected-opportunities--v6 .middle-selected-opportunity__content small,
.front-page .middle-selected-opportunities--v6 .middle-selected-opportunity__content small{
  display:-webkit-box;
  overflow:hidden;
  color:#6c7f94;
  font-size:10px;
  line-height:1.35;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
}
.home .middle-selected-opportunities--v6 .middle-selected-opportunity__arrow,
.front-page .middle-selected-opportunities--v6 .middle-selected-opportunity__arrow{
  display:grid;
  place-items:center;
  width:32px;
  height:32px;
  border:1px solid #cfe0ef;
  border-radius:50%;
  background:#fff;
  color:#2179dc;
  font-size:15px;
  font-weight:900;
  transition:transform .2s ease,background .2s ease,color .2s ease;
}
.home .middle-selected-opportunities--v6 .middle-selected-opportunity:hover .middle-selected-opportunity__arrow,
.front-page .middle-selected-opportunities--v6 .middle-selected-opportunity:hover .middle-selected-opportunity__arrow{
  transform:translateX(2px);
  background:#2179dc;
  color:#fff;
}
@media(max-width:900px){
  .home .middle-selected-opportunities--v6 .middle-selected-opportunities__head,
  .front-page .middle-selected-opportunities--v6 .middle-selected-opportunities__head{margin-bottom:40px!important}
  .home .middle-selected-opportunities--v6 .middle-selected-opportunities__city-note,
  .front-page .middle-selected-opportunities--v6 .middle-selected-opportunities__city-note{display:none!important}
  .home .middle-selected-opportunities--v6 .middle-selected-opportunities__grid,
  .front-page .middle-selected-opportunities--v6 .middle-selected-opportunities__grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:720px){
  .home .middle-selected-opportunities--v6,
  .front-page .middle-selected-opportunities--v6{
    padding:19px 14px 18px!important;
    border-radius:22px!important;
  }
  .home .middle-selected-opportunities--v6::before,
  .front-page .middle-selected-opportunities--v6::before{height:70%;bottom:0;background-position:center 70%;opacity:.24}
  .home .middle-selected-opportunities--v6 .middle-selected-opportunities__head,
  .front-page .middle-selected-opportunities--v6 .middle-selected-opportunities__head{margin-bottom:29px!important;gap:10px!important}
  .home .middle-selected-opportunities--v6 .middle-selected-opportunities__head h2,
  .front-page .middle-selected-opportunities--v6 .middle-selected-opportunities__head h2{font-size:29px!important}
  .home .middle-selected-opportunities--v6 .middle-selected-opportunities__head p,
  .front-page .middle-selected-opportunities--v6 .middle-selected-opportunities__head p{max-width:255px;font-size:10.5px!important;line-height:1.35}
  .home .middle-selected-opportunities--v6 .middle-selected-opportunities__head>a,
  .front-page .middle-selected-opportunities--v6 .middle-selected-opportunities__head>a{min-height:34px;padding:0 11px;font-size:9px!important}
  .home .middle-selected-opportunities--v6 .middle-selected-opportunities__grid,
  .front-page .middle-selected-opportunities--v6 .middle-selected-opportunities__grid{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:9px!important;
    margin:0!important;
    padding:0!important;
    overflow:visible!important;
  }
  .home .middle-selected-opportunities--v6 .middle-selected-opportunity,
  .front-page .middle-selected-opportunities--v6 .middle-selected-opportunity{flex:none!important;width:auto!important;border-radius:17px!important}
  .home .middle-selected-opportunities--v6 .middle-selected-opportunity__whole-link,
  .front-page .middle-selected-opportunities--v6 .middle-selected-opportunity__whole-link{
    grid-template-columns:42px minmax(0,1fr);
    grid-template-rows:auto auto;
    gap:8px 9px;
    min-height:126px;
    padding:13px 11px 11px;
  }
  .home .middle-selected-opportunities--v6 .middle-selected-opportunity__icon,
  .front-page .middle-selected-opportunities--v6 .middle-selected-opportunity__icon{width:42px!important;height:42px!important;border-radius:13px!important}
  .home .middle-selected-opportunities--v6 .middle-selected-opportunity__icon img,
  .front-page .middle-selected-opportunities--v6 .middle-selected-opportunity__icon img{width:28px!important;height:28px!important}
  .home .middle-selected-opportunities--v6 .middle-selected-opportunity__content,
  .front-page .middle-selected-opportunities--v6 .middle-selected-opportunity__content{align-self:center}
  .home .middle-selected-opportunities--v6 .middle-selected-opportunity__content strong,
  .front-page .middle-selected-opportunities--v6 .middle-selected-opportunity__content strong{font-size:13px;margin-bottom:3px}
  .home .middle-selected-opportunities--v6 .middle-selected-opportunity__content small,
  .front-page .middle-selected-opportunities--v6 .middle-selected-opportunity__content small{font-size:8.5px;line-height:1.3;-webkit-line-clamp:2}
  .home .middle-selected-opportunities--v6 .middle-selected-opportunity__arrow,
  .front-page .middle-selected-opportunities--v6 .middle-selected-opportunity__arrow{
    grid-column:1 / -1;
    justify-self:end;
    width:28px;
    height:28px;
    margin-top:-2px;
    font-size:13px;
  }
}
@media(max-width:390px){
  .home .middle-selected-opportunities--v6 .middle-selected-opportunities__head h2,
  .front-page .middle-selected-opportunities--v6 .middle-selected-opportunities__head h2{font-size:27px!important}
  .home .middle-selected-opportunities--v6 .middle-selected-opportunities__head p,
  .front-page .middle-selected-opportunities--v6 .middle-selected-opportunities__head p{max-width:220px}
  .home .middle-selected-opportunities--v6 .middle-selected-opportunity__whole-link,
  .front-page .middle-selected-opportunities--v6 .middle-selected-opportunity__whole-link{min-height:122px;padding:12px 9px 10px}
}
:root[data-middle-theme="dark"] .home .middle-selected-opportunities--v6,
:root[data-middle-theme="dark"] .front-page .middle-selected-opportunities--v6{
  border-color:#2e465c!important;
  background:linear-gradient(180deg,#173047 0%,#162a3d 100%)!important;
}
:root[data-middle-theme="dark"] .home .middle-selected-opportunities--v6::after,
:root[data-middle-theme="dark"] .front-page .middle-selected-opportunities--v6::after{background:linear-gradient(180deg,rgba(22,42,61,.95),rgba(22,42,61,.72) 42%,rgba(22,42,61,.30) 100%)}
:root[data-middle-theme="dark"] .home .middle-selected-opportunities--v6 .middle-selected-opportunities__head h2,
:root[data-middle-theme="dark"] .front-page .middle-selected-opportunities--v6 .middle-selected-opportunities__head h2{color:#f3f8fd!important}
:root[data-middle-theme="dark"] .home .middle-selected-opportunities--v6 .middle-selected-opportunities__head p,
:root[data-middle-theme="dark"] .front-page .middle-selected-opportunities--v6 .middle-selected-opportunities__head p{color:#abc0d3!important}
:root[data-middle-theme="dark"] .home .middle-selected-opportunities--v6 .middle-selected-opportunity,
:root[data-middle-theme="dark"] .front-page .middle-selected-opportunities--v6 .middle-selected-opportunity{border-color:#355069!important;background:rgba(25,44,62,.93)!important}
:root[data-middle-theme="dark"] .home .middle-selected-opportunities--v6 .middle-selected-opportunity__content strong,
:root[data-middle-theme="dark"] .front-page .middle-selected-opportunities--v6 .middle-selected-opportunity__content strong{color:#eef6ff!important}
:root[data-middle-theme="dark"] .home .middle-selected-opportunities--v6 .middle-selected-opportunity__content small,
:root[data-middle-theme="dark"] .front-page .middle-selected-opportunities--v6 .middle-selected-opportunity__content small{color:#9fb4c7!important}

/* ========================================================================== 
   Middle Community 0.5.13 — “Городские возможности” illustrated city concept
   Approved concept: panoramic city background + 4 illustrated service cards.
   ========================================================================== */
.home .middle-selected-opportunities--v7,
.front-page .middle-selected-opportunities--v7{
  position:relative!important;
  isolation:isolate!important;
  overflow:hidden!important;
  width:min(var(--mc-home-canvas,1540px),calc(100% - 44px))!important;
  margin:28px auto 0!important;
  padding:26px 28px 24px!important;
  border:1px solid rgba(196,221,241,.92)!important;
  border-radius:30px!important;
  background:#eef8ff!important;
  box-shadow:0 16px 42px rgba(36,82,124,.12)!important;
}
.home .middle-selected-opportunities--v7::before,
.front-page .middle-selected-opportunities--v7::before{
  content:"";
  position:absolute;
  z-index:-3;
  inset:0 0 auto 0;
  height:63%;
  background-image:url('../images/opportunities-city-bg.jpg');
  background-size:cover;
  background-position:center 48%;
  opacity:.88;
  filter:saturate(.93) contrast(.96) brightness(1.04);
}
.home .middle-selected-opportunities--v7::after,
.front-page .middle-selected-opportunities--v7::after{
  content:"";
  position:absolute;
  z-index:-2;
  inset:0;
  pointer-events:none;
  background:
    radial-gradient(circle at 10% 5%,rgba(255,255,255,.98) 0 13%,rgba(255,255,255,0) 35%),
    linear-gradient(90deg,rgba(246,251,255,.98) 0%,rgba(246,251,255,.88) 39%,rgba(246,251,255,.30) 70%,rgba(246,251,255,.06) 100%),
    linear-gradient(180deg,rgba(255,255,255,.18) 0%,rgba(255,255,255,.30) 36%,rgba(238,248,255,.92) 68%,rgba(238,248,255,.98) 100%);
}
.home .middle-opportunities-v7__topline,
.front-page .middle-opportunities-v7__topline{
  position:relative;
  z-index:2;
  display:flex;
  align-items:center;
  gap:16px;
  margin-bottom:16px;
  color:#7c91a8;
  font-size:11px;
  font-weight:650;
}
.home .middle-opportunities-v7__place,
.front-page .middle-opportunities-v7__place{
  display:inline-flex;
  align-items:center;
  gap:7px;
  min-height:34px;
  padding:0 12px;
  border:1px solid rgba(37,126,225,.18);
  border-radius:999px;
  background:rgba(255,255,255,.78);
  color:#1877df;
  font-size:11px;
  font-weight:850;
  box-shadow:0 6px 18px rgba(50,105,162,.08);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
}
.home .middle-opportunities-v7__place>span,
.front-page .middle-opportunities-v7__place>span{
  color:#2b8aff;
  font-size:15px;
  line-height:1;
}
.home .middle-opportunities-v7__head,
.front-page .middle-opportunities-v7__head{
  position:relative;
  z-index:2;
  display:flex!important;
  align-items:flex-start!important;
  justify-content:space-between!important;
  gap:24px!important;
  margin:0 0 38px!important;
}
.home .middle-opportunities-v7__head>div,
.front-page .middle-opportunities-v7__head>div{
  max-width:720px;
}
.home .middle-opportunities-v7__head>div>span,
.front-page .middle-opportunities-v7__head>div>span{display:none!important}
.home .middle-opportunities-v7__head h2,
.front-page .middle-opportunities-v7__head h2{
  margin:0!important;
  color:#0e2750!important;
  font-size:clamp(38px,3.25vw,56px)!important;
  line-height:.96!important;
  font-weight:900!important;
  letter-spacing:-.055em!important;
  text-shadow:0 1px 0 rgba(255,255,255,.6);
}
.home .middle-opportunities-v7__head p,
.front-page .middle-opportunities-v7__head p{
  max-width:650px!important;
  margin:10px 0 0!important;
  color:#7388a0!important;
  font-size:14px!important;
  line-height:1.45!important;
  font-weight:550!important;
}
.home .middle-opportunities-v7__head>a,
.front-page .middle-opportunities-v7__head>a{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:7px!important;
  min-height:39px!important;
  padding:0 15px!important;
  border:1px solid rgba(39,126,222,.18)!important;
  border-radius:999px!important;
  background:rgba(255,255,255,.85)!important;
  color:#1678e5!important;
  font-size:10px!important;
  font-weight:800!important;
  box-shadow:0 7px 20px rgba(51,109,166,.09)!important;
  backdrop-filter:blur(10px)!important;
  -webkit-backdrop-filter:blur(10px)!important;
  white-space:nowrap!important;
}
.home .middle-opportunities-v7__city-note,
.front-page .middle-opportunities-v7__city-note{
  position:absolute;
  z-index:1;
  top:122px;
  right:12.5%;
  display:flex;
  flex-direction:column;
  align-items:center;
  color:#1576dc;
  font-family:"Segoe Print","Bradley Hand","Comic Sans MS",cursive;
  font-style:italic;
  line-height:1.05;
  text-shadow:0 1px 0 rgba(255,255,255,.9);
  transform:rotate(-5deg);
  opacity:.94;
}
.home .middle-opportunities-v7__city-note b,
.front-page .middle-opportunities-v7__city-note b{font-size:22px;font-weight:650}
.home .middle-opportunities-v7__city-note span,
.front-page .middle-opportunities-v7__city-note span{font-size:16px;font-weight:650}
.home .middle-opportunities-v7__city-note::after,
.front-page .middle-opportunities-v7__city-note::after{
  content:"";
  width:150px;
  height:9px;
  margin-top:2px;
  border-bottom:3px solid #1c80e8;
  border-radius:50%;
  transform:rotate(-6deg);
}
.home .middle-opportunities-v7__grid,
.front-page .middle-opportunities-v7__grid{
  position:relative;
  z-index:3;
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:12px!important;
  margin:0!important;
  padding:0!important;
  overflow:visible!important;
}
.home .middle-opportunity-v7,
.front-page .middle-opportunity-v7{
  min-width:0!important;
  overflow:hidden!important;
  border:1px solid rgba(205,224,240,.96)!important;
  border-radius:24px!important;
  background:rgba(255,255,255,.95)!important;
  box-shadow:0 10px 28px rgba(34,76,113,.10)!important;
  transition:transform .24s ease,box-shadow .24s ease,border-color .24s ease!important;
}
.home .middle-opportunity-v7:hover,
.front-page .middle-opportunity-v7:hover{
  transform:translateY(-5px)!important;
  border-color:#afd5f7!important;
  box-shadow:0 18px 38px rgba(34,76,113,.16)!important;
}
.home .middle-opportunity-v7__link,
.front-page .middle-opportunity-v7__link{
  display:flex!important;
  flex-direction:column!important;
  width:100%!important;
  height:100%!important;
  color:inherit!important;
  text-decoration:none!important;
}
.home .middle-opportunity-v7__visual,
.front-page .middle-opportunity-v7__visual{
  display:block!important;
  width:100%!important;
  aspect-ratio:1.82/1!important;
  min-height:150px!important;
  background-image:var(--middle-opportunity-image)!important;
  background-size:cover!important;
  background-position:center!important;
  border-bottom:1px solid rgba(211,228,242,.72)!important;
  transition:transform .45s cubic-bezier(.2,.8,.2,1),filter .3s ease!important;
}
.home .middle-opportunity-v7:hover .middle-opportunity-v7__visual,
.front-page .middle-opportunity-v7:hover .middle-opportunity-v7__visual{
  transform:scale(1.018)!important;
  filter:saturate(1.04)!important;
}
.home .middle-opportunity-v7__body,
.front-page .middle-opportunity-v7__body{
  display:flex!important;
  flex:1 1 auto!important;
  flex-direction:column!important;
  min-width:0!important;
  padding:16px 18px 15px!important;
}
.home .middle-opportunity-v7__body>strong,
.front-page .middle-opportunity-v7__body>strong{
  display:block!important;
  margin:0 0 6px!important;
  color:#0e2345!important;
  font-size:21px!important;
  line-height:1.05!important;
  font-weight:900!important;
  letter-spacing:-.025em!important;
}
.home .middle-opportunity-v7__body>small,
.front-page .middle-opportunity-v7__body>small{
  display:-webkit-box!important;
  min-height:38px!important;
  margin:0!important;
  overflow:hidden!important;
  color:#788ba0!important;
  font-size:11.5px!important;
  line-height:1.42!important;
  font-weight:550!important;
  -webkit-box-orient:vertical!important;
  -webkit-line-clamp:2!important;
}
.home .middle-opportunity-v7__bottom,
.front-page .middle-opportunity-v7__bottom{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:10px!important;
  margin-top:14px!important;
}
.home .middle-opportunity-v7__bottom em,
.front-page .middle-opportunity-v7__bottom em{
  min-width:0!important;
  overflow:hidden!important;
  color:#187be8!important;
  font-size:10.5px!important;
  line-height:1.15!important;
  font-style:normal!important;
  font-weight:800!important;
  white-space:nowrap!important;
  text-overflow:ellipsis!important;
}
.home .middle-opportunity-v7__bottom i,
.front-page .middle-opportunity-v7__bottom i{
  display:grid!important;
  place-items:center!important;
  flex:0 0 40px!important;
  width:40px!important;
  height:40px!important;
  border:0!important;
  border-radius:50%!important;
  background:linear-gradient(145deg,#d9efff,#edf8ff)!important;
  color:#1779e6!important;
  font-size:22px!important;
  line-height:1!important;
  font-style:normal!important;
  font-weight:650!important;
  box-shadow:inset 0 0 0 1px rgba(37,133,230,.10)!important;
  transition:transform .2s ease,background .2s ease,color .2s ease,box-shadow .2s ease!important;
}
.home .middle-opportunity-v7--work .middle-opportunity-v7__bottom i,
.front-page .middle-opportunity-v7--work .middle-opportunity-v7__bottom i,
.home .middle-opportunity-v7--auto .middle-opportunity-v7__bottom i,
.front-page .middle-opportunity-v7--auto .middle-opportunity-v7__bottom i{
  background:linear-gradient(145deg,#4ba8ff,#1979ea)!important;
  color:#fff!important;
  box-shadow:0 8px 18px rgba(31,121,226,.20)!important;
}
.home .middle-opportunity-v7:hover .middle-opportunity-v7__bottom i,
.front-page .middle-opportunity-v7:hover .middle-opportunity-v7__bottom i{
  transform:translateX(2px)!important;
  background:linear-gradient(145deg,#2f95f7,#146fdf)!important;
  color:#fff!important;
  box-shadow:0 8px 18px rgba(31,121,226,.23)!important;
}
.home .middle-opportunities-v7__footer-note,
.front-page .middle-opportunities-v7__footer-note{
  position:relative;
  z-index:2;
  display:flex;
  justify-content:space-between;
  gap:20px;
  margin:18px 4px 0;
  color:#9cb0c5;
  font-size:8px;
  line-height:1.4;
  font-weight:750;
  letter-spacing:.18em;
}

@media(max-width:1100px){
  .home .middle-opportunities-v7__city-note,
  .front-page .middle-opportunities-v7__city-note{right:7%;top:125px;opacity:.72}
  .home .middle-opportunity-v7__visual,
  .front-page .middle-opportunity-v7__visual{min-height:125px!important}
  .home .middle-opportunity-v7__body>strong,
  .front-page .middle-opportunity-v7__body>strong{font-size:18px!important}
}

@media(max-width:900px){
  .home .middle-selected-opportunities--v7,
  .front-page .middle-selected-opportunities--v7{padding:24px 22px 22px!important}
  .home .middle-opportunities-v7__head,
  .front-page .middle-opportunities-v7__head{margin-bottom:28px!important}
  .home .middle-opportunities-v7__city-note,
  .front-page .middle-opportunities-v7__city-note{display:none!important}
  .home .middle-opportunities-v7__grid,
  .front-page .middle-opportunities-v7__grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .home .middle-opportunity-v7__visual,
  .front-page .middle-opportunity-v7__visual{min-height:150px!important}
}

@media(max-width:720px){
  .home .middle-selected-opportunities--v7,
  .front-page .middle-selected-opportunities--v7{
    width:calc(100% - 18px)!important;
    margin-top:18px!important;
    padding:16px 12px 15px!important;
    border-radius:23px!important;
  }
  .home .middle-selected-opportunities--v7::before,
  .front-page .middle-selected-opportunities--v7::before{
    height:44%;
    background-position:center 35%;
    opacity:.62;
  }
  .home .middle-selected-opportunities--v7::after,
  .front-page .middle-selected-opportunities--v7::after{
    background:
      linear-gradient(90deg,rgba(248,252,255,.96),rgba(248,252,255,.55)),
      linear-gradient(180deg,rgba(255,255,255,.15),rgba(239,248,255,.96) 48%,rgba(239,248,255,.99));
  }
  .home .middle-opportunities-v7__topline,
  .front-page .middle-opportunities-v7__topline{gap:9px;margin-bottom:10px;font-size:8.5px}
  .home .middle-opportunities-v7__place,
  .front-page .middle-opportunities-v7__place{min-height:29px;padding:0 9px;font-size:8.5px}
  .home .middle-opportunities-v7__head,
  .front-page .middle-opportunities-v7__head{display:block!important;margin-bottom:20px!important}
  .home .middle-opportunities-v7__head h2,
  .front-page .middle-opportunities-v7__head h2{font-size:29px!important;line-height:.98!important}
  .home .middle-opportunities-v7__head p,
  .front-page .middle-opportunities-v7__head p{max-width:290px!important;margin-top:7px!important;font-size:10px!important;line-height:1.38!important}
  .home .middle-opportunities-v7__head>a,
  .front-page .middle-opportunities-v7__head>a{position:absolute;top:14px;right:12px;min-height:31px!important;padding:0 10px!important;font-size:8px!important}
  .home .middle-opportunities-v7__grid,
  .front-page .middle-opportunities-v7__grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  .home .middle-opportunity-v7,
  .front-page .middle-opportunity-v7{border-radius:17px!important}
  .home .middle-opportunity-v7__visual,
  .front-page .middle-opportunity-v7__visual{min-height:0!important;aspect-ratio:1.78/1!important}
  .home .middle-opportunity-v7__body,
  .front-page .middle-opportunity-v7__body{padding:10px 10px 9px!important}
  .home .middle-opportunity-v7__body>strong,
  .front-page .middle-opportunity-v7__body>strong{margin-bottom:4px!important;font-size:14px!important}
  .home .middle-opportunity-v7__body>small,
  .front-page .middle-opportunity-v7__body>small{min-height:30px!important;font-size:8.2px!important;line-height:1.3!important}
  .home .middle-opportunity-v7__bottom,
  .front-page .middle-opportunity-v7__bottom{margin-top:8px!important;gap:5px!important}
  .home .middle-opportunity-v7__bottom em,
  .front-page .middle-opportunity-v7__bottom em{font-size:7.8px!important}
  .home .middle-opportunity-v7__bottom i,
  .front-page .middle-opportunity-v7__bottom i{flex-basis:29px!important;width:29px!important;height:29px!important;font-size:16px!important}
  .home .middle-opportunities-v7__footer-note,
  .front-page .middle-opportunities-v7__footer-note{display:none!important}
}

@media(max-width:390px){
  .home .middle-opportunities-v7__head>a,
  .front-page .middle-opportunities-v7__head>a{position:static!important;margin-top:10px!important}
  .home .middle-opportunities-v7__head h2,
  .front-page .middle-opportunities-v7__head h2{font-size:27px!important}
  .home .middle-opportunity-v7__body>strong,
  .front-page .middle-opportunity-v7__body>strong{font-size:13px!important}
}

:root[data-middle-theme="dark"] .home .middle-selected-opportunities--v7,
:root[data-middle-theme="dark"] .front-page .middle-selected-opportunities--v7{
  border-color:#2d4d68!important;
  background:#162b3f!important;
}
:root[data-middle-theme="dark"] .home .middle-selected-opportunities--v7::before,
:root[data-middle-theme="dark"] .front-page .middle-selected-opportunities--v7::before{opacity:.42;filter:saturate(.75) brightness(.62)}
:root[data-middle-theme="dark"] .home .middle-selected-opportunities--v7::after,
:root[data-middle-theme="dark"] .front-page .middle-selected-opportunities--v7::after{
  background:linear-gradient(90deg,rgba(20,39,57,.96),rgba(20,39,57,.72) 48%,rgba(20,39,57,.26)),linear-gradient(180deg,rgba(20,39,57,.12),#162b3f 72%);
}
:root[data-middle-theme="dark"] .home .middle-opportunities-v7__head h2,
:root[data-middle-theme="dark"] .front-page .middle-opportunities-v7__head h2{color:#f2f7fc!important;text-shadow:none}
:root[data-middle-theme="dark"] .home .middle-opportunities-v7__head p,
:root[data-middle-theme="dark"] .front-page .middle-opportunities-v7__head p,
:root[data-middle-theme="dark"] .home .middle-opportunities-v7__topline,
:root[data-middle-theme="dark"] .front-page .middle-opportunities-v7__topline{color:#a4b8cb!important}
:root[data-middle-theme="dark"] .home .middle-opportunity-v7,
:root[data-middle-theme="dark"] .front-page .middle-opportunity-v7{border-color:#36536c!important;background:rgba(22,43,63,.96)!important}
:root[data-middle-theme="dark"] .home .middle-opportunity-v7__body>strong,
:root[data-middle-theme="dark"] .front-page .middle-opportunity-v7__body>strong{color:#eff6fc!important}
:root[data-middle-theme="dark"] .home .middle-opportunity-v7__body>small,
:root[data-middle-theme="dark"] .front-page .middle-opportunity-v7__body>small{color:#a2b5c7!important}


/* 0.5.14 — immediate photo preparation feedback. */
.middle-publish-media.is-preparing .middle-publish-upload{
  opacity:.72!important;
  pointer-events:none!important;
}
.middle-publish-media.is-preparing .middle-publish-images-count{
  font-weight:750!important;
}
.middle-publish-media.is-preparing .middle-publish-media-preview__item::after{
  content:'';position:absolute;inset:auto 6px 6px auto;width:16px;height:16px;border:2px solid rgba(255,255,255,.65);border-top-color:#fff;border-radius:50%;animation:middle-publish-photo-spin .7s linear infinite;background:rgba(20,94,180,.35)
}
@keyframes middle-publish-photo-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.middle-publish-media.is-preparing .middle-publish-media-preview__item::after{animation:none}}

.middle-publish-media-preview__item.is-staged .middle-publish-media-preview__ready{
  position:absolute!important;right:6px!important;bottom:6px!important;display:grid!important;place-items:center!important;width:20px!important;height:20px!important;border-radius:50%!important;background:#1f9d62!important;color:#fff!important;font-size:12px!important;font-weight:900!important;line-height:1!important;box-shadow:0 3px 9px rgba(13,84,52,.25)!important
}



:root[data-middle-theme="dark"] .home .middle-home-golden-archive{border-color:rgba(255,214,140,.14);background:linear-gradient(135deg,#2f2415 0%,#3a2c17 100%);box-shadow:0 12px 32px rgba(0,0,0,.24)}
:root[data-middle-theme="dark"] .home .middle-home-golden-archive__kicker,:root[data-middle-theme="dark"] .home .middle-home-golden-archive__tag{background:rgba(255,213,126,.12);color:#ffd58a}
:root[data-middle-theme="dark"] .home .middle-home-golden-archive__intro p,:root[data-middle-theme="dark"] .home .middle-home-golden-archive__featured-copy p,:root[data-middle-theme="dark"] .home .middle-home-golden-archive__item-copy small{color:#c6c3bf}
:root[data-middle-theme="dark"] .home .middle-home-golden-archive__featured,:root[data-middle-theme="dark"] .home .middle-home-golden-archive__item{background:rgba(14,18,24,.55);border-color:rgba(255,214,140,.10)}
:root[data-middle-theme="dark"] .home .middle-home-golden-archive__featured-copy h3 a,:root[data-middle-theme="dark"] .home .middle-home-golden-archive__item{color:#f7f3eb}


/* 0.5.19 — Photo/Golden Archive mobile canonical layout. */
body.middle-photo-archive-page .middle-layout{grid-template-columns:minmax(0,1fr)!important;gap:0!important}
body.middle-photo-archive-page .middle-sidebar{display:none!important}
body.middle-photo-archive-page .middle-photo-archive{width:100%!important;max-width:none!important;min-width:0!important}
@media(max-width:720px){body.middle-photo-archive-page .middle-layout{display:block!important;width:100%!important;padding:10px 9px calc(108px + env(safe-area-inset-bottom))!important}body.middle-photo-archive-page .middle-photo-archive__hero{gap:12px!important;margin-bottom:12px!important;padding:16px 14px!important;border-radius:15px!important}body.middle-photo-archive-page .middle-photo-archive__kicker{min-height:24px!important;padding:0 8px!important;font-size:8px!important}body.middle-photo-archive-page .middle-photo-archive__hero h1{margin:9px 0 6px!important;font-size:29px!important;line-height:1.03!important;letter-spacing:-.035em!important}body.middle-photo-archive-page .middle-photo-archive__description,body.middle-photo-archive-page .middle-photo-archive__description p{font-size:12px!important;line-height:1.48!important}body.middle-photo-archive-page .middle-photo-archive__count{margin-top:9px!important;font-size:9px!important}body.middle-photo-archive-page .middle-photo-archive__publish{min-height:40px!important;width:100%!important;padding:0 12px!important;justify-content:center!important;font-size:12px!important}body.middle-photo-archive-page .middle-photo-grid{grid-template-columns:1fr!important;gap:10px!important}body.middle-photo-archive-page .middle-photo-card{min-width:0!important;margin:0!important}body.middle-photo-archive-page .middle-photo-card__link{display:block!important;width:100%!important;aspect-ratio:16/10!important;min-height:0!important;border-radius:15px!important;overflow:hidden!important}body.middle-photo-archive-page .middle-photo-card__media{position:absolute!important;inset:0!important;width:100%!important;height:100%!important}body.middle-photo-archive-page .middle-photo-card__media>img{display:block!important;width:100%!important;height:100%!important;object-fit:cover!important}body.middle-photo-archive-page .middle-photo-card__link:after{inset:58% 0 0!important;background:linear-gradient(180deg,transparent 0%,rgba(6,16,28,.22) 20%,rgba(6,16,28,.84) 100%)!important}body.middle-photo-archive-page .middle-photo-card__badge{top:9px!important;left:9px!important;min-height:23px!important;padding:0 7px!important;font-size:7.5px!important}body.middle-photo-archive-page .middle-photo-card__content{padding:11px 12px!important}body.middle-photo-archive-page .middle-photo-card__content time{margin-bottom:4px!important;font-size:8px!important}body.middle-photo-archive-page .middle-photo-card__content h2{font-size:15px!important;line-height:1.2!important;-webkit-line-clamp:2!important}body.middle-photo-archive-page .middle-photo-card__open{display:none!important}}
@media(max-width:420px){body.middle-photo-archive-page .middle-photo-card__link{aspect-ratio:4/3!important}body.middle-photo-archive-page .middle-photo-card__content h2{font-size:14px!important}}

:root[data-middle-theme="dark"] .home .middle-home-golden-archive--cinematic{border-color:rgba(255,214,140,.18);background:linear-gradient(120deg,rgba(11,18,30,.98) 0%,rgba(13,22,35,.96) 100%)}
