/* ==========================================================================
   Income Builder AI — member portal
   Same component contract as the portal's app.js, dressed in the
   incomebuilderai.com design system so the public site and the portal read as
   one product: white ground, ink #101828 type, one blue accent #2563EB,
   Inter, rounded cards and hairline #E4E7EC rules.
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Noto+Sans+SC:wght@400;500;700;900&display=swap');

:root {
  /* Ground */
  --ink:        #ffffff;
  --ink-2:      #f7f8fa;
  --panel:      #ffffff;
  --panel-2:    #f7f8fa;
  --panel-hi:   #eff4ff;
  --soft:       #f7f8fa;

  /* Brand */
  --blue:       #2563eb;
  --blue-hi:    #3b82f6;
  --blue-deep:  #1d4ed8;

  /* Type (names kept from the component contract: "silver" is the heading ink) */
  --silver:     #101828;
  --silver-2:   #344054;
  --muted:      #667085;
  --muted-2:    #667085;

  /* Lines */
  --line:       #d0d5dd;
  --line-2:     #e4e7ec;
  --line-blue:  rgba(37, 99, 235, 0.45);

  /* Semantic */
  --green:      #16a34a;
  --green-dim:  #ecfdf3;
  --red:        #dc2626;
  --red-dim:    #fef3f2;

  /* Metrics */
  --nav-h:      72px;
  --gutter:     clamp(20px, 5vw, 64px);
  --maxw:       1240px;
  --radius:     16px;
  --radius-sm:  8px;
  --shadow:     0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-lg:  0 24px 70px rgba(16, 24, 40, 0.12);

  --ease:       cubic-bezier(0.22, 1, 0.36, 1);

  --font: Inter, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", ui-sans-serif, system-ui,
          -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* --------------------------------------------------------------- reset -- */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(90% 70% at 82% -8%, rgba(37, 99, 235, 0.16), transparent 62%),
    radial-gradient(70% 60% at 4% 102%, rgba(37, 99, 235, 0.10), transparent 60%),
    var(--ink);
  background-attachment: fixed;
  color: var(--silver-2);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
  font-weight: 400;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
img, svg { display: block; max-width: 100%; }

h1, h2, h3, h4 {
  margin: 0;
  color: var(--silver);
  font-weight: 300;
  line-height: 1.14;
  letter-spacing: -0.025em;
}
h1, h2, h3, p { overflow-wrap: anywhere; }
p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

::selection { background: var(--blue-deep); color: #fff; }
:focus-visible { outline: 1px solid var(--blue-hi); outline-offset: 3px; }

code {
  color: var(--blue);
  font-family: var(--mono);
  font-size: 0.92em;
  letter-spacing: 0;
}

.wrap { width: min(var(--maxw), calc(100% - 40px)); margin-inline: auto; }

/* ----------------------------------------------------------------- nav -- */

.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
}
.nav-inner {
  min-height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 18px;
}

.brand { display: inline-flex; align-items: center; gap: 13px; flex: none; }
.brand__logo { height: 44px; width: auto; flex: none; }
.brand__rule {
  width: 1px;
  height: 28px;
  flex: none;
  background: linear-gradient(180deg, transparent, var(--line), transparent);
}
.brand b {
  color: var(--blue);
  font-size: 9.5px;
  line-height: 1.5;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  white-space: nowrap;
}

.menu-toggle {
  display: inline-grid;
  place-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  flex: none;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  transition: border-color 0.3s var(--ease);
}
.menu-toggle:hover { border-color: var(--line-blue); }
.menu-toggle span { display: block; width: 18px; height: 1px; background: var(--silver); }

.nav-links {
  position: fixed;
  top: var(--nav-h);
  bottom: 0;
  left: 0;
  z-index: 45;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1px;
  width: min(320px, calc(100vw - 40px));
  padding: 26px 18px 40px;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: #ffffff;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--muted);
  font-size: 13.5px;
  transform: translateX(-105%);
  transition: transform 0.4s var(--ease);
}
.menu-title {
  display: block;
  padding: 0 14px 14px;
  color: var(--muted-2);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}
.menu-account { display: none; }
.nav-links a {
  display: block;
  padding: 13px 14px;
  border-left: 1px solid transparent;
  color: var(--silver-2);
  transition: color 0.28s var(--ease), background 0.28s var(--ease),
              border-color 0.28s var(--ease);
}
.nav-links a:hover {
  color: var(--silver);
  background: rgba(37, 99, 235, 0.07);
  border-left-color: var(--blue);
}
.nav-links a.active {
  color: var(--blue);
  background: rgba(37, 99, 235, 0.10);
  border-left-color: var(--blue);
}
.menu-open .nav-links { transform: translateX(0); }
.menu-open { overflow: hidden; }
.menu-overlay {
  position: fixed;
  inset: var(--nav-h) 0 0;
  z-index: 20;
  border: 0;
  background: rgba(16, 24, 40, 0.45);
  cursor: pointer;
}
.menu-overlay[hidden] { display: none; }

.nav-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }

/* ------------------------------------------------------------- buttons -- */

.btn {
  position: relative;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--line);
  padding: 12px 24px;
  background: transparent;
  color: var(--silver);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  overflow: hidden;
  transition: color 0.35s var(--ease), border-color 0.35s var(--ease),
              background 0.35s var(--ease);
}
.btn:hover { color: var(--silver); border-color: var(--line-blue); background: rgba(37, 99, 235, 0.10); }
.btn-primary {
  border-color: transparent;
  background: linear-gradient(120deg, var(--blue-deep), var(--blue));
  color: #fff;
}
.btn-primary:hover {
  border-color: transparent;
  background: linear-gradient(120deg, var(--blue), var(--blue-hi));
}
.btn-dark { background: var(--panel); border-color: var(--line); }
.btn-ghost { border-color: var(--line); }
.btn-danger { border-color: transparent; background: #dc2626; color: #fff; }
.btn-danger:hover { border-color: transparent; background: #b91c1c; }
.btn-block { width: 100%; }
.btn-small { min-height: 32px; padding: 7px 13px; font-size: 10px; letter-spacing: 0.14em; }
.btn:disabled { cursor: not-allowed; opacity: 0.45; }
.btn:disabled:hover { color: var(--silver); border-color: var(--line); background: transparent; }

/* ---------------------------------------------------------- type bits -- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--blue);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  flex: none;
  background: linear-gradient(90deg, var(--blue), transparent);
}

h1 {
  margin: 20px 0 18px;
  max-width: 20ch;
  font-size: clamp(34px, 5.2vw, 60px);
  font-weight: 200;
  letter-spacing: -0.035em;
  line-height: 1.04;
}
.lead {
  max-width: 60ch;
  color: var(--muted);
  font-size: clamp(16px, 1.4vw, 18px);
  font-weight: 300;
  line-height: 1.62;
}
.quiet { margin: 16px 0 0; color: var(--muted-2); font-size: 13px; line-height: 1.66; }

.list { list-style: none; padding: 0; margin: 34px 0 0; display: grid; }
.list li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 15px 0;
  border-bottom: 1px solid var(--line-2);
  color: var(--silver-2);
  font-size: 14.5px;
  line-height: 1.6;
}
.tick {
  display: grid;
  place-items: center;
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  border: 1px solid var(--line-blue);
  color: var(--blue);
  font-size: 11px;
  font-weight: 500;
}

/* ------------------------------------------------------------ surfaces -- */

.card {
  position: relative;
  border: 1px solid var(--line-2);
  background: linear-gradient(165deg, var(--panel), var(--ink-2));
}
.panel { padding: clamp(22px, 2.4vw, 32px); }
.card h2 {
  font-size: clamp(19px, 1.9vw, 24px);
  font-weight: 300;
  letter-spacing: -0.02em;
}
.card .eyebrow + h2 { margin-top: 14px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  padding: 6px 12px;
  color: var(--muted);
  background: var(--soft);
  font-size: 11px;
  letter-spacing: 0.06em;
}
.pill strong { color: var(--silver); font-weight: 500; }

.badge {
  display: inline-flex;
  width: max-content;
  border: 1px solid var(--line);
  padding: 3px 10px;
  background: var(--soft);
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.badge.green { border-color: #abefc6; background: var(--green-dim); color: var(--green); }
.badge.red { border-color: #fecdca; background: var(--red-dim); color: var(--red); }

.empty {
  padding: 22px;
  border: 1px dashed var(--line);
  background: var(--soft);
  color: var(--muted-2);
  font-size: 14px;
}

/* -------------------------------------------------------- auth screens -- */

.auth-hero { padding: clamp(48px, 7vw, 92px) 0 clamp(60px, 8vw, 104px); }
.auth-grid {
  display: grid;
  grid-template-columns: 1fr 460px;
  gap: clamp(34px, 5vw, 64px);
  align-items: center;
}
.auth-card { padding: clamp(26px, 3vw, 36px); }
.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}
.card-top h2 { margin: 14px 0 0; }

.field { margin-bottom: 16px; }
.field label {
  display: block;
  margin-bottom: 9px;
  color: var(--muted-2);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.field small { display: block; margin-top: 7px; color: var(--muted-2); font-size: 12px; }
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--silver);
  padding: 13px 15px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--blue);
  background: rgba(37, 99, 235, 0.05);
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted-2); }
.field select {
  appearance: none;
  cursor: pointer;
  padding-right: 44px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10' fill='none'%3E%3Cpath d='M2 4l3 3 3-3' stroke='%232563eb' stroke-width='1.2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 12px;
}
.field select option { background: var(--panel); color: var(--silver); }
input[type="date"] { color-scheme: light; }

.input-wrap { position: relative; }
.input-wrap input { padding-right: 48px; }

/* Reveal toggle. Both icons ship in the markup and CSS picks one, so the
   button never flashes the wrong state before app.js binds it. */
.pw-toggle {
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted-2);
  cursor: pointer;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease),
              background 0.3s var(--ease);
}
.pw-toggle svg { width: 19px; height: 19px; }
.pw-toggle:hover { color: var(--blue); background: rgba(37, 99, 235, 0.08); }
.pw-toggle:focus-visible { border-color: var(--line-blue); outline: none; }
.pw-toggle .pw-eye-off { display: none; }
.pw-toggle.is-on { color: var(--blue); }
.pw-toggle.is-on .pw-eye { display: none; }
.pw-toggle.is-on .pw-eye-off { display: block; }

.remember {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 6px 0 20px;
  color: var(--muted);
  font-size: 13.5px;
  cursor: pointer;
}
.remember input, .switch-label input, .check input {
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
  flex: none;
}

.status {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-left: 2px solid var(--muted-2);
  background: var(--soft);
  color: var(--muted);
  padding: 12px 16px;
  font-size: 13.5px;
  line-height: 1.5;
}
.status.ok { border-color: #abefc6; border-left-color: var(--green); background: var(--green-dim); color: #05603a; }
.status.error { border-color: #fecdca; border-left-color: var(--red); background: var(--red-dim); color: #912018; }

.helper-links {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.helper-links a { transition: color 0.3s var(--ease); }
.helper-links a:hover { color: var(--blue); }

.trust {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line-2);
  color: var(--muted-2);
  font-size: 11.5px;
  line-height: 1.65;
  text-align: center;
}

/* ---------------------------------------------------------- page shell -- */

.page { padding: clamp(30px, 4vw, 46px) 0 clamp(60px, 8vw, 96px); }
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 26px;
  margin-bottom: clamp(26px, 3vw, 40px);
}
.page-head h1 { margin: 18px 0 0; max-width: 24ch; font-size: clamp(30px, 4vw, 48px); }
.page-head p { margin: 16px 0 0; max-width: 78ch; color: var(--muted); font-size: 15px; line-height: 1.65; }
.page-head p a { color: var(--blue); }

.back-link { margin-bottom: 26px; }
.back-link a {
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: color 0.3s var(--ease);
}
.back-link a:hover { color: var(--blue); }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }

/* --------------------------------------------------------------- stats -- */

.stat {
  padding: clamp(18px, 2vw, 26px);
  border: 1px solid var(--line-2);
  background: var(--ink-2);
  transition: border-color 0.45s var(--ease);
}
.stat:hover { border-color: var(--line-blue); }
.stat b {
  display: block;
  color: var(--silver);
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 200;
  letter-spacing: -0.03em;
  line-height: 1.1;
  overflow-wrap: anywhere;
}
.stat span {
  display: block;
  margin-top: 12px;
  color: var(--muted-2);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  line-height: 1.6;
}

/* --------------------------------------------------------- share link -- */

.share-link {
  display: flex;
  border: 1px solid var(--line);
  background: var(--soft);
  overflow: hidden;
}
.share-link input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 14px 15px;
  color: var(--blue);
  font-family: var(--mono);
  font-size: 13px;
  outline: none;
}
.share-link .btn { border: 0; border-left: 1px solid var(--line); }

/* -------------------------------------------------------------- tables -- */

.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--line-2); }
.card .table-wrap { margin-top: 18px; }
table { width: 100%; border-collapse: collapse; min-width: 680px; font-size: 14px; }
th, td { padding: 15px 18px; text-align: left; vertical-align: top; }
thead th {
  background: var(--ink-2);
  border-bottom: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  white-space: nowrap;
}
tbody tr { border-bottom: 1px solid var(--line-2); transition: background 0.3s; }
tbody tr:last-child { border-bottom: 0; }
tbody tr:hover { background: rgba(37, 99, 235, 0.04); }
td strong { color: var(--silver); font-weight: 500; }
td small { color: var(--muted-2); font-size: 12px; }
.table-link { color: var(--blue); }
.table-link:hover { text-decoration: underline; }

.status-select, .inline-input, td input[type="date"], td select {
  min-height: 34px;
  border: 1px solid var(--line);
  background: var(--soft);
  padding: 6px 9px;
  color: var(--silver);
  font-size: 12px;
  outline: none;
}
.inline-input { width: 140px; }
.status-select:focus, .inline-input:focus, td input:focus, td select:focus { border-color: var(--blue); }
.status-select option, td select option { background: var(--panel); color: var(--silver); }

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  color: var(--muted-2);
  font-size: 12px;
  letter-spacing: 0.04em;
}
.pagination-actions { display: flex; gap: 8px; }

/* -------------------------------------------------------- genealogy -- */

.tree, .tree ul { list-style: none; padding: 0; margin: 0; }
.tree { display: grid; gap: 12px; }
.tree ul { display: grid; gap: 12px; margin-top: 12px; padding-left: 34px; border-left: 1px solid var(--line-2); }
.node {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  width: 100%;
  border: 1px solid var(--line-2);
  background: var(--ink-2);
  padding: 15px;
  transition: border-color 0.4s var(--ease);
}
.node:hover { border-color: var(--line-blue); }
.node--clickable { cursor: pointer; text-decoration: none; transition: border-color 0.18s ease, background 0.18s ease; }
.node--clickable:hover { border-color: var(--line-blue); background: var(--panel-hi); }
.avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-blue);
  background: rgba(37, 99, 235, 0.08);
  color: var(--blue);
  font-size: 15px;
  font-weight: 400;
}
.node strong { display: block; color: var(--silver); font-weight: 400; }
.node small { display: block; margin-top: 4px; color: var(--muted-2); font-size: 12.5px; }
.node-meta {
  display: grid;
  gap: 3px;
  color: var(--muted-2);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: right;
}

/* ------------------------------------------------------- detail lists -- */

.formula-list { display: grid; margin-top: 22px; border-top: 1px solid var(--line-2); }
.formula-list div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-2);
  color: var(--muted);
  font-size: 13.5px;
}
.formula-list strong { color: var(--silver); font-weight: 400; text-align: right; }

/* Document library on the dashboard. Same rhythm as .formula-list, but each
   row is the download link itself rather than a label and a value. */
.doc-list { display: grid; margin-top: 22px; border-top: 1px solid var(--line-2); }
.doc-list .doc {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-2);
  color: var(--muted);
  font-size: 13.5px;
  text-decoration: none;
  transition: color 0.18s ease;
}
.doc-list .doc:hover, .doc-list .doc:focus-visible { color: var(--silver); }
.doc-list .doc strong {
  flex: none;
  color: var(--muted-2);
  font-weight: 400;
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}
.doc-list .quiet { padding: 14px 0; margin: 0; }

/* Icon in front of a Links-row label. brand icons (WhatsApp/Android/Apple)
   render in their own brand color regardless of hover state — a colored mark
   is how a member spots "that's the WhatsApp one" at a glance; the two
   Vantage-platform actions (register, copy trading) share the app's own
   accent instead, since they are not a third-party brand. */
.doc-label { display: flex; align-items: center; gap: 12px; min-width: 0; }
.doc-icon { flex: none; width: 20px; height: 20px; }
.doc-icon--whatsapp { color: #25d366; }
.doc-icon--android { color: #3ddc84; }
.doc-icon--apple { color: var(--silver); }
.doc-icon--vantage { color: var(--blue); }
.doc-icon--pdf { color: var(--red); }

.profile-details { display: grid; margin: 8px 0 0; }
.profile-details div {
  display: grid;
  grid-template-columns: minmax(120px, 0.7fr) minmax(0, 1.3fr);
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-2);
}
.profile-details dt {
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.profile-details dd { margin: 0; min-width: 0; color: var(--silver-2); font-size: 14px; overflow-wrap: anywhere; }

.action-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.action-row + .status { margin-top: 16px; }
.switch-label { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }

/* ------------------------------------------------------ notifications -- */

.notification {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line-2);
}
.notification.unread { border-left: 2px solid var(--blue); padding-left: 18px; }
.notification h3 { margin: 12px 0 6px; font-size: 16px; font-weight: 400; }
.notification p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.notification small { display: block; margin-top: 10px; color: var(--muted-2); font-size: 11.5px; letter-spacing: 0.1em; }

/* ------------------------------------------------------------ responsive */

@media (max-width: 1080px) {
  .grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .auth-grid, .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; }
  .nav-inner { gap: 12px; }
  .brand__rule, .brand b { display: none; }
  .nav-right .pill { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .page-head { display: grid; align-items: start; }
}
@media (max-width: 560px) {
  .wrap { width: min(100% - 28px, var(--maxw)); }
  .brand__logo { height: 38px; }
  .auth-card, .panel { padding: 20px; }
  .action-row .btn { width: 100%; }
  .nav-right .pill { display: none; }
  .menu-account {
    display: grid;
    gap: 4px;
    margin: 0 14px 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line-2);
  }
  .menu-account span { color: var(--muted-2); font-size: 10px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; }
  .menu-account strong { color: var(--silver); font-size: 15px; font-weight: 400; line-height: 1.35; }
  .menu-account small { color: var(--blue); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }
  .node { grid-template-columns: 38px minmax(0, 1fr); }
  .avatar { width: 38px; height: 38px; }
  .node-meta { grid-column: 2; text-align: left; }
  .tree ul { padding-left: 18px; }
  .helper-links { flex-direction: column; gap: 10px; }
}


/* ==========================================================================
   Income Builder AI skin — the rules above keep the portal's layout contract;
   everything below is what makes it look like incomebuilderai.com.
   ========================================================================== */

body {
  background: radial-gradient(900px 520px at 82% -10%, rgba(37, 99, 235, 0.10), transparent 60%), linear-gradient(180deg, #ffffff 0%, var(--soft) 100%);
  background-attachment: fixed;
  color: var(--silver-2);
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: 0;
}
h1, h2, h3, h4 { font-weight: 800; letter-spacing: -0.03em; }
h1, .page-head h1 { font-weight: 900; line-height: 1.06; letter-spacing: -0.03em; }
h1 { font-size: clamp(34px, 5vw, 56px); }
.page-head h1 { font-size: clamp(30px, 3.8vw, 44px); }
.card h2 { font-weight: 800; letter-spacing: -0.02em; }
.lead { font-weight: 400; line-height: 1.75; }
::selection { background: #dbeafe; color: var(--silver); }
:focus-visible { outline: 3px solid rgba(37, 99, 235, 0.45); outline-offset: 2px; border-radius: 6px; }
code { color: var(--blue-deep); background: var(--panel-hi); padding: 1px 6px; border-radius: 6px; }

/* brand lockup: the public site's mark and wordmark */
.nav { border-bottom: 1px solid var(--line-2); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.brand { gap: 12px; }
.brand__mark { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 8px; background: var(--silver); color: #fff; font-size: 13px; font-weight: 900; }
.brand__name { color: var(--silver); font-size: 16px; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; }
.brand__name i { color: var(--blue); font-style: normal; }
.brand__rule { background: var(--line-2); height: 24px; }
.brand b { font-size: 10px; font-weight: 700; letter-spacing: 0.18em; }

/* menu */
.menu-toggle { border-radius: var(--radius-sm); border-color: var(--line-2); background: #fff; }
.menu-toggle span { height: 2px; border-radius: 2px; width: 16px; }
.nav-links { border-right: 1px solid var(--line-2); box-shadow: var(--shadow-lg); font-size: 14.5px; gap: 2px; }
.nav-links a { border-left: 0; border-radius: var(--radius-sm); color: var(--silver-2); font-weight: 500; }
.nav-links a:hover { background: var(--soft); border-left: 0; }
.nav-links a.active { background: var(--panel-hi); font-weight: 600; }
.menu-title { letter-spacing: 0.18em; font-weight: 700; font-size: 11px; }

/* buttons: sentence case, 8px radius, solid blue primary */
.btn { border-radius: var(--radius-sm); border-color: var(--line-2); background: #fff; color: var(--silver); padding: 0 20px; font-size: 14px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.btn:hover { border-color: #98a2b3; background: #fff; }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 1px 2px rgba(37, 99, 235, 0.2); }
.btn-primary:hover { background: var(--blue-deep); border-color: var(--blue-deep); color: #fff; }
.btn-dark { background: var(--silver); border-color: var(--silver); color: #fff; }
.btn-dark:hover { background: #1d2939; border-color: #1d2939; color: #fff; }
.btn-ghost { border-color: var(--line-2); }
.btn-danger, .btn-danger:hover { color: #fff; }
.btn-small { min-height: 34px; padding: 0 13px; font-size: 13px; letter-spacing: 0; }
.btn:disabled:hover { color: var(--silver); border-color: var(--line-2); background: #fff; }
.btn-primary:disabled:hover { color: #fff; background: var(--blue); border-color: var(--blue); }

/* type bits */
.eyebrow { gap: 0; font-size: 12px; font-weight: 700; letter-spacing: 0.18em; }
.eyebrow::before { display: none; }
.quiet { font-size: 13.5px; }
.list li { border-bottom-color: var(--line-2); font-size: 15px; }
.tick { border: 0; border-radius: 50%; background: var(--panel-hi); font-weight: 700; }

/* surfaces */
.card { border: 1px solid var(--line-2); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.auth-card { border-color: var(--line); box-shadow: var(--shadow-lg); }
.pill { border-radius: 999px; border-color: var(--line-2); background: var(--soft); font-size: 12.5px; letter-spacing: 0; }
.pill strong { font-weight: 600; }
.badge { border-radius: 999px; border-color: var(--line-2); background: var(--soft); font-size: 11px; font-weight: 600; letter-spacing: 0.04em; }
.empty { border-radius: 12px; background: var(--soft); }
.stat { border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.stat b { font-weight: 800; letter-spacing: -0.03em; }
.stat span { font-size: 11px; font-weight: 600; letter-spacing: 0.12em; }
.card .stat { background: var(--soft); box-shadow: none; }

/* forms */
.field label { margin-bottom: 7px; color: var(--silver); font-size: 14px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.field input, .field select, .field textarea { border-radius: var(--radius-sm); border-color: var(--line); background-color: #fff; }
.field input:focus, .field select:focus, .field textarea:focus { background-color: #fff; box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16); }
.field input:disabled, .field input[readonly], .field select:disabled { background-color: var(--soft); color: var(--muted); }
.field select option, .status-select option, td select option { background: #fff; color: var(--silver); }
.pw-toggle { border-radius: 6px; }
.status { border-radius: 10px; border: 1px solid var(--line-2); border-left: 3px solid var(--line); background: var(--soft); color: var(--silver-2); }
.status.ok { border-left-color: var(--green); }
.status.error { border-left-color: var(--red); }
.helper-links { font-size: 13.5px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--blue); }
.back-link a { font-size: 13.5px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.share-link { border-radius: var(--radius-sm); background: #fff; }
.share-link .btn { border-radius: 0; }
.share-link input { color: var(--blue-deep); }

/* tables */
.table-wrap { border-radius: 12px; background: #fff; }
thead th { background: var(--soft); border-bottom: 1px solid var(--line-2); font-size: 11.5px; font-weight: 600; letter-spacing: 0.06em; }
tbody tr:hover { background: var(--soft); }
td strong { font-weight: 600; }
.table-link { font-weight: 600; }
.status-select, .inline-input, td input[type="date"], td select { border-radius: 6px; background: #fff; }

/* genealogy, lists, notifications */
.node { border-radius: 12px; background: #fff; }
.node--clickable:hover { background: var(--panel-hi); }
.avatar { border: 0; border-radius: 10px; background: var(--panel-hi); font-weight: 700; }
.node strong { font-weight: 600; }
.node-meta { font-size: 11px; letter-spacing: 0.06em; }
.formula-list strong { font-weight: 600; }
.doc-list .doc { color: var(--silver-2); font-weight: 500; }
.doc-list .doc:hover, .doc-list .doc:focus-visible { color: var(--blue); }
.profile-details dt { font-size: 11.5px; font-weight: 600; letter-spacing: 0.06em; }
.notification.unread { border-left: 3px solid var(--blue); }
.notification h3 { font-weight: 700; letter-spacing: -0.01em; }
.menu-account strong { font-weight: 700; }

@media (max-width: 980px) { .brand__rule, .brand b { display: none; } }
@media (max-width: 420px) { .brand__name { font-size: 15px; } }

/* ------------------------------------------------------ user activity -- */

/* a count with a bar behind it; the bar is the column's share of its largest value */
.bar-cell { min-width: 150px; }
.bar-cell__row { position: relative; display: block; line-height: 22px; }
.bar-cell__bar {
  position: absolute; left: 0; top: 0; height: 22px;
  border-radius: 0 4px 4px 0; background: var(--blue); opacity: 0.16;
}
.bar-cell__value { position: relative; padding-left: 8px; font-weight: 600; font-variant-numeric: tabular-nums; }

.col-chart {
  display: flex; align-items: stretch; gap: 2px; height: 220px; margin-top: 18px;
  padding-bottom: 22px; border-bottom: 1px solid var(--line-2); position: relative;
}
.col-chart__col {
  position: relative; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column;
  justify-content: flex-end; align-items: center; outline: none;
}
.col-chart__bar { width: 100%; max-width: 44px; border-radius: 4px 4px 0 0; background: var(--blue); }
.col-chart__col:hover .col-chart__bar, .col-chart__col:focus-visible .col-chart__bar { background: var(--blue-deep); }
.col-chart__value { margin-bottom: 4px; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.col-chart__tick {
  position: absolute; top: 100%; margin-top: 5px; color: var(--muted); font-size: 11px; white-space: nowrap;
}
.col-chart__col:hover::after, .col-chart__col:focus-visible::after {
  content: attr(data-tip); position: absolute; bottom: 100%; left: 50%; z-index: 5;
  transform: translateX(-50%); width: max-content; max-width: 220px; padding: 7px 10px; border-radius: 8px;
  background: var(--silver); color: #fff; font-size: 12px; line-height: 1.4; pointer-events: none;
}
.col-chart__col:first-child::after, .col-chart__col:nth-child(2)::after { left: 0; transform: none; }
.col-chart__col:last-child::after, .col-chart__col:nth-last-child(2)::after { left: auto; right: 0; transform: none; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.pager[hidden] { display: none; }
.pager .quiet { margin: 0; }
.status[hidden] { display: none; }

/* Live Stream menu item: a red pulsing dot while the stream is marked live */
.nav-live-dot { display: inline-block; width: 8px; height: 8px; margin-left: 6px; border-radius: 50%; background: #dc2626; vertical-align: 1px; box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.18); animation: nav-live-pulse 1.4s ease-in-out infinite; }
@keyframes nav-live-pulse { 50% { opacity: 0.35; } }

/* ── Trade History (trade-history.html) ───────────────────────────────────
   EA tabs, KPI tiles, the two SVG charts (monthly P/L columns, month balance
   line) and the month / trade tables. Chart colours: gains #2563eb, losses
   #e34948 (validated pair), hairline grid, text in ink tokens only. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.th-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 4px; }
.th-tab { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 210px; padding: 13px 16px; border: 1px solid var(--line-2); border-radius: 12px; background: #fff; color: var(--silver); font: inherit; text-align: left; cursor: pointer; box-shadow: var(--shadow); transition: border-color 0.15s, box-shadow 0.15s; }
.th-tab:hover { border-color: #98a2b3; }
.th-tab:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.th-tab[aria-selected="true"] { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12); }
.th-tab b { font-size: 14.5px; font-weight: 700; }
.th-tab span { font-size: 12.5px; color: var(--muted); }
.th-card { margin-top: 18px; padding: clamp(20px, 2.4vw, 30px); transition: opacity 0.2s var(--ease); }
.th-card.is-loading { opacity: 0.55; }
.th-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 14px 20px; }
.th-head h2 { margin: 4px 0 0; font-size: 22px; letter-spacing: -0.02em; }
.th-head .eyebrow + h2 { margin-top: 10px; }
.th-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.th-meta span + span::before { content: "·"; margin-right: 14px; color: #c0c5ce; }
.th-head__aside { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.th-badge { display: inline-flex; align-items: center; padding: 5px 11px; border-radius: 999px; background: var(--panel-hi); color: var(--blue-deep); font-size: 12px; font-weight: 600; }
.th-badge:empty { display: none; }
.th-updated { color: var(--muted); font-size: 12.5px; }
.th-reqs { display: grid; gap: 10px; margin: 16px 0 0; padding: 0; list-style: none; }
.th-reqs li { position: relative; padding-left: 22px; color: var(--silver-2); font-size: 14.5px; line-height: 1.5; }
.th-reqs li::before { content: ""; position: absolute; left: 2px; top: 0.55em; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }
.th-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.th-kpi { min-width: 0; padding: 15px 16px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--soft); }
.th-kpi__label { display: block; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.th-kpi__value { display: block; margin-top: 8px; overflow: hidden; color: var(--silver); font-size: 22px; font-weight: 700; letter-spacing: -0.02em; text-overflow: ellipsis; white-space: nowrap; }
.th-kpi__sub { display: block; margin-top: 4px; color: var(--muted); font-size: 12.5px; }
.th-chart { margin-top: 28px; }
.th-chart__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.th-chart__head h3, .th-trades-head h3 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.th-chart__unit { color: var(--muted); font-size: 12.5px; }
.th-chart__plot { position: relative; min-height: 200px; margin-top: 12px; }
.th-chart__plot svg { display: block; overflow: visible; }
.th-chart__plot text { fill: #667085; font-family: var(--font); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.th-chart__plot .th-label-strong { fill: var(--silver); font-weight: 600; }
.th-hit { fill: transparent; cursor: pointer; outline: none; }
.th-hit:focus-visible { fill: rgba(37, 99, 235, 0.07); }
.th-overlay { fill: transparent; cursor: crosshair; outline: none; }
.th-overlay:focus-visible { stroke: var(--blue); stroke-width: 1; }
.th-chart__empty { display: grid; place-items: center; min-height: 200px; color: var(--muted); font-size: 13.5px; }
.th-tip { position: absolute; z-index: 5; min-width: 150px; padding: 9px 12px; border-radius: 10px; background: #101828; box-shadow: var(--shadow-lg); color: #fff; font-size: 12.5px; line-height: 1.45; white-space: nowrap; pointer-events: none; transform: translate(-50%, calc(-100% - 12px)); }
.th-tip[hidden] { display: none; }
.th-tip strong { display: block; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.th-tip span { display: block; color: #d0d5dd; }
.th-table table { font-size: 13.5px; }
.th-table th, .th-table td { padding: 12px 16px; vertical-align: middle; white-space: nowrap; }
.th-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.th-table tr[data-th-run] { cursor: pointer; }
.th-table tr.is-selected, .th-table tr.is-selected:hover { background: var(--panel-hi); }
.th-table tr.is-selected td:first-child { box-shadow: inset 3px 0 0 var(--blue); }
.th-table .th-muted td { color: var(--muted); }
.th-month small, .th-src small { display: block; margin-top: 2px; color: var(--muted); font-size: 11.5px; }
.th-tag { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: #fffaeb; color: #b54708; font-size: 11px; font-weight: 600; vertical-align: 1px; }
.th-up { color: #067647; font-weight: 600; }
.th-down { color: #b42318; font-weight: 600; }
.th-side { display: inline-block; min-width: 42px; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-align: center; }
.th-side--buy { background: #eff4ff; color: #1d4ed8; }
.th-side--sell { background: #fef3f2; color: #b42318; }
.th-open { padding: 0 10px; }
.th-trades-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px; margin: 30px 0 12px; }
.th-trades-head .th-chart__unit { display: block; margin-top: 3px; }
@media (max-width: 1080px) { .th-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .th-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .th-tab { flex: 1 1 100%; min-width: 0; }
  .th-kpi { padding: 13px 14px; }
  .th-kpi__value { font-size: 17px; white-space: normal; overflow-wrap: anywhere; }
  .th-head__aside { width: 100%; }
}

/* ── Live Trade (live-trade.html) ─────────────────────────────────────────
   Status pill, price card with flash + day range, chart legend, account
   figures, basket cards and the activity list. Charts reuse the Trade History
   plot/tooltip styles; buy #2563eb / sell #e34948 / price #344054 / TP #067647. */
.lt-status { display: inline-flex; align-items: center; gap: 10px; align-self: center; padding: 9px 16px; border: 1px solid var(--line-2); border-radius: 999px; background: #fff; box-shadow: var(--shadow); font-size: 13px; }
.lt-status b { font-weight: 700; letter-spacing: 0.02em; }
.lt-clock { color: var(--muted); font-variant-numeric: tabular-nums; }
.lt-clock:empty { display: none; }
.lt-dot { width: 9px; height: 9px; border-radius: 50%; background: #98a2b3; }
.lt-status[data-state="live"] .lt-dot { background: #16a34a; box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.45); animation: lt-pulse 1.6s ease-out infinite; }
.lt-status[data-state="live"] b { color: #067647; }
.lt-status[data-state="replay"] .lt-dot { background: #f79009; }
.lt-status[data-state="replay"] b { color: #b54708; }
.lt-status[data-state="offline"] .lt-dot { background: #d92d20; }
@keyframes lt-pulse { 70% { box-shadow: 0 0 0 9px rgba(22, 163, 74, 0); } 100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); } }
.lt-tab b { display: inline-flex; align-items: center; gap: 8px; }
.lt-tab__dot { width: 8px; height: 8px; border-radius: 50%; background: #d0d5dd; }
.lt-tab__dot.is-on { background: #16a34a; }
.lt-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(300px, 1fr); gap: 18px; align-items: start; }
.lt-grid > .th-card { margin-top: 18px; }
/* fixed two columns: the price side may wrap inside itself, but the day range never jumps to a new row as the price changes */
.lt-quote-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, 260px); align-items: end; gap: 16px 28px; }
.lt-quote-head > div { min-width: 0; }
.lt-quote { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-top: 8px; }
.lt-quote b { padding: 0 6px; margin-left: -6px; border-radius: 8px; color: var(--silver); font-size: clamp(34px, 4vw, 46px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.lt-quote b.is-up { animation: lt-flash-up 0.9s ease-out; }
.lt-quote b.is-down { animation: lt-flash-down 0.9s ease-out; }
@keyframes lt-flash-up { 0% { background: rgba(37, 99, 235, 0.16); } 100% { background: transparent; } }
@keyframes lt-flash-down { 0% { background: rgba(227, 73, 72, 0.16); } 100% { background: transparent; } }
.lt-change { font-size: 15px; font-variant-numeric: tabular-nums; }
.lt-range { min-width: 0; }
.lt-range__labels { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.lt-range__values { margin-top: 6px; color: var(--silver); font-size: 13px; letter-spacing: 0; text-transform: none; font-variant-numeric: tabular-nums; }
.lt-range__track { position: relative; height: 6px; margin-top: 8px; border-radius: 999px; background: #eaecf0; }
.lt-range__fill { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 999px; background: #c7d7fe; }
.lt-range__mark { position: absolute; top: 50%; left: 0; width: 12px; height: 12px; border: 2px solid #fff; border-radius: 50%; background: var(--silver); box-shadow: var(--shadow); transform: translate(-50%, -50%); transition: left 0.4s var(--ease); }
.lt-chart-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 24px; }
.lt-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--silver-2); font-size: 12.5px; }
.lt-legend span { display: inline-flex; align-items: center; gap: 7px; }
.lt-key { display: inline-block; width: 16px; height: 0; border-top: 2px solid var(--key); }
.lt-key--dash { border-top-style: dashed; }
.lt-seg { display: inline-flex; padding: 3px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--soft); }
.lt-seg button { min-width: 44px; padding: 5px 10px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.lt-seg button[aria-pressed="true"] { background: #fff; color: var(--silver); box-shadow: var(--shadow); }
.lt-seg button:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.lt-chart { min-height: 300px; }
.lt-badge { display: inline-flex; padding: 5px 11px; border-radius: 999px; background: var(--soft); color: var(--silver-2); font-size: 12px; font-weight: 700; }
.lt-badge:empty { display: none; }
.lt-badge[data-type="real"] { background: #ecfdf3; color: #067647; }
.lt-badge[data-type="demo"] { background: #eff4ff; color: #1d4ed8; }
.lt-badge[data-type="replay"] { background: #fffaeb; color: #b54708; }
.lt-floating { margin-top: 20px; padding: 16px 18px; border-radius: 12px; background: var(--soft); }
.lt-floating span { display: block; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.lt-floating b { display: block; margin-top: 6px; font-size: 30px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.lt-figs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; margin: 18px 0 0; }
.lt-figs dt { color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.lt-figs dd { margin: 4px 0 0; color: var(--silver); font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.lt-today { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line-2); }
.lt-today h3, .lt-spark-head h3 { margin: 0; font-size: 14px; font-weight: 600; }
.lt-figs--today { margin-top: 12px; }
.lt-spark-head { margin-top: 22px; }
.lt-spark { min-height: 70px; margin-top: 8px; }
.lt-spark__empty { min-height: 70px; font-size: 12.5px; }
.lt-baskets { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin: 16px 0 14px; }
.lt-baskets:empty { display: none; }
.lt-basket { padding: 14px 16px; border: 1px solid var(--line-2); border-left: 3px solid var(--key, #98a2b3); border-radius: 12px; background: var(--soft); }
.lt-basket--buy { --key: #2563eb; }
.lt-basket--sell { --key: #e34948; }
.lt-basket__head { display: flex; align-items: center; gap: 8px; color: var(--silver-2); font-size: 13.5px; }
.lt-basket__head b { margin-left: auto; font-size: 16px; font-variant-numeric: tabular-nums; }
.lt-basket dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; margin: 12px 0 0; }
.lt-grid .th-table table { min-width: 540px; }
.lt-basket dt { color: var(--muted); font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.lt-basket dd { margin: 3px 0 0; color: var(--silver); font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.lt-activity { display: grid; gap: 2px; max-height: 560px; margin: 14px 0 0; padding: 0; overflow-y: auto; list-style: none; }
.lt-act { display: flex; gap: 12px; padding: 10px 6px; border-bottom: 1px solid var(--line-2); }
.lt-act:last-child { border-bottom: 0; }
.lt-act.is-new { animation: lt-in 0.6s var(--ease); }
@keyframes lt-in { from { background: #eff4ff; transform: translateY(-4px); } to { background: transparent; transform: none; } }
.lt-act__icon { flex: none; width: 10px; height: 10px; margin-top: 5px; border-radius: 50%; background: currentColor; }
.lt-act__icon.lt-buy { color: #2563eb; }
.lt-act__icon.lt-sell { color: #e34948; }
.lt-act p { margin: 0; color: var(--silver); font-size: 13.5px; }
.lt-act p b { margin-left: 4px; }
.lt-act small { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.lt-activity__empty { padding: 18px 4px; color: var(--muted); font-size: 13.5px; }
.lt-ea { margin-left: 6px; color: var(--muted); font-size: 12px; }
.lt-pill { display: inline-flex; padding: 3px 10px; border-radius: 999px; background: #f2f4f7; color: var(--silver-2); font-size: 12px; font-weight: 600; }
.lt-pill[data-on="true"] { background: #ecfdf3; color: #067647; }
@media (max-width: 1080px) { .lt-grid { grid-template-columns: minmax(0, 1fr); } .lt-grid > .th-card + .th-card { margin-top: 0; } }
@media (max-width: 560px) {
  .lt-quote-head { grid-template-columns: minmax(0, 1fr); }
  .lt-status { width: 100%; justify-content: center; }
  .lt-basket dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lt-floating b { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  .lt-status[data-state="live"] .lt-dot, .lt-quote b.is-up, .lt-quote b.is-down, .lt-act.is-new { animation: none; }
}
