/* Share layout safeguards; the captured stylesheet supplies type, color, and decoration.
   Showit's own .d/.m coordinate systems handle its canvas objects. */
:where(body:not(:has(#si-sp))) :where(article, main, .entry-content, .post-content, .article-body, [itemprop="articleBody"]) {
  min-inline-size: 0;
  overflow-wrap: break-word;
}
:where(body:not(:has(#si-sp))) :where(.entry-content, .post-content, .article-body, [itemprop="articleBody"]) > :where(p, ul, ol, blockquote) {
  max-inline-size: 76ch;
  line-height: 1.6;
}
:where(body:not(:has(#si-sp))) :where(img, video, iframe, object, embed, input, textarea, select, pre) {
  max-inline-size: 100%;
}
:where(body:not(:has(#si-sp))) :where(img[height], video[height]) {
  block-size: auto;
}
:where(body:not(:has(#si-sp))) :where(pre) { overflow-x: auto; }

/* Applied only when a captured in-flow box actually exceeds its container. */
[data-abb-fit-box] {
  box-sizing: border-box !important;
  min-inline-size: 0 !important;
  max-inline-size: 100% !important;
}
[data-abb-fit-grid] { grid-template-columns: minmax(0, 1fr) !important; }
[data-abb-fit-flex] { flex-wrap: wrap !important; }
[data-abb-fit-media] { block-size: auto !important; }
.abb-archive-scroll {
  max-inline-size: 100%;
  min-inline-size: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
}
@media (max-width: 48rem) {
  :where(body:not(:has(#si-sp))) :where(form, fieldset, figure, main, article, section, header, footer, aside, nav, .container, .wrapper, #wrapper, #content) {
    min-inline-size: 0;
    max-inline-size: 100%;
    box-sizing: border-box;
  }
  :where(body:not(:has(#si-sp))) :where(p, li, dt, dd, address, a) { overflow-wrap: anywhere; }
}
iframe[data-abb-fit-media] { aspect-ratio: var(--abb-media-ratio); }
html.m[data-abb-canvas-mobile] #si-sp .sc {
  max-inline-size: min(320px, 100%);
  margin-inline: auto;
}

/* The live blog section sits inside the captured canvas, but its articles
   follow normal HTML flow on every platform. */
.home-posts .home-article-body {
  min-inline-size: 0;
  max-inline-size: 76ch;
  margin-inline: auto;
  overflow-wrap: anywhere;
}
.home-posts .home-article-head,
.home-posts .home-strip-lead { min-inline-size: 0; overflow-wrap: anywhere; }
.home-posts .home-article-body :where(iframe, embed, video, img, pre) { max-inline-size: 100%; }
.home-posts .home-article-body pre { overflow-x: auto; }
.home-posts .home-article-body table { overflow-wrap: normal; }
.home-posts .home-article-body > table { display: block; overflow-x: auto; }
@media (min-width: 48rem) {
  .home-posts .home-article { max-inline-size: 80ch; margin-inline: auto; }
}

/* A local, successfully loaded first image replaces the empty space left
   by an uninitialized Basic jQuery Slider. Its native links stay usable.
   As soon as the plugin marks its slides, its own sizing and controls win. */
[data-abb-first-slide]:not(:has(.bjqs-slide)):has(> ul.bjqs:not([style],[hidden])) { height: auto !important; }
[data-abb-first-slide] > ul.bjqs:not([style],[hidden]):not(:has(> .bjqs-slide)) { display: block; }
[data-abb-first-slide] > ul.bjqs:not([style],[hidden]):not(:has(> .bjqs-slide)) > li ~ li { display: none; }
[data-abb-first-slide] > ul.bjqs:not([style],[hidden]):not(:has(> .bjqs-slide)) > li:first-child img {
  display: block;
  max-width: 100%;
  height: auto;
  margin-inline: auto;
}

/* The original Remix menu requires an unavailable legacy plugin on some archives. */
button.abb-menu-toggle{display:none}
@media (max-width:760px){
  [data-abb-remix-menu]{position:relative;padding:0 14px}
  [data-abb-remix-menu] .row{position:static;display:flex;align-items:center;width:100%;margin:0;min-height:46px;padding:0;box-sizing:border-box}
  [data-abb-remix-menu] .logo{visibility:visible;width:auto;margin:0;flex:1 1 auto;min-width:0}
  [data-abb-remix-menu] .logo h1{margin:0;line-height:1.2}
  [data-abb-remix-menu] .logo .text_logo{display:block;font-size:15px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  [data-abb-remix-menu] .btn_canvas{display:none}
  button.abb-menu-toggle{display:flex;flex-direction:column;justify-content:center;gap:4px;position:absolute;right:14px;top:50%;transform:translateY(-50%);width:44px;height:44px;padding:9px;border:0;background:transparent;color:inherit;cursor:pointer;z-index:10000}
  button.abb-menu-toggle span{display:block;width:100%;height:2px;border-radius:2px;background:currentColor}
  [data-abb-remix-menu] nav{display:none !important;position:absolute !important;top:calc(100% + 1px) !important;left:-14px !important;right:-14px !important;width:auto !important;height:auto !important;margin:0 !important;background:var(--abb-menu-surface, Canvas) !important;padding:10px 16px 16px !important;z-index:9999 !important;max-height:70vh !important;overflow:auto !important;box-shadow:0 18px 30px rgba(0,0,0,.45) !important;border-top:1px solid rgba(255,255,255,.1) !important}
  [data-abb-remix-menu].abb-menu-open nav{display:block !important}
  [data-abb-remix-menu] nav .sf-menu{display:block !important;float:none !important;position:static !important;width:auto !important;height:auto !important;visibility:visible !important;opacity:1 !important;list-style:none !important;margin:0 !important;padding:0 !important}
  [data-abb-remix-menu] nav .sf-menu > li{display:block !important;float:none !important;position:relative !important;width:auto !important;height:auto !important;margin:0 !important;padding:0 !important}
  [data-abb-remix-menu] nav .sf-menu > li > a{display:block !important;float:none !important;position:static !important;padding:8px 0 !important;font-size:14px !important;line-height:1.4 !important;text-decoration:none !important}
  [data-abb-remix-menu] nav .sf-menu ul.sub-menu{display:block !important;float:none !important;position:static !important;visibility:visible !important;opacity:1 !important;width:auto !important;height:auto !important;margin:0 0 8px 12px !important;padding:0 !important;list-style:none !important;background:transparent !important;box-shadow:none !important}
  [data-abb-remix-menu] nav .sf-menu ul.sub-menu li{display:block !important;float:none !important;width:auto !important}
  [data-abb-remix-menu] nav .sf-menu ul.sub-menu a{display:block !important;padding:5px 0 !important;font-size:12.5px !important;line-height:1.4 !important}
}

/* Captured desktop themes often hard-code a 910-980px shell and float the
   content and sidebar. Let those pages shrink and stack on phones while the
   original desktop rendering keeps its exact captured styles. */
@media (max-width: 980px) {
  :where(body:not(:has(#si-sp))) { min-width: 0 !important; }
  :where(body:not(:has(#si-sp))) :where(#wrapper_head, #wrapper_main, #wrapper_footer, #footer_bottom, #header, #footer, #wrapper) {
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    box-sizing: border-box !important;
  }
  :where(body:not(:has(#si-sp))) .center {
    width: 100% !important;
    max-width: 100% !important;
    padding-inline: 14px !important;
    box-sizing: border-box !important;
  }
  :where(body:not(:has(#si-sp))) #head { height: auto !important; min-height: 0 !important; }
  :where(body:not(:has(#si-sp))) :where(#head .logo, #head .logoimg, #head .logo a) {
    position: static !important;
    margin: 0 auto !important;
    height: auto !important;
  }
  :where(body:not(:has(#si-sp))) #headextras {
    position: static !important;
    width: 100% !important;
    margin: 10px 0 0 !important;
    padding: 10px !important;
    box-sizing: border-box !important;
  }
  :where(body:not(:has(#si-sp))) :where(#main, .content, .sidebar, .main, .content-area, .sidebar-area) {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    padding-inline: 0 !important;
    box-sizing: border-box !important;
  }
  :where(body:not(:has(#si-sp))) :where(.sidebar, .sidebar-area) {
    display: block !important;
    margin-top: 22px !important;
  }
  :where(body:not(:has(#si-sp))) #menu-superior {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 4px 12px !important;
    height: auto !important;
    width: 100% !important;
  }
  :where(body:not(:has(#si-sp))) #menu-superior > li {
    float: none !important;
    display: inline-block !important;
    width: auto !important;
    margin: 0 !important;
  }
  :where(body:not(:has(#si-sp))) #menu-superior ul {
    position: static !important;
    display: block !important;
    background: transparent !important;
    box-shadow: none !important;
    padding-left: 14px !important;
  }
  :where(body:not(:has(#si-sp))) :where(.one_third, .one_fourth, .one_half) {
    width: 100% !important;
    float: none !important;
    margin: 0 0 18px !important;
  }
  :where(body:not(:has(#si-sp))) :where(table) { max-width: 100% !important; }
  :where(body:not(:has(#si-sp))) .home-posts .wrap { width: calc(100% - 28px) !important; }
}
@media (max-width: 980px) {
  :where(body:not(:has(#si-sp))) :where(.menu-superior-container, #head, #main, #footer) {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
}
@media (max-width: 980px) {
  :where(body:not(:has(#si-sp))) .menu-superior-container { height: auto !important; position: relative !important; }
  :where(body:not(:has(#si-sp))) #menu-superior {
    position: static !important;
    top: auto !important;
    left: auto !important;
    height: auto !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 2px 14px !important;
    padding: 0 !important;
    background: transparent !important;
  }
  :where(body:not(:has(#si-sp))) #menu-superior > li {
    position: static !important;
    float: none !important;
    display: inline-block !important;
  }
  :where(body:not(:has(#si-sp))) #menu-superior ul.sub-menu {
    display: none !important;
    position: static !important;
    height: auto !important;
    width: auto !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 4px 0 8px 12px !important;
  }
  :where(body:not(:has(#si-sp))) #menu-superior li:hover > ul.sub-menu,
  :where(body:not(:has(#si-sp))) #menu-superior li:focus-within > ul.sub-menu {
    display: block !important;
  }
}
@media (max-width: 980px) {
  :where(body:not(:has(#si-sp))) { max-width: 100% !important; overflow-x: clip; }
}
