/* Shared page width and configurable typography. Original button and home layouts are retained. */
:root{--site-width:1600px;--wp--style--global--content-size:1600px;--wp--style--global--wide-size:1600px;--h1:64px;--h2:44px;--h3:28px;--h4:24px;--h5:20px;--h6:18px;--p1:18px;--p2:16px;--p3:13px;--lh-h1:1.08;--lh-h2:1.16;--lh-h3:1.24;--lh-h4:1.1;--lh-h5:1.1;--lh-h6:1.1;--lh-p1:1.78;--lh-p2:1.65;--lh-p3:1.5}
body.tm-layout{font:var(--p2)/var(--lh-p2) var(--sans)}
body.tm-layout .container{width:min(1600px,calc(100% - 64px));max-width:1600px;margin-inline:auto}
.page-heading,.article-heading{max-width:none;width:100%;margin-inline:0}
.page-content{max-width:none;width:100%}
.page-content>*,.page-content :is(.alignwide,.alignfull,.wp-block-group.is-layout-constrained)>*{max-width:100%}
body.tm-layout :is(.page-content,.entry-content) .container{width:100%;max-width:100%;margin-inline:auto}
body.tm-layout :is(h1,h2,h3,h4,h5,h6){font-family:var(--serif);text-wrap:balance;overflow-wrap:break-word}
body.tm-layout :is(h1,.hero h1,.article-heading h1){font-size:var(--h1);line-height:var(--lh-h1)}
body.tm-layout :is(h2,.section-heading h2,.categories .section-heading h2,.newsletter-layout h2,.entry-content h2){font-size:var(--h2);line-height:var(--lh-h2)}
body.tm-layout :is(h3,.card-large .card-body h3,.card-body h3,.quick-card h3,.entry-content h3){font-size:var(--h3);line-height:var(--lh-h3)}
body.tm-layout h4{font-size:var(--h4);line-height:var(--lh-h4)}body.tm-layout h5{font-size:var(--h5);line-height:var(--lh-h5)}body.tm-layout h6{font-size:var(--h6);line-height:var(--lh-h6)}
body.tm-layout :is(.entry-content,.p1,.article-lead,.hero p){font-size:var(--p1);line-height:var(--lh-p1)}
body.tm-layout :is(.p2,.card-body p,.section-heading p,.newsletter-layout p){font-size:var(--p2);font-family:var(--sans);line-height:var(--lh-p2)}
body.tm-layout :is(.p3,.post-meta,.calendar-footnote,.source-note,figcaption){font-size:var(--p3);line-height:var(--lh-p3)}
.entry-content :is(.p2,.has-p2-font-size){font-size:var(--p2)!important;line-height:var(--lh-p2)!important}.entry-content :is(.p3,.has-p3-font-size){font-size:var(--p3)!important;line-height:var(--lh-p3)!important}
.entry-content table{display:table}.entry-content .table-scroller{overflow:auto}.entry-content :is(h2,h3,h4,h5,h6){scroll-margin-top:90px}
.entry-content>p:first-child{font-size:var(--p1)}
.entry-content .wp-block-group.is-layout-constrained>*{max-width:100%}
.button-login{width:auto}.filter-bar{flex-wrap:wrap}.filter-bar .search-field{min-width:180px;flex:1}
/* The cover spans navigation + text; the useful sidebar starts beside the cover. */
.article-layout{display:grid;grid-template-columns:300px minmax(0,1fr) 340px;grid-template-rows:auto 1fr;gap:30px;justify-content:stretch;align-items:start}
.article-cover-heading{grid-column:1/3;grid-row:1;position:relative;isolation:isolate;min-height:560px;padding:42px 44px;margin:0;display:flex;align-items:flex-end;color:#fff;border-radius:10px;overflow:hidden;background:var(--forest)}
.article-cover-heading>.article-cover-image,.article-cover-heading>.article-cover-image img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:-2}
.article-cover-heading::after{content:'';position:absolute;inset:0;background:linear-gradient(0deg,rgba(7,17,10,.93),rgba(7,17,10,.72) 52%,rgba(7,17,10,.08) 100%);z-index:-1}
.article-cover-heading .article-heading{margin:0;max-width:100%;width:100%;padding:0}
.article-cover-heading .eyebrow{color:#e3c794}.article-cover-heading h1{margin:0;max-width:100%;text-shadow:0 2px 4px #0003}
body.tm-layout .article-cover-heading .article-lead{color:#f6f3eb;font-family:var(--serif);line-height:var(--lh-p1);max-width:920px;margin:18px 0 0}
.article-toc{grid-column:1;grid-row:2;min-width:0;align-self:stretch}
.left-sidebar-inner{position:sticky;top:24px;max-height:calc(100dvh - 48px);overflow:auto;overscroll-behavior:contain;scrollbar-width:thin}
.article-toc:has(.tm-ad-slot) nav{max-height:39dvh}
.article-main{grid-column:2;grid-row:2;min-width:0;width:100%;max-width:900px}
.article-meta-row{border-bottom:1px solid var(--line);padding-bottom:20px;margin-bottom:24px;gap:10px;flex-wrap:wrap}
.article-meta-row .post-meta{font-size:var(--p3)}.article-meta-row .bookmark{width:38px;height:38px;min-width:38px}
.article-sidebar{grid-column:3;grid-row:1/3;align-self:stretch;margin-top:0}
.article-sidebar .sticky-sidebar{position:sticky;top:24px;gap:24px}
.article-sidebar,.article-sidebar .sticky-sidebar,.article-sidebar .panel,.article-sidebar .widget{min-width:0;max-width:100%;overflow-wrap:anywhere}
.article-sidebar .panel{width:100%}.article-sidebar .button{max-width:100%;white-space:normal;padding-inline:16px;text-align:center}
body.tm-layout .article-sidebar .panel :is(h2,h3,.wp-block-heading){font-size:var(--h3);line-height:var(--lh-h3)}
.article-sidebar .wp-block-search__inside-wrapper,.article-sidebar .search-form{display:flex;flex-direction:column;gap:10px;width:100%;min-width:0}
.article-sidebar .wp-block-search__input,.article-sidebar .wp-block-search__button,.article-sidebar .search-field{width:100%;min-width:0;margin:0!important}
.article-sidebar :is(ul,ol){padding-left:20px}
.article-toc .panel{padding:20px;background:var(--surface)}
.article-toc h2{font:700 20px/1.3 var(--serif)!important;margin:0 0 17px}
.article-toc nav{display:grid;gap:4px;max-height:calc(100dvh - 230px);overflow:auto;overscroll-behavior:contain}
[data-toc] a{display:block;border-left:2px solid transparent;padding:9px 10px;color:var(--muted);font:14px/1.45 var(--sans);text-decoration:none}
[data-toc] a.toc-sub{font-size:13px;padding-left:22px}
[data-toc] a[aria-current=location]{background:color-mix(in srgb,var(--accent) 12%,transparent);border-color:var(--accent);color:var(--ink)}
[data-toc] a:hover{color:var(--accent)}
.toc-progress{padding-top:18px;margin-top:12px;border-top:1px solid var(--line);font-size:12px;color:var(--muted)}
.toc-progress-track{height:3px;margin-top:9px;background:var(--line);border-radius:3px;overflow:hidden}
.toc-progress-track span{height:100%;display:block;background:var(--accent);width:0}
.toc-mobile-bar{display:none;position:sticky;top:10px;z-index:20;margin:0 0 22px}
.toc-mobile-bar .button{width:100%;justify-content:space-between;background:var(--surface)!important;color:var(--ink)!important;box-shadow:0 5px 20px #0001}
.toc-dialog{width:min(560px,calc(100% - 28px));max-height:80dvh;border:1px solid var(--line);background:var(--surface);color:var(--ink);border-radius:18px;padding:28px}
.toc-dialog::backdrop{background:#132016a8;backdrop-filter:blur(3px)}
.toc-dialog .dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:14px}
.toc-dialog h2{font-size:24px!important;margin:0}.toc-dialog nav{max-height:60dvh;overflow:auto}
.article-reading-progress{height:3px;background:var(--accent);position:fixed;top:0;left:0;z-index:110;transform-origin:left;width:100%;transform:scaleX(0);pointer-events:none}
.post-navigation-cards,.related-posts{width:100%;max-width:none}
/* Responsive ad grids are independent for each placement. */
.tm-ad-slot{min-width:0;max-width:100%;margin:32px 0;font:var(--p3)/var(--lh-p3) var(--sans);clear:both}
.tm-ad-label{font-size:11px;letter-spacing:1.2px;text-transform:uppercase;color:var(--muted);margin-bottom:9px}
.tm-ad-grid{display:grid;grid-template-columns:repeat(var(--ad-cols-desktop,1),minmax(0,1fr));gap:16px;align-items:start}
.tm-ad-banner{min-width:0;overflow:hidden;border-radius:8px;background:var(--surface)}
.tm-ad-banner a{display:block}.tm-ad-image{width:100%;height:auto;object-fit:contain;margin:0!important;border-radius:8px}
.tm-ad-banner :is(img,iframe,video){max-width:100%}.tm-ad-banner iframe{width:100%}
.article-toc .tm-ad-slot{margin:24px 0 0}.tm-ad-footer-wrap{padding:20px 0 38px}.tm-ad-footer-wrap .tm-ad-slot{margin:0}
.article-share{margin-top:34px;padding-top:28px;border-top:1px solid var(--line)}
body.tm-layout .article-main .article-share h2{font-size:var(--h3);margin-bottom:18px}.article-share .eyebrow{margin-bottom:7px}
.share-buttons{display:flex;flex-wrap:wrap;gap:10px}.share-service{gap:9px;padding:10px 17px;white-space:normal}
.share-service .icon{width:20px;height:20px}.share-status{min-height:20px;margin:12px 0 0;color:var(--muted)}
.share-copy-fallback label{display:block;font-size:13px;margin:10px 0 6px}.share-copy-fallback input{width:100%}
@media(max-width:1024px){
 body.tm-layout .container{width:min(1600px,calc(100% - 44px))}
 .article-layout{display:flex;flex-direction:column;gap:0}
 .article-cover-heading{min-height:470px;padding:32px;margin-bottom:28px;width:100%}
 .article-toc{width:100%;order:1;margin:0}.article-toc .toc-panel{display:none}
 .left-sidebar-inner{position:static;max-height:none;overflow:visible}.article-toc .tm-ad-slot{margin:0 0 25px}
 .article-main{order:2;align-self:center;max-width:900px}.toc-mobile-bar{display:block}
 .article-sidebar{order:3;width:100%;margin-top:32px}.article-sidebar .sticky-sidebar{display:grid;position:static;max-height:none;overflow:visible;grid-template-columns:repeat(2,minmax(0,1fr))}
 .tm-ad-grid{grid-template-columns:repeat(var(--ad-cols-tablet,1),minmax(0,1fr))}
}
@media(max-width:700px){
 body.tm-layout .container{width:calc(100% - 32px)}
 .article-cover-heading{min-height:420px;padding:26px 22px;border-radius:8px;margin-bottom:22px}
 body.tm-layout .article-cover-heading h1{font-size:var(--h1);line-height:var(--lh-h1)}
 body.tm-layout .article-cover-heading .article-lead{font-size:var(--p1);line-height:var(--lh-p1);margin-top:14px}
 .article-sidebar .sticky-sidebar{grid-template-columns:1fr}.toc-mobile-bar{top:8px}
 .article-meta-row .post-meta{flex:1 1 240px}.entry-content table{font-size:13px}
 .tm-ad-grid{grid-template-columns:repeat(var(--ad-cols-mobile,1),minmax(0,1fr));gap:12px}
 .tm-ad-hide-mobile{display:none}.tm-ad-footer-wrap{padding:15px 0 28px}
 .share-buttons{gap:8px}.share-service{padding:10px 13px;font-size:13px}.article-share{padding-top:22px}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.button,.icon-button{transition:none!important;animation:none!important;transform:none!important}}
@media print{.article-toc,.toc-mobile-bar,.toc-dialog,.article-reading-progress,.article-share,.tm-ad-slot,.tm-ad-footer-wrap{display:none!important}.article-layout{display:block}.article-cover-heading{min-height:300px!important;padding:25px!important;color:#fff!important;print-color-adjust:exact}.article-main{max-width:none}}
.tm-layout .header-actions .mobile-menu{display:none}.toc-mobile-bar[hidden],.toc-panel[hidden]{display:none!important}
@media(max-width:980px){.tm-layout .header-actions .mobile-menu{display:inline-flex}}
@media(max-width:700px){.tm-layout .header-actions .login-button{display:none}}
@media(max-width:360px){.header-inner{gap:6px}.header-inner .brand{gap:6px}.header-inner .brand-emblem{width:44px;height:44px}.header-inner .brand-copy strong{font-size:16px}.header-actions{gap:1px}}

.account-unread{display:inline-grid;place-items:center;min-width:20px;height:20px;padding:0 5px;background:var(--accent);color:#fff;border-radius:50px;font:700 11px/1 var(--sans)}.account-unread[hidden]{display:none!important}.mobile-account{position:relative}.mobile-account .account-unread{position:absolute;top:-2px;right:10px;min-width:16px;height:16px;font-size:9px}

/* Solid header on every page and in both colour modes. */
body.tm-layout .site-header,body.tm-layout.home .site-header,[data-theme=dark] body.tm-layout .site-header{background:var(--paper);background-image:none;border-bottom:1px solid var(--line)}
body.tm-layout.home .site-header::after{display:none}
body.tm-layout.home .header-actions,body.tm-layout.home .primary-nav>ul>li:last-child>a{color:var(--ink)}
/* Category covers keep the 4:3 box independently of the source photograph. */
body.category .archive-page .view-target .post-card .card-photo{position:relative;width:100%;height:auto;aspect-ratio:4/3;align-self:start}
body.category .archive-page .view-target .post-card .card-photo img{position:absolute;inset:0;width:100%;height:100%;min-height:0;object-fit:cover;margin:0;border-radius:0}
body.category .archive-page .view-target:not(.list-view) .post-card{container-type:inline-size}
body.category .archive-page .view-target:not(.list-view) .play-bubble{top:37.5cqw}
body.category .archive-page .view-target:not(.list-view) .duration{top:calc(75cqw - 29px)}
.header-actions .header-profile{gap:9px;padding:5px 12px;min-height:44px;max-width:220px;white-space:nowrap}
.header-profile .profile-label{max-width:135px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tm-profile-avatar{display:block;width:32px;height:32px;border-radius:50%;object-fit:cover;flex:none}
.mobile-account .tm-profile-avatar{width:24px;height:24px}.mobile-account .profile-label{display:block;max-width:67px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.article-sidebar .tm-ad-slot{margin:0}
@media(min-width:1025px){.article-sidebar .sticky-sidebar{max-height:none;overflow:visible;padding-right:0}.article-main .toc-mobile-bar{display:none}}
@media(max-width:700px){
 .home :is(.featured,.community-section,.collections-section,.gear-section,.videos-section) :is(.posts-grid,.editorial-grid,.editorial-side,.gear-grid){display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:none;grid-auto-rows:auto}
 .home :is(.featured,.videos-section) .editorial-side{margin-top:0}
 .article-sidebar .sticky-sidebar{grid-template-columns:1fr}
 .article-meta-row .post-meta{min-width:0;flex-basis:0}
}
@media print{.article-sidebar .sticky-sidebar{max-height:none;overflow:visible}}

/* 1.4: compact article navigation and fixed desktop sidebar. */
@media (min-width:1025px) and (max-width:1279px){
 .article-layout{grid-template-columns:minmax(0,1fr) 340px}
 .article-cover-heading{grid-column:1;grid-row:1}
 .article-main{grid-column:1;grid-row:2}
 .article-sidebar{grid-column:2;grid-row:1/3}
 .article-main .toc-mobile-bar{display:block}
}
@media (max-width:1279px){.article-toc{display:none}}
@media (max-width:700px){.article-main .toc-mobile-bar{display:none}}
.mobile-bottom [hidden]{display:none!important}
.hero .hero-side{top:50%;bottom:auto;transform:translateY(-50%)}
.section-heading .nature-note-custom{height:105px;min-width:0;background:none;position:absolute}
.nature-note-custom img{width:100%;height:100%;object-fit:contain;object-position:center}
.section-heading .nature-note-custom span{display:none}
/* The useful gallery participates directly in the mobile article flow. */
@media(max-width:700px){
 .article-layout>.article-cover-heading{order:0}
 .article-layout>.article-sidebar,.article-layout>.article-sidebar>.sticky-sidebar{display:contents}
 .article-layout>.article-sidebar>.sticky-sidebar>*{order:3;width:100%;margin-top:22px}
 .article-layout>.article-sidebar>.sticky-sidebar>.tm-instruction-panel{order:1;margin-top:0;margin-bottom:24px}
 .article-layout>.article-main{order:2}
 .article-layout .tm-instruction-panel{padding:20px}
}
@media(min-width:981px) and (max-width:1100px){.header-profile .profile-label{max-width:80px}}

/* Covers share one frame across Blog, archives and the two home feeds. */
.mobile-menu-close{display:none}
@media(max-width:980px){
 body.tm-menu-open{overflow:hidden}
 body.tm-layout .primary-nav.open{position:fixed;inset:0 0 74px;z-index:35;max-height:none;overflow-y:auto;overscroll-behavior:contain;padding:70px 24px 28px;background:var(--surface);border:0;border-bottom:1px solid var(--line);box-shadow:0 12px 45px #0003}
 .primary-nav.open .mobile-menu-close{display:block;position:absolute;right:24px;top:22px;font-size:14px;border:1px solid var(--line);border-radius:25px;padding:8px 15px}
}
.newsletter-section .newsletter-layout{display:grid;grid-template-columns:minmax(0,1fr);align-items:center;gap:40px}
.newsletter-section.has-feature-image .newsletter-layout{grid-template-columns:minmax(0,1.2fr) minmax(240px,.8fr)}
.newsletter-section .newsletter-copy{max-width:820px;min-width:0}.newsletter-section .newsletter-copy p{max-width:680px}
.newsletter-section .newsletter-telegram{margin-top:5px;background:#fffaf1;border-color:#fffaf1;color:#243725;white-space:normal;text-align:center}
.newsletter-section .newsletter-telegram:hover{background:#e8dbbf;border-color:#e8dbbf}
.newsletter-feature{min-width:0;max-width:100%;display:grid;place-items:center}
.newsletter-feature img{width:100%;height:auto;max-height:440px;object-fit:contain;border-radius:12px}
.newsletter-email{grid-column:1/-1;width:min(100%,680px);padding-top:20px;border-top:1px solid #ffffff35}
.newsletter-preview-note{font-size:13px!important}
@media(max-width:700px){.newsletter-section.has-feature-image .newsletter-layout{grid-template-columns:minmax(0,1fr);gap:28px}.newsletter-feature img{max-height:320px}.newsletter-section .newsletter-telegram{width:100%}}
body.tm-layout :is(.view-target,.encyclopedia-section,.fresh-section) .post-card .card-photo{position:relative;display:block;width:100%;height:auto;min-height:0;aspect-ratio:4/3;align-self:start}
body.tm-layout :is(.view-target,.encyclopedia-section,.fresh-section) .post-card .card-photo img{position:absolute;inset:0;width:100%;height:100%;min-height:0;object-fit:cover;margin:0;border-radius:0}
body.tm-layout .view-target:not(.list-view) .post-card{container-type:inline-size}
body.tm-layout .view-target:not(.list-view) .post-card .play-bubble{top:37.5cqw}
body.tm-layout .view-target:not(.list-view) .post-card .duration{top:calc(75cqw - 29px)}
/* List rows follow their contents instead of inheriting grid row heights. */
body.tm-layout .posts-grid.list-view{display:flex;flex-direction:column;gap:16px;align-items:stretch}
body.tm-layout .list-view .post-card{display:grid;grid-template-columns:240px minmax(0,1fr);align-items:start;height:auto;min-height:0;margin:0}
body.tm-layout .list-view .post-card .card-body{height:auto;min-height:0;padding:18px 20px 32px;align-self:start}
body.tm-layout .list-view .post-card .card-body h3{margin:0 0 10px}
body.tm-layout .entry-content .post-card .card-body h3 a{color:var(--ink);text-decoration:none}
body.tm-layout .list-view .post-card .play-bubble,body.tm-layout .list-view .post-card .duration{display:none}
/* A tall sidebar moves with the document and has no nested vertical viewport. */
.article-sidebar .sticky-sidebar{position:static;max-height:none;overflow:visible}
@media(max-width:700px){
 body.tm-layout .posts-grid:not(.grid-5):not(.list-view){grid-template-columns:minmax(0,1fr);grid-auto-rows:auto;align-items:start}
 body.tm-layout .list-view .post-card{grid-template-columns:104px minmax(0,1fr);height:auto;min-height:0}
 body.tm-layout .list-view .post-card .card-body{padding:12px 12px 12px}
 body.tm-layout .list-view .post-card .card-body h3{font-size:19px;line-height:1.25;margin-bottom:10px}
 body.tm-layout .list-view .post-card .card-body p{display:none}
 body.tm-layout .list-view .post-card .card-badge{display:none}
 body.tm-layout .list-view .post-card .post-meta{padding-right:30px;gap:6px;font-size:10px;min-height:24px;align-items:center}
 body.tm-layout .list-view .post-card:not(:has([data-bookmark])) .post-meta{padding-right:0}
 body.tm-layout .list-view .post-card .post-meta .author-mark{display:none}
 body.tm-layout .list-view .post-card .bookmark{right:8px;bottom:8px}
}
