/* ALG byline + "Legally Reviewed By" box (Sept 2026). Loaded by inc/alg-byline.php */
.alg-byline,.alg-reviewed{--alg-navy:#222766;--alg-gold:#C5A867;clear:both;float:none;width:100%!important;max-width:100%;box-sizing:border-box;text-align:left!important}

/* Byline */
.alg-byline{display:block!important;margin:0 0 40px!important;padding:40px 0 34px!important;border-bottom:1px solid #dcdcdc}
.alg-byline__row{position:relative!important;display:block!important;min-height:76px;padding:12px 230px 0 96px!important;box-sizing:border-box}
.alg-byline__badge{position:absolute!important;left:0;top:0;width:76px;height:76px;border-radius:50%;background:var(--alg-navy);display:flex!important;align-items:center;justify-content:center;margin:0!important}
.alg-byline__badge svg{width:52px!important;height:35px!important;display:block}
.alg-byline__text{display:block!important;width:auto!important;margin:0!important;float:none!important}
.alg-byline__text p{margin:0!important;padding:0!important;width:auto!important;text-align:left!important;line-height:1.4!important}
.alg-byline__by{font-size:18px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:var(--alg-navy)}
.alg-byline__by a{color:var(--alg-navy)!important;text-decoration:underline;text-underline-offset:3px}
.alg-byline__sub{font-size:15px;margin-top:8px!important}
.alg-byline__sub a{color:var(--alg-navy)!important;opacity:.75;text-decoration:none}
.alg-byline__sub a:hover{opacity:1;text-decoration:underline}
.alg-byline__trust{position:absolute!important;right:0;top:50%;transform:translateY(-50%);display:flex!important;align-items:center;gap:10px;font-size:15px;letter-spacing:.04em;text-transform:uppercase;color:var(--alg-navy);white-space:nowrap;margin:0!important}
.alg-byline__trust svg{width:32px!important;height:32px!important;color:var(--alg-gold);flex-shrink:0}
.alg-byline .alg-byline__trust svg{color:var(--alg-navy)!important}
.alg-reviewed .alg-reviewed__trust{color:#9C7C33!important;font-weight:600}
.alg-reviewed .alg-reviewed__trust svg{color:var(--alg-gold)!important}
.alg-byline__filed{display:block!important;margin:26px 0 0!important;padding:0!important;font-size:16px;line-height:1.3!important;text-align:left!important}
.alg-byline__filed a{display:inline-block!important;float:none!important;width:auto!important;margin:0 0 0 10px!important;vertical-align:middle;padding:7px 16px;border-radius:999px;background:#EEF0F7;border:1px solid #D5D8E8;color:var(--alg-navy)!important;text-decoration:none!important;font-weight:600;font-size:15px;line-height:1.3}
.alg-byline__filed a:hover{background:var(--alg-navy);color:#fff!important}

/* Reviewer box */
.alg-reviewed{border-top:2px solid var(--alg-gold);border-bottom:2px solid var(--alg-gold);padding:28px 0;margin:36px 0!important}
.alg-reviewed__head{display:flex!important;align-items:center;justify-content:space-between;gap:16px;margin:0 0 18px}
.alg-reviewed__label{font-family:Georgia,'Times New Roman',serif;font-size:1.8em;color:var(--alg-navy);margin:0!important}
.alg-reviewed__trust{position:static!important;transform:none}
.alg-reviewed__row{display:grid!important;grid-template-columns:112px 1fr;column-gap:24px;align-items:start}
.alg-reviewed__row > div{margin:0!important;width:100%!important;min-width:0}
.alg-reviewed__photo,.alg-reviewed__initials{width:112px!important;height:112px!important;border-radius:50%;border:5px solid var(--alg-navy);box-sizing:border-box;margin:0!important}
.alg-reviewed__photo{object-fit:cover;object-position:center 20%}
.alg-reviewed__initials{display:flex!important;align-items:center;justify-content:center;background:var(--alg-navy);color:#fff;font-family:Georgia,'Times New Roman',serif;font-size:36px;letter-spacing:.04em}
.alg-reviewed__row p{text-align:left!important}
.alg-reviewed__name{margin:8px 0 4px!important;font-weight:700;font-size:20px!important;line-height:1.3!important}
.alg-reviewed__name a{color:var(--alg-navy)!important;font-size:inherit!important;font-weight:700!important;text-decoration:underline;text-underline-offset:3px}
.alg-reviewed__title{margin:0 0 6px!important;font-style:italic}
.alg-reviewed__date{margin:0 0 12px!important;font-size:14px;opacity:.8}
.alg-reviewed__bio summary{list-style:none;cursor:pointer;display:inline-flex!important;align-items:center;gap:8px;color:var(--alg-navy);text-transform:uppercase;font-weight:600;font-size:16px!important;letter-spacing:.04em;margin-top:8px}
.alg-reviewed__bio summary::-webkit-details-marker{display:none}
.alg-reviewed__bio summary::after{content:"";width:8px;height:8px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg);margin-top:-4px;transition:transform .2s}
.alg-reviewed__bio[open] summary::after{transform:rotate(-135deg);margin-top:4px}
.alg-reviewed__bio[open] summary{margin-bottom:14px!important}
.alg-reviewed__more{text-align:right!important}
.alg-reviewed__more a{color:var(--alg-navy)!important;text-decoration:underline}

/* Table of Contents (phones only) */
.alg-toc{display:none!important}
.inner-pages h2[id],.inner-pages h3[id]{scroll-margin-top:120px}

/* Phones */
@media (max-width:767px){
	/* Byline: cleaner, no Trusted Content here (it moves into the reviewer box) */
	.alg-byline{padding:28px 0 26px!important;margin:0 0 28px!important}
	.alg-byline__row{padding:12px 0 0 80px!important;min-height:64px}
	.alg-byline__badge{width:64px!important;height:64px!important}
	.alg-byline__badge svg{width:44px!important;height:30px!important}
	.alg-byline__by{font-size:15px}
	.alg-byline__sub{font-size:14px}
	.alg-byline .alg-byline__trust{display:none!important}
	.alg-reviewed__trust{display:flex!important}
	.alg-byline__filed{margin-top:20px!important}

	/* Table of Contents */
	.alg-toc{display:block!important;margin:0 0 32px!important;padding:0!important}
	.alg-toc summary{list-style:none;cursor:pointer;display:flex;justify-content:space-between;align-items:center;font-family:Georgia,'Times New Roman',serif;font-size:1.75em;line-height:1.2;color:var(--alg-navy,#222766);padding:0 0 10px;border-bottom:1px solid #222766}
	.alg-toc summary::-webkit-details-marker{display:none}
	.alg-toc summary::after{content:"";width:10px;height:10px;border-right:2px solid #222766;border-bottom:2px solid #222766;transform:rotate(45deg);margin:0 6px 6px 0;transition:transform .2s}
	.alg-toc[open] summary::after{transform:rotate(-135deg);margin-bottom:0}
	.alg-toc ol{list-style:none!important;margin:18px 0 0!important;padding:0 0 0 16px!important;border-left:2px solid #222766}
	.alg-toc ol ol{border-left:0;margin:4px 0 4px!important;padding-left:22px!important}
	.alg-toc li{margin:0!important;padding:0!important;list-style:none!important}
	.alg-toc li::before{display:none!important}
	.alg-toc a{display:block;padding:7px 0;font-weight:600;font-size:16px;line-height:1.35;color:#1a1a1a!important;text-decoration:none!important}
	.alg-toc a:hover{color:#222766!important;text-decoration:underline!important}

	/* Reviewer box: centered stack */
	.alg-reviewed{border-top:2px solid var(--alg-gold)!important;text-align:center!important;padding:26px 0!important}
	.alg-reviewed__head{flex-direction:column-reverse;align-items:center;gap:10px;margin-bottom:20px}
	.alg-reviewed__label{font-size:1.6em;text-align:center!important}
	.alg-reviewed__row{grid-template-columns:1fr;justify-items:center;row-gap:14px}
	.alg-reviewed__photo,.alg-reviewed__initials{width:120px!important;height:120px!important}
	.alg-reviewed__row p,.alg-reviewed__more{text-align:center!important}
	.alg-reviewed__bio summary{display:inline-block}
	.alg-reviewed__bio p:not(.alg-reviewed__more){text-align:left!important}
}

/* Spacing under byline name (beats .alg-byline__text p margin reset) */
.alg-byline__text .alg-byline__sub{margin-top:10px!important}

/* Phones: scrollable Table of Contents (scrollbar on the left, fade hints more items) */
@media (max-width:767px){
    .alg-toc > ol{max-height:300px;overflow-y:auto;-webkit-overflow-scrolling:touch;direction:rtl;border-left:0!important;padding:0 0 28px 16px!important;scrollbar-width:thin;scrollbar-color:#222766 #D5D8E8;-webkit-mask-image:linear-gradient(to bottom,#000 82%,transparent);mask-image:linear-gradient(to bottom,#000 82%,transparent)}
    .alg-toc > ol > li{direction:ltr}
    .alg-toc > ol::-webkit-scrollbar{width:4px}
    .alg-toc > ol::-webkit-scrollbar-track{background:#D5D8E8;border-radius:4px}
    .alg-toc > ol::-webkit-scrollbar-thumb{background:#222766;border-radius:4px}
}

/* Topic row: label and pill aligned, closer together */
.alg-byline__filed{display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:8px}
.alg-byline__filed a{margin:0!important}

/* Phones: always-visible TOC scrollbar (custom track + thumb; JS wraps the list) */
@media (max-width:767px){
    .alg-toc__wrap{position:relative;margin-top:18px}
    .alg-toc__wrap .alg-toc__list{max-height:300px;overflow-y:auto;-webkit-overflow-scrolling:touch;margin:0!important;padding:0 0 28px 20px!important;border-left:0!important;direction:ltr;scrollbar-width:none}
    .alg-toc__wrap .alg-toc__list::-webkit-scrollbar{display:none}
    .alg-toc__wrap::before{content:"";position:absolute;left:0;top:0;bottom:0;width:5px;border-radius:5px;background:#D5D8E8}
    .alg-toc__thumb{position:absolute;left:0;top:0;width:5px;height:100%;border-radius:5px;background:#222766;pointer-events:none}
    .alg-toc__wrap.is-scroll .alg-toc__list{-webkit-mask-image:linear-gradient(to bottom,#000 82%,transparent);mask-image:linear-gradient(to bottom,#000 82%,transparent)}
    .alg-toc__wrap.is-scroll.at-end .alg-toc__list{-webkit-mask-image:none;mask-image:none}
}