/* LanhDao Directory v1.0.9 — Layout layer for archives, single & taxonomy pages.
 * Deliberately scoped: does not change the homepage. */
:root{--ld-sidebar:278px;--ld-font:'Inter',Arial,sans-serif}
.ld-directory-shell{width:min(1250px,calc(100% - 32px));min-height:calc(100vh - var(--ld-nav-h));margin:0 auto;display:grid;grid-template-columns:minmax(0,1fr) var(--ld-sidebar);gap:27px;align-items:start;background:#fff}
.ld-directory-shell>.sidebar{grid-column:2;grid-row:1;min-width:0;position:static;align-self:start;margin:26px 0 50px;padding:19px 16px 22px;border:1px solid #e1e7ef;border-radius:14px;background:#f8fafc}
.ld-directory-shell>.main{grid-column:1;grid-row:1;min-width:0;padding:28px 0 68px;background:#fff}
.ld-directory-main>.ld-breadcrumb{margin:0 0 17px}
.ld-directory-main .page-header-card{padding:26px 28px;margin-bottom:19px;box-shadow:none;background:#fff}
.ld-directory-main .page-header-card h1{font-size:clamp(27px,3vw,37px);font-weight:700;line-height:1.2;overflow-wrap:anywhere}
.ld-directory-main .page-header-card .ld-eyebrow,.ld-single-kicker{display:block;margin-bottom:8px;font-size:11px;font-weight:700;letter-spacing:.08em;color:#526b87;text-transform:uppercase}
.ld-archive-description,.ld-archive-description p{font-size:13px;line-height:1.75;color:#617187;margin:0 0 14px}
.ld-archive-description a{color:#204d7b;text-decoration:underline}
.ld-directory-main .ld-search-form{margin-top:16px}
.ld-directory-main .ld-search-form input{font-size:13px!important}
.ld-directory-main .archive-toolbar{gap:10px;margin-bottom:15px}
.ld-directory-main .toolbar-meta{font-size:12px;color:#596b80}.ld-directory-main .toolbar-meta strong{font-size:15px;color:#132c4b}
.ld-toolbar-note{font-size:11px;color:#8794a4}
.ld-directory-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:stretch}
.ld-directory-grid>*{min-width:0}
.ld-grid-type-ld_leader,.ld-grid-type-ld_ranking{grid-template-columns:minmax(0,1fr)}
.ld-grid-type-ld_historical,.ld-grid-type-ld_quote{grid-template-columns:repeat(3,minmax(0,1fr))}
.ld-directory-grid>.leader-row,.ld-directory-grid>.ld-ranking-card{grid-column:1/-1}
.ld-directory-grid .ld-card-title{font-size:16px;margin:0 0 6px;line-height:1.4;overflow-wrap:anywhere}
.ld-directory-grid .ld-card-excerpt{font-size:12px;line-height:1.65}
.ld-directory-grid .ld-card-post{grid-template-columns:118px minmax(0,1fr);min-height:140px}
.ld-directory-grid .ld-post-thumb{width:118px;height:100%;min-height:140px}
.ld-directory-grid .ld-post-body{min-width:0;padding:16px}
.ld-directory-grid .ld-post-thumb img{height:100%;width:100%;object-fit:cover}
.ld-directory-grid .ld-post-body .ld-readmore{font-size:11px}
.ld-directory-grid .no-results-card{grid-column:1/-1}
.ld-directory-grid .ld-card-fallback{padding:22px}
.ld-directory-grid .ld-card-fallback h2{font-size:17px;margin:0 0 10px}
.ld-directory-main .ld-pagination{display:flex;flex-wrap:wrap;gap:5px;margin-top:27px}
.ld-directory-main .ld-pagination .page-numbers{margin:0}
.ld-directory-shell .sidebar .sb-h{padding:0 8px 10px;font-size:11px;color:#617288}
.ld-directory-shell .sidebar .sb-menu li a{font-size:12px;line-height:1.45;min-width:0}
.ld-directory-shell .sidebar .sb-menu .cnt{flex:0 0 auto}
.ld-directory-shell .sidebar .sb-menu li a .ico{flex:0 0 22px}
.ld-directory-shell .sidebar .sb-ft{font-size:12px}
.ld-directory-shell .sidebar .chk-list li label{font-size:12px;line-height:1.45}
.ld-directory-shell .sidebar .sb-apply{font-size:12px}
.ld-directory-shell .ld-filter-close{display:none}
/* Single pages: content left, factual sidebar right. */
.ld-single-shell .single-card{width:100%;max-width:none;min-width:0}
.ld-single-shell .single-header{grid-template-columns:92px minmax(0,1fr);gap:20px;margin-bottom:18px;align-items:start;padding:27px;box-shadow:none}
.ld-single-shell .single-header h1{font-size:clamp(27px,3.5vw,39px);font-weight:700;overflow-wrap:anywhere}
.ld-single-shell .single-avatar{width:92px;height:92px;border:1px solid #dce5ed;border-radius:13px}
.ld-single-shell .single-header-main{min-width:0}
.ld-single-shell .single-header .ld-badges{margin-top:15px}
.ld-single-shell .single-content,.ld-single-shell .single-section,.ld-single-shell .related-block{padding:27px;margin-bottom:18px;box-shadow:none}
.ld-single-shell .single-content{font-size:15px;line-height:1.85;overflow-wrap:anywhere}
.ld-single-shell .single-content>:first-child{margin-top:0}
.ld-single-shell .single-content>:last-child{margin-bottom:0}
.ld-single-shell .single-content p{margin:0 0 1.2em}
.ld-single-shell .single-content h2{font-size:clamp(22px,2.5vw,28px);margin:1.55em 0 .65em}
.ld-single-shell .single-content h3{font-size:clamp(18px,2.1vw,23px);margin:1.4em 0 .6em}
.ld-single-shell .single-content h4{font-size:18px;margin:1.25em 0 .55em}
.ld-single-shell .single-content ul,.ld-single-shell .single-content ol{padding-left:1.5em;margin-bottom:1.3em}
.ld-single-shell .single-content li{margin-bottom:.3em}
.ld-single-shell .single-content img{max-width:100%;height:auto}
.ld-single-shell .single-content figure{max-width:100%;margin:1.5em auto}
.ld-single-shell .single-content figcaption{text-align:center;font-size:12px;color:#758397;margin-top:8px}
.ld-single-shell .single-content blockquote{margin:1.5em 0;padding:16px 20px;border-left:3px solid #285e93;background:#f6f9fc;color:#344d68}
.ld-single-shell .single-content pre,.ld-single-shell .single-content code{overflow-wrap:anywhere;white-space:pre-wrap}
.ld-single-shell .single-content iframe,.ld-single-shell .single-content video,.ld-single-shell .single-content embed{max-width:100%}
.ld-single-shell .single-content table,.ld-single-shell .ld-ranking-table{width:100%;border-collapse:collapse}
.ld-single-shell .single-content table{display:block;overflow-x:auto}
.ld-single-shell .single-content th,.ld-single-shell .single-content td{padding:10px;border:1px solid #dfe6ed;vertical-align:top}
.ld-single-shell .single-content .wp-block-image,.ld-single-shell .single-content .wp-block-columns,.ld-single-shell .single-content .wp-block-gallery{max-width:100%}
.ld-single-shell .single-content .wp-block-columns{flex-wrap:wrap}
.ld-single-shell .single-content .alignwide,.ld-single-shell .single-content .alignfull{max-width:100%;width:100%;margin-left:0;margin-right:0}
.ld-single-shell .single-content .wp-block-embed__wrapper{max-width:100%}
.ld-single-shell .single-content .wp-block-embed__wrapper iframe{aspect-ratio:16/9;width:100%;height:auto}
.ld-single-shell .ld-single-type-post .single-header{grid-template-columns:1fr}
.ld-single-featured{margin:0 0 18px;overflow:hidden;border-radius:13px;aspect-ratio:16/9;background:#eef2f7}
.ld-single-featured img{display:block;width:100%;height:100%;object-fit:cover}
.ld-single-byline,.ld-single-facts{display:flex;align-items:center;flex-wrap:wrap;gap:8px 14px;margin-top:14px;color:#65758a;font-size:12px}
.ld-single-byline a{color:#214c78;font-weight:600}
.ld-fact{display:inline-flex;gap:7px;align-items:center;max-width:100%;min-width:0;overflow-wrap:anywhere}
.ld-fact>span{flex:0 0 auto;color:#315d87}
.ld-single-sidebar .ld-single-sidebar-label{padding:0 2px 10px;font-size:11px;font-weight:700;letter-spacing:.08em;color:#7a8899}
.ld-single-sidebar-card{padding:18px;background:#fff;border:1px solid #e1e7ef;border-radius:12px}
.ld-side-heading{font-size:16px;color:var(--ld-navy);font-weight:700;margin-bottom:10px}
.ld-side-attribute{display:grid;gap:3px;padding:11px 0;border-bottom:1px solid #e9edf2}
.ld-side-attribute span{font-size:11px;color:#78889a}
.ld-side-attribute strong{font-size:12px;line-height:1.5;color:#263f5c;font-weight:600;overflow-wrap:anywhere}
.ld-side-back{display:block;margin-top:16px;color:#174c80;font-size:12px;font-weight:650}
.ld-single-side-contact{margin-top:16px}
.ld-single-shell .single-gallery{grid-template-columns:repeat(3,minmax(0,1fr))}
.ld-single-shell .gallery-item{aspect-ratio:4/3}
.ld-single-shell .gallery-item img{width:100%;height:100%;object-fit:cover}
.ld-single-shell .ld-related-wrap{border:1px solid #e1e7ee;border-radius:14px;padding:24px;margin:22px 0;background:#fff}
.ld-single-shell .ld-related-wrap .ld-grid-2,.ld-single-shell .related-list-2col{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.ld-single-shell .ld-related-wrap .ld-card-related{grid-template-columns:95px minmax(0,1fr);min-width:0}
.ld-single-shell .ld-related-wrap .ld-related-thumb{width:95px;height:100%;min-height:110px}
.ld-single-shell .ld-related-wrap .ld-related-thumb img{height:100%;width:100%;object-fit:cover}
.ld-single-shell .ld-related-wrap .ld-related-body{min-width:0}
.ld-single-shell .ld-related-wrap .ld-card-title{font-size:14px;line-height:1.4}
.ld-single-shell .related-block .ld-card-post{grid-template-columns:100px minmax(0,1fr)}
.ld-single-shell .related-block .ld-post-thumb{width:100px;height:100%;min-height:110px}
.ld-single-shell .related-block .ld-post-body{padding:12px;min-width:0}
.ld-single-shell .related-block .ld-card-title{font-size:14px}
.ld-single-shell .related-block .ld-post-thumb img{width:100%;height:100%;object-fit:cover}
.ld-single-shell .ld-table-scroll{max-width:100%;overflow-x:auto}
.ld-ranking-table{font-size:13px}
.ld-ranking-table thead{background:#f2f6fa}
.ld-ranking-table tr:nth-child(even){background:#fafcfe}
.ld-ranking-table th,.ld-ranking-table td{padding:12px 14px;border-bottom:1px solid #e0e7ee;text-align:left;vertical-align:top}
.ld-ranking-table th{font-weight:650;color:#173d66}
.ld-ranking-table td:first-child{width:70px;font-weight:700;color:#174b7c}
.ld-single-shell .price-row{flex-wrap:wrap}
@media(max-width:1110px){
  .ld-directory-shell{gap:18px;--ld-sidebar:240px}
  .ld-grid-type-ld_historical,.ld-grid-type-ld_quote{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:900px){
  .ld-directory-shell{display:block;width:min(100% - 28px,780px);margin:0 auto}
  .ld-directory-shell>.main{padding:20px 0 54px}
  .ld-directory-shell>.sidebar{display:none;grid-column:auto;grid-row:auto}
  .ld-directory-archive>.sidebar{position:fixed;display:block;left:0;top:0;bottom:0;z-index:1300;width:min(340px,87vw);height:100dvh;overflow-y:auto;transform:translateX(-110%);visibility:hidden;transition:transform .2s ease,visibility .2s ease;margin:0;padding:22px 18px 38px;border-radius:0;box-shadow:16px 0 45px rgba(11,35,66,.15)}
  body.ld-filter-open .ld-directory-archive>.sidebar{transform:translateX(0);visibility:visible}
  body.ld-filter-open{overflow:hidden}
  body.ld-filter-open::after{content:'';position:fixed;inset:0;z-index:1200;background:rgba(13,31,55,.35);display:block!important;pointer-events:none}
  .ld-directory-archive .ld-filter-close{display:block!important;margin:0 0 15px auto;width:34px;height:34px;border:1px solid #dde5ed;border-radius:8px;background:#fff;font-size:20px;color:#40556c}
  .ld-directory-archive .archive-filter-toggle{display:inline-flex}
  .ld-single-shell>.ld-single-sidebar{display:block;position:static;margin:0 0 25px;padding:0;border:0;background:#fff}
  .ld-single-shell>.ld-single-sidebar .ld-single-side-contact{display:none}
  .ld-single-shell{display:flex;flex-direction:column}
  .ld-single-shell>.main{order:1}
  .ld-single-shell>.ld-single-sidebar{order:2}
  .ld-single-shell .single-header{padding:22px}
}
@media(max-width:640px){
  .ld-directory-grid,.ld-grid-type-ld_historical,.ld-grid-type-ld_quote{grid-template-columns:1fr}
  .ld-directory-main .page-header-card{padding:20px}
  .ld-directory-main .page-header-card h1{font-size:27px}
  .ld-toolbar-note{display:none}
  .ld-directory-grid .ld-card-post{grid-template-columns:100px minmax(0,1fr)}
  .ld-directory-grid .ld-post-thumb{width:100px;min-height:124px}
  .ld-directory-grid .ld-post-body{padding:11px}
  .ld-directory-grid .ld-card-title{font-size:14px}
  .ld-directory-grid .ld-card-excerpt{font-size:11px}
  .ld-single-shell .single-header{grid-template-columns:68px minmax(0,1fr);gap:14px;padding:18px}
  .ld-single-shell .single-avatar{width:68px;height:68px}
  .ld-single-shell .single-header h1{font-size:25px}
  .ld-single-shell .single-content,.ld-single-shell .single-section,.ld-single-shell .related-block{padding:19px}
  .ld-single-shell .single-content{font-size:14px}
  .ld-single-shell .ld-related-wrap .ld-grid-2,.ld-single-shell .related-list-2col{grid-template-columns:1fr}
  .ld-single-shell .ld-related-wrap{padding:17px}
  .ld-single-shell .single-gallery{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:370px){
  .ld-single-shell .single-header{grid-template-columns:1fr}
  .ld-directory-grid .ld-card-post{grid-template-columns:90px minmax(0,1fr)}
  .ld-directory-grid .ld-post-thumb{width:90px}
  .ld-directory-shell{width:calc(100% - 20px)}
}
