/*
Theme Name: ClickClarify
Author: ClickClarify
Description: Block theme for ClickClarify. 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
Requires PHP: 8.0
License: GNU General Public License v2 or later
Text Domain: clickclarify
*/
/* Shared block and runtime foundations. Publication layout lives in assets/editorial.css. */
:root {
  --tm-ink: var(--wp--preset--color--ink);
  --tm-copper: var(--wp--preset--color--primary);
  --tm-paper: var(--wp--preset--color--paper);
  --tm-canvas: var(--wp--preset--color--canvas);
  --tm-line: var(--wp--preset--color--line);
  --tm-muted: var(--wp--preset--color--muted);
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--tm-ink); background: var(--tm-paper); font-family: var(--wp--preset--font-family--body); font-size: 18px; line-height: 1.7; }
a { color: var(--wp--preset--color--link); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--wp--preset--color--primary); outline-offset: 4px; }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4 { font-family: var(--wp--preset--font-family--editorial); font-weight: 600; line-height: 1.2; overflow-wrap: anywhere; }
.wp-site-blocks { padding: 0; }
.wp-site-blocks > * + * { margin-block-start: 0; }
.wp-element-button, .wp-block-search__button { min-height: 44px; border: 0; border-radius: 4px; padding: 10px 18px; color: var(--wp--preset--color--white); background: var(--wp--preset--color--primary); font: 600 1rem/1.5 var(--wp--preset--font-family--body); cursor: pointer; }
.wp-block-search__inside-wrapper { display: flex; gap: 8px; }
.wp-block-search__input { width: 100%; min-width: 0; min-height: 44px; border: 1px solid var(--tm-line); border-radius: 4px; padding: 10px 12px; background: var(--tm-paper); color: var(--tm-ink); font: inherit; font-size: 16px; }
.wp-block-search__button { flex: none; margin: 0; }
.wp-block-search__label { display: block; margin-bottom: 8px; font-size: 1rem; font-weight: 600; }
.aen-sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
.tm-topics { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.tm-topics a { display: inline-flex; align-items: center; min-height: 44px; }
.aen-contact-details, .aen-contact, .aen-contact-address { overflow-wrap: anywhere; }


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}

/* 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; }
