/* Template components (v1.21.0): edition cards, section headings, filter pills, plans, quick editions, hero, utility bar, store badges.
   Every rule uses the site's CSS variables, so templates work in light and dark mode, and every grid collapses cleanly on tablets and phones. */

/* ======================================================================================================
   Edition card: the markup always carries every part; the template's card style (body class tl-cx-*) picks the visible ones
   ====================================================================================================== */
.ed-label-grid { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: 1.35rem; }
@media (max-width: 1199.98px) { .ed-label-grid.cols-5, .ed-label-grid.cols-6 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 991.98px) { .ed-label-grid, .ed-label-grid[class*="cols-"] { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; } .ed-label-grid.cx-flagship[class*="cols-"] { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575.98px) { .ed-label-grid, .ed-label-grid[class*="cols-"] { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; } .ed-label-grid.cx-flagship[class*="cols-"] { grid-template-columns: 1fr; } }
@media (max-width: 380px) { .elc-label b { font-size: .8rem; } .elc-note { flex-direction: column; gap: 0; } }

.ed-label-card { display: flex; flex-direction: column; min-width: 0; background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(15, 23, 42, .2); transition: transform .15s, box-shadow .15s; }
.ed-label-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(15, 23, 42, .25); }
.ed-label-card a { text-decoration: none; }
.ed-label-card a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.elc-meta, .elc-more, .elc-date { display: none; }
.elc-cover { display: block; aspect-ratio: 3 / 4; background: #fff; overflow: hidden; }
.elc-cover img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.elc-cover i { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; font-size: 2.2rem; color: #cbd5e1; }
.elc-label { display: block; background: var(--primary); color: #fff; padding: .6rem .7rem .55rem; text-align: center; }
.elc-label b { display: block; font-family: var(--font-head); font-size: .95rem; letter-spacing: .02em; text-transform: uppercase; line-height: 1.25; overflow-wrap: anywhere; }
.elc-note { display: flex; justify-content: space-between; gap: .4rem; margin-top: .25rem; font-size: .66rem; font-weight: 600; opacity: .92; }
html[data-theme="dark"] .ed-label-card { background: #1e293b; color: #e5e7eb; }
html[data-theme="dark"] .elc-cover { background: #0f172a; }

/* black name bar (state sections) */
.tl-cx-black .elc-label { background: #111; }
/* date bar under the cover (calendar sidebar templates) */
.tl-cx-datebar .elc-label b, .tl-cx-datebar .elc-note { display: none; }
.tl-cx-datebar .elc-date { display: block; font-family: var(--font-mono); font-size: .74rem; letter-spacing: .03em; }
.tl-cx-datebar .elc-label { padding: .5rem .6rem; }
/* caption under the cover, no bar */
.tl-cx-plain .ed-label-card { background: transparent; box-shadow: none; }
.tl-cx-plain .elc-cover { border: 1px solid var(--line); box-shadow: 0 2px 8px rgba(15, 23, 42, .12); }
.tl-cx-plain .elc-label { background: transparent; color: var(--ink); text-align: left; padding: .6rem .1rem 0; }
.tl-cx-plain .elc-label b { text-transform: none; font-size: 1rem; }
.tl-cx-plain .elc-note { color: var(--muted); }
.tl-cx-plain .ed-label-card:hover { box-shadow: none; }
/* rounded soft card */
.tl-cx-soft .ed-label-card { border-radius: 16px; overflow: hidden; box-shadow: 0 6px 22px -8px rgba(15, 23, 42, .25); }
.tl-cx-soft .elc-label { background: var(--surface); color: var(--ink); text-align: left; padding: .7rem .9rem; }
.tl-cx-soft .elc-label b { text-transform: none; }
.tl-cx-soft .elc-note { color: var(--muted); }
/* framed card with a meta row: ornate editorial look */
.tl-cx-frame .ed-label-card { background: var(--surface); border: 1px solid var(--line); padding: .6rem; box-shadow: none; }
.tl-cx-frame .elc-meta { display: flex; justify-content: space-between; gap: .4rem; font-family: var(--font-mono); font-size: .6rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding-bottom: .45rem; }
.tl-cx-frame .elc-cover { border: 1px solid var(--line); }
.tl-cx-frame .elc-label { background: transparent; color: var(--ink); border-top: 3px double var(--line); margin-top: .55rem; padding: .55rem .2rem .1rem; }
.tl-cx-frame .elc-label b { font-size: .92rem; text-transform: none; }
.tl-cx-frame .elc-note { justify-content: center; color: var(--muted); }
.tl-cx-frame .ed-label-card:hover { border-color: var(--primary); }
/* brutal: thick outline, offset shadow, yellow tags */
.tl-cx-brutal .ed-label-card { background: #fff; border: 3px solid #000; box-shadow: 6px 6px 0 #000; padding: .55rem; }
.tl-cx-brutal .ed-label-card:hover { transform: translate(-2px, -2px); box-shadow: 9px 9px 0 #000; }
.tl-cx-brutal .elc-meta { display: flex; justify-content: space-between; gap: .4rem; padding-bottom: .5rem; font-family: var(--font-mono); font-size: .6rem; font-weight: 700; text-transform: uppercase; }
.tl-cx-brutal .elc-tag { background: var(--accent); color: #000; padding: .1rem .4rem; border: 2px solid #000; }
.tl-cx-brutal .elc-pages { background: #000; color: #fff; padding: .1rem .4rem; }
.tl-cx-brutal .elc-cover { border: 2px solid #000; }
.tl-cx-brutal .elc-label { background: transparent; color: #000; padding: .6rem 0 0; border-top: 2px solid #000; margin-top: .5rem; }
.tl-cx-brutal .elc-label b { font-family: var(--font-head); font-size: .85rem; }
html[data-theme="dark"] .tl-cx-brutal .ed-label-card { background: #1e293b; }
/* flagship: a large card with description, price and buttons (used by the featured block and by templates asking for it) */
.cx-flagship .ed-label-card, .tl-cx-flagship .ed-label-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: .9rem; box-shadow: var(--shadow-1); }
.cx-flagship .elc-meta, .tl-cx-flagship .elc-meta { display: flex; gap: .4rem; padding-bottom: .55rem; font-family: var(--font-mono); font-size: .62rem; text-transform: uppercase; letter-spacing: .06em; }
.cx-flagship .elc-tag, .tl-cx-flagship .elc-tag { background: var(--primary); color: #fff; padding: .12rem .5rem; border-radius: 3px; }
.cx-flagship .elc-pages, .tl-cx-flagship .elc-pages { background: var(--surface-mid); color: var(--ink-2); padding: .12rem .5rem; border-radius: 3px; }
.cx-flagship .elc-cover, .tl-cx-flagship .elc-cover { aspect-ratio: 4 / 5; border-radius: 6px; border: 1px solid var(--line); }
.cx-flagship .elc-label, .tl-cx-flagship .elc-label { background: transparent; color: var(--ink); text-align: left; padding: .8rem 0 .2rem; }
.cx-flagship .elc-label b, .tl-cx-flagship .elc-label b { font-size: 1.3rem; text-transform: none; font-weight: 800; }
.cx-flagship .elc-note, .tl-cx-flagship .elc-note { display: none; }
.cx-flagship .elc-more, .tl-cx-flagship .elc-more { display: block; }
.elc-desc { margin: 0 0 .7rem; color: var(--ink-2); font-size: .85rem; line-height: 1.45; }
.elc-price { display: flex; justify-content: space-between; align-items: center; gap: .6rem; background: var(--surface-low); border: 1px solid var(--line); border-radius: 6px; padding: .5rem .7rem; margin-bottom: .7rem; font-size: .8rem; }
.elc-price small { text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-size: .62rem; font-weight: 700; }
.elc-price b { font-family: var(--font-head); font-size: 1.05rem; }
.elc-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.elc-actions a { flex: 1 1 auto; text-align: center; padding: .5rem .8rem; border-radius: 6px; font-weight: 700; font-size: .82rem; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.elc-actions .elc-sub { background: var(--primary); border-color: var(--primary); color: #fff; }
.elc-actions a:hover { filter: brightness(.95); }

/* ======================================================================================================
   Section headings (body class tl-sec-*)
   ====================================================================================================== */
.es-title { font-family: var(--font-head); font-size: 1.1rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--primary); border-bottom: 1px solid var(--primary); padding-bottom: .4rem; margin: 0 0 1.15rem; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .4rem; }
.es-count { font-family: var(--font-mono); font-size: .66rem; font-weight: 500; letter-spacing: .05em; color: var(--muted); display: none; }
.es-sub { color: var(--ink-2); margin: -.6rem 0 1rem; font-size: .9rem; }
/* bar: a dot or bar before the title, the count on the right */
.tl-sec-bar .es-title { text-transform: none; letter-spacing: 0; border-bottom: 0; color: var(--ink); font-size: 1.15rem; padding-bottom: 0; flex-wrap: nowrap; }
.tl-sec-bar .es-t::before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); margin-right: .6rem; }
.tl-sec-bar .es-count { display: inline; text-transform: uppercase; }
/* state: a header card with a coloured left bar and a count badge */
.tl-sec-state .es-title { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 8px; padding: .8rem 1rem; text-transform: none; letter-spacing: 0; color: var(--ink); font-size: 1.2rem; align-items: center; }
.tl-sec-state .es-count { display: inline-block; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); border-radius: 999px; padding: .15rem .7rem; font-family: var(--font); font-weight: 700; font-size: .76rem; }
/* ornate: centred serif title between lines, count beneath */
.tl-sec-ornate .es-title { display: block; text-align: center; border: 0; text-transform: none; letter-spacing: 0; color: var(--ink); font-size: clamp(1.4rem, 2.6vw, 2rem); margin-bottom: 1.4rem; }
.tl-sec-ornate .es-t { display: inline-flex; align-items: center; gap: 1rem; }
.tl-sec-ornate .es-t::before, .tl-sec-ornate .es-t::after { content: ''; width: clamp(24px, 8vw, 90px); height: 1px; background: color-mix(in srgb, var(--ink) 35%, transparent); }
.tl-sec-ornate .es-count { display: block; margin-top: .25rem; text-transform: uppercase; font-size: .62rem; letter-spacing: .14em; }
.tl-sec-ornate .es-title::after { content: ''; display: block; width: 44px; height: 3px; background: var(--primary); margin: .6rem auto 0; }
/* ribbon: a boxed title with a ruled line either side */
.tl-sec-ribbon .es-title { display: flex; justify-content: center; align-items: center; gap: 0; border: 0; padding: 0; margin-bottom: 1.3rem; position: relative; }
.tl-sec-ribbon .es-title::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; border-top: 2px solid var(--primary); }
.tl-sec-ribbon .es-t { position: relative; background: var(--primary); color: #fff; padding: .45rem 1.6rem; font-size: .95rem; letter-spacing: .08em; }
.tl-sec-ribbon .es-count { display: none; }
/* brutal: heavy uppercase title in a yellow tag */
.tl-sec-brutal .es-title { border: 0; margin-bottom: 1.4rem; }
.tl-sec-brutal .es-t { display: inline-block; background: var(--accent); color: #000; border: 3px solid #000; box-shadow: 4px 4px 0 #000; padding: .3rem .9rem; font-size: 1.15rem; font-weight: 800; }
.tl-sec-brutal .es-count { display: inline-block; background: #000; color: #fff; padding: .15rem .5rem; font-weight: 700; }

/* ======================================================================================================
   Filter pills
   ====================================================================================================== */
.es-pills { display: flex; gap: .5rem; overflow-x: auto; padding: .1rem .1rem .6rem; margin-bottom: 1rem; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.es-pill { flex: 0 0 auto; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: .38rem .95rem; font-weight: 600; font-size: .86rem; white-space: nowrap; cursor: pointer; transition: background .15s, color .15s; }
.es-pill span { opacity: .65; font-weight: 500; margin-left: .2rem; }
.es-pill:hover { border-color: var(--primary); }
.es-pill.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.es-pill:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.es-group[hidden] { display: none; }
.tl-cx-brutal .es-pill { border: 2px solid #000; border-radius: 0; box-shadow: 3px 3px 0 #000; background: #fff; color: #000; }
.tl-cx-brutal .es-pill.on { background: var(--accent); color: #000; }

/* ======================================================================================================
   Plans strip, quick editions
   ====================================================================================================== */
.plans-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; }
.plan-card { display: flex; flex-direction: column; gap: .35rem; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--primary); border-radius: 8px; padding: 1.1rem; }
.plan-name { font-family: var(--font-head); font-size: 1.05rem; }
.plan-price { font-family: var(--font-head); font-size: 1.9rem; font-weight: 800; color: var(--primary); line-height: 1.1; }
.plan-card small { color: var(--muted); margin-bottom: .5rem; }
.plan-card .btn-navy { margin-top: auto; text-align: center; justify-content: center; }
.quick-editions li a { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .5rem 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: .9rem; }
.quick-editions li:last-child a { border-bottom: 0; }
.quick-editions li a:hover { color: var(--primary); }
.qe-date { font-family: var(--font-mono); font-size: .66rem; color: var(--muted); white-space: nowrap; }
.qe-date.today { background: var(--accent); color: #fff; padding: .08rem .45rem; border-radius: 3px; font-weight: 700; }

/* ======================================================================================================
   Front-page hero (cover left, cover right, wide banner, dark)
   ====================================================================================================== */
.hero-paper { display: grid; grid-template-columns: minmax(240px, 380px) 1fr; gap: 1.6rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.1rem; }
.hero-paper .hp-cover { display: block; aspect-ratio: 3 / 4; max-height: 540px; overflow: hidden; background: #fff; box-shadow: 0 4px 18px rgba(15, 23, 42, .22); }
.hero-paper .hp-cover img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.hero-paper .hp-info { display: flex; flex-direction: column; gap: .55rem; min-width: 0; }
.hp-kicker { font-family: var(--font-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); font-weight: 700; }
.hp-title { font-family: var(--font-head); font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 800; margin: 0; color: var(--ink); line-height: 1.15; }
.hp-date { margin: 0; color: var(--ink-2); font-size: .95rem; }
.hp-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: .3rem 0 .4rem; }
.hp-stories { list-style: none; margin: .2rem 0 0; padding: 0; border-top: 1px solid var(--line); }
.hp-stories li { padding: .55rem 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: .8rem; align-items: baseline; }
.hp-stories a { font-family: var(--font-head); font-weight: 600; color: var(--ink); text-decoration: none; line-height: 1.35; }
.hp-stories a:hover { color: var(--primary); }
.hp-stories small { color: var(--muted); white-space: nowrap; font-family: var(--font-mono); font-size: .68rem; }
.hp-chips { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-top: auto; padding-top: .5rem; }
.hp-chips > span { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; margin-right: .2rem; }
.hp-chip { padding: .28rem .75rem; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); text-decoration: none; font-size: .85rem; background: var(--surface-low); }
.hp-chip:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.tl-hero-right .hero-paper { grid-template-columns: 1fr minmax(240px, 380px); }
.tl-hero-right .hero-paper .hp-cover { order: 2; }
.tl-hero-banner .hero-paper { grid-template-columns: 1fr; padding: 0; overflow: hidden; }
.tl-hero-banner .hero-paper .hp-cover { aspect-ratio: auto; height: clamp(220px, 32vw, 380px); max-height: none; box-shadow: none; }
.tl-hero-banner .hero-paper .hp-info { padding: 1.1rem 1.3rem 1.3rem; }
.tl-hero-banner .hero-paper .hp-stories { display: grid; grid-template-columns: 1fr 1fr; column-gap: 1.6rem; }
.tl-hero-dark .hero-paper { background: linear-gradient(135deg, #121316, #2a1a12); border: 0; color: #fff; }
.tl-hero-dark .hp-title, .tl-hero-dark .hp-stories a { color: #fff; }
.tl-hero-dark .hp-date, .tl-hero-dark .hp-stories small, .tl-hero-dark .hp-chips > span { color: #c7c9ce; }
.tl-hero-dark .hp-stories, .tl-hero-dark .hp-stories li { border-color: rgba(255, 255, 255, .15); }
.tl-hero-dark .hp-chip { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .2); color: #fff; }
.tl-hero-dark .hero-paper .hp-actions a.btn-line { background: transparent !important; color: #fff !important; border-color: rgba(255, 255, 255, .45) !important; }
@media (max-width: 767.98px) {
  .hero-paper, .tl-hero-right .hero-paper { grid-template-columns: 1fr; padding: .9rem; }
  .tl-hero-right .hero-paper .hp-cover { order: 0; }
  .hero-paper .hp-cover { max-height: 420px; margin-inline: auto; width: min(100%, 320px); }
  .tl-hero-banner .hero-paper { padding: 0; }
  .tl-hero-banner .hero-paper .hp-cover { width: 100%; max-width: none; }
  .tl-hero-banner .hero-paper .hp-stories { grid-template-columns: 1fr; }
}

/* ======================================================================================================
   Utility bar, masthead, store badges
   ====================================================================================================== */
.tl-tb-dark .topbar { background: #000; color: #e5e7eb; }
.tl-tb-dark .topbar .tb-date, .tl-tb-dark .topbar a { color: #fff; }
.tl-tb-light .topbar { background: #fff; color: #111827; border-bottom: 1px solid #e5e7eb; }
.tl-tb-light .topbar .tb-date { color: #111827; }
.tl-tb-light .topbar .theme-toggle { color: #111827; background: #f3f4f6; }
.tl-tb-light .topbar .tb-link { color: var(--accent); font-weight: 600; }
.tl-tb-accent .topbar { background: var(--accent); color: #000; border-bottom: 3px solid #000; }
.tl-tb-accent .topbar .tb-date, .tl-tb-accent .topbar a, .tl-tb-accent .topbar .theme-toggle { color: #000; }
.topbar .tb-links { display: inline-flex; align-items: center; gap: .85rem; padding-left: .9rem; margin-left: .4rem; border-left: 1px solid rgba(255, 255, 255, .3); }
.tl-tb-light .topbar .tb-links, .tl-tb-light .topbar .tb-follow { border-left-color: #d1d5db; }
.topbar .tb-link { color: inherit; text-decoration: none; font-weight: 600; white-space: nowrap; }
.topbar .tb-link:hover { text-decoration: underline; }
.topbar .tb-follow { display: inline-flex; align-items: center; gap: .6rem; padding-left: .9rem; margin-left: .4rem; border-left: 1px solid rgba(255, 255, 255, .3); }
.topbar .tb-follow b { font-weight: 600; font-size: .72rem; white-space: nowrap; }
.topbar .tb-follow .social { display: inline-flex; gap: .55rem; }
.topbar .tb-follow .social a { color: inherit; width: auto; height: auto; background: none; border: 0; font-size: .8rem; }
.tl-tb-light .topbar .tb-follow .social a { color: var(--accent); }
.mast-apps { display: flex; gap: .5rem; align-items: center; }
.app-badges { display: flex; flex-wrap: wrap; gap: .5rem; }
.app-badge { display: inline-flex; align-items: center; gap: .5rem; background: #000; color: #fff !important; border: 1px solid #555; border-radius: 7px; padding: .3rem .7rem .3rem .55rem; text-decoration: none; line-height: 1.05; font-weight: 700; font-size: .85rem; }
.app-badge i { font-size: 1.35rem; }
.app-badge small { display: block; font-size: .56rem; font-weight: 500; opacity: .85; text-transform: none; }
.app-badge:hover { background: #1f2937; }

/* ======================================================================================================
   Menu: readable hover and active states on solid bars, state dropdowns
   ====================================================================================================== */
body[class*="tl-width-"].nav-layout-left .main-nav .nav-link:hover, body[class*="tl-width-"].nav-layout-center .main-nav .nav-link:hover { background: color-mix(in srgb, var(--nav-text) 16%, transparent); }
body[class*="tl-width-"].nav-layout-left .main-nav .nav-link.active, body[class*="tl-width-"].nav-layout-center .main-nav .nav-link.active { background: color-mix(in srgb, var(--nav-text) 22%, transparent); color: var(--nav-text) !important; }
body[class*="tl-width-"] .main-nav .nav-tools button, body[class*="tl-width-"] .main-nav .nav-tools a, body[class*="tl-width-"] .main-nav .navbar-toggler { color: var(--nav-text); }
.nav-source-categories .main-nav .nav-link { text-transform: uppercase; font-size: .8rem; letter-spacing: .03em; font-weight: 700; }
.nav-source-categories .main-nav .dropdown-menu { border-radius: 0; border: 0; box-shadow: 0 10px 28px rgba(15, 23, 42, .25); min-width: 12rem; }
.nav-source-categories .main-nav .dropdown-item:hover { background: var(--surface-mid); color: var(--primary); }
@media (min-width: 992px) { .nav-source-categories .main-nav .dropdown:hover > .dropdown-menu { display: block; margin-top: 0; } }
@media (max-width: 991.98px) { body[class*="tl-width-"] .main-nav .navbar-collapse { background: var(--nav-bg); padding-bottom: .5rem; } body[class*="tl-width-"] .main-nav .nav-link { padding: .6rem .9rem !important; } }

/* ======================================================================================================
   Reader focus: the paper viewer with little chrome, and a minimal footer
   ====================================================================================================== */
.tl-vw-focus .viewer-wrap .crumbs { display: none; }
.tl-vw-focus .viewer-wrap { padding-top: .5rem !important; background: var(--surface-low); }
.tl-vw-focus .viewer-toolbar { box-shadow: 0 1px 0 var(--line); border-radius: 0; }
.tl-vw-focus .viewer-toolbar .vt-actions .lbl { display: none; }
.tl-vw-focus .page-stage { background: transparent; border: 0; box-shadow: none; padding: 0; }
.tl-vw-focus .page-wrap { background: #fff; box-shadow: 0 4px 24px rgba(15, 23, 42, .18); }
.tl-vw-focus .page-nav { width: 46px; height: 46px; border-radius: 50%; background: #d1d5db; color: #111827 !important; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
.tl-vw-focus .page-nav:hover { background: var(--primary); color: #fff !important; }
.tl-vw-focus .page-nav.prev { left: -24px; }
.tl-vw-focus .page-nav.next { right: -24px; }
@media (max-width: 767.98px) { .tl-vw-focus .page-nav.prev { left: 4px; } .tl-vw-focus .page-nav.next { right: 4px; } }
.footer-layout-minimal .site-footer { margin-top: 2.5rem; }
.footer-layout-minimal .site-footer .container-x { padding-top: 0; }
.footer-layout-minimal .footer-widgets, .footer-layout-minimal .footer-columns { display: none !important; }
.footer-layout-minimal .footer-bottom { border-top: 0; padding-block: 1.1rem; margin-top: 0; }

/* ======================================================================================================
   Paper viewer: page thumbnails in two columns on the side, or a horizontal strip on top (chrome option viewer_thumbs)
   ====================================================================================================== */
@media (min-width: 768px) and (max-width: 1199.98px) {
  .viewer-thumbs-two .viewer-wrap .row > aside:not(.viewer-sidebar) { flex: 0 0 auto; width: 30%; }
  .viewer-thumbs-two .viewer-wrap .viewer-content { flex: 0 0 auto; width: 70%; }
}
@media (min-width: 1200px) {
  .viewer-thumbs-two .viewer-wrap .row > aside:not(.viewer-sidebar) { flex: 0 0 auto; width: 22%; }
  .viewer-thumbs-two .viewer-wrap .viewer-content { flex: 0 0 auto; width: 54%; }
  .viewer-thumbs-two .viewer-wrap .viewer-layout-full .viewer-content { width: 78%; }
  .viewer-thumbs-two .viewer-wrap .viewer-sidebar { width: 24%; }
}
.viewer-thumbs-two .thumb-rail { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; align-content: start; }
.viewer-thumbs-two .thumb-rail .rail-head { grid-column: 1 / -1; }
.viewer-thumbs-two .thumb-rail .thumb-item { margin: 0; min-width: 0; }
.viewer-thumbs-two .thumb-rail .ti-cap { font-size: .72rem; }
@media (min-width: 768px) {
  .viewer-thumbs-top .viewer-wrap .row > aside:not(.viewer-sidebar) { display: block !important; flex: 0 0 100%; max-width: 100%; width: 100%; order: -1; }
  .viewer-thumbs-top .thumb-rail { display: flex; gap: .6rem; overflow-x: auto; position: static; max-height: none; padding-bottom: .4rem; scroll-snap-type: x proximity; }
  .viewer-thumbs-top .thumb-rail .rail-head { display: none; }
  .viewer-thumbs-top .thumb-rail .thumb-item { flex: 0 0 104px; margin: 0; scroll-snap-align: start; }
  .viewer-thumbs-top .thumb-rail .ti-cap { font-size: .68rem; }
}

/* with the thumbnails on top the page and sidebar share the full width */
@media (min-width: 1200px) {
  .viewer-thumbs-top .viewer-wrap .row > .viewer-content { flex: 0 0 auto; width: 75%; }
  .viewer-thumbs-top .viewer-wrap .row.viewer-layout-full > .viewer-content { width: 100%; }
  .viewer-thumbs-top .viewer-wrap .row > .viewer-sidebar { width: 25%; }
  .viewer-thumbs-two .viewer-wrap .row.viewer-layout-full > .viewer-content { width: 78%; }
}
@media (min-width: 768px) and (max-width: 1199.98px) {
  .viewer-thumbs-top .viewer-wrap .row > .viewer-content { flex: 0 0 auto; width: 100%; }
}

/* ======================================================================================================
   Masthead alignment for every template: logo, search and actions line up; a logo on a coloured or dark band sits on a white plate
   ====================================================================================================== */
@media (min-width: 992px) {
  body[class*="tl-width-"].tl-hd-plain .masthead .container-x, body[class*="tl-width-"].tl-hd-band .masthead .container-x, body[class*="tl-width-"].tl-hd-dark .masthead .container-x { justify-content: flex-start; column-gap: 1.5rem; }
  body[class*="tl-width-"].tl-hd-plain .masthead .search-box, body[class*="tl-width-"].tl-hd-band .masthead .search-box, body[class*="tl-width-"].tl-hd-dark .masthead .search-box { flex: 1 1 360px; max-width: 480px; margin-left: .5rem; }
  body[class*="tl-width-"].tl-hd-plain .masthead .mast-actions, body[class*="tl-width-"].tl-hd-band .masthead .mast-actions, body[class*="tl-width-"].tl-hd-dark .masthead .mast-actions { margin-left: auto; flex-wrap: nowrap; white-space: nowrap; }
}
.tl-hd-band .masthead .brand, .tl-hd-dark .masthead .brand { background: #fff; padding: .35rem .9rem; border-radius: 8px; box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }
html[data-theme="dark"] body[class*="tl-width-"] .masthead .brand:not(:has(.logo-d)) { background: #fff; padding: .35rem .9rem; border-radius: 8px; }
.masthead .search-box input { min-width: 0; text-overflow: ellipsis; }
html[data-theme="dark"] body[class*="tl-width-"] .masthead .brand:not(:has(.logo-d)) img { filter: none; }
.tl-hd-band .masthead .brand img, .tl-hd-dark .masthead .brand img { filter: none !important; }
