/* EDITORIAL_REFINEMENT_V1: scoped visual polish, no global layout reset. */
html.aehea-desk-theme{--erp-panel:#faf9f5;--erp-ink:#252a24;--erp-muted:#5c635c;--erp-line:#cbc7ba;--erp-accent:#87520a;--erp-chip:#f1eee5}
.gm-footer.erp-footer,.grombi-game-shell,.gm-main,.ud-main,.hw-grombi,.gear-grombi{--erp-panel:#151c26;--erp-ink:#eaf0f7;--erp-muted:#a8b5c5;--erp-line:#303d4c;--erp-accent:#89ebad;--erp-chip:#1c2632}
html.aehea-desk-theme .ud-main,html.aehea-desk-theme .ud-related-frame{--erp-panel:#faf9f5;--erp-ink:#252a24;--erp-muted:#5c635c;--erp-line:#cbc7ba;--erp-accent:#87520a;--erp-chip:#f1eee5}
/* The outer wrapper uses each site's existing content-shell width. */
.ud-related-frame{box-sizing:border-box;margin-block:12px 24px;min-width:0}
.ud-related-frame > section.ud-main.ud-related{width:100%;max-width:none;margin:0;padding:16px clamp(12px,2vw,24px) 20px;box-sizing:border-box;border:1px solid var(--erp-line,#87909b55);border-radius:10px;background:var(--erp-panel,transparent);color:var(--erp-ink,inherit)}
.ud-related-frame .ud-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.ud-related-frame .ud-card{background:var(--erp-chip,transparent);border-color:var(--erp-line,#87909b55)}
.ud-related-frame .ud-copy{padding:12px}.ud-related-frame .ud-copy h3{margin:3px 0 7px}.ud-related-frame .ud-section-head{margin-bottom:12px}
/* A concise article opening: no fixed heights or clipped headlines. */
html.aehea-desk-theme .aehea-news-article .aehea-window-body{padding-block:clamp(12px,2vw,24px)}
html.aehea-desk-theme article.aehea-news-document,article.ed-document{padding-block:clamp(14px,2vw,26px)}
article.aehea-news-document>h1,article.ed-document>h1,article.hw-article>h1,article.gear-article>h1{font-size:clamp(1.75rem,2.65vw,2.6rem);line-height:1.13;letter-spacing:-.035em;margin:7px 0 10px;overflow-wrap:break-word;text-wrap:balance}
html.aehea-desk-theme article.aehea-news-document>h1{font-size:clamp(1.75rem,2.65vw,2.6rem);line-height:1.13;margin:7px 0 10px}
article.aehea-news-document>.ed-deck,article.ed-document>.ed-deck,article.hw-article>.hw-deck,article.gear-article>.gear-deck{font-size:clamp(1rem,1.3vw,1.16rem);line-height:1.48;margin:0 0 12px}
article.aehea-news-document>.ed-author,article.ed-document>.ed-author,article.hw-article>.hw-byline,article.gear-article>.gear-person{margin:10px 0 14px;padding:0 0 8px;gap:10px}
article.aehea-news-document .ed-author .ed-avatar,article.ed-document .ed-author .ed-avatar,article.gear-article>.gear-person img{width:42px;height:42px;flex:0 0 42px;object-fit:cover}
article.aehea-news-document .ed-author strong,article.ed-document .ed-author strong{font-size:.96rem}
article.aehea-news-document .ed-author span,article.ed-document .ed-author span{font-size:.83rem;line-height:1.4}
article.aehea-news-document>figure.aehea-news-article-media,article.ed-document>figure.ed-figure{margin-block:14px 20px}
article.hw-article,article.gear-article{margin-top:12px}
/* Section headers retain hierarchy, and keep links alongside headings. */
.ed-panel.eis-panel{padding:clamp(12px,1.6vw,22px);margin-block:12px 20px}
.ed-panel.eis-panel .eis-head,.ed-panel .ed-panel-head{gap:8px 16px;margin:0 0 12px;align-items:center}
.ed-panel.eis-panel .eis-head h1,.ed-panel.eis-panel .eis-head h2,.ed-panel .ed-panel-head h2,.gm-main .gm-section-head h2,.hw-section .hw-section-head h2,.gear-section .gear-section-head h2{font-size:clamp(1.35rem,2vw,1.9rem);line-height:1.15;margin:2px 0;letter-spacing:-.025em}
.ed-panel.eis-panel .eis-head p,.ed-panel .ed-panel-head p{font-size:.9rem;line-height:1.4;margin:4px 0}
.ed-panel.eis-panel .eis-links{gap:6px}.ed-panel.eis-panel .eis-links .ed-all,.ed-panel .ed-panel-head .ed-all{padding:6px 10px;font-size:.82rem;line-height:1.4}
.hw-section .hw-section-head,.gear-section .gear-section-head,.gm-main .gm-section-head{padding-block:8px 10px;margin-bottom:8px;align-items:center;gap:8px 12px}
.hw-section .hw-kicker,.gear-section .gear-kicker,.ed-panel .ed-kicker,.gm-section-head .gm-kicker{font-size:.69rem;line-height:1.3;letter-spacing:.07em}
.hw-page .hw-archive-head,.gear-page .gear-archive-head,.ed-main .ed-hero,.aehea-news .aehea-news-hero{padding-block:12px 16px}
.hw-page .hw-archive-head h1,.gear-page .gear-archive-head h1,.ed-main .ed-hero h1,.aehea-news .aehea-news-hero h1{font-size:clamp(1.65rem,2.7vw,2.4rem);margin:4px 0 7px;line-height:1.13}
/* Actual citations stay visible and clickable, without printing full URLs. */
article .erp-source-heading,article .hw-sources h2,article .gear-sources h2{font-size:1.15rem;line-height:1.3;margin:14px 0 8px}
article .hw-sources,article .gear-sources{padding:12px 0;margin-top:16px}
article ul.erp-source-pills{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin:0 0 10px;padding:0;list-style:none}
article ul.erp-source-pills>li{margin:0;padding:0;min-width:0;max-width:100%;list-style:none;font-size:.78rem;line-height:1.3}
article ul.erp-source-pills>li>a{display:inline-flex;align-items:center;flex-wrap:wrap;gap:4px 7px;border:1px solid var(--erp-line,#87909b55);border-radius:999px;padding:6px 10px;background:var(--erp-chip,transparent);color:var(--erp-accent,currentColor);font-size:.78rem;text-decoration:none;overflow-wrap:anywhere;max-width:100%;box-sizing:border-box}
.erp-source-host{font-weight:650}.erp-source-topic{opacity:.88}.erp-external{font-size:.8em}article ul.erp-source-pills>li>a:hover{text-decoration:underline;border-color:currentColor}
article.aehea-news-document>.aehea-amber-button{font-size:.87rem;padding:7px 12px;margin:4px 0 8px;line-height:1.35}
article.aehea-news-document>aside.erp-source-note{margin:8px 0 12px;padding:8px 11px;font-size:.83rem;line-height:1.45;display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 8px}
article.aehea-news-document>aside.erp-source-note strong,article.aehea-news-document>aside.erp-source-note span{font-size:inherit;display:inline;margin:0}
/* Footer preserves all existing destinations, grouped by purpose. */
footer.erp-footer{display:grid;grid-template-columns:minmax(160px,1fr) minmax(0,3fr);gap:20px 28px;align-items:start;padding:24px 0 18px;border-top:1px solid var(--erp-line,#87909b55);color:var(--erp-muted,inherit);font-family:inherit;font-size:.85rem;box-sizing:border-box}
footer.erp-footer>.erp-footer-brand{display:flex;flex-direction:column;align-items:flex-start;gap:8px;min-width:0}
footer.erp-footer .erp-wordmark{font-size:1.4rem;line-height:1.1;letter-spacing:-.035em;font-weight:800;color:var(--erp-ink,inherit);text-decoration:none}
footer.erp-footer .erp-footer-brand p{font-size:.85rem;line-height:1.5;margin:0;max-width:29ch}
footer.erp-footer nav.erp-footer-nav{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px 22px;min-width:0;margin:0;padding:0;align-items:start}
footer.erp-footer .erp-footer-group{display:flex;flex-direction:column;align-items:flex-start;gap:7px;min-width:0}
footer.erp-footer .erp-footer-group h2{font-size:.78rem;text-transform:uppercase;letter-spacing:.055em;line-height:1.3;margin:0 0 3px;font-weight:750;color:var(--erp-ink,inherit)}
footer.erp-footer .erp-footer-group a{color:inherit;font-size:.82rem;line-height:1.4;overflow-wrap:anywhere;text-decoration:none;margin:0;padding:0}
footer.erp-footer .erp-footer-group a:hover{color:var(--erp-accent,currentColor);text-decoration:underline}
footer.erp-footer .erp-footer-bottom{grid-column:1/-1;display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px;border-top:1px solid var(--erp-line,#87909b55);padding-top:12px;margin:0;font-size:.76rem}
footer.erp-footer .erp-footer-bottom a{color:inherit;text-decoration:none}
footer.erp-footer a:focus-visible,article .erp-source-pills a:focus-visible{outline:2px solid var(--erp-accent,currentColor);outline-offset:3px}
@media(max-width:850px){.ud-related-frame .ud-grid{grid-template-columns:repeat(2,minmax(0,1fr))}footer.erp-footer{grid-template-columns:1fr;gap:18px}footer.erp-footer nav.erp-footer-nav{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:520px){footer.erp-footer nav.erp-footer-nav{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 12px}footer.erp-footer .erp-footer-group a{font-size:.8rem}.ud-related-frame > section.ud-main.ud-related{padding:10px}.ud-related-frame .ud-grid{gap:8px}.ud-related-frame .ud-copy{padding:9px}.ed-panel.eis-panel .eis-head h1,.ed-panel.eis-panel .eis-head h2{font-size:1.35rem}}
/* Inline AEHEA related content shares the real article/game window width. */
html.aehea-desk-theme .aehea-app-window>.ud-related-frame.erp-related-inline{margin:0;max-width:100%;width:100%;padding:0;box-sizing:border-box}
html.aehea-desk-theme .aehea-app-window>.erp-related-inline>section.ud-related{border:0;border-top:1px solid var(--erp-line);border-radius:0;background:transparent;padding:clamp(12px,2vw,24px);margin:0}
.ed-panel.eis-panel .eis-head>div:first-child{flex:1 1 280px;min-width:0}
.ed-panel.eis-panel .eis-head .eis-links{flex:0 1 auto;align-self:center;justify-content:flex-end}
html.aehea-desk-theme footer.aehea-desk-footer.erp-footer{font-family:inherit;display:grid;align-items:start}
html.aehea-desk-theme footer.aehea-desk-footer.erp-footer>nav.erp-footer-nav{display:grid}
html.aehea-desk-theme footer.aehea-desk-footer.erp-footer>.erp-footer-bottom{display:flex;flex-direction:row}
@media(max-width:600px){.ed-panel.eis-panel .eis-head .eis-links{justify-content:flex-start}}
