
@counter-style digi-paren {
	system: extends decimal;
	suffix: ") ";
}

@counter-style alpha-paren {
	system: extends lower-alpha;
	suffix: ") ";
}

.single-main .bwrnf {
	font-size: 16px;

    q {
        quotes: "“" "”";
    }

    q::before {
    content: open-quote;
    }

    q::after {
    content: close-quote;
    }

	.bwrnfIntro {
		margin: 0 auto;
		padding: 1rem 1rem 0;

		p {
			line-height: 1.4;
		}
	}

	.bwrnfContainer {
		display: grid;
		grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
		padding: 0 1rem 1rem 0;
	}

	.content-wrap {
		padding: 1rem 0.5rem 1rem 1rem;
		line-height: 1.5
	}
	a {
		color: #003B60;
		text-decoration: underline;
		text-decoration-style: dotted;
		text-underline-offset: 3px;
		text-decoration-thickness: 1px;
	}

	p, ul li {
		line-height: 1.5;
	}

	h2.wp-block-heading {
		font-size: 1.2rem;
	}

	.toc {
		position: sticky;
		top: 0;
		max-height: 100vh;
		overflow-y: auto;
		padding: 1rem 1rem 2rem 0;
        transition: top 0.3s;
	}
	.toc li {
		margin-bottom: 0.8rem;
		line-height: 1.3;
	}

	.toc li a.active {
		background-color: #a9dcd959;
	}

    .toc > li:last-child {
        padding-bottom: 2rem;
    }

	.heading {
		font-weight: bold;
	}
	
	ol.wp-block-list.top-list {
		margin-bottom: 3rem;
		padding-left: 2.4rem;
		list-style: upper-roman;
		line-height: 1.2;

        > li { 
            list-style: upper-roman; 
        }

		> li > .heading {
			font-size: 1.5rem;
		}
	}
	.sections-list {
		padding-left: 2rem;
		
		::marker {
			font-size: 1.5rem;
            font-weight: bold;
		}
	}

	.sub-list-l1 {
		list-style-type: upper-alpha;
        margin: 1rem 0;

        > li {
            list-style-type: upper-alpha;
        }
		
		::marker, li > .heading {
			font-size: 1.2rem;
			font-weight: bold;
		}

        > li > p:first-of-type {
            margin-top: 1rem;
        }
	}

    .sub-list-l2 {
        margin: 1rem 0;
        padding-left: 1.5rem;
        list-style: decimal;

        > li > p:first-of-type {
            margin-top: 1rem;
        }

        ::marker {
            font-size: 1.2rem;
            font-weight: bold;
        }

        &.normal {
            ::marker {
                font-size: inherit;
            }
        }
    }

	.sub-list-l3 {
		list-style-type: lower-alpha;
        margin: 1rem 0;
        padding-left: 2rem;

        > li {
            list-style-type: lower-alpha;
        }

        > li > p:first-of-type {
            margin-top: 1rem;
        }

		::marker {
			font-size: 1.2rem;
			font-weight: bold;
		}

        &.normal {
            ::marker {
                font-size: inherit;
                font-weight: normal;
            }
        }
	}

    .sub-list-l4 {
		list-style: decimal;
        list-style: digi-paren;
        margin: 1rem 0;
        padding-left: 2rem;

        > li {
            list-style: decimal;
            list-style: digi-paren;
            margin-bottom: 1rem;
        }

        ::marker {
            font-size: inherit;
            font-weight: normal;
        }
    }

    .sub-list-l5 {
		list-style: lower-alpha;
        list-style: alpha-paren;
        margin: 1rem 0;
        padding-left: 2rem;

        > li {
            list-style: lower-alpha;
            list-style: alpha-paren;
            margin-bottom: 1rem;
        }

        ::marker {
            font-size: 1rem;
            font-weight: normal;
        }
    }

    .sub-list-l6 {
        margin: 1rem 0;
        padding-left: 2rem;
        list-style: decimal;

        ::marker {
            font-size: 1rem;
            font-weight: normal;
        }

        li {
            margin-bottom: 1rem;
        }
    }

	.toc .sub-list-l1, .toc .sub-list-l2, .toc .sub-list-l3 {
        margin-top: 1rem;

		::marker {
			font-size: inherit;
			font-weight: normal;
		}
	}
	
	sup a {
		padding: 0.25rem 0.4rem 0.2rem 0.3rem;
	}
	
	.footnotes {
		font-size: 0.8rem;
        padding: 2rem;
        margin-bottom: 2rem;
        border-bottom: 1px dashed #003B60;

		p a {
			overflow-wrap: break-word;
		}

		sup {
			font-weight: bold;
            margin-right: 0.25rem;
		}
	}

	.content-wrap .bookmark {
		scroll-margin-top: 0.25rem;
	}

	#returnButton {
		position: fixed;
		right: 0;
		top: 0;
		z-index: 110;
		width: 3rem;
		height: 3rem;
		text-indent: 200%;
		white-space: nowrap;
		overflow: hidden;
		background-color: #fff;
		background-image: url(/wp-content/uploads/2026/05/return.svg);
		background-size: 90%;
		background-repeat: no-repeat;
		background-position: center;
		border: 1px solid #003B60;
		cursor: pointer;
		visibility: hidden;
		opacity: 0;
		transition: opacity 0.5s;

		&.showing {
			visibility: visible;
			opacity: 0.9;
			transition: opacity 0.5s;
		}
	}

	.drop-toc {
		display: none;
		position: fixed;
		top: -1px;
		z-index: 99;
		width: 100%;
		text-align: center;
		transform: translateY(-100%);
		transition: transform 0.4s, top 0.1s;

		#dropToc {
			background-color: #a9dcd9ee;
			border: 1px solid #003b60;
			border-top: none;
			border-radius: 0 0 1rem 1rem;
			padding: 0.4rem 1rem;
			font-weight: bold;
		}
	}

	#contentBreak {
		height: 1rem;
	}

	@media (max-width:800px) {

		.content-wrap .bookmark, .content-wrap .body-link {
			scroll-margin-top: calc(130px + env(safe-area-inset-top));
		}
		
		.bwrnfContainer {
			display: block;
			padding: 0 0 1rem 0;
		}

		.content-wrap {
			width: calc(100vw - 1rem);
            padding: 1rem 0.5rem 1rem 0.5rem;

			p, ul li {
				line-height: 1.5;
			}
		}

		.sections-list, ol.wp-block-list.top-list {
			padding-left: 0;
		
			> ::marker {
				font-size: 1.3rem;
			}

            li {
                list-style-position: inside;
            }
		}

        ol.wp-block-list.top-list {
            padding-left: 0;
        }

		.sub-list-l4, .sub-list-l5, .sub-list-l6 {

			::marker {
				font-size: 1rem;
				font-weight: bold;
			}
		}

		.sub-list-l1, .sub-list-l2, .sub-list-l3, .sub-list-l4, .sub-list-l5, .sub-list-l6 {
			padding-left: 1rem;

            li {
                list-style-position: inside;
            }
		}

		ul {
			padding-left: 1rem;
		}

		.footnotes {
			padding: 2rem 0rem 2rem 0;
		}

		.drop-toc {
			display: block;

			&.showing {
				transform: translateY(0);
				transition: transform 0.4s, top 0.4s;
			}
		}

		.toc {
			position: fixed;
			background-color: #fff;
			padding: 1rem 1rem 0 0;
			transform: translateY(-100%);
			transition: transform 0.5s;

			&.showing {
				transform: translateY(0);
				transition: transform 0.5s;
			}
		}
		
		.top-list {

			::marker {
				display: inline-block;
				vertical-align: top;
			}
		}
	}
	
	@media (hover:hover) {	
		a:hover {
			text-decoration-style: solid;
			text-decoration-thickness: 2px;
		}
		sup a:hover {	
			text-decoration: none;
			outline: 1px solid #003B60;
			outline-offset: -2px;
		}

		#returnButton:hover {
			background-color: #F47E52;
		}
	}
}