/* STOCKET 레이아웃 — 공통 헤더 + 글 사이드바
 * 사이트 '추가 CSS'가 #masthead · #site-navigation · #right-sidebar 를 꾸미고 있어
 * 같은 대상을 body.stl-on 으로 한 단계 더 구체적으로 지정해 덮어씁니다. */
body.stl-on{
	--stl-ink:#0e1726;--stl-text:#3b4250;--stl-muted:#667085;--stl-faint:#98a2b3;
	--stl-line:#e4e7ec;--stl-line2:#eef0f3;--stl-blue:#2563eb;--stl-blue-ink:#1d4ed8;--stl-blue-soft:#eaf1fe;--stl-blue-bg:#e6effd;
	--stl-top:0px;--stl-radius:14px;
}
body.stl-on.admin-bar{--stl-top:32px}
@media (max-width:782px){body.stl-on.admin-bar{--stl-top:46px}}
@media (max-width:600px){body.stl-on.admin-bar{--stl-top:0px}}

.stl-ico{display:block;flex:0 0 auto}
body.stl-on .screen-reader-text:focus{clip-path:none}

/* ========== 공통 헤더 ========== */
body.stl-on #masthead .inside-header{display:flex;align-items:center;flex-wrap:nowrap;gap:28px;min-height:68px;padding:0 24px}
body.stl-on #masthead .site-branding{flex:0 0 auto;margin:0}
body.stl-on #site-navigation{flex:1 1 auto;min-width:0;margin-left:0!important;float:none;background:transparent}
body.stl-on #site-navigation .inside-navigation{padding:0;justify-content:flex-start}
@media (min-width:769px){body.stl-on #site-navigation .main-nav>ul{display:flex;align-items:center;gap:4px;flex-wrap:nowrap}}
body.stl-on #site-navigation .main-nav>ul>li{float:none}
body.stl-on #site-navigation .main-nav>ul>li>a{display:flex;align-items:center;gap:8px;height:40px;line-height:40px;padding:0 14px;border-radius:10px;
	font-size:15px;font-weight:600;color:var(--stl-text);background:transparent;white-space:nowrap;transition:background .15s,color .15s}
body.stl-on #site-navigation .main-nav>ul>li>a .stl-ico{color:var(--stl-muted);transition:color .15s}
body.stl-on #site-navigation .main-nav>ul>li:hover>a,
body.stl-on #site-navigation .main-nav>ul>li>a:focus-visible{color:var(--stl-ink);background:#f4f6f9}
body.stl-on #site-navigation .main-nav>ul>li.stl-current>a{color:var(--stl-blue);background:var(--stl-blue-soft)}
body.stl-on #site-navigation .main-nav>ul>li.stl-current>a .stl-ico{color:var(--stl-blue)}
/* WordPress 기본 current 표시가 다른 항목을 파랗게 만들지 않도록: 활성 표시는 stl-current 하나만 */
body.stl-on #site-navigation .main-nav>ul>li.current-menu-item:not(.stl-current):not(:hover)>a{color:var(--stl-text);background:transparent}
body.stl-on #site-navigation a:focus-visible,body.stl-on .stl-hsearch button:focus-visible,body.stl-on .stl-side a:focus-visible,body.stl-on .stl-toc-m summary:focus-visible{outline:2px solid var(--stl-blue);outline-offset:2px}

/* 검색 */
.stl-hsearch{flex:0 0 auto;margin-left:auto;display:flex;align-items:center}
.stl-hsearch-toggle{display:none}
.stl-hsearch-form{position:relative;width:300px;margin:0}
body.stl-on .stl-hsearch-form input[type=search]{width:100%;height:42px;margin:0;padding:0 46px 0 14px;font-size:14px;line-height:42px;color:var(--stl-ink);
	background:#f7f8fa;border:1px solid var(--stl-line);border-radius:10px;box-shadow:none;transition:border-color .15s,background .15s,box-shadow .15s;-webkit-appearance:none;appearance:none}
body.stl-on .stl-hsearch-form input[type=search]::placeholder{color:var(--stl-faint)}
body.stl-on .stl-hsearch-form input[type=search]:focus{outline:none;background:#fff;border-color:var(--stl-blue);box-shadow:0 0 0 3px rgba(37,99,235,.15)}
body.stl-on .stl-hsearch-form input[type=search]::-webkit-search-cancel-button{-webkit-appearance:none}
body.stl-on .stl-hsearch-btn{position:absolute;right:4px;top:4px;width:34px;height:34px;padding:0;margin:0;display:flex;align-items:center;justify-content:center;
	border:0;border-radius:8px;background:transparent;color:var(--stl-ink);cursor:pointer;line-height:1}
body.stl-on .stl-hsearch-btn:hover{background:#eceff3;color:var(--stl-blue)}

@media (max-width:1024px) and (min-width:769px){
	body.stl-on #masthead .inside-header{gap:18px}
	body.stl-on #site-navigation .main-nav>ul>li>a{padding:0 10px;gap:6px;font-size:14px}
	.stl-hsearch-form{width:210px}
}

/* 모바일 헤더: 로고 · 검색 버튼 · 메뉴 버튼, 검색창과 메뉴는 아래로 펼침 */
@media (max-width:768px){
	body.stl-on #masthead .inside-header{flex-wrap:wrap;gap:0;min-height:60px;padding:0 16px}
	body.stl-on #masthead .site-branding{order:0;margin-right:auto;padding:16px 0}
	.stl-hsearch{order:1;margin-left:0}
	body.stl-on #mobile-menu-control-wrapper{order:2;margin-left:4px}
	body.stl-on #site-navigation{order:4;flex:1 0 100%}
	.stl-hsearch-toggle{display:flex;align-items:center;justify-content:center;width:44px;height:44px;padding:0;border:0;border-radius:10px;background:transparent;color:var(--stl-ink);cursor:pointer}
	.stl-hsearch-toggle:hover,.stl-hsearch-toggle[aria-expanded=true]{background:#f4f6f9}
	.stl-hsearch-form{display:none}
	.stl-hsearch.is-open .stl-hsearch-form{display:block;position:absolute;left:16px;right:16px;width:auto;top:calc(100% + 8px);z-index:50}
	body.stl-on #masthead{position:relative}
	.stl-hsearch.is-open{position:static}
	body.stl-on .stl-hsearch.is-open .stl-hsearch-form input[type=search]{height:48px;font-size:16px;background:#fff;box-shadow:0 12px 30px -16px rgba(14,23,38,.35)}
	body.stl-on .stl-hsearch.is-open .stl-hsearch-btn{top:7px}
	body.stl-on #mobile-menu-control-wrapper .menu-toggle{height:44px;padding:0 12px;border-radius:10px}
	/* 메뉴 열고 닫기는 테마(GeneratePress) 기본 동작 그대로. 펼쳤을 때 모양만 */
	body.stl-on #site-navigation.toggled .main-nav>ul{display:block;padding:6px 0 12px}
	body.stl-on #site-navigation.toggled .main-nav>ul>li{width:100%}
	body.stl-on #site-navigation .main-nav>ul>li>a{height:48px;line-height:48px;padding:0 14px;font-size:16px}
}

/* ========== 글 페이지 ========== */
/* 1.0.2: 접는 목차는 모든 화면에서 글 위에 보임 (디자인은 파일 맨 아래) */
.stl-toc-m{display:block}
/* 본문 링크 꾸밈(추가 CSS의 밑줄·형광 배경)이 목차에 번지지 않게 */
#stl-toc-mobile .stl-toc-list a{color:var(--stl-muted);border:0;background:none;box-shadow:none;text-decoration:none;font-weight:500}
#stl-toc-mobile .stl-toc-list a.is-on,#stl-toc-mobile .stl-toc-list a:hover{color:var(--stl-blue);font-weight:700}
#stl-toc-mobile .stl-toc-list li{margin:0;padding:0;border:0;font-size:inherit;list-style:none}

body.stl-post #right-sidebar .inside-right-sidebar>aside.widget{display:none} /* 테마 기본 위젯 대체 표시 방지 (안전장치) */
body.stl-post .entry-content :is(h2,h3)[id]{scroll-margin-top:calc(var(--stl-top) + 24px)}

body.stl-post #right-sidebar{border-left:1px solid var(--stl-line)}
body.stl-post #right-sidebar .inside-right-sidebar{height:100%;padding:40px 0 40px 28px} /* 높이를 채워야 고정(sticky)이 동작 */
.stl-side{display:flex;flex-direction:column;gap:22px}
.stl-side.is-sticky{position:sticky;top:calc(var(--stl-top) + 24px)}
body.stl-on #right-sidebar .stl-side-title{margin:0;color:var(--stl-ink);font-size:19px;font-weight:800;line-height:1.35;letter-spacing:-.02em}

/* ① 목차 */
.stl-toc{padding:0 4px}
.stl-toc .stl-side-title{margin-bottom:14px!important}
.stl-toc-list{list-style:none;margin:0;padding:0;position:relative}
.stl-toc-list li{position:relative;margin:0;padding:0}
.stl-toc-list.is-scroll{overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;padding-right:4px;-webkit-mask-image:linear-gradient(#000 calc(100% - 22px),transparent);mask-image:linear-gradient(#000 calc(100% - 22px),transparent)}
.stl-toc-list li::before{content:"";position:absolute;left:7px;top:0;bottom:0;width:1px;background:var(--stl-line)}
.stl-toc-list li:first-child::before{top:50%}
.stl-toc-list li:last-child::before{bottom:50%}
.stl-toc-list li:only-child::before{display:none}
.stl-toc-list a{position:relative;display:flex;align-items:flex-start;gap:12px;padding:7px 4px 7px 0;color:var(--stl-muted);font-size:14.5px;line-height:1.45;text-decoration:none;word-break:keep-all;overflow-wrap:anywhere;transition:color .15s}
.stl-toc-dot{position:relative;flex:0 0 15px;width:15px;height:15px;margin-top:2px;border:1.5px solid #c4cad4;border-radius:50%;background:#fff;transition:border-color .15s,background .15s,box-shadow .15s}
.stl-toc-l3 a{font-size:13.5px}
.stl-toc-l3 .stl-toc-dot{flex:0 0 9px;width:9px;height:9px;margin:4px 3px 0}
.stl-toc-l3 .stl-toc-txt{padding-left:10px}
.stl-toc-list a:hover{color:var(--stl-ink)}
.stl-toc-list a:hover .stl-toc-dot{border-color:var(--stl-blue)}
.stl-toc-list a.is-on,.stl-toc-list a[aria-current]{color:var(--stl-blue);font-weight:700}
.stl-toc-list a.is-on .stl-toc-dot,.stl-toc-list a[aria-current] .stl-toc-dot{border-color:var(--stl-blue);background:var(--stl-blue);box-shadow:0 0 0 3px #d6e4fd,inset 0 0 0 2.5px #fff}

/* ② 증시 캘린더 카드 */
body.stl-on a.stl-calcard{position:relative;display:flex;align-items:center;min-height:168px;padding:24px 22px;border-radius:var(--stl-radius);overflow:hidden;
	background:linear-gradient(135deg,#eef4ff 0%,#dfeafd 100%);border:1px solid #d7e4fb;color:var(--stl-ink);text-decoration:none;transition:box-shadow .2s,transform .2s}
body.stl-on a.stl-calcard:hover{box-shadow:0 14px 30px -18px rgba(37,99,235,.45)}
.stl-calcard-txt{position:relative;z-index:1;display:flex;flex-direction:column;align-items:flex-start}
.stl-calcard-title{font-size:21px;font-weight:800;letter-spacing:-.02em;line-height:1.3}
.stl-calcard-desc{margin-top:6px;font-size:14px;color:#334155}
.stl-calcard-btn{display:inline-flex;align-items:center;gap:6px;margin-top:16px;height:40px;padding:0 16px;border-radius:9px;background:var(--stl-blue);color:#fff;font-size:14px;font-weight:700;transition:background .15s}
body.stl-on a.stl-calcard:hover .stl-calcard-btn{background:var(--stl-blue-ink)}
.stl-cal-art{position:absolute;right:-6px;bottom:4px;width:140px;height:auto;pointer-events:none}

/* ③ 함께 읽으면 좋은 글 */
.stl-rel{padding:20px 20px 8px;border:1px solid var(--stl-line);border-radius:var(--stl-radius);background:#fff}
.stl-rel-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:12px}
body.stl-on a.stl-rel-more{display:flex;align-items:center;justify-content:center;width:32px;height:32px;margin-right:-6px;border-radius:8px;color:var(--stl-muted)}
body.stl-on a.stl-rel-more:hover{background:#f4f6f9;color:var(--stl-ink)}
.stl-rel-list{list-style:none;margin:0;padding:0}
.stl-rel-list li{margin:0;padding:0;border-top:1px solid var(--stl-line2)}
.stl-rel-list li:first-child{border-top:0}
body.stl-on a.stl-rel-item{display:flex;gap:14px;align-items:flex-start;padding:12px 0;color:var(--stl-ink);text-decoration:none}
.stl-rel-thumb{flex:0 0 88px;width:88px;height:68px;border-radius:9px;overflow:hidden;background:#eef2f7}
.stl-rel-thumb img{display:block;width:100%;height:100%;object-fit:cover;transition:transform .3s}
body.stl-on a.stl-rel-item:hover .stl-rel-thumb img{transform:scale(1.04)}
.stl-rel-ph{display:flex;align-items:center;justify-content:center;width:100%;height:100%;color:#9fb3d9;background:linear-gradient(135deg,#eef4ff,#e1eafb)}
.stl-rel-meta{display:flex;flex-direction:column;min-width:0}
.stl-rel-cat{font-size:12px;font-weight:700;color:var(--stl-blue);line-height:1.4}
.stl-rel-title{margin-top:2px;font-size:14.5px;font-weight:600;line-height:1.45;color:var(--stl-ink);word-break:keep-all;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
body.stl-on a.stl-rel-item:hover .stl-rel-title{color:var(--stl-blue)}
.stl-rel-date{margin-top:4px;font-size:12.5px;color:var(--stl-faint)}

/* 태블릿: 사이드바 폭이 좁을 때 */
@media (max-width:1024px) and (min-width:769px){
	body.stl-post #right-sidebar .inside-right-sidebar{padding-left:20px}
	.stl-cal-art{width:110px;opacity:.9}
	.stl-rel-thumb{flex-basis:72px;width:72px;height:56px}
	body.stl-on a.stl-calcard{padding:20px 18px}
}

/* 모바일: 목차는 본문 위에서 접기, 캘린더·추천 글은 본문 아래 */
@media (max-width:768px){
	.stl-toc-m{display:block;margin:0 0 28px;border:1px solid var(--stl-line);border-radius:12px;background:#fafbfc}
	.stl-toc-m summary{display:flex;align-items:center;gap:8px;min-height:50px;padding:0 16px;cursor:pointer;list-style:none;font-size:15px;font-weight:700;color:var(--stl-ink)}
	.stl-toc-m summary::-webkit-details-marker{display:none}
	.stl-toc-m summary::after{content:"";width:8px;height:8px;margin-left:auto;border-right:2px solid var(--stl-muted);border-bottom:2px solid var(--stl-muted);transform:rotate(45deg) translateY(-3px);transition:transform .2s}
	.stl-toc-m[open] summary::after{transform:rotate(225deg) translateY(-1px)}
	.stl-toc-m summary .stl-ico{color:var(--stl-blue)}
	.stl-toc-m summary small{font-size:12.5px;font-weight:600;color:var(--stl-faint)}
	.stl-toc-m nav{padding:2px 16px 12px}
	.stl-toc-m .stl-toc-list a{font-size:15px;padding:8px 0}
	.stl-toc .stl-side-title{display:none}
	body.stl-post #right-sidebar .stl-toc{display:none}
	body.stl-post #right-sidebar{border-left:0}
	body.stl-post #right-sidebar .inside-right-sidebar{height:auto;padding:8px 0 24px}
	.stl-side.is-sticky{position:static}
}

@media (prefers-reduced-motion:reduce){
	body.stl-on .stl-side *,body.stl-on #masthead *{transition:none!important}
}
@media print{.stl-hsearch,.stl-toc-m,body.stl-post #right-sidebar{display:none!important}}

/* ========== 1.0.2 글 위 목차 (기본 접힘) ========== */
#stl-toc-mobile.stl-toc-m{display:block;margin:6px 0 34px;border:1px solid rgba(91,79,224,.16);border-radius:16px;background:#fff;box-shadow:0 1px 2px rgba(30,20,80,.04),0 10px 28px rgba(60,40,140,.06);overflow:hidden}
#stl-toc-mobile summary{display:flex;align-items:center;gap:10px;min-height:56px;padding:0 20px;cursor:pointer;list-style:none;font-size:15.5px;font-weight:700;color:#16141F;-webkit-user-select:none;user-select:none;transition:background .15s}
#stl-toc-mobile summary::-webkit-details-marker{display:none}
#stl-toc-mobile summary:hover{background:rgba(91,79,224,.04)}
#stl-toc-mobile summary .stl-ico{flex:none;color:#5B4FE0}
#stl-toc-mobile summary small{display:inline-flex;align-items:center;height:22px;padding:0 9px;border-radius:999px;background:#ECE8FD;color:#5B4FE0;font-size:12px;font-weight:700;font-variant-numeric:tabular-nums}
#stl-toc-mobile summary::after{content:"";flex:none;width:8px;height:8px;margin-left:auto;border-right:2px solid #8C88A0;border-bottom:2px solid #8C88A0;transform:rotate(45deg) translateY(-2px);transition:transform .2s}
#stl-toc-mobile[open] summary::after{transform:rotate(225deg) translateY(-1px)}
#stl-toc-mobile[open] summary{border-bottom:1px solid rgba(40,30,90,.08)}
#stl-toc-mobile nav{padding:10px 14px 16px}
#stl-toc-mobile .stl-toc-list{counter-reset:stltoc;margin:0;padding:0;max-height:none}
#stl-toc-mobile .stl-toc-list li{margin:0;padding:0;list-style:none}
#stl-toc-mobile .stl-toc-list li::before,#stl-toc-mobile .stl-toc-dot{display:none}
#stl-toc-mobile .stl-toc-list a{display:flex;align-items:baseline;gap:12px;padding:9px 10px;border-radius:10px;font-size:15px;line-height:1.5;font-weight:500;color:#3A3747;text-decoration:none;border:0;background:none;box-shadow:none}
#stl-toc-mobile .stl-toc-l2{counter-increment:stltoc}
#stl-toc-mobile .stl-toc-l2 a::before{content:counter(stltoc,decimal-leading-zero);flex:none;width:24px;font:600 12.5px/1.5 "JetBrains Mono",ui-monospace,Menlo,Consolas,monospace;color:#5B4FE0;letter-spacing:.02em}
#stl-toc-mobile .stl-toc-l3 a{padding-left:46px;font-size:14px;color:#625E75}
#stl-toc-mobile .stl-toc-l3 .stl-toc-txt{padding-left:0}
#stl-toc-mobile .stl-toc-list a:hover{background:rgba(91,79,224,.06);color:#5B4FE0}
#stl-toc-mobile .stl-toc-list a.is-on{color:#5B4FE0;font-weight:700}
@media (max-width:600px){#stl-toc-mobile summary{padding:0 16px;min-height:52px}#stl-toc-mobile nav{padding:8px 8px 12px}#stl-toc-mobile .stl-toc-list a{font-size:14.5px;padding:8px}#stl-toc-mobile .stl-toc-l3 a{padding-left:42px}}
/* Redesign(.srd)의 오른쪽 목차용 !important 꾸밈이 글 위 목차에 번지지 않게 */
html body.srd #stl-toc-mobile .stl-toc-list a{display:flex!important;border-left:0!important;padding:9px 10px!important;color:#3A3747!important;background:none!important}
html body.srd #stl-toc-mobile .stl-toc-l3 a{padding-left:46px!important;color:#625E75!important}
html body.srd #stl-toc-mobile .stl-toc-l2 a::before{display:inline-block!important}
html body.srd #stl-toc-mobile .stl-toc-list a:hover{background:rgba(91,79,224,.06)!important;color:#5B4FE0!important}
html body.srd #stl-toc-mobile .stl-toc-list a.is-on{color:#5B4FE0!important;font-weight:700}
html body.srd #stl-toc-mobile .stl-toc-list a.srd-read{color:#8C88A0!important}
@media (max-width:600px){html body.srd #stl-toc-mobile .stl-toc-list a{padding:8px!important}html body.srd #stl-toc-mobile .stl-toc-l3 a{padding-left:42px!important}}
