/*
Theme Name: CircuitLife
Author: CircuitLife
Description: Block theme for CircuitLife. Base and trust pages come from this pack; navigation, authors, contact, tagline, logo and icon come from the AEN PLAN contract.
Version: 1.0.7
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: circuitlife
*/
body.single-post .wp-block-post-content table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    border-collapse: collapse;
    border-spacing: 0;
    margin-block: 1.25em;
    line-height: 1.55;
}
body.single-post .wp-block-post-content table :is(th, td) {
    border: 1px solid var(--wp--preset--color--line);
    border-color: color-mix(in srgb, currentColor 45%, transparent);
    padding: .6em .75em;
    min-width: calc(8ch + 1.5em);
    vertical-align: top;
    text-align: start;
    overflow-wrap: normal;
    word-break: normal;
}
body.single-post .wp-block-post-content table :is(th, thead td) {
    font-weight: 700;
    background-color: color-mix(in srgb, currentColor 6%, transparent);
}
body.single-post .wp-block-post-content table :is(th, td) > :first-child { margin-block-start: 0; }
body.single-post .wp-block-post-content table :is(th, td) > :last-child { margin-block-end: 0; }
body.single-post .wp-block-post-content .wp-block-table { max-width: 100%; overflow-x: auto; }
body.single-post .wp-block-post-content :is(ul, ol):not(.wp-block-post-template):not(.wp-block-navigation__container) {
    padding-inline-start: 1.65em;
    margin-block: 1em;
    list-style-position: outside;
}
body.single-post .wp-block-post-content ul:not(.wp-block-post-template):not(.wp-block-navigation__container) { list-style-type: disc; }
body.single-post .wp-block-post-content ol:not([type]) { list-style-type: decimal; }
body.single-post .wp-block-post-content ul:not(.wp-block-post-template):not(.wp-block-navigation__container) ul { list-style-type: circle; }
body.single-post .wp-block-post-content ul:not(.wp-block-post-template):not(.wp-block-navigation__container) ul ul { list-style-type: square; }
body.single-post .wp-block-post-content :is(ul, ol):not(.wp-block-post-template):not(.wp-block-navigation__container) > li {
    display: list-item;
    margin-block: .35em;
    padding-inline-start: .15em;
}
body.single-post .wp-block-post-content :is(ul, ol):not(.wp-block-post-template):not(.wp-block-navigation__container) li > :is(ul, ol) { margin-block: .35em; }
body.single-post .wp-block-post-content li > p { margin-block: .35em; }
body.single-post .wp-block-post-content blockquote {
    margin-inline: 0;
    padding-inline: 1em;
    border-inline-start: 3px solid currentColor;
}
body.single-post .wp-block-post-content img:is(.emoji, .wp-smiley) {
    display: inline !important;
    width: 1em !important;
    height: 1em !important;
    min-width: 0 !important;
    max-width: 1em !important;
    margin: 0 .07em !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0;
    box-shadow: none !important;
    vertical-align: -.1em;
    object-fit: contain;
}

.aen-static-map{max-width:800px;margin:1.5rem 0}.aen-static-map-image{display:block;width:100%;height:auto}.aen-static-map figcaption{font-size:.75rem;line-height:1.5}.aen-contact-address{overflow-wrap:anywhere}

/* Live contact details: independent cards, never embedded between form fields. */
.aen-contact-panel{margin:1.5rem 0;max-width:900px}.aen-contact-panel header{margin-bottom:1.5rem}.aen-contact-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));gap:1rem;margin:0}.aen-contact-cards>div{border:1px solid currentColor;border-color:color-mix(in srgb,currentColor 22%,transparent);padding:1.25rem;border-radius:6px}.aen-contact-cards dt{font-size:.85em;font-weight:700;margin-bottom:.5rem}.aen-contact-cards dd{margin:0;overflow-wrap:anywhere}.aen-contact-panel .aen-static-map{width:100%;max-width:100%;margin:0}
.aen-contact-cards>div{min-width:0}.aen-feed-link p{margin-top:0}.aen-feed-link a{display:inline-block;min-height:44px;padding:.6em 0}



/* Shared phone hooks: contact pool display only (no hardcoded contact values); author bylines/profile style only. */
@media (max-width:480px){
  .aen-contact-panel{margin:1.1rem 0;padding-inline:0}
  .aen-contact-panel header{margin-bottom:1rem}
  .aen-contact-cards{grid-template-columns:1fr!important;gap:.85rem}
  .aen-contact-cards>div{padding:1rem;border-radius:10px;min-width:0}
  .aen-contact-cards dt{margin-bottom:.35rem}
  .aen-contact-cards dd,.aen-contact-address{overflow-wrap:anywhere;word-break:break-word}
  .aen-static-map{max-width:100%;margin:1rem 0}
  .aen-feed-link a{min-height:44px;display:inline-flex;align-items:center}
  :is(.volt-author-byline,.aen-author-byline,.pb-author-byline,.v-author-byline,a.volt-author-byline){
    display:inline-flex;align-items:center;gap:10px;min-height:44px;max-width:100%;
    font-size:14px;font-weight:650;text-decoration:none;overflow-wrap:anywhere
  }
  :is(.volt-author-byline,.aen-author-byline) img{width:32px;height:32px;border-radius:50%;object-fit:cover;flex:0 0 auto}
  :is(.volt-author-summary,.aen-author-summary,.author-profile .volt-author-summary){
    display:grid;grid-template-columns:72px minmax(0,1fr);gap:14px;align-items:start;
    padding:16px;border:1px solid color-mix(in srgb,currentColor 18%,transparent);border-radius:12px;margin:0 0 20px
  }
  :is(.volt-author-summary,.aen-author-summary) img{width:72px;height:72px;border-radius:50%;object-fit:cover}
  :is(.volt-author-summary,.aen-author-summary) h1{font-size:22px;line-height:1.25;margin:0 0 8px;overflow-wrap:anywhere}
  :is(.volt-author-summary,.aen-author-summary) p{margin:0;font-size:14px;line-height:1.55;overflow-wrap:anywhere}
  .volt-author-count{grid-column:1/-1;margin-top:4px!important;font-size:13px}
}

/* Contain wide article blocks while keeping their contents scrollable. */
body.single-post :is(.entry-content, .wp-block-post-content, .sl-article-body) { min-width: 0; overflow-wrap: anywhere; }
body.single-post :is(.entry-content, .wp-block-post-content, .sl-article-body) :is(pre, table, figure, iframe, img, code) { box-sizing: border-box; min-width: 0; max-width: 100%; }
body.single-post :is(.entry-content, .wp-block-post-content, .sl-article-body) :is(pre, table, figure) { overflow-x: auto; }
body.single-post :is(.entry-content, .wp-block-post-content, .sl-article-body) figure { margin-inline: 0; }
body.single-post :is(.entry-content, .wp-block-post-content, .sl-article-body) pre { white-space: pre; }
body.single-post :is(.entry-content, .wp-block-post-content, .sl-article-body) table { display: block; }
body.single-post :is(.entry-content, .wp-block-post-content, .sl-article-body) :is(iframe, img) { height: auto; }
body.single-post :is(.entry-content, .wp-block-post-content, .sl-article-body) code { overflow-wrap: anywhere; }

/* Inline tokens wrap; preformatted lines remain horizontally scrollable. */
body.single-post :is(.entry-content, .wp-block-post-content, .sl-article-body) :not(pre) > code { white-space: normal; overflow-wrap: anywhere; word-break: break-word; }
body.single-post :is(.entry-content, .wp-block-post-content, .sl-article-body) pre { min-width: 0; max-width: 100%; overflow-x: auto; }
body.single-post :is(.entry-content, .wp-block-post-content, .sl-article-body) pre code { white-space: pre; overflow-wrap: normal; word-break: normal; }

/* Single-post grid and flex items must shrink around long content. */
body.single-post :is(main, article, .wp-block-post-content, .entry-content) { min-width: 0; overflow-wrap: anywhere; }
