/* Cash Machine, member page. The admin page's grammar (tools/dashboard.html), trimmed to what members see. */
:root {
  --bg: #f3f2f2; --surface: #eae9e9; --text: #201e1d; --accent: #ec3013; --accent-700: #ae1800;
  --n100: #f8f4f4; --n300: #d7d3d3; --n400: #bab6b6; --n600: #7d7979; --n700: #605d5d; --n800: #444141;
  --sig-green: #2e8b3d; --sig-ly: #f2cc3f; --sig-dy: #e07b18; --sig-red: #ec3013;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: Archivo, system-ui, sans-serif; font-size: 15px; }
h1, h2 { font-weight: 800; line-height: 1.12; letter-spacing: -0.015em; margin: 0; }
.num { font-variant-numeric: tabular-nums; }
.kicker { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--n600); font-weight: 600; }
.sub { font-size: 12px; color: var(--n700); line-height: 1.4; }
.muted { color: var(--n700); }
.rule { height: 2px; background: var(--text); margin: 14px 0 0; }

header { display: flex; align-items: stretch; border-bottom: 2px solid var(--text); flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-right: 2px solid var(--text); }
.brand i { width: 16px; height: 16px; background: var(--accent); display: block; }
.brand b { font-weight: 800; letter-spacing: -0.02em; font-size: 17px; }
nav { display: flex; align-items: stretch; flex-wrap: wrap; }
nav button { font-family: inherit; font-weight: 700; font-size: 14px; cursor: pointer; padding: 12px 18px; border: none;
             border-right: 2px solid var(--text); border-radius: 0; background: transparent; color: var(--text); }
nav button.on { background: var(--text); color: var(--bg); }
.lookup { flex: 1; display: flex; align-items: center; gap: 8px; padding: 8px 20px; min-width: 240px; }
.lookup input { flex: 1; max-width: 220px; min-width: 0; border: 1px solid var(--n400); background: var(--n100); padding: 7px 10px;
                font-family: inherit; font-size: 14px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; border-radius: 0; }
.session { display: flex; flex-direction: column; justify-content: center; padding: 8px 20px; border-left: 2px solid var(--text); }
.session b { font-size: 13px; font-weight: 600; }
.btn { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-family: inherit; font-weight: 700;
       font-size: 14px; line-height: 1.2; color: var(--bg); background: var(--accent); border: 1px solid transparent; padding: 8px 14px; border-radius: 0; }
.btn:hover { background: #dd2b0f; } .btn:disabled { background: var(--n400); cursor: default; }
.btn.ghost { background: transparent; color: var(--text); border-color: color-mix(in srgb, var(--text) 40%, transparent); font-size: 13px; padding: 5px 10px; }
.btn.ghost:hover { background: color-mix(in srgb, var(--text) 7%, transparent); }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; font-size: 13px; font-weight: 700; color: var(--accent-700); cursor: pointer; text-decoration: underline; }

main { padding: 24px 20px 64px; }
.titlebar { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 4px; }
.titlebar h1 { font-size: 34px; }
.titlebar div { font-size: 13px; color: var(--n700); }
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
table.wide { min-width: 1040px; } table.mid { min-width: 760px; }
thead tr { border-bottom: 2px solid var(--text); }
th { padding: 10px 12px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--n700); font-weight: 700; text-align: left; white-space: nowrap; }
th.r, td.r { text-align: right; } th:first-child, td:first-child { padding-left: 0; }
tbody tr { border-bottom: 1px solid var(--n300); vertical-align: top; }
td { padding: 12px; text-align: left; }
td.r { white-space: nowrap; }
.tk { font-weight: 800; font-size: 16px; letter-spacing: 0.01em; cursor: pointer; }
.coname { font-size: 12px; color: var(--n700); font-weight: 500; max-width: 30ch; margin-top: 1px; }
.sig { display: flex; align-items: center; gap: 7px; font-size: 13px; }
.sw { width: 18px; height: 18px; display: block; flex: none; } .sw.sm { width: 12px; height: 12px; } .sw.lg { width: 26px; height: 26px; }
.sw.green { background: var(--sig-green); } .sw.light_yellow { background: var(--sig-ly); }
.sw.dark_yellow { background: var(--sig-dy); } .sw.red { background: var(--sig-red); } .sw.none { border: 1px solid var(--n400); }
.sw.super { outline: 2px solid var(--text); outline-offset: 1px; }
.strike { font-weight: 700; font-size: 16px; }
.nocall { font-size: 13px; color: var(--n800); max-width: 300px; line-height: 1.35; }
.tag { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; border: 1px solid var(--text); padding: 3px 7px; margin: 0 4px 4px 0; }
.tag.alert { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.tag.solid { background: var(--text); color: var(--bg); }
.caution { color: var(--accent-700); font-weight: 700; font-size: 12px; }
.grade { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; padding: 1px 6px; border: 1px solid var(--n400); }
.grade.Poor { background: var(--text); color: var(--bg); border-color: var(--text); }
.grade.Good { border-color: var(--n700); }
.grade.Great { border-color: var(--n300); color: var(--n700); }
.quiet { border: 2px solid var(--text); padding: 12px 14px; font-weight: 700; margin-top: 14px; display: inline-block; max-width: 720px; line-height: 1.4; }
.quiet.alert { border-color: var(--accent); }
.banner { border: 3px solid var(--accent-700); padding: 10px 14px; margin: 12px 0; font-weight: 700; }
.legend { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 18px; padding-top: 14px; border-top: 2px solid var(--text); }
.legend .keys { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; font-size: 13px; }
.legend .keys span { display: flex; align-items: center; gap: 7px; }
.legend .note { font-size: 12px; color: var(--n700); max-width: 620px; line-height: 1.45; }
.big { font-size: 52px; margin: 4px 0 2px; letter-spacing: -0.03em; font-weight: 800; }
.conamefull { font-size: 16px; font-weight: 500; margin: -2px 0 8px; }
.px { font-size: 26px; font-weight: 700; }
tr.rec { background: var(--surface); } tr.rec td:first-child { border-left: 4px solid var(--text); padding-left: 10px; }
tr.hedge { border-top: 2px solid var(--text); }
tr.roll td { background: var(--surface); font-size: 14px; line-height: 1.5; }
.rname { font-weight: 700; font-size: 15px; } tr.rec .rname { font-weight: 800; font-size: 17px; }
.dots { display: flex; gap: 6px; } .dots i { display: block; width: 13px; height: 13px; border: 1px solid var(--n300); }
.dots.round i { border-radius: 50%; }
details { margin-top: 12px; } summary { cursor: pointer; font-size: 13px; font-weight: 700; }
footer { border-top: 2px solid var(--text); padding: 14px 20px 30px; font-size: 12px; color: var(--n700); line-height: 1.5; }

.gatepage { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.gatepage > div { max-width: 600px; }
.gatepage h1 { font-size: 34px; margin-bottom: 14px; }
.gatepage .box { background: var(--surface); border: 2px solid var(--text); padding: 18px; margin-bottom: 18px; line-height: 1.5; font-size: 14px; }
.gatepage label { display: flex; align-items: center; gap: 10px; font-size: 14px; margin-bottom: 16px; }
.gatepage input[type=checkbox] { width: 18px; height: 18px; }
.gatepage input:not([type=checkbox]) { font: inherit; font-size: 14px; padding: 8px 10px; border: 1px solid var(--text); background: var(--bg); width: 100%; }
@media (max-width: 760px) { .titlebar h1 { font-size: 26px; } .big { font-size: 38px; } main { padding: 18px 16px 48px; } .brand, .session, .lookup { padding-left: 16px; padding-right: 16px; } }
/* Compass: the chart, and beside it the member's own names and their one lookup */
.cmp-wrap { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; margin-top: 10px; }
.cmp-chart { flex: 1 1 620px; min-width: 0; }
.cmp-side { flex: 0 0 236px; border-left: 2px solid var(--text); padding: 2px 0 2px 16px; }
.cmp-name { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; border-bottom: 1px solid var(--n300); padding: 7px 0; }
.cmp-name .sub { flex-basis: 100%; }
.cmp-add { display: flex; gap: 6px; margin-top: 10px; }
.cmp-add input { flex: 1; min-width: 0; border: 1px solid var(--n400); background: var(--n100); padding: 6px 8px; font-family: inherit; font-size: 14px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; border-radius: 0; }
.cmp-msg { color: var(--accent-700); font-weight: 600; margin-top: 6px; min-height: 16px; }
@media (max-width: 900px) { .cmp-side { flex-basis: 100%; border-left: 0; border-top: 2px solid var(--text); padding: 12px 0 0; } }

/* CM Momentum board (the shared CM BOARD block): the same rules on the admin page and the member page */
.cmb-p { max-width: 820px; margin: 6px 0; }
.cmb-h2 { font-weight: 800; font-size: 22px; margin: 30px 0 0; }
.cmb-key { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; margin: 10px 0 4px; font-size: 12px; color: var(--n700); }
.cmb-key span { display: inline-flex; align-items: center; gap: 6px; }
.cmb-dots { display: inline-flex; gap: 5px; vertical-align: middle; }
.cmb-dots i { display: block; width: 14px; height: 14px; border: 1px solid transparent; }
.cmb-dots.round i { border-radius: 50%; }
.cmb-dots.sm i { width: 11px; height: 11px; }
.cmb-b3 { background: var(--sig-green); } .cmb-b2 { background: var(--sig-ly); } .cmb-b1 { background: var(--sig-dy); } .cmb-b0 { background: var(--sig-red); }
.cmb-bx { background-color: #c9c5c5; border-color: var(--n400) !important; cursor: help;
          background-image: repeating-linear-gradient(135deg, transparent 0 3px, rgba(255, 255, 255, 0.75) 3px 5px); }
.cmb-board { margin-top: 6px; max-width: 1080px; }
.cmb-head, .cmb-row { display: grid; grid-template-columns: minmax(0, 1fr) 96px 96px; align-items: center; column-gap: 22px; }
.cmb-head { padding: 16px 10px 6px; border-bottom: 2px solid var(--text); }
.cmb-head div { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--n600); font-weight: 700; }
.cmb-head small { display: block; text-transform: none; letter-spacing: 0; font-weight: 500; }
.cmb-row { padding: 9px 10px; border-bottom: 1px solid var(--n300); }
button.cmb-row { width: 100%; background: transparent; border-left: 0; border-right: 0; border-top: 0; font: inherit; color: inherit;
                 text-align: left; cursor: pointer; border-radius: 0; }
button.cmb-row:hover { background: var(--surface); }
button.cmb-row:focus-visible { outline: 2px solid var(--text); outline-offset: -2px; }
.cmb-nm { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cmb-nm b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmb-caret { width: 14px; flex: none; font-size: 13px; color: var(--n700); font-family: system-ui, 'Segoe UI Symbol', sans-serif; }
.cmb-tag { flex: none; font-size: 10px; font-weight: 700; letter-spacing: 0.06em; border: 1px solid var(--n400); color: var(--n700); padding: 1px 5px; cursor: help; }
.cmb-cnt { flex: none; font-size: 12px; color: var(--n600); }
.cmb-sector > .cmb-row .cmb-nm b { font-size: 16px; font-weight: 800; }
.cmb-subs { background: var(--n100); border-bottom: 2px solid var(--text); }
.cmb-subs .cmb-row { padding-left: 30px; }
.cmb-stocks { display: grid; grid-template-columns: repeat(auto-fill, minmax(214px, 1fr)); gap: 2px 18px; padding: 10px 10px 14px 52px;
              background: var(--surface); border-bottom: 1px solid var(--n300); }
.cmb-stock { display: grid; grid-template-columns: 58px auto auto; align-items: center; column-gap: 14px; padding: 3px 0; justify-content: start; }
.cmb-stock b { font-weight: 700; font-size: 13px; letter-spacing: 0.02em; cursor: pointer; }
.cmb-stock b:hover { text-decoration: underline; }
.cmb-pair .cmb-nm { display: block; }
.cmb-pair .cmb-nm b { display: block; white-space: normal; }
.cmb-pair .cmb-nm span { display: block; font-size: 12px; color: var(--n700); margin-top: 2px; }
@media (max-width: 560px) {
  .cmb-head, .cmb-row { grid-template-columns: minmax(0, 1fr) 78px 78px; column-gap: 12px; }
  .cmb-dots { gap: 3px; } .cmb-dots i { width: 12px; height: 12px; }
  .cmb-subs .cmb-row { padding-left: 18px; } .cmb-stocks { padding-left: 18px; }
}

/* The Pressure Valve's two modes, and the whole-account view */
.vmodes, .vidx { display: flex; width: max-content; gap: 0; margin: 0 0 8px; border: 1px solid var(--text); }
.vidx { margin: 8px 12px 8px 0; display: inline-flex; vertical-align: middle; }
.vmodes button, .vidx button { font-family: inherit; font-weight: 700; font-size: 13px; padding: 6px 12px; border: 0; border-right: 1px solid var(--text);
                               background: transparent; color: var(--text); cursor: pointer; border-radius: 0; }
.vmodes button:last-child, .vidx button:last-of-type { border-right: 0; }
.vmodes button.on, .vidx button.on { background: var(--text); color: var(--bg); }
.vidx + .linkbtn, .vidx .linkbtn { margin-left: 12px; }
.vtab { margin-top: 4px; border-collapse: collapse; }
.vtab th, .vtab td { padding: 4px 12px 4px 0; text-align: left; font-size: 13px; }
.vin { width: 96px; border: 1px solid var(--n400); background: var(--n100); padding: 5px 8px; font-family: inherit; font-size: 14px; border-radius: 0; }
.vgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-top: 12px; }
.vbig { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; margin: 2px 0; }
.vleg { margin-top: 4px; }
.vpath { border-collapse: collapse; } .vpath td, .vpath th { padding: 3px 14px 3px 0; font-size: 13px; }
.vpath tr.on td { font-weight: 700; background: var(--surface); }

/* The member Compass hover box, and the two legs of the collar */
.cmp-tip { position: fixed; z-index: 20; max-width: 340px; background: var(--text); color: var(--bg); font-size: 12px; line-height: 1.4;
           padding: 6px 9px; pointer-events: none; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18); }
.cmp-tip[hidden] { display: none; }
.cmp-tip.live { pointer-events: auto; }
.cmp-tip-open { font: inherit; font-size: 12px; font-weight: 700; margin-left: 6px; padding: 2px 6px; border: 1px solid var(--bg); background: transparent; color: var(--bg); cursor: pointer; }
.vlegs { margin: 6px 0; display: grid; gap: 3px; }
.vlegs .kicker { display: inline-block; width: 38px; }
.choice { margin: 6px 0 0; padding: 6px 10px; border-left: 3px solid transparent; }
.choice.lead { border-left-color: currentColor; }
/* The 9-EMA alert: the tag and the Compass dot flash on the day it fires */
@keyframes cm-flash { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
.tag.flash, .cmp-flash circle { animation: cm-flash 1.1s ease-in-out infinite; }
/* The Position Compass: a click lands on the row, briefly marked */
tr.pos-hit td { box-shadow: inset 0 2px 0 var(--accent); }
/* My Positions: the member's own */
.banner.sample { margin: 10px 0; }
.mact { margin-top: 6px; font-size: 12px; }
.mform { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; margin-top: 14px; }
.mform .kicker { width: 100%; }
.mf { display: flex; flex-direction: column; font-size: 12px; gap: 3px; }
.mf input, .mf select { font: inherit; font-size: 13px; padding: 5px 7px; border: 1px solid var(--text); background: var(--bg); min-width: 120px; }
/* The hotlist filter (display only) */
.hf { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 14px 0 4px; }
.hf-b { font: inherit; font-size: 12px; font-weight: 700; padding: 5px 9px; border: 1px solid var(--text); background: transparent; color: var(--text); cursor: pointer; border-radius: 0; }
.hf-b.on { background: var(--text); color: var(--bg); }
.hf-sort { font: inherit; font-weight: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline dotted; }
.hf-gap { width: 10px; } .hf-n { margin-left: auto; font-size: 13px; }
.cmp-pos { margin-top: 6px; }
@media (prefers-reduced-motion: reduce) { .tag.flash, .cmp-flash circle { animation: none; outline: 2px solid var(--accent); } }
