/*
Theme Name: TiesTimes
Author: TiesTimes
Description: Block theme for TiesTimes. Base and trust pages come from this pack; navigation, authors, contact, tagline, logo and icon come from the AEN PLAN contract.
Version: 1.0.6
Requires at least: 6.7
Tested up to: 6.9
Requires PHP: 7.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: full-site-editing, block-patterns, block-styles, wide-blocks, accessibility-ready, style-variations
Text Domain: tiestimes
*/
* { box-sizing: border-box; }
body { margin: 0; background: var(--wp--preset--color--background); color: var(--wp--preset--color--text); }
.wp-site-blocks { padding: 0; }
.wp-site-blocks > * + * { margin-block-start: 0; }
.wp-site-blocks main { padding-block: var(--wp--preset--spacing--section); }
img, video, iframe, svg { max-width: 100%; }
img, video { height: auto; }
button, input, select, textarea { font: inherit; }
button, summary { cursor: pointer; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--wp--preset--color--link); }
:where(a, button, input, textarea, select, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--wp--preset--color--primary); outline-offset: 4px;
}
:where(h1, h2, h3, h4, p, li, a, dd) { overflow-wrap: anywhere; }
.aen-sr-only, .ph-sr-only {
  position: absolute !important; width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px !important; overflow: hidden !important;
  clip-path: inset(50%); white-space: nowrap !important; border: 0 !important;
}
.wp-block-search { max-width: 100%; }
.wp-block-search__inside-wrapper { display: flex; min-width: 0; gap: 0; padding: 0; border: 1px solid var(--wp--preset--color--line); }
.wp-block-search__input {
  min-width: 0; width: 100%; min-height: 48px; border: 0; border-radius: 0;
  padding: 10px 14px; background: var(--wp--preset--color--surface); color: var(--wp--preset--color--text); font-size: 1rem;
}
.wp-block-search__button, .wp-element-button {
  display: inline-flex; justify-content: center; align-items: center; min-height: 48px;
  margin: 0; border: 0; border-radius: 0; padding: 10px 18px;
  background: var(--wp--preset--color--text); color: var(--wp--preset--color--background);
  font: 600 1rem/1.4 var(--wp--preset--font-family--body); text-decoration: none;
}
.wp-block-search__button:hover, .wp-element-button:hover { background: var(--wp--preset--color--link); color: var(--wp--preset--color--background); }
.wp-block-search__label { display: block; margin-bottom: 8px; font-weight: 600; }

/* Authored content keeps its markup; wide tables and code scroll locally. */
.wp-block-post-content { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.wp-block-post-content > * { max-width: 100%; }
.wp-block-post-content :is(figure, .alignwide, .alignfull) { max-width: 100%; margin-inline: 0; }
.wp-block-post-content :is(img, iframe, video) { max-width: 100%; }
.wp-block-post-content :is(pre, .wp-block-table) { max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; }
.wp-block-post-content pre { padding: 20px; background: var(--wp--preset--color--soft); white-space: pre; }
.wp-block-post-content code { overflow-wrap: anywhere; }
.wp-block-post-content pre code { overflow-wrap: normal; }
.wp-block-post-content table {
  display: block; width: 100%; max-width: 100%; overflow-x: auto; border-collapse: collapse;
  border-spacing: 0; margin-block: 1.5em; font-size: .94em; line-height: 1.55;
}
.wp-block-post-content :is(th, td) {
  min-width: 8ch; padding: .75em; border: 1px solid var(--wp--preset--color--line);
  vertical-align: top; text-align: start;
}
.wp-block-post-content th { background: var(--wp--preset--color--soft); }
.wp-block-post-content :is(th, td) > :first-child { margin-block-start: 0; }
.wp-block-post-content :is(th, td) > :last-child { margin-block-end: 0; }
.wp-block-post-content :is(ul, ol) { padding-inline-start: 1.6em; list-style-position: outside; }
.wp-block-post-content ul { list-style-type: disc; }
.wp-block-post-content ol:not([type]) { list-style-type: decimal; }
.wp-block-post-content ul ul { list-style-type: circle; }
.wp-block-post-content ol ol { list-style-type: lower-alpha; }
.wp-block-post-content li + li { margin-top: .45em; }
.wp-block-post-content :is(img.emoji, img.wp-smiley) {
  display: inline !important; width: 1em !important; height: 1em !important;
  margin: 0 .05em !important; vertical-align: -.12em !important; box-shadow: none !important;
}
.wp-block-post-content :is(.aen-toc, .aen-article-toc, #ez-toc-container) { max-width: 100%; min-width: 0; overflow-wrap: anywhere; }

/* Existing contact and public author interfaces. */
.aen-contact-panel { margin: 1.5rem 0; max-width: 100%; }
.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 { min-width: 0; padding: 1.25rem; border: 1px solid var(--wp--preset--color--line); background: var(--wp--preset--color--surface); }
.aen-contact-cards dt { margin-bottom: .5rem; font-size: .9em; font-weight: 600; }
.aen-contact-cards dd { margin: 0; overflow-wrap: anywhere; }
.aen-contact-address { overflow-wrap: anywhere; }
.aen-static-map { width: 100%; max-width: 100%; margin: 1.5rem 0; }
.aen-static-map-image { display: block; width: 100%; height: auto; }
.aen-static-map figcaption { font-size: .875rem; }
.aen-feed-link a { display: inline-flex; min-height: 44px; align-items: center; }
:is(.volt-author-byline, .aen-author-byline, .pb-author-byline, .v-author-byline) {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; max-width: 100%;
  font-size: .875rem; 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) {
  display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 18px; align-items: start;
  padding: 24px; border-block: 1px solid var(--wp--preset--color--line); margin-block: 28px;
}
: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) :is(h1, h2, p) { margin-top: 0; }
.volt-author-count { grid-column: 1 / -1; }
.aen-back-to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 25; display: grid; place-items: center;
  width: 48px; height: 48px; border: 1px solid var(--wp--preset--color--line);
  background: var(--wp--preset--color--text); color: var(--wp--preset--color--background);
}
.aen-back-to-top[hidden] { display: none; }
@media (max-width: 600px) {
  .aen-contact-cards { grid-template-columns: minmax(0, 1fr); }
  :is(.volt-author-summary, .aen-author-summary) { padding: 18px 0; gap: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}

/* 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; }

/* PB-D03: assigned visual identity, local system fonts, content geometry. */
:root{--vd-accent:#a4471d;--vd-ink:#17212b;--vd-paper:#fcf9f7;--vd-line:#eedcd4;--vd-body:"Calibri",Arial,sans-serif;--vd-heading:"Constantia",Georgia,serif;--ph-accent:#a4471d;--ph-ink:#17212b;--ph-paper:#ffffff;--ph-canvas:#fcf9f7;--ph-line:#eedcd4;--ph-muted:#4b5563;--ph-soft:#f7eeeb;--ph-blue:#a4471d;--ph-rust:#a4471d;--ph-olive:#a4471d;--ph-copper:#a4471d;--ph-brass:#a4471d;}
body{font-family:var(--vd-body);background:#fcf9f7;color:#17212b}
h1,h2,h3,h4,.wp-block-post-title,.wp-block-site-title{font-family:var(--vd-heading)!important}
.wp-block-post-content{max-width:670px;min-width:0;overflow-wrap:anywhere}
button,input,textarea,summary{font-family:var(--vd-body)}
.wp-block-button__link,.wp-element-button,.wp-block-search__button{border-radius:8px;background:var(--vd-ink);color:white;min-height:44px}
.ph-shell{width:calc(100% - 48px);max-width:1022px;margin-left:auto;margin-right:clamp(24px,5vw,80px)}
.ph-layout{display:grid!important;grid-template-columns:minmax(0,1fr) 260px!important;gap:32px!important}
.ph-layout>*{min-width:0}
.ph-reading{width:100%;min-width:0;max-width:730px}
.ph-page{width:100%;max-width:730px!important}
.tb-page{width:calc(100% - 48px);margin-inline:auto!important}
.wr-page{padding-inline:0}
.ph-reading .is-style-phrasehaven-sheet,.ph-story,.ph-card,.ph-widget,.aen-contact-cards>div{border-radius:8px;box-shadow:0 9px 28px #17212b12}
.aen-social-logo{width:44px!important;height:44px!important;min-width:44px;border:1px solid currentColor;background:transparent;border-radius:0!important;color:inherit!important}
.vd-page-heading{margin-bottom:32px!important;padding:24px;border-color:var(--vd-accent)!important}
.vd-page-heading h1{margin:0!important;font-size:clamp(28px,4vw,42px)}
.vd-page-heading p{font-size:15px;line-height:1.6;margin:12px 0 0}
.vd-page-band{background:var(--vd-ink);color:white;border-top:6px solid}
.vd-page-rail{border-left:6px solid;background:#f7eeeb}
.vd-page-masthead{text-align:center;border-block:2px solid;letter-spacing:.025em}
.vd-page-caption{padding-inline:0;border-bottom:5px solid}
@media(max-width:1100px){.ph-shell{width:calc(100% - 36px)!important;margin-inline:auto!important;max-width:none!important;padding-inline:0!important}.ph-layout{grid-template-columns:minmax(0,1fr)!important}.ph-reading{max-width:none}}

.vd-header{background:var(--vd-paper)!important;color:var(--vd-ink)!important;border-bottom:4px solid var(--vd-accent)!important;padding:0!important;isolation:auto!important;transform:none!important}
.vd-header .vd-header-row{display:flex!important;align-items:center!important;justify-content:space-between!important;flex-wrap:nowrap!important;gap:20px;min-height:84px;width:calc(100% - 48px);max-width:1320px;margin:0 auto!important;padding:12px 0!important;position:static!important}
.vd-header .vd-brand{display:flex!important;align-items:center!important;gap:10px;min-width:0;flex-shrink:1!important;margin:0!important}
.vd-header .vd-brand>*{margin:0!important}
.vd-header .vd-brand .wp-block-site-title{font-size:26px;line-height:1.2;white-space:nowrap;min-width:0;overflow:hidden;text-overflow:ellipsis;color:var(--vd-ink)!important}
.vd-header .vd-brand .wp-block-site-logo{line-height:1;flex-shrink:0}
.vd-header .vd-brand img{display:block;width:36px!important;height:36px!important;object-fit:contain}
.aen-vd-nav{margin:0 0 0 auto!important;min-width:0;flex-shrink:0}
.aen-vd-desktop{display:flex;align-items:center;justify-content:flex-end;gap:clamp(12px,1.3vw,21px);font:700 14px/1.35 var(--vd-body)}
.aen-vd-desktop a{padding:12px 0;color:inherit;white-space:nowrap}
.aen-vd-toggle{display:none}
.aen-vd-overlay[hidden]{display:none!important}
.aen-vd-overlay{position:fixed;inset:0;z-index:100000;isolation:isolate;color:#17212b;text-align:left;font-family:var(--vd-body)}
.aen-vd-backdrop{position:absolute;inset:0;width:100%;height:100%;padding:0;border:0;border-radius:0;background:#0713219c;cursor:pointer}
.aen-vd-drawer{position:absolute;inset:0 0 0 auto;width:min(336px,calc(100vw - 28px));height:100dvh;overflow-y:auto;overscroll-behavior:contain;background:var(--vd-paper);padding:16px 20px 30px;box-sizing:border-box;box-shadow:-12px 0 40px #0003}
.aen-vd-drawer-top{display:flex;align-items:center;justify-content:space-between;gap:8px;padding-bottom:16px;border-bottom:3px solid var(--vd-accent)}
.aen-vd-home{font:700 21px/1.2 var(--vd-heading);color:#17212b}
.aen-vd-close,.aen-vd-toggle{width:44px;height:44px;min-width:44px;min-height:44px;flex-shrink:0;align-items:center;justify-content:center;background:#17212b;color:#fff;border:1px solid #17212b;border-radius:8px;padding:8px;cursor:pointer}
.aen-vd-categories,.aen-vd-pages{display:flex;flex-direction:column;align-items:stretch;text-align:left;gap:0;margin:0;padding:12px 0}
.aen-vd-categories a,.aen-vd-pages a{display:flex;align-items:center;min-height:44px;box-sizing:border-box;padding:10px 0;text-align:left;font-size:16px;line-height:1.4;color:#17212b;overflow-wrap:anywhere}
.aen-vd-categories a{font-weight:700;border-bottom:1px solid var(--vd-line)}
.aen-vd-pages{border-top:1px solid var(--vd-line)}
.aen-vd-search label{display:block;font-size:15px;font-weight:700;margin-bottom:8px}
.aen-vd-search>div{display:flex;gap:8px}
.aen-vd-search input{min-width:0;width:100%;min-height:44px;border:1px solid #6b7280;padding:8px;background:white;color:#17212b;border-radius:4px}
.aen-vd-search button{min-height:44px;background:var(--vd-ink);color:#fff;border:0;padding:10px 14px;border-radius:4px}
.aen-vd-nav :focus-visible{outline:3px solid var(--vd-ink);outline-offset:3px}
.aen-vd-footer-pages{display:flex;justify-content:center;flex-wrap:wrap;gap:8px 24px;padding:16px 20px;font-size:14px}
.aen-vd-footer-pages a{display:inline-flex;align-items:center;min-height:44px;color:inherit}
.aen-share-links .aen-social-logo{display:inline-flex;align-items:center;justify-content:center;text-decoration:none;color:inherit}
footer>.aen-share,footer .aen-share{padding:16px 20px}
.aen-share-links{display:flex;flex-wrap:wrap;justify-content:center;gap:12px}
@media(max-width:1100px){
 .aen-vd-desktop{display:none}.aen-vd-toggle{display:flex}
 .aen-vd-nav{order:3}
 :is(.ph-header,.tb-header,.rf-header,.wr-header,.fd-header){position:relative!important;top:auto!important;max-height:none!important}
 :is(.ph-header-inner,.tb-header-inner,.rf-header-inner,.wr-header-inner,.fd-header-inner){display:flex!important;flex-wrap:nowrap!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;min-height:72px!important;height:auto!important;padding-block:10px!important;position:relative!important;width:calc(100% - 32px)!important;max-width:calc(100% - 32px)!important;margin-inline:auto!important}
 :is(.ph-brand,.tb-brand,.rf-brand,.wr-brand,.fd-brand){display:flex!important;flex:1 1 auto!important;align-items:center;min-width:0!important;gap:8px!important;position:static!important;margin:0!important}
 :is(.ph-brand,.tb-brand,.rf-brand,.wr-brand,.fd-brand) .wp-block-site-title{font-size:clamp(18px,5vw,23px)!important;line-height:1.2!important;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0!important}
 :is(.ph-brand,.tb-brand,.rf-brand,.wr-brand,.fd-brand) :is(.wp-block-site-logo,img){max-width:36px!important;width:36px!important;max-height:36px!important;height:auto!important;flex-shrink:0;object-fit:contain}
 :is(.ph-header,.tb-header,.rf-header,.wr-header,.fd-header) :is(.ph-controls,.tb-header-search,.rf-header-search,.wr-header-search,.fd-header-search){display:none!important}
}
