/* Townnews layout (single system).
   Outer box: 88% of the viewport, centred (94% under 992px).
   Inner grid: TownPress column pattern, 25% sidebars with 15px gutters, main column takes the rest.
   Under 992px the columns stack: main, then left sidebar, then right sidebar.
   Sidebars are sticky on desktop (no inner scrolling). Colours come from the --tn-* tokens, so light and dark both follow the switch. */

/* ---- Outer box ---- */
.tn-layout{display:block;width:88%;max-width:none;margin:0 auto;padding:0;box-sizing:border-box}
@media (max-width:991px){.tn-layout{width:94%}}

/* ---- Inner grid ---- */
.tn-layout__grid{display:grid;grid-template-columns:minmax(0,1fr);grid-template-areas:"main";gap:0;margin:0 -15px;align-items:start;box-sizing:border-box}
.tn-layout__grid.has-left{grid-template-columns:25% minmax(0,1fr);grid-template-areas:"left main"}
.tn-layout__grid.has-right{grid-template-columns:minmax(0,1fr) 25%;grid-template-areas:"main right"}
.tn-layout__grid.has-left.has-right{grid-template-columns:25% minmax(0,1fr) 25%;grid-template-areas:"left main right"}
.tn-layout__grid>*{padding:0 15px;box-sizing:border-box;min-width:0}
.tn-layout__main{grid-area:main}
.tn-layout__left{grid-area:left}
.tn-layout__right{grid-area:right}
@media (min-width:992px){
	.tn-layout__left,.tn-layout__right{position:sticky;top:104px;align-self:start}
}
@media (max-width:991px){
	.tn-layout__grid,.tn-layout__grid.has-left,.tn-layout__grid.has-right,.tn-layout__grid.has-left.has-right{grid-template-columns:minmax(0,1fr);grid-template-areas:"main" "left" "right";margin:0}
	.tn-layout__grid>*{padding:0}
	.tn-layout__left,.tn-layout__right{position:static}
}

/* ---- Sidebar widgets (TownPress geometry: 24px between widgets, 20px inside, title runs to the box edge) ---- */
.tn-sidebar{min-width:0}
.tn-sidebar .widget{margin:24px 0;font-size:14px;background:var(--tn-card);box-shadow:1px 1px 0 rgba(0,0,0,.05);border:0;border-radius:0;padding:0;min-width:0}
.tn-sidebar .widget:first-child{margin-top:0}
.tn-sidebar .widget__inner{padding:20px;background:transparent;min-width:0}
.tn-sidebar .widget__title{margin:-20px -20px 0 -20px;padding:20px 20px 15px 20px;font-size:18.288px;font-weight:700;text-transform:uppercase;letter-spacing:0;line-height:1.25;color:var(--tn-ink);position:static;border:0;background:none}
.tn-sidebar .widget__title:before{display:none}
.tn-sidebar .widget__inner>*:not(.widget__title){margin-top:15px}
.tn-sidebar ul{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}
.tn-sidebar li{padding:7px 0;border-bottom:1px solid var(--tn-line)}
.tn-sidebar li:last-child{border-bottom:0}
.tn-sidebar a{color:var(--tn-ink);text-decoration:none;font-size:14px;line-height:1.35;overflow-wrap:anywhere}
.tn-sidebar a:hover{color:var(--tn-accent)}
.tn-sidebar p,.tn-sidebar .textwidget,.tn-sidebar .textwidget p{font-size:14px;line-height:1.5;color:var(--tn-muted);margin:0 0 6px;overflow-wrap:anywhere}
.tn-sidebar img{max-width:100%;height:auto;display:block}
.tn-sidebar .tn-card{background:none;border:0;padding:0;box-shadow:none;gap:4px}
.tn-sidebar .tn-card:hover{transform:none;box-shadow:none}
.tn-sidebar .tn-card-media{display:block;border-radius:10px;overflow:hidden;margin-bottom:4px}
.tn-sidebar .tn-card-media img{aspect-ratio:16/9;object-fit:cover;width:100%}
.tn-sidebar .tn-card-title{font-size:14px;line-height:1.3;margin:0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.tn-sidebar .tn-card-meta{font-size:12px;color:var(--tn-muted);margin:0}
.tn-sidebar .tn-card-excerpt{font-size:13px;color:var(--tn-muted);margin:0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.tn-sidebar .tn-featured{display:block}
.tn-sidebar .tn-attachments li{padding:6px 0}
.tn-sidebar .tn-weather-temp{font-size:1.4rem;margin:2px 0}
.tn-sidebar .tn-weather-city,.tn-sidebar .tn-weather-desc,.tn-sidebar .tn-weather-meta{font-size:13px;margin:0 0 2px}

/* ---- Event calendar inside the sidebar (single definition, sized to the column) ---- */
.tn-sidebar .tn-calendar{font-size:12px;color:var(--tn-ink)}
.tn-sidebar .tn-cal-head{display:flex;justify-content:space-between;align-items:center;margin:0 0 8px;font-weight:700;font-size:13px}
.tn-sidebar .tn-cal-nav{width:24px;height:24px;border-radius:50%;display:grid;place-items:center;color:var(--tn-accent);text-decoration:none;font-size:16px;line-height:1;border:1px solid var(--tn-line)}
.tn-sidebar .tn-calendar table{width:100%;table-layout:fixed;border-collapse:separate;border-spacing:0}
.tn-sidebar .tn-calendar th{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:var(--tn-muted);padding:0 0 6px;border:0;background:none}
.tn-sidebar .tn-calendar td{border:0;background:none;padding:2px 0;text-align:center;height:30px;vertical-align:top}
.tn-sidebar .tn-calendar td.tn-cal-empty{height:30px}
.tn-sidebar .tn-cal-day{display:inline-grid;place-items:center;width:24px;height:24px;border-radius:50%;font-size:12px;color:var(--tn-ink);text-decoration:none}
.tn-sidebar .tn-calendar td.is-today .tn-cal-day{background:var(--tn-accent);color:#fff;font-weight:700}
.tn-sidebar .tn-calendar td.has-event .tn-cal-day{font-weight:800;color:var(--tn-accent);box-shadow:inset 0 0 0 1.5px var(--tn-accent)}
.tn-sidebar .tn-calendar td.is-today.has-event .tn-cal-day{color:#fff;box-shadow:none}
.tn-sidebar .tn-cal-event{display:block;font-size:10px;line-height:1.25;color:var(--tn-accent);margin:2px 0 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.tn-sidebar .tn-cal-link{text-decoration:none}

/* ---- Pages with the layout: sticky sidebars need visible overflow; base containers give up their width ---- */
.wrapper:has(.tn-layout){overflow:visible!important}
.container:has(.tn-layout){max-width:none!important;width:100%!important;padding-left:0!important;padding-right:0!important}
.row:has(.tn-layout){margin-left:0!important;margin-right:0!important;width:100%!important;max-width:100%!important;box-sizing:border-box!important;padding-left:0!important;padding-right:0!important}
/* Page title band lines up with the layout */
.container:has(.tn-layout) .page-entry-title{width:88%!important;max-width:none!important;margin-left:auto!important;margin-right:auto!important;box-sizing:border-box}
@media (max-width:991px){.container:has(.tn-layout) .page-entry-title{width:94%!important}}

/* ---- Article inside the main column: the base theme's own right column is replaced by the sidebars ---- */
.tn-layout__main .col-lg-4,.tn-layout__main aside.col-lg-4,.tn-layout__main .content-right>aside{display:none!important}
.tn-layout__main .col-lg-8,.tn-layout__main .content-right{width:100%!important;max-width:100%!important;flex:0 0 100%!important}
.tn-layout__main .tab-article,.tn-layout__main .tab-article-lead,.tn-layout__main .entry-content{max-width:none!important}
.tn-layout__main .bs-blog-meta{max-width:100%;flex-wrap:wrap;overflow-wrap:anywhere;width:auto}
.tn-layout__main .tamfis-tags,.tn-layout__main .tag-links{flex-wrap:wrap;max-width:100%}

/* ---- Breadcrumb: one centred line (Home / Section / Title), long titles wrap inside it ---- */
.bs-breadcrumb-section{padding:14px 0 6px;text-align:center}
.bs-breadcrumb-section .container,.bs-breadcrumb-section .row{display:block;text-align:center}
.bs-breadcrumb-section nav,.breadcrumb-trail,.breadcrumbs{display:block;text-align:center}
ol.breadcrumb,ul.breadcrumb,.breadcrumb.trail-items{display:flex!important;flex-wrap:wrap;justify-content:center;align-items:center;gap:4px 0;list-style:none;margin:0 auto;padding:0;max-width:100%;text-align:center;background:none;font-size:13px}
ol.breadcrumb>li,ul.breadcrumb>li,.breadcrumb.trail-items>li{display:inline-flex!important;align-items:center;margin:0;padding:0;max-width:100%;color:var(--tn-muted);font-size:13px;line-height:1.4}
ol.breadcrumb>li+li:before,ul.breadcrumb>li+li:before,.breadcrumb.trail-items>li+li:before{content:"›";padding:0 8px;color:var(--tn-muted);opacity:.6;font-size:15px}
ol.breadcrumb a,ul.breadcrumb a,.breadcrumb.trail-items a{color:var(--tn-muted);text-decoration:none}
ol.breadcrumb a:hover,ul.breadcrumb a:hover,.breadcrumb.trail-items a:hover{color:var(--tn-accent)}
ol.breadcrumb>li.active,ol.breadcrumb>li:last-child,ul.breadcrumb>li:last-child,.breadcrumb.trail-items>li:last-child{color:var(--tn-ink);font-weight:600;overflow-wrap:anywhere;word-break:break-word}

/* ---- Category and archive cards: image 40%, text fills the rest ---- */
.tn-layout__main .bs-blog-post.list-blog{display:flex!important;align-items:stretch;width:100%;max-width:100%;margin:0 0 20px!important;padding:0!important;border:1px solid var(--tn-line);border-radius:14px;overflow:hidden;background:var(--tn-card);box-shadow:0 4px 14px rgba(13,34,56,.05);box-sizing:border-box}
.tn-layout__main .bs-blog-post.list-blog .bs-blog-thumb{flex:0 0 40%;width:40%;max-width:40%;min-height:230px;margin:0!important;padding:0!important;position:relative;overflow:hidden}
.tn-layout__main .bs-blog-post.list-blog .bs-blog-thumb .bs-thumb-bg{position:absolute;inset:0;width:100%;height:100%;margin:0}
.tn-layout__main .bs-blog-post.list-blog .bs-blog-thumb .link-div{position:absolute;inset:0}
.tn-layout__main .bs-blog-post.list-blog>article{flex:1 1 60%;min-width:0;width:auto;float:none!important;padding:18px 22px;box-sizing:border-box;display:flex;flex-direction:column;gap:8px}
.tn-layout__main .bs-blog-post.list-blog .entry-title{font-size:19px;line-height:1.28;margin:0;overflow-wrap:anywhere}
.tn-layout__main .bs-blog-post.list-blog .bs-blog-meta{font-size:12px;color:var(--tn-muted);flex-wrap:wrap;gap:6px}
.tn-layout__main .bs-blog-post.list-blog p{font-size:14px;line-height:1.55;color:var(--tn-muted);margin:0;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.tn-layout__main .bs-blog-post.list-blog .bs-blog-category{flex-wrap:wrap;gap:4px}
@media (max-width:640px){.tn-layout__main .bs-blog-post.list-blog{flex-direction:column}.tn-layout__main .bs-blog-post.list-blog .bs-blog-thumb{width:100%;max-width:100%;flex:0 0 auto;min-height:200px}}

/* Event titles stay out of the small month grid (no uneven rows); the highlighted day links to the event via its title. */
.tn-sidebar .tn-cal-event{display:none}
.tn-sidebar .tn-calendar td.has-event{cursor:pointer}

/* Title band: title and breadcrumb stacked and centred (the breadcrumb was squeezed into a side slot) */
.container:has(.tn-layout) .page-entry-title{flex-direction:column!important;align-items:center!important;justify-content:center!important;text-align:center;gap:6px;padding:22px 20px!important}
.container:has(.tn-layout) .page-entry-title .bs-breadcrumb-section,.container:has(.tn-layout) .page-entry-title .breadcrumb-trail{width:100%;max-width:100%;margin:0!important;padding:0!important;min-width:0}
.container:has(.tn-layout) .page-entry-title .breadcrumb.trail-items{justify-content:center;flex-wrap:wrap}

/* Live category grid: two columns of fixed-width cards overflowed the main column. Cards fill one column instead. */
.tn-layout__main .d-grid,.tn-layout__main .d-grid.column2{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:20px;width:100%;max-width:100%;box-sizing:border-box}
.tn-layout__main .d-grid>*,.tn-layout__main .d-grid .post,.tn-layout__main .grid-card{width:100%!important;max-width:100%!important;min-width:0;margin-left:0!important;margin-right:0!important;box-sizing:border-box;float:none!important}
.tn-layout__main .grid-card .bs-blog-thumb{width:100%!important;max-width:100%!important}
