/* Shared ecosystem utility; TBW's own navigation and footer remain intact. */
:root { --eco-self:#E05A9D; --eco-system:#168C99; --eco-society:#7C4BB4; }
/* Existing homepage semantic representations adopt the final ecosystem palette. */
:root { --home-self:#E05A9D; --home-system:#168C99; --home-society:#7C4BB4; }
.lens-self h3 { color:#E05A9D; }
.lens-system h3 { color:#168C99; }
.lens-society h3 { color:#7C4BB4; }
.site-header[data-header] { display:block; padding:0; }
.tbw-primary-header { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:1.5rem; padding:1rem var(--pad); min-width:0; }
.tbw-ecosystem-utility { display:flex; justify-content:flex-end; padding:0 var(--pad); border-bottom:1px solid var(--line); }
.tbw-ecosystem-disclosure { position:relative; }
.tbw-ecosystem-disclosure > summary { display:flex; align-items:center; gap:.6rem; min-height:44px; padding:.35rem .25rem; color:var(--paper); font-size:.8125rem; cursor:pointer; list-style:none; }
.tbw-ecosystem-disclosure > summary::-webkit-details-marker { display:none; }
.tbw-ecosystem-disclosure[open] > summary > span { transform:rotate(180deg); }
.site-header .tbw-ecosystem-panel { display:block; position:absolute; right:0; top:100%; width:25rem; max-width:calc(100vw - 2 * var(--pad)); max-height:65vh; max-height:65dvh; overflow:auto; overscroll-behavior:contain; z-index:40; padding:1rem; border:1px solid #555; background:#111; box-shadow:0 1rem 2rem #0008; }
.tbw-ecosystem-disclosure:not([open]) > .tbw-ecosystem-panel { display:none; }
.tbw-eco-identities { display:grid; gap:.625rem; padding:0; margin:0; list-style:none; }
.tbw-eco-identities li { min-width:0; margin:0; }
.tbw-eco-self { --eco-color:var(--eco-self); }
.tbw-eco-system { --eco-color:var(--eco-system); }
.tbw-eco-society { --eco-color:var(--eco-society); }
:is(.site-header,.tbw-ecosystem-footer) .tbw-eco-link { display:flex; align-items:center; gap:.75rem; min-height:78px; height:100%; padding:.75rem; border-left:3px solid var(--eco-color); color:#F8F6F1; background:#ffffff06; text-decoration:none; font-size:1rem; font-weight:400; }
:is(.site-header,.tbw-ecosystem-footer) .tbw-eco-link:hover { background:#ffffff12; }
.tbw-eco-symbol { width:2.75rem; height:2.75rem; flex:0 0 2.75rem; color:var(--eco-color); }
.tbw-eco-copy { display:grid; gap:.2rem; min-width:0; line-height:1.35; }
.tbw-eco-label { color:var(--eco-color); font-size:.8125rem; font-weight:750; letter-spacing:.06em; }
.tbw-eco-domain { font-size:.8125rem; overflow-wrap:anywhere; }
.tbw-eco-current { font-size:.75rem; color:#B9BEC2; }
.tbw-eco-external { margin-left:auto; flex:0 0 auto; }
.tbw-ecosystem-footer { display:block; grid-column:1 / -1; width:100%; min-width:0; padding-top:1.5rem; margin-top:1rem; border-top:1px solid var(--line); }
.tbw-ecosystem-footer h2 { margin:0 0 1rem; font-size:.9375rem; font-weight:500; color:var(--paper); }
.tbw-ecosystem-footer .tbw-eco-identities { grid-template-columns:repeat(3,minmax(0,1fr)); }
:is(.tbw-ecosystem-utility,.tbw-ecosystem-footer) :is(a,summary):focus-visible { outline:3px solid #F8F6F1 !important; outline-offset:3px; box-shadow:0 0 0 2px #0B0C0E; }
.creator-attribution { max-width:52rem; font-size:1rem; line-height:1.65; }
.creator-attribution a { text-underline-offset:.2em; }
.creator-attribution a:focus-visible { outline-color:currentColor !important; }
/* These are semantic labels, not a replacement for decorative TBW colors. */
.freedoms-lenses article:nth-child(1) { border-color:#E05A9D; }
.freedoms-lenses article:nth-child(2) { border-color:#168C99; }
.freedoms-lenses article:nth-child(3) { border-color:#7C4BB4; }
.card-questions-page #main [data-family-section="SELF"] { --family-accent:#E05A9D !important; }
.card-questions-page #main [data-family-section^="SYSTEM"] { --family-accent:#168C99 !important; }
.card-questions-page #main [data-family-section="SOCIETY"] { --family-accent:#7C4BB4 !important; }
.card-questions-page .cq-card :is(.cq-sequence,.cq-stage) { color:#0B0C0E !important; }
.card-questions-page .cq-family-heading { border-color:var(--family-accent); }
/* Extra utility height stays clear of existing fixed-header page openings. */
body:not(.question-libraries-page):not(.resource-reader-page):not(.resource-library-page):not(.question-anything-page) main > section:first-child { padding-top:max(clamp(8rem,12vw,10rem),calc(var(--site-header-height) + 2rem)); }
@media (max-width:850px) { .tbw-ecosystem-footer .tbw-eco-identities { grid-template-columns:1fr; } }
@media (max-width:590px) { .tbw-primary-header { gap:.75rem; padding:.85rem var(--pad); } .site-header .tbw-ecosystem-panel { padding:.65rem; } }
