/* =====================================================================
   Solaradex design system: the one source of colours, type, spacing and
   shared behaviour for every page (main site, info pages, admin).
   Rule: premium = fewer, better things. No gradients, glows, glass,
   heavy shadows or emoji icons. Colour carries meaning, not decoration.
   ===================================================================== */
:root {
  /* surfaces */
  --bg: #0b0f14;            /* page */
  --surface: #11171f;       /* raised areas: tables, pop-ups, inputs */
  --surface-2: #16202d;     /* hover / selected row */
  --line: #1e2834;          /* dividers and borders */
  --line-strong: #2b3a4d;   /* input borders, focus-adjacent */

  /* text */
  --text: #e6edf3;
  --text-2: #b4c0cf;        /* secondary */
  --mute: #8b98a9;          /* labels, metadata (13px and up) */

  /* one accent */
  --brand: #4f8cff;
  --brand-ink: #ffffff;     /* text on brand */

  /* meaning */
  --up: #26a69a;            /* price up */
  --down: #ef5350;          /* price down */
  --safe: #26a69a;          /* safety: fine */
  --warn: #f2b84b;          /* safety: caution */
  --danger: #ef5350;        /* safety: serious risk */
  --info: #6aa7ff;

  /* type: the device's own font, 6 sizes, 3 weights */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --fs-xs: 12px; --fs-sm: 13px; --fs-md: 14px; --fs-lg: 16px; --fs-xl: 20px; --fs-2xl: 28px;
  --fw-text: 400; --fw-label: 600; --fw-figure: 700;

  /* space, radius, motion */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  --r1: 6px;                /* controls */
  --r2: 10px;               /* surfaces */
  --r-pill: 999px;
  --shadow-pop: 0 18px 48px rgba(0, 0, 0, .55);   /* pop-ups and drawers only */
  --t: 120ms ease;

  /* older names still used in the page styles (kept so nothing breaks while pages move over) */
  --panel: var(--surface);
  --accent: var(--brand);
  --blue: var(--brand);
  --green: var(--up);
  --red: var(--down);
  --amber: var(--warn);
  --gold: var(--warn);
}

/* ---- shared behaviour ---- */
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); }
/* numbers line up in columns everywhere */
table, .num, .tabular { font-variant-numeric: tabular-nums; }
/* one visible focus ring for keyboard users, on every control */
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
:focus:not(:focus-visible) { outline: none; }
::selection { background: rgba(79, 140, 255, .35); }
/* respect "reduce motion" */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0ms !important; animation-duration: 0ms !important; scroll-behavior: auto !important; }
}

/* My alerts (13 Nov 2026) */
.ma-h { display:flex; justify-content:space-between; align-items:baseline; gap:8px; margin-top:16px; }
.ma-n { font-size:12px; font-weight:500; color:var(--mute, #8a94a6); }
.ma-hint { margin:2px 0 6px; }
.ma-rule { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:8px 10px; border:1px solid var(--line, #232a36); border-radius:10px; }
.ma-back { display:block; background:none; border:0; padding:0 0 4px; color:var(--mute, #8a94a6); font-size:12px; cursor:pointer; }
.ma-back:hover { color:inherit; }
.g-list .x { background:none; border:1px solid var(--line-strong, #2b3a4d); color:var(--mute, #8b98a9); border-radius:8px; width:26px; height:26px;
  line-height:1; font-size:13px; cursor:pointer; padding:0; display:inline-grid; place-items:center; }
.g-list .x:hover { color:#ff6b6b; border-color:#ff6b6b; }

/* Movers direction + Results sub-tabs (13 Nov 2026) */
.mdir.on, .rv.on { border-color: var(--accent, #4f7dff); color: var(--text, #e6edf5); }
.tfsep { display:inline-block; width:10px; }
.restabs { display:flex; gap:6px; margin:10px 0 4px; }
/* one search + check box: the Check button sits right next to the search field (13 Nov 2026) */
body .bar #q { order:1; flex:1 1 280px; width:auto; }
body .bar #barSlot { order:2; flex:0 0 auto; }
body .bar #src { order:3; } body .bar #cur { order:4; } body .bar #helpBtn { order:5; } body .bar #fxNote { order:6; }
body .bar #barSlot .paste { flex:0 0 auto; background:none; border:0; box-shadow:none; padding:0; }
body .bar #barSlot .paste-go { height:36px; padding:0 16px; }
@media (max-width:760px) {
  body .bar #q { flex:1 1 calc(100% - 90px); min-width:0; }   /* search + Check fill the first row */
  body .bar #barSlot .paste-go { height:36px; border-radius:10px; }
}
/* Developer card tabs (13 Nov 2026) */
.dvtabs { display:flex; gap:4px; margin:6px 0 10px; border-bottom:1px solid var(--line, #1e2834); }
.dvtab { background:none; border:0; border-bottom:2px solid transparent; color:var(--mute, #8b98a9); font:inherit; font-size:13px; font-weight:600;
  padding:6px 8px 7px; cursor:pointer; display:inline-flex; align-items:center; gap:4px; white-space:nowrap; }
.dvtab.on { color:var(--text, #e6edf5); border-bottom-color:var(--accent, #4f7dff); }
.dvtab .mute { font-weight:400; }
.dvdot { width:7px; height:7px; min-width:7px; max-width:7px; flex:0 0 7px; padding:0; margin:0 0 0 2px; border-radius:50%; display:none; font-size:0; }
.dvdot.dv-bad { display:inline-block; background:#ff5c5c; } .dvdot.dv-warn { display:inline-block; background:#f2b84b; }
.devtop { display:flex; align-items:center; gap:6px; flex-wrap:wrap; padding:7px 10px; border-radius:10px; font-size:13px; margin:4px 0 2px; }
.devtop.bad { background:#ff5c5c1a; border:1px solid #ff5c5c55; } .devtop.warn { background:#f2b84b14; border:1px solid #f2b84b55; }
.devtop .linkbtn { margin-left:auto; background:none; border:0; color:var(--accent, #4f7dff); cursor:pointer; font:inherit; font-size:12px; padding:0; }
/* the counts are already in each tab's verdict line; keep the tab row narrow enough for the side column */
.dvtab #devSum, .dvtab #netSum { display:none; }
.dvtabs { flex-wrap:wrap; }
.dvtab { padding:6px 7px 7px; }

/* Risk history on the coin page (Task 005): collapsed, plain text, one line per event */
.rhist { margin-top: var(--s3); border-top: 1px solid var(--line, #1f2a37); padding-top: var(--s2); }
.rhist > summary { cursor: pointer; font-size: var(--fs-sm); font-weight: var(--fw-label); color: var(--text-2); list-style: none; }
.rhist > summary::-webkit-details-marker { display: none; }
.rhist > summary::before { content: "▸"; display: inline-block; width: 1em; color: var(--mute); }
.rhist[open] > summary::before { content: "▾"; }
.rhlist { list-style: none; margin: var(--s2) 0; padding: 0; }
.rhlist li { display: grid; grid-template-columns: 64px 1fr; gap: var(--s2); padding: 5px 0 5px 10px; font-size: var(--fs-sm);
  color: var(--text-2); border-left: 2px solid var(--line-strong, #2b3a4d); }
.rhlist li .t { color: var(--mute); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
.rhlist li.rh-warn { border-left-color: var(--warn); }
.rhlist li.rh-bad { border-left-color: var(--danger); color: var(--text); }
.rhlist li.rh-good { border-left-color: var(--safe); }
.rhlist .devw { margin-left: 4px; }

/* Threat registry note (Task 006): quiet, evidence first; the red line on the left carries the meaning */
.thrnote { margin: 0 0 var(--s2); padding: 6px 0 6px 10px; border-left: 2px solid var(--danger); font-size: var(--fs-sm); color: var(--text-2); display: grid; gap: 3px; }
.thrnote > b { color: var(--danger); font-size: var(--fs-xs); font-weight: var(--fw-label); }
