/* Redline Alpha — shared intel design system.
 * Coherence overhaul foundation. NO theme change: tokens are the
 * existing dark palette, normalised so every page speaks one language.
 * Adopt on any page with:
 *   <link rel="stylesheet" href="/static/redline.css">
 *   <script src="/static/redline_shell.js"></script>   (nav + footer)
 * Component classes are `rl-` prefixed so they never collide with a
 * page's existing styles during incremental migration.
 */

:root {
  --rl-bg:        #0f1117;   /* page background            */
  --rl-bg-2:      #12141c;   /* recessed panels            */
  --rl-surface:   #1a1d27;   /* cards / nav                */
  --rl-surface-2: #1e2130;   /* hover / raised             */
  --rl-border:    #252830;   /* default border             */
  --rl-text:      #e2e8f0;   /* primary text               */
  --rl-muted:     #888888;   /* secondary text             */
  --rl-dim:       #555555;   /* captions / disclaimers     */
  --rl-brand:     #e53e3e;   /* Redline red (brand only)   */
  --rl-green:     #48bb78;   /* HIGH / positive            */
  --rl-amber:     #ecc94b;   /* MEDIUM / caution           */
  --rl-grey:      #a0aec0;   /* LOW                        */
  --rl-noop:      #718096;   /* NO_OPINION                 */
  --rl-radius:    10px;
  --rl-gap:       12px;
  --rl-maxw:      900px;
  --rl-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ---- base (scoped via rl- classes; does not restyle raw tags
        globally so it can co-exist with un-migrated page CSS) ---- */
.rl-body { background: var(--rl-bg); color: var(--rl-text);
  font-family: var(--rl-font); margin: 0; }
.rl-container { max-width: var(--rl-maxw); margin: 0 auto; padding: 16px; }
.rl-h1 { font-size: 18px; font-weight: 700; margin: 0 0 4px; }
.rl-h2 { font-size: 14px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--rl-dim); margin: 0 0 8px; }
.rl-sub { font-size: 11px; color: var(--rl-muted); line-height: 1.5; }
.rl-dim { color: var(--rl-dim); }
.rl-link { color: var(--rl-grey); text-decoration: none;
  border-bottom: 1px dotted #3d4759; }
.rl-link:hover { color: var(--rl-green); border-bottom-color: var(--rl-green); }

/* ---- top nav (injected by redline_shell.js) ---- */
.rl-nav { position: sticky; top: 0; z-index: 50; display: flex;
  align-items: center; gap: 18px; padding: 12px 18px;
  background: var(--rl-surface); border-bottom: 1px solid var(--rl-border);
  overflow-x: auto; }
.rl-nav .rl-brand { font-weight: 800; letter-spacing: 0.5px;
  color: var(--rl-text); white-space: nowrap; }
.rl-nav .rl-brand b { color: var(--rl-brand); }
.rl-nav a { color: var(--rl-muted); text-decoration: none; font-size: 13px;
  font-weight: 600; white-space: nowrap; padding: 4px 0; }
.rl-nav a:hover { color: var(--rl-text); }
.rl-nav a.rl-active { color: var(--rl-green);
  border-bottom: 2px solid var(--rl-green); }
.rl-nav .rl-spacer { flex: 1; }

/* ---- footer / disclaimer (injected by redline_shell.js) ---- */
.rl-footer { max-width: var(--rl-maxw); margin: 22px auto 0;
  padding: 14px 18px; border-top: 1px solid var(--rl-border);
  font-size: 10px; color: var(--rl-dim); line-height: 1.6; }
.rl-footer b { color: var(--rl-muted); }

/* ---- card ---- */
.rl-card { background: var(--rl-surface); border: 1px solid var(--rl-border);
  border-radius: var(--rl-radius); padding: 14px 16px;
  margin-bottom: var(--rl-gap); }
.rl-card:hover { background: var(--rl-surface-2); }

/* ---- confidence chip (the platform's core signal) ---- */
.rl-chip { display: inline-block; font-size: 10px; font-weight: 700;
  letter-spacing: 0.5px; padding: 3px 9px; border-radius: 4px;
  vertical-align: middle; }
.rl-chip--high { background: #1c3a2a; color: var(--rl-green);
  border: 1px solid #2d5a3e; }
.rl-chip--med  { background: #2a2418; color: var(--rl-amber);
  border: 1px solid #4a4020; }
.rl-chip--low  { background: #1e2028; color: var(--rl-grey);
  border: 1px solid #333; }
.rl-chip--noop { background: #1e2028; color: var(--rl-noop);
  border: 1px solid #333; }
/* confidence-led card accent (left border) */
.rl-card--high { border-color: #2d5a3e; box-shadow: 0 0 0 1px #2d5a3e inset; }
.rl-card--med  { border-color: #4a4020; }
.rl-card--low  { border-color: #333; }
.rl-card--noop { border-color: var(--rl-border); opacity: 0.94; }

/* ---- demoted staking marker (never a CTA) ---- */
.rl-staking-off { font-size: 10px; color: var(--rl-dim); margin-top: 4px; }

/* ---- generic badge / button / table / bar ---- */
.rl-badge { display: inline-block; font-size: 10px; font-weight: 700;
  padding: 3px 8px; border-radius: 4px; background: var(--rl-bg-2);
  color: var(--rl-muted); border: 1px solid var(--rl-border); }
.rl-btn { background: var(--rl-surface); border: 1px solid var(--rl-border);
  color: var(--rl-muted); padding: 6px 12px; border-radius: 6px;
  cursor: pointer; font-size: 12px; }
.rl-btn.rl-active { background: #1c3a2a; border-color: #2d5a3e;
  color: var(--rl-green); font-weight: 600; }
.rl-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.rl-table th, .rl-table td { padding: 6px 8px; text-align: left;
  border-bottom: 1px solid #20232d; }
.rl-table th { color: var(--rl-dim); font-weight: 600; font-size: 10px;
  text-transform: uppercase; }
.rl-bar { height: 16px; background: var(--rl-bg-2);
  border: 1px solid var(--rl-border); border-radius: 4px; overflow: hidden; }
.rl-bar > i { display: block; height: 100%; background: #2d5a3e; }

/* ---- disclaimer block (honesty contract, reusable) ---- */
.rl-disclaimer { font-size: 10px; color: var(--rl-dim); margin-top: 10px;
  line-height: 1.5; }

@media (max-width: 560px) {
  .rl-container { padding: 12px; }
  .rl-nav { gap: 12px; padding: 10px 12px; }
}
