/* Local additions for accessible light/dark reading and responsive components. */
.entry-content{font-size:var(--custom-body-size,18px);line-height:var(--custom-line-height,1.9);overflow-wrap:anywhere}
.entry-content>p,.entry-content>ul,.entry-content>ol{max-width:var(--custom-reading-width,780px);margin-inline:auto}
.entry-content ul{list-style:disc outside;padding-inline-start:1.5em}.entry-content ol{list-style:decimal outside;padding-inline-start:1.5em}
.entry-content li{margin-block:.3em}.entry-content img,.entry-content video,.entry-content iframe{max-width:100%}
.entry-content pre{overflow:auto;max-width:100%}.entry-content table{max-width:100%}
.magazine-notice{position:relative;z-index:1000;padding:12px 20px;background:#173f65;color:#fff;line-height:1.7}
.magazine-notice-inner{max-width:1280px;margin-inline:auto;display:flex;align-items:center;gap:16px}
.magazine-notice-content{flex:1;min-width:0;overflow-wrap:anywhere}.magazine-notice-content p:last-child{margin-bottom:0}
.magazine-notice-content a{color:inherit;text-decoration:underline}.magazine-notice-content :is(h1,h2,h3,h4,h5,h6){color:inherit;font-size:1.15em}
.magazine-notice.is-centered .magazine-notice-content{text-align:center}
.magazine-notice .magazine-notice-button{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:7px 20px;border-radius:var(--custom-radius,6px);font-weight:700;background:#fff;color:#173f65;text-decoration:none;white-space:normal;text-align:center}
.magazine-notice .magazine-notice-close{flex:0 0 44px;min-width:44px;min-height:44px;padding:0;background:transparent;color:inherit;border:1px solid currentColor;border-radius:var(--custom-radius,6px);font:inherit;font-size:26px;cursor:pointer}
.magazine-notice[hidden]{display:none!important}.magazine-notice.is-sticky{position:sticky;top:0;z-index:10020}
.admin-bar .magazine-notice.is-sticky{top:32px}
.custom-follow-news{display:flex;flex-wrap:wrap;gap:12px;margin-block:24px}.custom-follow-news a{padding:10px 16px;border:1px solid currentColor;border-radius:var(--custom-radius,6px)}
.custom-category-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:12px;margin-block:20px}.custom-category-grid a{padding:12px;border:1px solid #94a3b866;border-radius:var(--custom-radius,6px)}.custom-category-grid span{opacity:.8;font-size:.85em}
.custom-nav-button>a{border-radius:var(--custom-radius,6px);outline:1px solid currentColor;outline-offset:-6px}
.custom-nav-style-2 #main-nav .main-menu-wrapper{border-radius:12px}.custom-nav-style-3 #main-nav .main-menu-wrapper{box-shadow:0 3px 12px #0002}
.custom-nav-style-4 #main-nav .menu>li>a{border-bottom:3px solid transparent}.custom-nav-style-4 #main-nav .menu>li>a:hover{border-bottom-color:currentColor}
.custom-nav-style-5 #main-nav .menu>li{margin-inline:3px}.custom-nav-style-5 #main-nav .menu>li>a{border-radius:999px}
.custom-nav-style-6 #main-nav .menu>li+li{border-inline-start:1px solid #94a3b866}.custom-nav-style-7 #main-nav .main-menu-wrapper{border-block:2px solid currentColor}
.custom-nav-style-8 #main-nav .menu>li>a{letter-spacing:.02em;font-weight:700}.custom-nav-style-9 #main-nav .main-menu-wrapper{border-radius:8px;border:1px solid #94a3b866;box-shadow:0 4px 0 #0002}
:where(a,button,input,select,textarea):focus-visible{outline:3px solid #1686d9!important;outline-offset:3px}
.change-skin{touch-action:manipulation}.mobile-header-components .components>li>a{min-width:44px;min-height:44px}
.dark-skin{color-scheme:dark;--base-color:var(--custom-dark-text,#edf2f7);--bright-color:var(--custom-dark-bg,#121820);--tie-body-bg:var(--custom-dark-bg,#121820)}
.dark-skin body,.dark-skin #tie-wrapper,.dark-skin .background-overlay{background-color:var(--custom-dark-bg,#121820);color:var(--custom-dark-text,#edf2f7)}
.dark-skin :is(.container-wrapper,.widget,.post-layout-1,.post-layout-2,.post-layout-3,.comment-list .comment-content,.comp-sub-menu,.mobile-menu-wrap){background-color:var(--custom-dark-surface,#1b2530);color:var(--custom-dark-text,#edf2f7);border-color:#71809666}
.dark-skin :is(.entry-content,.entry-content p,.entry-content li,.post-title,.entry-title,.widget-title,.comment-content,.about-author,.page-title){color:var(--custom-dark-text,#edf2f7)}
.dark-skin :is(.post-meta,.post-meta a,.meta-author,.comment-metadata,.post-excerpt,.widget-posts-list-container .post-meta){color:var(--custom-dark-muted,#bac6d2)}
.dark-skin .entry-content a:not(.button):not(.shortc-button),.dark-skin .comment-content a{color:var(--custom-dark-link,#8ccbff)}
.dark-skin :is(input:not([type=submit]):not([type=button]),textarea,select){background-color:#121a23;color:var(--custom-dark-text,#edf2f7);border-color:#718096}
.dark-skin ::placeholder{color:var(--custom-dark-muted,#bac6d2);opacity:1}
.dark-skin .entry-content :is(th,td){border-color:#718096}.dark-skin .entry-content th{background:#263548;color:var(--custom-dark-text,#edf2f7)}
.dark-skin .entry-content :is(pre,code,blockquote){background:#111923;color:var(--custom-dark-text,#edf2f7)}
.dark-skin .entry-content img,.dark-skin .post-thumb img{filter:brightness(var(--custom-dark-brightness,90%))}
.dark-skin #autocomplete-suggestions{background:var(--custom-dark-surface,#1b2530);color:var(--custom-dark-text,#edf2f7)}
.custom-reduce-motion *{animation-duration:.01ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
@media(max-width:782px){.admin-bar .magazine-notice.is-sticky{top:46px}}
@media(max-width:767px){.entry-content{font-size:var(--custom-mobile-size,17px)}.magazine-notice-inner{flex-wrap:wrap;gap:10px}.magazine-notice-content{flex-basis:calc(100% - 64px)}.magazine-notice-button{order:3;width:100%}.magazine-notice.hide-on-mobile{display:none}.magazine-notice{padding:10px 14px}.custom-category-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.entry-content h2{font-size:1.5em}.entry-content h3{font-size:1.3em}}
@media(max-width:600px){.admin-bar .magazine-notice.is-sticky{top:0}}

.custom-category-columns-1{grid-template-columns:1fr}.custom-category-columns-2{grid-template-columns:repeat(2,minmax(0,1fr))}.custom-category-columns-3{grid-template-columns:repeat(3,minmax(0,1fr))}.custom-category-columns-4{grid-template-columns:repeat(4,minmax(0,1fr))}
@media(max-width:480px){.custom-category-columns-3,.custom-category-columns-4{grid-template-columns:repeat(2,minmax(0,1fr))}}

.custom-auto-dropcap .entry-content>p:first-of-type::first-letter{float:inline-start;font-size:3.2em;line-height:.95;font-weight:700;margin-inline-end:.12em;margin-block-start:.08em;color:var(--brand-color,currentColor)}
@supports not (float:inline-start){.custom-auto-dropcap .entry-content>p:first-of-type::first-letter{float:left}.rtl.custom-auto-dropcap .entry-content>p:first-of-type::first-letter{float:right}}

#top-nav .custom-top-nav-text{padding-block:8px;line-height:1.6;max-width:100%;white-space:normal;overflow-wrap:anywhere}#top-nav .custom-top-nav-text a{color:inherit;text-decoration:underline}.custom-author-bio-more{white-space:normal}

/* Keep every title reachable on narrow screens; no overflow popup for accessible tabs. */
.tabs-wrapper.custom-tabs-enhanced>.tabs[role=tablist]{display:flex;flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;max-width:100%;opacity:1;scroll-padding-inline:8px;padding-block:4px}
.tabs-wrapper.custom-tabs-enhanced>.tabs[role=tablist]>li{float:none;flex:0 0 auto}
.tabs-wrapper.custom-tabs-enhanced>.tabs[role=tablist] a{min-height:44px;display:flex;align-items:center;white-space:nowrap}
.tabs-wrapper.tabs-vertical.custom-tabs-enhanced>.tabs[role=tablist]{flex-direction:column;overflow-y:auto}
.tabs-wrapper.custom-tabs-enhanced>.tab-content[hidden]{display:none!important}
.tabs-wrapper.custom-tabs-enhanced>.tab-content:not([hidden]) .tab-content-elements li{opacity:1}
/* Without JavaScript, keep tab anchors and all their content usable. */
.tabs-wrapper:not([data-custom-tabs-ready])>.tabs{opacity:1}
.tabs-wrapper:not([data-custom-tabs-ready])>.tab-content{display:block!important}
.tabs-wrapper:not([data-custom-tabs-ready])>.tab-content .tab-content-elements li{opacity:1}
@media print{.tabs-wrapper.custom-tabs-enhanced>.tab-content[role=tabpanel]{display:block!important}.tabs-wrapper>.tab-content .tab-content-elements li{opacity:1}.tabs-wrapper>.tabs[role=tablist]{display:none!important}}

/* Progressive enhancement: closed content stays readable if JavaScript does not load. */
.toggle:not([data-toggle-ready])>.toggle-content{display:block!important}
.toggle[data-toggle-ready]>.toggle-content[hidden]{display:none!important}
h3.toggle-head[role=button]{min-height:44px;touch-action:manipulation}
h3.toggle-head[role=button]:focus-visible{outline:3px solid #1686d9;outline-offset:3px}

/* Print all disclosure content, including tabs nested inside a closed toggle.
   These rules do not mutate the screen state or saved user choices. */
@media print{
  .toggle[data-toggle-ready]>.toggle-content,
  .toggle[data-toggle-ready]>.toggle-content[hidden],
  .toggle.tie-sc-close>.toggle-content,
  .tabs-wrapper.custom-tabs-enhanced>.tab-content[role=tabpanel]{
    display:block!important;float:none!important;width:100%!important;
    max-width:100%!important;max-height:none!important;overflow:visible!important;
  }
  .tabs-wrapper.custom-tabs-enhanced>.tabs[role=tablist]{display:none!important}
  .tabs-wrapper.custom-tabs-enhanced>.tab-content .tab-content-elements li{opacity:1!important}
}

/* Logical spacing follows Persian RTL and English LTR without reversing the page. */
.toggle>h3.toggle-head{text-align:start;overflow-wrap:anywhere}
.toggle>h3.toggle-head>span.fa{margin-inline-start:12px;margin-inline-end:0}
/* Programming blocks retain their own direction inside Persian articles. */
.entry-content pre,.entry-content pre code{direction:ltr;text-align:left;unicode-bidi:isolate}

/* Wrap long Persian and mixed-language titles inside the vertical tab column. */
.tabs-wrapper.tabs-vertical.custom-tabs-enhanced>.tabs[role=tablist]>li{width:100%;min-width:0;box-sizing:border-box}
.tabs-wrapper.tabs-vertical.custom-tabs-enhanced>.tabs[role=tablist] a{min-width:0;max-width:100%;box-sizing:border-box;white-space:normal;overflow-wrap:anywhere;word-break:normal;text-align:start}
/* Stack both columns on phones, including standalone extension and RTL styles. */
@media(max-width:670px){
  body .tabs-wrapper.tabs-vertical.custom-tabs-enhanced>.tabs[role=tablist],
  body .tabs-wrapper.tabs-vertical.custom-tabs-enhanced>.tab-content{width:100%;float:none;left:auto;right:auto;box-sizing:border-box}
  .tabs-wrapper.tabs-vertical.custom-tabs-enhanced:after{display:none}
}
