/* Site-wide elements shared by the homepage, every backtest page and the legal pages */
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--text, #e6edf3) !important; font-weight: 800; font-size: 1.08rem !important; letter-spacing: -0.3px; text-decoration: none; line-height: 1; }
.brand svg { width: 28px; height: 28px; flex: 0 0 auto; display: block; }
.brand em { font-style: normal; font-weight: 500; color: var(--cyan, #00e5ff); margin-left: 3px; }
.brand:hover { color: var(--text, #e6edf3) !important; }
.nav-left { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.nav-left .nav-all { color: var(--muted, #8b949e); font-size: 0.85rem; text-decoration: none; padding-left: 14px; border-left: 1px solid var(--border, #30363d); }
.nav-left .nav-all:hover { color: var(--green, #00e676); }

/* Footer */
.site-footer { margin: 26px 0 8px; padding: 16px 4px 0; border-top: 1px solid var(--border, #30363d); color: var(--muted, #8b949e); font-size: 0.8rem; line-height: 1.55; }
.site-footer a { color: var(--cyan, #00e5ff); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .footer-brand { margin-bottom: 8px; }
.site-footer .footer-note { margin: 0 0 10px; max-width: 880px; }
.site-footer .footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 10px; }
.site-footer .footer-copy { opacity: 0.8; }
.site-related { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--border, #30363d); font-size: 0.82rem; }
.site-related span { color: var(--text, #e6edf3); font-weight: 700; }

/* Advertising slot (stays hidden until ads are configured in shared/site.json and the visitor consents) */
.ad-slot { margin: 22px 0 0; min-height: 90px; text-align: center; overflow: hidden; }
.ad-slot[hidden] { display: none; }

/* Cookie consent banner (only appears if ads or analytics are configured) */
.consent-banner { position: fixed; left: 14px; right: 14px; bottom: 14px; max-width: 780px; margin: 0 auto; z-index: 9999; background: var(--panel, #161b22); border: 1px solid var(--border, #30363d); border-radius: 12px; padding: 14px 16px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.55); display: flex; gap: 14px; align-items: center; flex-wrap: wrap; font-size: 0.84rem; color: var(--text, #e6edf3); }
.consent-banner p { margin: 0; flex: 1 1 340px; color: var(--muted, #8b949e); line-height: 1.5; }
.consent-banner a { color: var(--cyan, #00e5ff); }
.consent-banner .consent-actions { display: flex; gap: 8px; flex: 0 0 auto; }
.consent-banner button { cursor: pointer; font-weight: 700; font-size: 0.82rem; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--border, #30363d); background: transparent; color: var(--text, #e6edf3); }
.consent-banner button.primary { background: rgba(0, 229, 255, 0.16); border-color: rgba(0, 229, 255, 0.55); color: var(--cyan, #00e5ff); }
.consent-banner button:hover { border-color: var(--cyan, #00e5ff); }

/* Legal / about pages */
.legal { max-width: 820px; margin: 18px auto 10px; line-height: 1.7; }
.legal h1 { font-size: 1.9rem; margin: 6px 0 4px; }
.legal h2 { font-size: 1.18rem; margin: 30px 0 8px; color: var(--text, #e6edf3); }
.legal h3 { font-size: 1rem; margin: 18px 0 4px; color: var(--amber, #ffb300); }
.legal p, .legal li { color: #c9d1d9; font-size: 0.97rem; }
.legal li { margin-bottom: 8px; }
.legal a { color: var(--cyan, #00e5ff); }
.legal .updated { color: var(--muted, #8b949e); font-size: 0.85rem; margin-top: 0; }
.legal .lead { font-size: 1.1rem; color: var(--text, #e6edf3); }
.legal .callout { background: rgba(255, 179, 0, 0.08); border: 1px solid rgba(255, 179, 0, 0.35); border-radius: 10px; padding: 12px 16px; }

/* Reset Defaults lives at the top of the settings sidebar */
.settings-bar { display: flex; justify-content: flex-end; margin: 4px 0 12px; }
.settings-bar .reset-link-btn { font-size: 0.74rem; padding: 5px 10px; }
