
/* One knob for every micro-label on the site. Gal: the 8-9px mono labels were
   unreadably small — raise them here, everywhere at once. */
:root { --fs-micro: 10.5px; --fs-label: 12px; --fs-value: 18px; }
  /* WaveMan Terminal palette. Two greys are deliberately lighter than the
     mockup: #666E76 and #535B63 measured 3.9:1 and 2.9:1 against the
     background, and they carry the hints, table headers and empty states —
     that is, the explanatory copy was the hardest text on the site to read.
     The values below keep the same cool-grey character above 5:1. */
  :root {
    --bg: #07080A; --surface: #0B0C0F; --surface-2: #0F1217; --border: #1D2126;
    --ink: #E8EAED; --ink-2: #B4BBC2; --ink-3: #8A929B;
    --accent: #C6F24E; --accent-hi: #E4FFA1;
    /* text that sits ON the accent — the accent is a light lime, so white
       text on it is unreadable; this pair measures 15.4:1 */
    --on-accent: #08090B;
    --buy: #C6F24E; --buy-bg: rgba(198,242,78,.12);
    --sell: #FF5A4E; --sell-bg: rgba(255,90,78,.12);
    --warn: #FFB44E;
    --r-card: 18px; --r-ctl: 10px;
  }
  * { box-sizing: border-box; margin: 0; }
  body {
    background:
      radial-gradient(900px 460px at 82% -8%, rgba(198,242,78,.09), transparent 62%),
      var(--bg);
    color: var(--ink);
    font: 13.5px/1.5 Archivo, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
  }
  /* numbers are read in columns and compared, so they get the mono face and
     tabular figures everywhere, not just in the places that remembered to */
  .num, .val, .tkr, .date, code, .mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }
  .num, .val { font-variant-numeric: tabular-nums; }
  h1, .homeh1 { font-family: 'Instrument Serif', Georgia, serif; font-weight: 400; letter-spacing: 0; }
  .shell { max-width: 1240px; margin: 0 auto; padding: 0 24px 40px; }

  /* ---------- sticky header: brand + tabs + live ---------- */
  .top {
    position: sticky; top: 0; z-index: 20;
    background: rgba(7,8,10,.92); backdrop-filter: blur(8px);
    display: flex; align-items: center; gap: 14px;
    padding: 12px 0; border-bottom: 1px solid var(--border); margin-bottom: 16px;
  }
  /* the lockup stacks mark over wordmark, so it needs real height to stay
     legible — below ~40px the WAVEMAN letterforms turn to mush */
  .lockup { flex: none; display: block; line-height: 0; }
  .lockup img { height: 46px; width: auto; display: block; }
  nav { display: flex; gap: 4px; margin-left: 10px; }
  .tab {
    background: none; border: 0; color: var(--ink-2); font: inherit; font-weight: 600;
    padding: 7px 14px; border-radius: var(--r-ctl); cursor: pointer;
  }
  a.tab { text-decoration: none; display: inline-block; }
  .tab:hover { color: var(--ink); background: var(--surface-2); }
  .tab.on { color: var(--on-accent); background: var(--accent); }
  .live { margin-left: auto; display: flex; align-items: center; gap: 6px; color: var(--ink-3); font-size: 11.5px; white-space: nowrap; }
  .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--buy); animation: pulse 2s infinite; }
  @keyframes pulse { 50% { opacity: .35; } }

  /* ---------- command row: search + ask ---------- */
  .cmd { display: flex; gap: 8px; margin-bottom: 14px; }
  .cmd input {
    background: var(--surface); border: 1px solid var(--border); color: var(--ink);
    border-radius: 8px; padding: 8px 12px; font: inherit; outline: none;
  }
  .cmd input:focus { border-color: var(--accent); }
  #tk { flex: 0 0 190px; }
  #aiQ { flex: 1 1 auto; }
  .cmd button {
    background: var(--accent); color: var(--on-accent); border: 0; border-radius: 8px;
    padding: 8px 16px; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap;
  }
  .cmd button:hover { filter: brightness(1.1); }
  #aiPanel { display: none; margin-bottom: 14px; }
  #aiA {
    background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
    padding: 12px 15px; line-height: 1.65; white-space: pre-wrap;
  }
  .hint { color: var(--ink-3); font-size: 11.5px; }

  /* ---------- cards & grid ---------- */
  .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  @media (max-width: 940px) { .grid2 { grid-template-columns: 1fr; } }
  .card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card);
    overflow: hidden; margin-bottom: 12px;
  }
  .card > h2 {
    font-size: 12px; font-weight: 600; color: var(--ink-2);
    padding: 10px 14px; border-bottom: 1px solid var(--border);
    display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap;
  }
  .legend { display: flex; gap: 12px; font-size: 11.5px; color: var(--ink-2); font-weight: 500; }
  .legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2.5px; margin-right: 4px; }
  .chart-wrap { padding: 12px 12px 6px; position: relative; }
  .tipbox, #tooltip {
    position: absolute; pointer-events: none; display: none; z-index: 5;
    background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px;
    padding: 7px 10px; font-size: 12px; box-shadow: 0 6px 24px rgba(0,0,0,.45); white-space: nowrap;
  }
  .tipbox b, #tooltip b { font-variant-numeric: tabular-nums; }

  /* ---------- KPI tiles ---------- */
  .tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 10px; margin-bottom: 12px; }
  .tile { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px 10px; }
  .tile .v { font-size: 21px; font-weight: 700; letter-spacing: -.4px; font-variant-numeric: tabular-nums; }
  .tile .k { color: var(--ink-2); font-size: 11.5px; margin-top: 2px; }
  .tile.buy .v { color: var(--buy); } .tile.sell .v { color: var(--sell); }

  /* ---------- tables ---------- */
  .wrap { overflow-x: auto; }
  table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
  th {
    text-align: left; color: var(--ink-3); font-size: 10px; text-transform: uppercase;
    letter-spacing: .5px; padding: 7px 14px; border-bottom: 1px solid var(--border); font-weight: 650;
    cursor: pointer; user-select: none; white-space: nowrap;
  }
  th:hover { color: var(--ink-2); }
  th::after { content: "⇅"; opacity: .25; margin-left: 5px; font-size: 9px; }
  th.asc::after  { content: "↑"; opacity: 1; color: var(--accent); }
  th.desc::after { content: "↓"; opacity: 1; color: var(--accent); }
  td { padding: 7px 14px; border-bottom: 1px solid rgba(29,33,38,.6); white-space: nowrap; font-size: 12.5px; }
  tr:last-child td { border-bottom: none; }
  tbody tr:hover { background: rgba(255,255,255,.03); }
  .num { text-align: right; } th.num { text-align: right; }
  .tkr { font-weight: 700; color: var(--accent); cursor: pointer; }
  .tkr:hover { text-decoration: underline; }
  .chip { display: inline-flex; padding: 1.5px 8px; border-radius: 20px; font-size: 11px; font-weight: 700; }
  .chip.P { background: var(--buy-bg); color: var(--buy); }
  .chip.S { background: var(--sell-bg); color: var(--sell); }
  .chip.other { background: rgba(255,255,255,.06); color: var(--ink-2); }
  .who { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
  .role { color: var(--ink-3); font-size: 11px; }
  .val { font-weight: 650; }
  .date { color: var(--ink-2); font-size: 12px; }
  .fbtn {
    background: var(--surface-2); border: 1px solid var(--border); color: var(--ink-2);
    border-radius: 20px; padding: 3px 11px; font-size: 11.5px; font-weight: 600; cursor: pointer;
  }
  .fbtn.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

  /* ---------- sections / ticker overlay ---------- */
  .section { display: none; }
  .section.on { display: block; }
  #tickerSec { display: none; }
  #tickerSec .close {
    background: none; border: 0; color: var(--ink-3); font-size: 16px; cursor: pointer; padding: 0 4px;
  }
  #tickerSec .close:hover { color: var(--ink); }
  .foot { color: var(--ink-3); font-size: 11px; margin-top: 14px; line-height: 1.6; }

  /* ---------- mobile ---------- */
  @media (max-width: 640px) {
    .shell { padding: 0 10px 28px; }
    .top { flex-wrap: wrap; row-gap: 8px; }
    /* the sticky header eats screen on mobile; 40px is the floor at which the
       wordmark is still readable */
    .lockup img { height: 40px; }
    /* six tabs no longer divide evenly into a phone width without either
       clipping labels or pushing the page sideways, so the strip scrolls
       instead — the row can grow without the document ever overflowing */
    nav {
      margin-left: 0; order: 3; flex-basis: 100%;
      overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
    }
    nav::-webkit-scrollbar { display: none; }
    .tab { flex: 0 0 auto; text-align: center; padding: 8px 11px; }
    .live { display: none; }
    .cmd { flex-wrap: wrap; }
    #tk { flex: 1 1 100%; }
    .tiles { grid-template-columns: 1fr 1fr; gap: 8px; }
    .tile .v { font-size: 18px; }
    th, td { padding-left: 9px; padding-right: 9px; }
    .hide-m { display: none; }
    .who { max-width: 140px; }
    .legend { flex-wrap: wrap; gap: 8px; }
  }
  /* derived (computed) figures must be visually distinct from filed ones */
  .drv { color: var(--accent); font-size: 10px; vertical-align: super; cursor: help; margin-left: 1px; }
  tfoot td.role { padding: 8px 12px; line-height: 1.5; }

  /* ---------- screener ---------- */
  .presets { display: flex; flex-wrap: wrap; gap: 7px; padding: 12px 14px 4px; }
  .pbtn {
    background: var(--surface-2); border: 1px solid var(--border); color: var(--ink-2);
    border-radius: 20px; padding: 5px 13px; font: inherit; font-size: 12px;
    font-weight: 600; cursor: pointer;
  }
  .pbtn:hover { color: var(--ink); border-color: var(--accent); }
  .pbtn.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
  .pbtn.ghost { color: var(--ink-3); }
  .filters {
    display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end;
    padding: 12px 14px 16px;
  }
  .filters label {
    display: flex; flex-direction: column; gap: 3px;
    font-size: 11px; color: var(--ink-2); font-weight: 600;
  }
  .filters label span { display: none; }
  .filters input {
    background: var(--bg); border: 1px solid var(--border); color: var(--ink);
    border-radius: 7px; padding: 6px 9px; font: inherit; font-size: 13px;
    width: 96px; outline: none; font-variant-numeric: tabular-nums;
  }
  .filters input:focus { border-color: var(--accent); }
  .filters input::placeholder { color: var(--ink-3); font-weight: 400; }
  .filters button {
    background: var(--accent); color: var(--on-accent); border: 0; border-radius: 8px;
    padding: 7px 18px; font: inherit; font-weight: 600; cursor: pointer;
  }
  .filters button:hover { filter: brightness(1.1); }
  @media (max-width: 640px) {
    .filters input { width: 100%; }
    .filters label { flex: 1 1 44%; }
  }

  /* ---------- capability strip ----------
     The differentiators were invisible: an outside reviewer catalogued seven
     sections and missed all four. These are links, not decoration. */
  .caps {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 10px; margin-bottom: 14px;
  }
  .cap {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--r-card); padding: 13px 15px 11px;
    display: flex; flex-direction: column; gap: 5px;
    cursor: pointer; text-decoration: none; color: inherit;
    transition: border-color .12s ease, background .12s ease;
  }
  .cap:hover, .cap:focus-visible {
    border-color: var(--accent); background: var(--surface-2); outline: none;
  }
  .cap .ct { font-size: 13.5px; font-weight: 700; letter-spacing: -.15px; }
  .cap .cd { font-size: 12px; color: var(--ink-2); line-height: 1.55; flex: 1; }
  .cap .cd b { color: var(--ink); }
  .cap .cl { font-size: 11.5px; font-weight: 600; color: var(--accent); }
  @media (max-width: 640px) { .caps { grid-template-columns: 1fr; } }

  /* account chip in the header; sits after .live, which already pushes to
     the right with margin-left:auto */
  .acct { display: flex; align-items: center; gap: 8px; margin-left: 12px; }
  .acct .who { color: var(--ink-2); font-size: 12px; max-width: 160px;
               overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  @media (max-width: 760px) { .acct .who { display: none; } }
  /* watch star on a palette result row */
  .pal-watch {
    margin-left: auto; flex: none; background: none; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--border); border-radius: 6px; color: var(--ink-3);
    line-height: 1; padding: 5px 8px;
  }
  .pal-watch:hover { border-color: var(--accent); color: var(--accent); }
  .pal-watch.on { color: var(--accent); border-color: rgba(198,242,78,.4);
                  background: rgba(198,242,78,.08); }

/* ---- cookie consent dialog (no JS; dismissed via the /consent form) ---- */
.consent { position: fixed; inset: auto 0 0 0; z-index: 60; display: flex;
           justify-content: center; padding: 24px;
           background: linear-gradient(180deg, transparent, rgba(4,5,6,.55)); }
.cbox { max-width: 560px; width: 100%; border: 1px solid #2A3037;
        border-radius: 20px; background: #0B0C0F; padding: 24px 26px;
        box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.chead2 { display: flex; align-items: center; gap: 10px; }
.cmark { width: 26px; height: 26px; border-radius: 7px; background: var(--accent);
         color: var(--on-accent); display: flex; align-items: center;
         justify-content: center; font-weight: 800; font-size: 13px; }
.ck2 { font-family: "JetBrains Mono", monospace; font-size: 9px;
       letter-spacing: .18em; color: #7C848C; }
.ct1b { font-weight: 700; font-size: 18px; margin-top: 14px; }
.cbody { font-size: 13px; color: #9BA3AB; line-height: 1.65; margin: 8px 0 0; }
.crow { display: flex; align-items: center; justify-content: space-between;
        gap: 12px; padding: 10px 0; border-bottom: 1px solid #0F1216;
        cursor: pointer; }
.crow > div { min-width: 0; }
.crow b { display: block; font-size: 12.5px; }
.crow span:not(.sw) { font-size: 11px; color: #666E76; }
.crow input { position: absolute; opacity: 0; pointer-events: none; }
.sw { flex: none; width: 36px; height: 20px; border-radius: 999px; padding: 2px;
      background: #20262C; transition: .15s; }
.sw i { display: block; width: 16px; height: 16px; border-radius: 50%;
        background: #666E76; transition: .15s; }
.sw.locked, .crow input:checked ~ .sw { background: var(--accent); }
.sw.locked i, .crow input:checked ~ .sw i { background: #08090B;
        transform: translateX(16px); }
.sw.locked { opacity: .55; }
.cbtns { margin-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; }
.cb1, .cb2 { flex: 1; border-radius: 10px; padding: 11px; font: inherit;
             font-size: 13px; cursor: pointer; }
.cb1 { border: 0; font-weight: 700; background: var(--accent); color: var(--on-accent); }
.cb2 { border: 1px solid #2A3037; background: none; font-weight: 600; color: var(--ink-2); }
@media (max-width: 560px) { .consent { padding: 10px; } }

/* ---- site footer ---- */
.sitefoot { margin-top: 40px; border-top: 1px solid var(--border); padding: 26px 0 8px; }
.sf-top { display: flex; gap: 40px; flex-wrap: wrap; align-items: flex-start; }
.sf-brand { min-width: 260px; max-width: 420px; }
.sf-bhead { display: flex; gap: 12px; align-items: center; }
.sf-about { font-size: 13px; color: #8B939B; line-height: 1.65; margin: 12px 0 0; }
.sf-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.sf-chips span { font-family: "JetBrains Mono", monospace; font-size: 8.5px;
                 letter-spacing: .1em; color: #666E76; border: 1px solid #1D2126;
                 border-radius: 6px; padding: 4px 8px; }
.sf-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--accent);
           color: var(--on-accent); display: flex; align-items: center;
           justify-content: center; font-weight: 800; font-size: 15px; flex: none; }
.sf-name { font-family: "JetBrains Mono", monospace; font-size: 10px;
           letter-spacing: .18em; color: var(--ink-2); }
.sf-tag { font-size: 11.5px; color: #666E76; margin-top: 3px; }
.sf-cols { display: flex; gap: 56px; flex-wrap: wrap; margin-left: auto; }
.sf-col { display: grid; gap: 7px; align-content: start; }
.sf-h { font-family: "JetBrains Mono", monospace; font-size: 9px;
        letter-spacing: .16em; color: #565E66; margin-bottom: 3px; }
.sf-col a { font-size: 12.5px; color: #8B939B; text-decoration: none; }
.sf-col a:hover { color: var(--accent); }
.sf-line { margin-top: 24px; padding-top: 14px; border-top: 1px solid #101317;
           font-family: "JetBrains Mono", monospace; font-size: 9px;
           letter-spacing: .1em; color: #4A5158; line-height: 1.9;
           display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.sf-live { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.sf-live i { width: 6px; height: 6px; border-radius: 50%; background: var(--buy);
             animation: pulse 2s infinite; }
.sf-live a { color: var(--accent); margin-left: 10px; }
.sf-line a { color: #666E76; }
@media (max-width: 700px) { .sf-cols { margin-left: 0; gap: 32px; } }

/* lime call-to-action variant of the header tab (Create account) */
.tab.cta { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.tab.cta:hover { background: var(--accent-hi); color: var(--on-accent); }

/* --- save-screen bar (desk screener) --- */
.scrsave{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:10px 0 4px}
.scrsave input[type=text]{background:var(--surface);border:1px solid var(--border);
  color:var(--ink);padding:7px 11px;border-radius:3px;font:inherit;
  font-size:var(--fs-label);min-width:200px}
.scrsave button{background:var(--accent,#b7f36b);color:#10160c;border:0;
  padding:8px 14px;border-radius:3px;font:inherit;font-size:var(--fs-label);
  font-weight:700;cursor:pointer}
.scrsave .hint{font-size:var(--fs-micro);color:var(--ink-3,#888)}
/* --- saved screens card (account) --- */
.srow{display:flex;justify-content:space-between;align-items:center;gap:8px;
  padding:8px 0;border-bottom:1px solid var(--border)}
.srow:last-of-type{border-bottom:0}
.srow b{display:block;font-size:var(--fs-label)}
.ssub{font-size:var(--fs-micro);color:var(--ink-3,#888)}
.sdel{background:none;border:1px solid var(--border);color:var(--ink-3,#888);
  width:26px;height:26px;border-radius:3px;cursor:pointer;font-size:15px;line-height:1}
.sdel:hover{color:var(--sell,#f66);border-color:var(--sell,#f66)}
