/* VERITAS — the watcher's page. 2026-10-15 redesign ("fund report"): flat, one typeface (IBM Plex
   Sans, tabular digits), hairline rules instead of boxes, colour only for profit / loss, one status
   mark. VERITAS's own palette: steel navy + brushed silver on near-black. The PIN login keeps its
   card. Fonts are served from this folder; nothing loads from any other site. */
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 100 700; font-stretch: 100%; font-display: swap;
  src: url("fonts/plex-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 100 700; font-stretch: 100%; font-display: swap;
  src: url("fonts/plex-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ------------------------------------------------------------------ palette */
:root {
  color-scheme: dark;
  --bg: #080b11;
  --bg-top: #0c121c;
  --line: rgba(201, 206, 214, 0.10);
  --line-strong: rgba(201, 206, 214, 0.18);
  --text: #e9edf3; --muted: #8e9aac; --faint: #5d6878;
  --silver: #c9ced6;
  --steel: #5b8ad0;                       /* the logo's blue: the equity curve, links, focus */
  --up: #46c08a; --down: #ee6a6a;         /* profit / loss — the only colours that mean something */
  --up-rgb: 70 192 138; --down-rgb: 238 106 106;
  --live: #f0566a;                        /* real money */
  --amber: #e0a43a;
  --font: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  /* the PIN login card (kept from the first VERITAS) */
  --surface: rgba(13, 19, 31, 0.92);
  --border: rgba(201, 206, 214, 0.11);
  --track: rgba(74, 120, 184, 0.07);
  --accent-rgb: 74 120 184; --accent2-rgb: 169 184 204;
  --accent-line: linear-gradient(90deg, transparent, rgba(201, 206, 214, 0.4), rgba(74, 120, 184, 0.8), rgba(201, 206, 214, 0.4), transparent);
  --shadow-lift: 0 1px 2px rgba(0,0,0,0.18), 0 8px 24px rgba(0,0,0,0.28), 0 24px 64px rgba(0,0,0,0.34);
  --r-lg: 18px; --r-sm: 9px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ------------------------------------------------------------------ base */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { height: 100%; -webkit-text-size-adjust: 100%; overflow-x: hidden; overflow-x: clip; }
body {
  margin: 0; min-height: 100%; max-width: 100%; overflow-x: clip;
  font: 14px/1.5 var(--font); color: var(--text); font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  background: var(--bg);
  background-image: linear-gradient(180deg, var(--bg-top), var(--bg) 420px);
  background-repeat: no-repeat;
}
button { font: inherit; color: inherit; cursor: pointer; }
h2, h3 { text-wrap: balance; }
::selection { background: rgb(var(--accent-rgb) / 0.35); }
:focus-visible { outline: 2px solid var(--steel); outline-offset: 2px; border-radius: 4px; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.22); border-radius: 999px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.pos, .up { color: var(--up); }
.neg, .down { color: var(--down); }
.mut { color: var(--muted); }

/* ------------------------------------------------------------------ login (unchanged look) */
.auth-wrap { position: relative; z-index: 1; display: grid; place-items: center; min-height: 100vh; min-height: 100dvh; padding: 24px 16px;
  background: radial-gradient(1400px 820px at 50% -22%, rgba(43, 77, 126, 0.26), transparent 62%); }
.auth-card { position: relative; width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 16px;
  padding: 26px 28px 22px; border-radius: var(--r-lg); background: var(--surface);
  border: 1px solid var(--border); box-shadow: var(--shadow-lift); overflow: hidden; }
.auth-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 1px; background: var(--accent-line); opacity: 0.7; pointer-events: none; }
.auth-lockup { display: flex; justify-content: center; margin: 2px 0 -2px; }
.auth-lockup img { width: 196px; height: auto; display: block;
  filter: drop-shadow(0 6px 22px rgb(var(--accent-rgb) / 0.28)) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6)); }
.auth-sub { margin: 0; text-align: center; font-size: 13px; line-height: 1.6; color: var(--muted); }
.pin-boxes { display: flex; justify-content: center; gap: 8px; }
.pin-boxes input { width: 46px; height: 56px; padding: 0; text-align: center; font: 600 24px var(--font); color: var(--text);
  border-radius: 10px; border: 1px solid var(--border); background: var(--track); caret-color: var(--steel);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
.pin-boxes input:focus { outline: none; border-color: rgb(var(--accent-rgb) / 0.8); box-shadow: 0 0 0 3px rgb(var(--accent-rgb) / 0.18); }
.pin-boxes input.filled { border-color: rgb(var(--accent-rgb) / 0.45); }
.auth-hint { margin: -6px 0 0; font-size: 11.5px; line-height: 1.5; color: var(--muted); text-align: center; }
.auth-err { margin: 0; padding: 9px 11px; border-radius: var(--r-sm); background: rgba(244, 63, 94, 0.10);
  border: 1px solid rgba(244, 63, 94, 0.30); color: #fb7185; font-size: 12.5px; line-height: 1.5; }
.auth-go { padding: 12px 14px; border: none; border-radius: var(--r-sm); color: #fff;
  background: linear-gradient(135deg, rgb(var(--accent-rgb) / 0.92), rgb(var(--accent2-rgb) / 0.85));
  font: 600 14px var(--font); transition: filter .16s var(--ease); }
.auth-go:hover:not(:disabled) { filter: brightness(1.1); }
.auth-go:disabled { opacity: 0.45; cursor: not-allowed; }
.to-portal { align-self: center; font-size: 12px; font-weight: 500; color: var(--muted); text-decoration: none;
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); }
.to-portal:hover { color: var(--text); }

/* ------------------------------------------------------------------ shell */
.portal { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.wrap { width: 100%; max-width: 1320px; margin: 0 auto; padding-inline: 28px; }

.topbar { position: sticky; top: 0; z-index: 20; padding-top: env(safe-area-inset-top, 0px);
  background: rgba(8, 11, 17, 0.88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; gap: 22px; height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; user-select: none; }
.brand-img { height: 40px; width: auto; display: block; }
.brand .brand-word { height: 19px; width: auto; display: block; }
.seg { display: inline-flex; flex: none; border: 1px solid var(--line-strong); border-radius: 7px; overflow: hidden; }
.seg .mn { border: 0; background: transparent; padding: 6px 15px; color: var(--muted); font-weight: 500; display: inline-flex; align-items: center; gap: 7px; }
.seg .mn + .mn { border-left: 1px solid var(--line-strong); }
.seg .mn:hover { color: var(--text); }
.seg .mn.active { background: var(--silver); color: #0b0f16; font-weight: 600; }
.seg #tab-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--live); }
.grow { flex: 1; }
.feed { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.feed-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--up); display: inline-block; }
.feed.stale .feed-dot { background: var(--amber); }
.feed.stale #p-state { color: var(--amber); }
.who { display: inline-flex; flex-direction: column; line-height: 1.15; text-align: right; }
.who b { font-weight: 600; font-size: 13.5px; }
.who small { color: var(--faint); font-size: 11px; }
.signout { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 7px;
  border: 1px solid var(--line-strong); background: transparent; color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.signout:hover { color: var(--text); border-color: rgba(238, 106, 106, 0.5); }

.banner { margin: 14px auto 0; width: calc(100% - 56px); max-width: 1264px; padding: 9px 12px; border-radius: 6px; font-size: 12.5px;
  color: var(--amber); background: rgba(224, 164, 58, 0.08); border: 1px solid rgba(224, 164, 58, 0.35); }

.main { flex: 1; padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }

/* ------------------------------------------------------------------ today (on every tab) */
.today { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr); gap: 28px 56px; align-items: end;
  padding-block: 30px 26px; border-bottom: 1px solid var(--line); }
.t-lbl { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.t-lbl .live-mark { color: var(--live); font-weight: 700; letter-spacing: 0.06em; display: inline-flex; align-items: center; gap: 6px; }
.t-lbl .live-mark::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--live); }
.t-big { font-size: 44px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; margin-top: 4px; white-space: nowrap; }
.t-sub { color: var(--muted); margin-top: 6px; font-size: 13px; }
.t-accts { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.t-accts span::before { content: "● "; color: var(--up); }
.t-accts span.off::before { color: var(--down); }
.figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); margin: 0; }
.figs div { padding: 2px 18px; border-left: 1px solid var(--line); min-width: 0; }
.figs dt { font-size: 12px; color: var(--muted); white-space: nowrap; }
.figs dd { margin: 3px 0 0; font-size: 17px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.figs small { display: block; font-size: 11.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ------------------------------------------------------------------ section tabs */
.ptabs { display: flex; gap: 30px; border-bottom: 1px solid var(--line); overflow: hidden; touch-action: pan-y; }
.ptabs::-webkit-scrollbar { display: none; }
.ptabs .lt { border: 0; background: none; padding: 14px 0 12px; color: var(--muted); border-bottom: 2px solid transparent;
  white-space: nowrap; font-weight: 500; margin-bottom: -1px; }
.ptabs .lt:hover { color: var(--text); }
.ptabs .lt.active { color: var(--text); border-bottom-color: var(--silver); font-weight: 600; }
.ptabs .lt span { color: var(--faint); font-weight: 400; margin-left: 4px; }

/* ------------------------------------------------------------------ panes */
.pane { min-width: 0; }
.sec { padding-block: 26px; border-bottom: 1px solid var(--line); min-width: 0; }
.sec:last-child { border-bottom: 0; }
.sec-h { margin: 0 0 14px; font-size: 13.5px; font-weight: 600; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.sec-h small { font-size: 12.5px; font-weight: 400; color: var(--muted); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 0 56px; }
.split > .sec:first-child { border-bottom: 0; }
.cols2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 56px; }
.cols2 > .sec { border-bottom: 0; }

/* tables */
.tbl-scroll { overflow-x: auto; }
.pos-table { width: 100%; border-collapse: collapse; }
.pos-table th, .pos-table td { padding: 10px 10px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.pos-table th { color: var(--muted); font-size: 12px; font-weight: 500; padding-top: 4px; }
.pos-table th:first-child, .pos-table td:first-child { text-align: left; padding-left: 0; }
.pos-table th:last-child, .pos-table td:last-child { padding-right: 0; }
.pos-table td.l, .pos-table th.l { text-align: left; }
.pos-table tr:last-child td { border-bottom: 0; }
.pos-table td.strong { font-weight: 600; }
.pos-table tr.leg-off td { opacity: 0.4; }
.pos-table tr.group td { padding: 18px 0 8px; border-bottom: 1px solid var(--line-strong); text-align: left; }
.pos-table tr.group:first-child td { padding-top: 4px; }
.pos-table tr.group .g-name { font-weight: 600; }
.pos-table tr.group .g-val { float: right; font-weight: 600; }
.pos-table tr.hs-row-live td { background: rgba(91, 138, 208, 0.06); }
.instrument .inst-top { display: flex; align-items: center; gap: 8px; }
.instrument .inst-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 2px 0 0 24px; font-size: 11.5px; color: var(--muted); white-space: normal; }
.instrument.nobs .inst-sub { margin-left: 0; }
.qty-sub { display: block; font-size: 11px; color: var(--faint); }
.bs { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 16px; height: 16px; border-radius: 3px;
  font-size: 10px; font-weight: 700; }
.bs.buy { color: var(--up); background: rgb(var(--up-rgb) / 0.14); }
.bs.sell { color: var(--down); background: rgb(var(--down-rgb) / 0.14); }
.reason-tag, .lb-carry { font-size: 11px; color: var(--muted); }
.reason-tag.algo { color: var(--steel); }
.lb-carry { color: var(--amber); }
.lb-reason { max-width: 320px; color: var(--down); font-size: 12px; white-space: normal; text-align: left; overflow-wrap: anywhere; }
.pos-table td.lb-time { color: var(--muted); text-align: left; }
.empty { margin: 0; padding: 36px 0; color: var(--muted); }
.lb-err { margin: 0; padding-block: 24px; color: var(--down); }
.lb-subtabs { display: flex; gap: 22px; flex-wrap: wrap; margin-bottom: 8px; }
.lb-subtabs button { border: 0; background: none; padding: 2px 0; font-size: 13px; color: var(--muted); border-bottom: 1px solid transparent; }
.lb-subtabs button.on { color: var(--text); border-bottom-color: var(--text); }

/* side lists (by strategy, best / worst) */
.kv { width: 100%; border-collapse: collapse; }
.kv td { padding: 9px 0; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.kv td:first-child { text-align: left; color: var(--muted); padding-right: 12px; white-space: normal; }
.kv tr:last-child td { border-bottom: 0; }
.kv td small { color: var(--faint); margin-left: 6px; }
.bd-rows { display: flex; flex-direction: column; }
.bd-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.bd-row:last-child { border-bottom: 0; }
.bd-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bd-val { font-weight: 600; text-align: right; }
.bd-track { grid-column: 1 / -1; position: relative; height: 3px; background: var(--line); }
.bd-track::after { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--line-strong); }
.bd-fill { position: absolute; top: 0; bottom: 0; }
.bd-fill.pos { left: 50%; background: var(--up); }
.bd-fill.neg { right: 50%; background: var(--down); }

/* ------------------------------------------------------------------ History (fund report) */
.hs-hero { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 44px; }
.rng-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.rng { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 6px; overflow: hidden; }
.rng-month { font: inherit; font-size: 12.5px; color: var(--muted); background: var(--bg); border: 1px solid var(--line-strong); border-radius: 6px; padding: 4px 8px; cursor: pointer; }
.rng-month.on { background: var(--silver); color: #0b0f16; font-weight: 600; border-color: var(--silver); }
.rng-month option { background: #0c121c; color: var(--text); font-weight: 400; }
.rng button { border: 0; background: transparent; padding: 5px 11px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.rng button + button { border-left: 1px solid var(--line-strong); }
.rng button:hover { color: var(--text); }
.rng button.on { background: var(--silver); color: #0b0f16; font-weight: 600; }
.hs-ret { font-size: 46px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.05; margin-top: 4px; }
.hs-hero .kv { margin-top: 20px; }
.chart { position: relative; min-width: 0; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .ax { fill: var(--muted); font: 11px var(--font); }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .zero { stroke: var(--line-strong); }
.chart .eq-line { stroke: var(--steel); stroke-width: 1.8; fill: none; stroke-linejoin: round; }
.chart .eq-area { fill: var(--steel); fill-opacity: 0.12; }
.chart .dd-line { stroke: var(--down); stroke-width: 1.5; fill: none; stroke-linejoin: round; }
.chart .dd-area { fill: var(--down); fill-opacity: 0.14; }
.chart .dot { fill: var(--text); }
.chart .hover-line { stroke: var(--line-strong); stroke-dasharray: 3 3; }
.chart-lab { font-size: 12px; color: var(--muted); margin: 16px 0 4px; }
.dd-none { margin: 6px 0 0; padding: 14px 0; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); }
.tip { position: absolute; pointer-events: none; background: var(--silver); color: #0b0f16; font-size: 12px; font-weight: 500;
  padding: 5px 9px; border-radius: 4px; white-space: nowrap; transform: translate(-50%, calc(-100% - 10px)); }
.mx { width: 100%; border-collapse: collapse; }
.mx th, .mx td { padding: 11px 6px; text-align: center; font-size: 13px; white-space: nowrap; border-bottom: 1px solid var(--line); }
.mx th { font-size: 12px; font-weight: 500; color: var(--muted); padding-top: 4px; }
.mx th:first-child, .mx td:first-child { text-align: left; padding-left: 0; }
.mx td.e { color: var(--faint); }
.mx td.c { color: var(--text); }
.mx td.ytd { font-weight: 600; border-left: 1px solid var(--line); }
.mx tr:last-child td { border-bottom: 0; }
.hs-tag { font-size: 11.5px; color: var(--muted); margin-left: 8px; }
.hs-tag.hs-live { color: var(--up); font-weight: 600; }
.hs-tag.hs-live::before { content: "● "; }
.hs-tag.hs-est { color: var(--amber); }
.mx td.c { cursor: pointer; }
.mx td.c.on { box-shadow: inset 0 0 0 1.5px var(--silver); }
/* calendar */
.cal-top { display: flex; align-items: center; justify-content: space-between; gap: 10px 24px; flex-wrap: wrap; margin-bottom: 12px; }
.cal-nav-wrap { display: flex; align-items: center; gap: 10px; }
.cal-title { font-weight: 600; font-size: 15px; min-width: 84px; text-align: center; }
.cal-nav { width: 32px; height: 30px; border-radius: 6px; border: 1px solid var(--line-strong); background: transparent; color: var(--text); font-size: 17px; line-height: 1; }
.cal-nav:hover:not(:disabled) { border-color: var(--silver); }
.cal-nav:disabled { opacity: 0.3; cursor: default; }
.cal-sum { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 13px; color: var(--muted); }
.cal-sum b { font-weight: 600; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.cal-h { font-size: 12px; color: var(--muted); padding: 0 8px 6px; }
.cal-c { min-height: 66px; padding: 7px 9px; display: flex; flex-direction: column; justify-content: space-between; gap: 4px;
  background: rgba(201, 206, 214, 0.035); border-radius: 3px; min-width: 0; }
.cal-c.blank { background: transparent; }
.cal-c.wkend:not(.has) { background: transparent; }
.cal-c b { font-size: 12px; font-weight: 500; color: var(--faint); }
.cal-c.has b { color: var(--muted); }
.cal-c i { font-style: normal; font-size: 13px; font-weight: 600; color: var(--text); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-c.live { box-shadow: inset 0 0 0 1.5px var(--silver); }
button.cal-c { border: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button.cal-c:hover { filter: brightness(1.18); }
.cal-c.picked { box-shadow: inset 0 0 0 2px var(--text); }
.cal-sign { margin-right: 1px; }
.cal-detail { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 22px; margin-top: 12px; padding: 12px 14px;
  border: 1px solid var(--line-strong); border-radius: 6px; font-size: 13.5px; color: var(--muted); }
.cal-detail b { font-size: 16px; font-weight: 600; }
.cal-detail .cd-date { color: var(--text); font-weight: 600; }
.cal-detail .cd-st { font-size: 12px; }
.cal-hint { margin: 10px 0 0; font-size: 12px; color: var(--faint); }
.hs-more { margin-top: 12px; background: none; border: 0; color: var(--steel); padding: 6px 0; font-weight: 500; }
.hs-note { margin: 0; color: var(--faint); font-size: 12px; line-height: 1.6; max-width: 80ch; }

.install-row { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.install-row.in-app { align-items: flex-start; padding-block: 18px; border-top: 1px solid var(--line); }
.install-btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 8px; font-size: 13px; font-weight: 600;
  color: var(--text); background: rgba(201, 206, 214, 0.06); border: 1px solid var(--line-strong); }
.install-btn:hover { border-color: var(--silver); }
.install-btn img { border-radius: 5px; display: block; }
.install-how { font-size: 12.5px; color: var(--muted); line-height: 1.6; max-width: 46ch; text-align: center; }
.install-row.in-app .install-how { text-align: left; }
.install-how b { color: var(--text); font-weight: 600; }
.ios-share { display: inline-block; padding: 0 5px; border: 1px solid var(--line-strong); border-radius: 4px; font-size: 11px; }
.tgbox:empty { display: none; }
.tgbox { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px;
  padding-block: 18px; border-top: 1px solid var(--line); }
.tg-text { display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--muted); max-width: 60ch; }
.tg-text b { color: var(--text); font-weight: 600; }
.tg-act { display: flex; align-items: center; gap: 12px; }
.tg-btn { border: 1px solid #229ED9; background: #229ED9; color: #fff; font-weight: 600; font-size: 13px; padding: 7px 14px; border-radius: 6px; }
.tg-btn.ghost { background: transparent; color: var(--muted); border-color: var(--line-strong); }
.tg-act a { color: #4fb7ea; font-size: 13px; }
.tg-wait { font-size: 12.5px; color: var(--muted); }
.tg-msg { flex-basis: 100%; margin: 0; font-size: 12px; color: var(--muted); }
.foot { padding-block: 22px 34px; border-top: 1px solid var(--line); color: var(--faint); font-size: 12px; line-height: 1.6; }
.foot ul { margin: 0; padding-left: 16px; }

/* ------------------------------------------------------------------ phone cards */
.pos-cards { display: none; flex-direction: column; }
.pc { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.pc:last-child { border-bottom: 0; }
.pc.off { opacity: 0.45; }
.pc-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pc-name { font-weight: 500; overflow-wrap: anywhere; }
.pc-right { font-weight: 600; font-size: 15px; text-align: right; white-space: nowrap; }
.pc-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); min-width: 0; }
.pc-subr { font-size: 12px; color: var(--muted); text-align: right; white-space: nowrap; max-width: 46vw; overflow: hidden; text-overflow: ellipsis; }
.pc-group { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 18px 0 8px;
  border-bottom: 1px solid var(--line-strong); font-weight: 600; }
.pc-group:first-child { padding-top: 4px; }
.pc-group b { font-weight: 600; }

/* ------------------------------------------------------------------ narrower screens */
@media (max-width: 1080px) {
  .today { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .figs div:first-child { border-left: 0; padding-left: 0; }
  .split, .cols2 { grid-template-columns: minmax(0, 1fr); }
  .split > .sec:first-child, .cols2 > .sec:first-child { border-bottom: 1px solid var(--line); }
  .hs-hero { grid-template-columns: minmax(0, 1fr); gap: 20px; }
}
@media (max-width: 760px) {
  .wrap { padding-inline: 16px; }
  .banner { width: calc(100% - 32px); }
  .topbar .wrap { gap: 12px; height: 54px; }
  .brand { gap: 6px; }
  .brand .brand-word { height: 12px; }
  .brand-img { height: 34px; }
  .who small, .signout .so-text, #p-state { display: none; }
  .feed { font-size: 11px; gap: 5px; }
  .feed-dot { width: 6px; height: 6px; }
  .seg .mn { padding: 7px 13px; min-height: 36px; }
  .signout { padding: 8px 9px; }
  .today { padding-block: 22px 20px; }
  .t-big { font-size: 36px; }
  .figs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .figs div { border-left: 0; padding: 10px 0; border-top: 1px solid var(--line); }
  .ptabs { gap: 0; justify-content: space-between; }
  .ptabs .lt { min-height: 44px; flex: 0 1 auto; font-size: 13.5px; padding-inline: 2px; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
  .ptabs .lt span { margin-left: 3px; }
  .tbl-scroll.has-cards { display: none; }
  .pos-cards { display: flex; }
  .pos-cards + .tbl-scroll, .tbl-scroll + .tbl-scroll { margin-top: 12px; }
  .pos-cards + .tbl-scroll.has-cards + .pos-cards { margin-top: 18px; }
  .sec { padding-block: 20px; }
  .hs-ret { font-size: 38px; }
  .cal-h { padding: 0 2px 4px; text-align: center; font-size: 11px; }
  .cal-c { min-height: 48px; padding: 4px 3px; align-items: center; }
  .cal-c b { font-size: 11px; }
  .cal-c i { font-size: 10.5px; text-align: center; max-width: 100%; white-space: normal; overflow: visible; line-height: 1.15; letter-spacing: -0.02em; }
  .cal-c { min-height: 52px; }
  .cal-detail { font-size: 13px; gap: 4px 16px; }
}
@media (max-width: 380px) {
  .wrap { padding-inline: 12px; }
  .topbar .wrap { gap: 6px; }
  .brand { gap: 4px; }
  .seg .mn { padding: 6px 8px; font-size: 12.5px; gap: 5px; min-height: 34px; }
  .brand-img { height: 28px; }
  .brand .brand-word { height: 10px; }
  .feed { font-size: 10.5px; gap: 4px; }
  .signout { padding: 7px 7px; }
}
@media (max-width: 350px) {
  .brand .brand-word { height: 9px; }
  .seg .mn { padding: 6px 7px; }
}
@media (max-width: 520px) {
  .who { display: none; }
  .topbar .wrap { gap: 10px; }
  .seg .mn { padding: 7px 11px; }
  .pin-boxes { gap: 6px; }
  .pin-boxes input { width: 41px; height: 52px; font-size: 22px; }
}
@media (max-width: 330px) {
  .brand .brand-word { display: none; }
}
.install-how a { color: var(--steel); overflow-wrap: anywhere; }

/* ------------------------------------------------------------------ ♛ THE KING (30 Oct)
   Watching an ADMIN profile's book: the portal's admin black & gold (frontend styles.css, data-theme="king").
   Gold carries the chrome — rules, active tabs, the equity curve, the logo; PROFIT / LOSS stay green / red.
   The PIN login stays VERITAS (nobody is known until the PIN is in). */
:root[data-theme="king"] {
  --bg: #000000;
  --bg-top: #0d0a04;
  --line: rgba(212, 175, 55, 0.14);
  --line-strong: rgba(212, 175, 55, 0.30);
  --text: #f6eedb; --muted: #b9a77c; --faint: #7f7253;
  --silver: #d4af37;
  --steel: #e6c25a;
  --surface: rgba(16, 13, 7, 0.92);
  --border: rgba(212, 175, 55, 0.22);
  --track: rgba(212, 175, 55, 0.07);
  --accent-rgb: 212 175 55; --accent2-rgb: 241 207 107;
  --accent-line: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.85), rgba(255, 236, 170, 0.6), transparent);
}
:root[data-theme="king"] body {
  background:
    radial-gradient(1300px 600px at 50% -14%, rgba(212, 175, 55, 0.11), transparent 62%),
    linear-gradient(180deg, var(--bg-top), var(--bg) 420px);
  background-repeat: no-repeat;
}
:root[data-theme="king"] .topbar { background: rgba(0, 0, 0, 0.86); border-bottom-color: rgba(212, 175, 55, 0.26);
  box-shadow: 0 1px 0 rgba(212, 175, 55, 0.06), 0 10px 30px rgba(0, 0, 0, 0.5); }
/* the VERITAS mark + word keep their own colours (blue, gold edges): only a soft gold glow here */
:root[data-theme="king"] .brand-img { filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.25)); }
:root[data-theme="king"] .brand .brand-word { filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.25)); }
:root[data-theme="king"] .pos-table tr.hs-row-live td { background: rgba(212, 175, 55, 0.06); }
:root[data-theme="king"] .seg .mn.active,
:root[data-theme="king"] .rng-month.on,
:root[data-theme="king"] .rng button.on { background: linear-gradient(135deg, #f1cf6b, #c9a032); color: #120d02; }
:root[data-theme="king"] .tip { color: #120d02; }
:root[data-theme="king"] ::selection { background: rgba(212, 175, 55, 0.35); }

/* The profile's name on top of the page, phones included (6 Nov) */
.ptitle { margin: 20px 0 -6px; font-size: 24px; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; color: var(--text);
  overflow-wrap: anywhere; }
.ptitle:empty { display: none; }
@media (max-width: 520px) { .ptitle { margin-top: 14px; font-size: 20px; } }

/* 16 Nov: manual From / To dates beside 7 days · 1 month · 2 months · Lifetime */
.rng-dates { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
.rng-dl { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); font-weight: 500; }
.rng-date { position: relative; display: inline-flex; align-items: center; justify-content: space-between; gap: 10px;
  min-width: 150px; min-height: 42px; box-sizing: border-box; padding: 8px 12px; border-radius: 8px;
  background: #e9edf3; color: #0b0f16; font-size: 15px; font-weight: 600; cursor: pointer; }
.rng-dval { white-space: nowrap; }
.rng-dico { font-size: 12px; opacity: 0.7; }
.rng-date-in { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0;
  opacity: 0; cursor: pointer; font-size: 16px; color-scheme: light; }
@media (max-width: 760px) {
  .rng-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .rng-dl { display: grid; gap: 4px; }
  .rng-date { width: 100%; box-sizing: border-box; }
}
/* 16 Nov: Daily P&L — one grid per month of the chosen period */
.cal-month + .cal-month { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
/* 16 Nov: monthly returns - the 14-column table on a wide screen, a list with a bar per month on a phone */
.mx-list { display: none; }
@media (max-width: 760px) {
  .mx-wide { display: none; }
  .mx-list { display: grid; gap: 14px; }
  .rng { flex-wrap: wrap; }
}
.mxl-head { display: flex; justify-content: space-between; align-items: baseline; padding: 0 0 6px; border-bottom: 1px solid var(--line); font-size: 13px; }
.mxl-head b { font-size: 14px; }
.mxl-row { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%;
  background: transparent; border: 0; border-bottom: 1px solid var(--line); padding: 10px 0; color: var(--text); text-align: left; font: inherit; cursor: pointer; }
.mxl-row.on { box-shadow: inset 3px 0 0 var(--silver); padding-left: 8px; }
.mxl-m { font-size: 13px; color: var(--muted); white-space: nowrap; }
.mxl-bar { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; min-width: 0; }
.mxl-bar i { display: block; height: 100%; border-radius: 4px; }
.mxl-bar i.up { background: rgb(70 192 138); }
.mxl-bar i.dn { background: rgb(238 106 106); }
.mxl-v { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mxl-v b { font-size: 13.5px; }
.mxl-v small { font-size: 11.5px; }
/* 16 Nov: on a PC the 5 period buttons (+ Dates…) did not fit the 300px column ("Da"), and 8 top figures cut their numbers */
.hs-hero { grid-template-columns: 390px minmax(0, 1fr); }
.rng { flex-wrap: wrap; }
.figs { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); row-gap: 14px; }
.figs dd, .figs small { overflow: visible; text-overflow: clip; }
@media (max-width: 1080px) { .hs-hero { grid-template-columns: minmax(0, 1fr); } }
