/* RFOS v4.1.0 — authoritative visual, header and colour contract. */
:root{--rfos-blue:#073b8f;--rfos-blue-2:#0b4fc3;--rfos-gold:#d6aa24;--rfos-bg:#f4f6fb;--rfos-surface:#fff;--rfos-surface-2:#eef2f8;--rfos-text:#17233a;--rfos-muted:#566176;--rfos-line:#cbd4e3;--rfos-shadow:0 12px 28px rgba(15,36,76,.12)}
html[data-rfos-theme="dark"]{color-scheme:dark;--rfos-bg:#06101f;--rfos-surface:#12243a;--rfos-surface-2:#19304b;--rfos-text:#f6f8fc;--rfos-muted:#cfdaea;--rfos-line:#536c8d;--rfos-shadow:0 12px 28px rgba(0,0,0,.32)}
html,body{background:var(--rfos-bg)!important;color:var(--rfos-text)!important}
body,main,.container,.rfos-discovery{transition:none!important;animation:none!important}
p,li,dd,dt,label,.media-note,.copy,.email{color:var(--rfos-text)}
a{color:var(--rfos-blue-2)}
html[data-rfos-theme="dark"] a{color:#9bc2ff}

/* Header remains present, singular and protected before any translation runs. */
.rfos-site-header{display:block!important;visibility:visible!important;opacity:1!important;min-height:74px;background:linear-gradient(100deg,#072f78,#063fa6)!important;color:#fff!important;transform:none!important;animation:none!important;contain:none!important}
.rfos-site-header .topbar,.rfos-site-header .header-inner{display:flex!important;align-items:center!important;gap:14px;min-height:74px}
.rfos-site-header .brand{flex:0 1 auto;min-width:210px}
.rfos-site-header nav{display:flex;align-items:center;gap:3px;flex-wrap:nowrap!important;white-space:nowrap}
.rfos-site-header nav a{color:#fff!important;font-size:clamp(.82rem,.9vw,.98rem)!important;line-height:1.15;padding:.68rem .52rem!important}
.rfos-site-header nav a.active,.rfos-site-header nav a:hover{color:#f2ca4b!important;background:rgba(255,255,255,.09)!important}
.rfos-site-header .language-toggle,.rfos-site-header .menu-toggle{color:#fff!important;border-color:rgba(255,255,255,.62)!important;background:rgba(3,31,85,.42)!important}
.rfos-site-header .translate-row{background:#082e75!important}
@media(max-width:980px){.rfos-site-header nav{white-space:normal}.rfos-site-header nav a{font-size:1rem!important}.rfos-site-header .brand{min-width:0}}

/* Ordinary content surfaces use one consistent light/dark palette. */
.card,.content-card,.about-card,.mission-card,.message-card,.contact-card,.support-card,.entertainment-card,.x-space-card,.publication-card,.update-card,.awareness-card,.published-item,.rfos-publication,.rfos-managed-section,.rfos-discovery-panel,.rfos-stage,.rfos-stage-body,.rfos-challenge-welcome,.rfos-challenge-feedback,.rfos-answer,.rfos-story-card,.rfos-story-list,.rfos-story-list-item,.rfos-follow-panel,.rfos-info-panel,.note,form,fieldset{background:var(--rfos-surface)!important;color:var(--rfos-text)!important;border-color:var(--rfos-line)!important;box-shadow:var(--rfos-shadow)}
input,textarea,select{background:var(--rfos-surface)!important;color:var(--rfos-text)!important;border-color:var(--rfos-line)!important}
input::placeholder,textarea::placeholder{color:var(--rfos-muted)!important;opacity:1}
.section-heading p,.page-header p,.published-meta,.publication-meta,.photo-caption,figcaption{color:var(--rfos-muted)!important}

/* Brand emphasis remains blue, gold and white in both modes. */
.page-header,.rfos-discovery-head,.rfos-stage-hero,.rfos-panel-title,.rfos-support-cta,.rfos-horizontal-panel{background:linear-gradient(105deg,#06378b,#084dca)!important;color:#fff!important}
.page-header h1,.rfos-discovery-head h2,.rfos-stage-hero h3,.rfos-panel-title strong,.rfos-support-cta h2{color:#e2b62e!important}
.page-header p,.rfos-discovery-head p,.rfos-stage-hero p,.rfos-panel-title p,.rfos-support-cta p{color:#fff!important}
button,.button,.rfos-hub-button,.rfos-primary-action,.rfos-support-cta a{background:linear-gradient(105deg,#06378b,#0a4fc7)!important;color:#e8bd35!important;border:1px solid #d6aa24!important;font-weight:800!important}
button:disabled{opacity:.62!important;cursor:not-allowed}

/* Challenge: legible, interactive and free of inherited black-on-blue text. */
.rfos-question,.rfos-challenge-category,.rfos-challenge-progress,.rfos-answer{color:var(--rfos-text)!important}
.rfos-answer{display:block;width:100%;margin:.7rem 0;text-align:left;cursor:pointer}
.rfos-challenge-feedback.is-correct{background:#e9f8ee!important;color:#123c22!important;border-left:5px solid #278b49!important}
.rfos-challenge-feedback.is-incorrect{background:#fff1ef!important;color:#5a211d!important;border-left:5px solid #b84b40!important}
html[data-rfos-theme="dark"] .rfos-challenge-feedback.is-correct{background:#193b28!important;color:#eaffef!important}
html[data-rfos-theme="dark"] .rfos-challenge-feedback.is-incorrect{background:#482622!important;color:#fff2ef!important}

/* Publications and captions remain orderly without recolouring their media. */
.publications-list,.updates-list,.awareness-list,.x-spaces-list{display:grid;gap:22px!important;align-items:start}
.publication-card,.update-card,.awareness-card,.x-space-card{overflow:hidden;margin:0!important}
.publication-card img,.update-card img,.x-space-card img,figure img{display:block;max-width:100%;height:auto}
figure{max-width:100%;margin:1.2rem auto}
figcaption,.photo-caption{display:block;width:100%;box-sizing:border-box;margin:0;padding:.55rem .75rem;text-align:left;line-height:1.45;background:var(--rfos-surface-2)!important}

/* Awareness guidance boxes stay independent instead of becoming one block. */
.awareness-boxes,.awareness-guidance-grid,.awareness-points,.rfos-awareness-boxes{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(220px,1fr))!important;gap:18px!important;background:transparent!important;border:0!important;box-shadow:none!important;padding:0!important}
.awareness-box,.awareness-guidance-box,.awareness-point,.rfos-awareness-box{display:flex!important;flex-direction:column!important;align-items:center!important;background:var(--rfos-surface)!important;color:var(--rfos-text)!important;border:1px solid var(--rfos-line)!important;border-top:4px solid var(--rfos-blue)!important;border-radius:18px!important;padding:1.35rem!important;box-shadow:var(--rfos-shadow)!important}
.rfos-awareness-box h3,.rfos-awareness-box p{color:var(--rfos-text)!important}
.rfos-awareness{background:transparent!important;border:0!important;box-shadow:none!important}

/* Theme controls stay above content; artwork and quote cards keep native colours. */
.rfos-theme-toggle,#rfosInstallApp{z-index:2147483000!important}
.quote-card,.quote-card *,figure img,.entertainment-card iframe{filter:none!important;mix-blend-mode:normal}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
