/* AXIOM_RC20_UI — shared smooth/light/dark editorial visual cleanup. */
:root{--rc20-red:#c4101c;--rc20-ease:cubic-bezier(.22,.61,.36,1)}
/* Cross-page navigation is progressively enhanced where the browser supports it. */
@view-transition{navigation:auto}
::view-transition-old(root){animation:.12s ease-in both rc20-leave}
::view-transition-new(root){animation:.23s var(--rc20-ease) both rc20-enter}
@keyframes rc20-enter{from{opacity:.35;transform:translateY(5px)}to{opacity:1;transform:none}}
@keyframes rc20-leave{to{opacity:.3}}
body.ae-portal main{animation:rc20-content .22s var(--rc20-ease) both}
@keyframes rc20-content{from{opacity:.7;transform:translateY(5px)}to{opacity:1;transform:none}}
body.ae-portal :is(button,a,input,textarea,select):focus-visible{outline:2px solid var(--ae-red,#c4101c);outline-offset:3px}
/* One brand mark on all editorial pages (including standalone publications and moderation). */
#ae-rail .ae-monogram{background:#c4101c!important;color:#fff!important;border:1px solid #a50e19!important;border-radius:12px!important;width:43px;height:43px;padding:7px;display:flex;align-items:center;justify-content:center;box-shadow:0 9px 22px rgba(196,16,28,.19)!important}
#ae-rail .ae-monogram svg{display:block;width:27px;height:27px;flex:none}
#ae-rail .ae-brand{transition:background-color .18s ease,opacity .18s ease}
#ae-rail .ae-brand:hover{opacity:.84}
#ae-rail .ae-nav a{transition:background-color .18s var(--rc20-ease),color .18s var(--rc20-ease),transform .18s var(--rc20-ease)!important}
#ae-rail .ae-nav a.active{box-shadow:inset 3px 0 0 #c4101c}
/* Consistent, comfortably readable controls in both palettes. */
body.ae-portal :is(.panel,.stat,.tile,.kpi,.ae-work-card,.ae-article-row,.ae-report-row){transition:background-color .2s ease,border-color .2s ease,box-shadow .2s ease}
body.ae-portal :is(.panel,.stat,.tile,.kpi,.ae-work-card):hover{border-color:color-mix(in srgb,var(--ae-border) 74%,var(--ae-red) 26%)}
body.ae-portal :is(.panel,.stat,.tile,.kpi,.ae-work-card) :is(button,a){transition:background-color .18s ease,border-color .18s ease,color .18s ease,transform .18s ease}
/* RSS, queue and analytics: dark-mode white patches from inline legacy styles. */
html[data-axiom-theme="dark"] body.ae-portal main :is(button:not(.primary):not(.ae-primary):not(.selected):not(.active):not([role="switch"]):not(.switch), .secondary, .refresh, .tab:not(.active), .editor-nav button, .source button, #autoToggle:not(.primary), #refresh, #reload, #saveAutoSettings){background:var(--ae-input,#22242b)!important;color:var(--ae-ink,#f1f2f4)!important;border:1px solid var(--ae-border,#3b3f49)!important;box-shadow:none!important}
html[data-axiom-theme="dark"] body.ae-portal main :is(button.danger,#clearQueue,.ae-source-danger){background:#321b23!important;color:#ff8d99!important;border:1px solid #78404c!important}
html[data-axiom-theme="dark"] body.ae-portal main :is(button.primary,button.ae-primary,.ae-workspace button.ae-primary,.length-option.selected,.tab.active){background:#c4101c!important;color:#fff!important;border-color:#c4101c!important}
html[data-axiom-theme="dark"] body.ae-portal main :is(button[disabled],button:disabled){opacity:.45!important;cursor:not-allowed!important}
html[data-axiom-theme="dark"] body.ae-portal main :is(.auto-hero,.auto-countdown,.cycle-result,.length-configuration,.auto-settings,.auto-foot,.source,.empty,.formrow,.editor-helper,.auto-field,.topnote,.entry,.toggle,.issue,.log,.logs,.bar,.auto-status,.length-current,.length-option,.note){background:var(--ae-paper,#1b1d23)!important;color:var(--ae-ink,#f1f2f4)!important;border-color:var(--ae-border,#3b3f49)!important;box-shadow:none!important}
html[data-axiom-theme="dark"] body.ae-portal main .auto-status.live{background:#1c392d!important;color:#8ce5b0!important}
html[data-axiom-theme="dark"] body.ae-portal main .length-current{background:#392028!important;color:#ff98a3!important}
html[data-axiom-theme="dark"] body.ae-portal main :is(.auto-description p,.length-heading p,.length-footer span,.auto-foot,.auto-countdown .countdown-description span,.cycle-result small,.topnote,.entry,.entry strong,.auto-field small,.source small,.length-option small,.note,.muted,.log span,.log p,.fields label){color:var(--ae-muted,#afb2bc)!important}
html[data-axiom-theme="dark"] body.ae-portal main :is(.length-option.selected,.tab.active,.zones button.selected){background:#3c2028!important;color:#ff9daa!important;border-color:#a74b55!important}
html[data-axiom-theme="dark"] body.ae-portal main :is(.length-option.selected,.tab.active,.zones button.selected) b{color:inherit!important}
html[data-axiom-theme="dark"] body.ae-portal main :is(.switch:not([aria-checked="true"])){background:#4b4d56!important}
html[data-axiom-theme="dark"] body.ae-portal main :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea){background:var(--ae-input,#22242b)!important;color:var(--ae-ink,#f1f2f4)!important;border-color:var(--ae-border,#3b3f49)!important}
html[data-axiom-theme="dark"] body.ae-portal main :is(input,textarea)::placeholder{color:#9499a6!important}
html[data-axiom-theme="dark"] body.ae-portal main :is(.modal,.ae-source-modal,.ae-work-modal,.ae-report-dialog){background:var(--ae-paper)!important;color:var(--ae-ink)!important;border-color:var(--ae-border)!important}
html[data-axiom-theme="dark"] body.ae-portal main :is(.cat.active,.badge,.pill){background:#392027!important;color:#ff98a3!important}
/* Consistent RSS panels in light mode as well; no invasive redesign of their JS. */
body.ae-portal:has(#autoPanel) :is(.auto-hero,.auto-countdown,.cycle-result,.auto-settings,.auto-foot,.length-configuration){border-color:var(--ae-border)!important}
body.ae-portal:has(#autoPanel) :is(.auto-countdown,.cycle-result){padding:17px 23px}
body.ae-portal:has(#autoPanel) :is(.auto-save button,.length-footer button){min-height:42px;border-radius:10px}
body.ae-portal:has(#autoPanel) :is(.length-option,.tab,.source button,#autoToggle){transition:background-color .2s ease,border-color .2s ease,color .2s ease,transform .17s ease}
/* Article: compact report icon uses the same 46px visual language as bookmark/share/edit. */
#app .article-tools button.ae-news-report{display:grid!important;place-items:center!important;width:46px!important;height:46px!important;min-width:46px!important;min-height:46px!important;padding:0!important;border:1px solid #dddde3!important;border-radius:15px!important;background:var(--axiom-surface,#fff)!important;color:var(--ink,#121319)!important;box-shadow:0 8px 22px rgba(0,0,0,.08)!important;flex:none!important;position:static!important;line-height:1!important}
#app .article-tools button.ae-news-report svg{width:19px;height:19px;display:block}
#app .article-tools button.ae-news-report:hover{color:#c4101c!important;border-color:#c4101c!important;transform:translateX(2px)}
html[data-axiom-theme="dark"] #app .article-tools button.ae-news-report{background:#1b1c23!important;color:#e8e8ee!important;border-color:#424550!important;box-shadow:0 7px 20px #0004!important}
html[data-axiom-theme="dark"] #app .article-tools button.ae-news-report:hover{color:#ff6975!important;border-color:#f05263!important;background:#2e222a!important}
#app .article-tools .ae-report-screenreader{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
/* Dialog follows the same palette in both modes. */
.ae-report-dialog{background:var(--paper,#fff)!important;color:var(--ink,#16171c)!important;border-color:var(--line,#e5e5e9)!important}
.ae-report-dialog textarea{background:var(--paper,#fff)!important;color:var(--ink,#16171c)!important;border-color:var(--line,#e5e5e9)!important}
@media(max-width:1150px){#app .article-tools button.ae-news-report{width:42px!important;height:42px!important;min-width:42px!important;min-height:42px!important;border-radius:13px!important}}
@media(max-width:520px){body.ae-portal:has(#autoPanel) :is(.auto-countdown,.cycle-result){padding:13px 15px}}
@media(prefers-reduced-motion:reduce){@view-transition{navigation:none}::view-transition-old(root),::view-transition-new(root){animation:none!important}body.ae-portal main{animation:none!important}body.ae-portal *,body.ae-portal *::before,body.ae-portal *::after{transition-duration:0.01ms!important;animation-duration:0.01ms!important}}
/* Explicit destructive action styling beats generic legacy button rules. */
html[data-axiom-theme="dark"] body.ae-portal main #clearQueue.danger,
html[data-axiom-theme="dark"] body.ae-portal main button.ae-source-danger{background:#321b23!important;color:#ff8d99!important;border:1px solid #78404c!important}
/* Native site's hash-based category/article navigation: gentle view entry. */
body:not(.ae-portal) #app > .wrap{animation:rc20-content .18s var(--rc20-ease) both}
@media(prefers-reduced-motion:reduce){body:not(.ae-portal) #app > .wrap{animation:none!important}}
@media(max-width:650px){
 body.ae-portal:has(#autoPanel) .heading{flex-wrap:wrap!important;align-items:stretch!important}
 body.ae-portal:has(#autoPanel) .heading>div{min-width:0;flex:1 1 100%}
 body.ae-portal:has(#autoPanel) .heading>#checkNow{max-width:100%;min-width:0;flex:1 1 100%;white-space:normal}
}
