:root {
  --bg: #f4f7f8;
  --card: #ffffff;
  --ink: #102032;
  --muted: #647386;
  --line: #dce5ea;
  --navy: #08253f;
  --teal: #167d7f;
  --green: #1f8a5b;
  --amber: #d59a2d;
  --red: #ca4b54;
  --blue: #275dad;
  --purple: #6f4cc3;
  --shadow: 0 12px 35px rgba(8, 37, 63, .08);
}

* { box-sizing: border-box; }
body {
  background:
    radial-gradient(circle at top left, rgba(22, 125, 127, .16), transparent 34vw),
    radial-gradient(circle at top right, rgba(111, 76, 195, .14), transparent 30vw),
    var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
}
body.auth-pending > * { visibility: hidden; }
body.auth-pending::before {
  align-items: center;
  background: var(--navy);
  color: white;
  content: "Checking secure session…";
  display: flex;
  inset: 0;
  justify-content: center;
  position: fixed;
}
button, input, a { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }

.v2-login-page {
  background:
    radial-gradient(circle at 18% 18%, rgba(139, 224, 212, .24), transparent 24vw),
    radial-gradient(circle at 82% 12%, rgba(111, 76, 195, .26), transparent 26vw),
    linear-gradient(145deg, #061727, #0b2c49 52%, #241b47);
  color: white;
  min-height: 100vh;
}
.v2-login-shell {
  align-items: center;
  display: grid;
  gap: 22px;
  margin: 0 auto;
  max-width: 1060px;
  min-height: 100vh;
  padding: 22px;
}
.v2-login-hero {
  overflow: hidden;
  padding: 8px 2px;
  position: relative;
}
.v2-login-brand {
  align-items: center;
  color: white;
  display: inline-flex;
  gap: 10px;
  margin-bottom: 42px;
  text-decoration: none;
}
.v2-login-brand img {
  display: block;
  height: auto;
  max-width: min(360px, 82vw);
  min-width: 240px;
  width: auto;
}
.v2-login-brand span {
  background: linear-gradient(135deg, var(--teal), #8be0d4);
  border-radius: 14px;
  color: var(--navy);
  display: grid;
  font-weight: 950;
  height: 42px;
  place-items: center;
  width: 42px;
}
.v2-login-brand b { font-size: 18px; }
.v2-login-hero h1 {
  font-size: clamp(42px, 13vw, 82px);
  letter-spacing: -.07em;
  line-height: .88;
  margin: 14px 0;
  max-width: 680px;
}
.v2-login-hero > p:not(.v2-kicker) {
  color: #d4e5ed;
  font-size: 18px;
  line-height: 1.4;
  margin: 0;
}
.v2-login-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 24px;
}
.v2-login-pills span {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(139,224,212,.32);
  border-radius: 999px;
  color: #dff7f4;
  font-size: 12px;
  font-weight: 950;
  padding: 9px 11px;
}
.v2-orb {
  aspect-ratio: 1;
  border: 1px solid rgba(139,224,212,.22);
  border-radius: 50%;
  filter: drop-shadow(0 0 34px rgba(139,224,212,.2));
  opacity: .8;
  position: absolute;
  right: 0;
  top: 82px;
  width: min(42vw, 300px);
}
.v2-orb span {
  animation: v2-spin 11s linear infinite;
  border: 1px solid rgba(139,224,212,.36);
  border-left-color: transparent;
  border-radius: 50%;
  inset: 12%;
  position: absolute;
}
.v2-orb span:nth-child(2) {
  animation-duration: 15s;
  border-color: rgba(111,76,195,.45);
  border-right-color: transparent;
  inset: 25%;
}
.v2-orb span:nth-child(3) {
  animation-duration: 7s;
  border-color: rgba(255,255,255,.32);
  border-bottom-color: transparent;
  inset: 38%;
}
@keyframes v2-spin { to { transform: rotate(360deg); } }
.v2-login-card {
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(255,255,255,.52);
  border-radius: 26px;
  box-shadow: 0 30px 80px rgba(0,0,0,.28);
  color: var(--ink);
  padding: 22px;
}
.v2-login-card-head h2 {
  font-size: 34px;
  letter-spacing: -.05em;
  margin: 0;
}
.v2-login-card-head p {
  color: var(--muted);
  margin: 6px 0 0;
}
.v2-login-card form {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}
.v2-login-card label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}
.v2-login-card input {
  background: #f7fafb;
  border: 1px solid #cbd7df;
  border-radius: 16px;
  font: inherit;
  padding: 14px 13px;
  width: 100%;
}
.v2-login-button {
  background: linear-gradient(135deg, var(--teal), var(--purple));
  border: 0;
  border-radius: 16px;
  color: white;
  font-weight: 950;
  margin-top: 6px;
  padding: 14px 16px;
}
.v2-forgot-button {
  background: transparent;
  border: 0;
  color: var(--teal);
  font-weight: 950;
  justify-self: center;
  padding: 8px 10px;
}
.v2-reset-help {
  background: #f3f8fa;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding: 12px;
}
.v2-reset-help[hidden] { display: none; }
.v2-reset-help strong { font-size: 14px; }
.v2-reset-help p { color: var(--muted); font-size: 13px; line-height: 1.4; margin: 0; }
.v2-reset-form {
  display: grid;
  gap: 9px;
  margin: 6px 0;
}
.v2-reset-form .v2-login-button { margin-top: 0; }
.v2-message {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  margin: 0;
}
.v2-login-card small {
  color: var(--muted);
  display: block;
  line-height: 1.35;
  margin-top: 14px;
}

.v2-topbar {
  align-items: center;
  background: var(--navy);
  color: white;
  display: grid;
  gap: 7px;
  grid-template-columns: 1fr auto;
  padding: 8px 12px;
  position: sticky;
  top: 0;
  z-index: 5;
}
.v2-brand { align-items: center; display: flex; gap: 9px; min-width: 0; text-decoration: none; }
.v2-brand img {
  display: block;
  height: auto;
  max-width: min(220px, 56vw);
  min-width: 160px;
  width: auto;
}
.v2-brand span { background: var(--teal); border-radius: 10px; display: grid; font-weight: 900; height: 36px; place-items: center; width: 36px; }
.v2-menu-button {
  align-items: center;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 14px;
  color: white;
  display: inline-grid;
  gap: 3px;
  grid-template-columns: 18px auto;
  justify-self: end;
  padding: 7px 9px;
}
.v2-menu-button span {
  background: white;
  border-radius: 999px;
  display: block;
  grid-column: 1;
  height: 2px;
  width: 18px;
}
.v2-menu-button b {
  font-size: 12px;
  grid-column: 2;
  grid-row: 1 / 4;
  letter-spacing: .02em;
  place-self: center;
}
.v2-topbar nav { display: flex; gap: 5px; grid-column: 1 / -1; overflow-x: auto; }
.v2-topbar nav a { border-radius: 999px; color: #cbd6df; flex: 0 0 auto; font-size: 12px; font-weight: 800; padding: 7px 9px; text-decoration: none; }
.v2-topbar nav a.active { background: rgba(255,255,255,.12); color: white; }
.v2-ghost-button {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  color: white;
  font-weight: 800;
  padding: 8px 11px;
}

.v2-shell { margin: 0 auto; max-width: 1040px; padding: 12px 12px 34px; }
.v2-hero, .v2-panel, .v2-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 8px 22px rgba(8, 37, 63, .06);
}
.v2-hero {
  background:
    radial-gradient(circle at 85% 18%, rgba(139, 224, 212, .28), transparent 22%),
    linear-gradient(140deg, var(--navy), #17415f 55%, #442c76);
  color: white;
  overflow: hidden;
  padding: 16px;
  position: relative;
}
.v2-hero::after {
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.18), transparent);
  content: "";
  height: 160%;
  left: -60%;
  position: absolute;
  top: -30%;
  transform: rotate(18deg);
  width: 38%;
}
.v2-hero h1 { font-size: clamp(26px, 8vw, 42px); letter-spacing: -.055em; line-height: 1; margin: 5px 0 8px; }
.v2-hero p { color: #d5e1e8; line-height: 1.35; margin: 0; }
.v2-kicker { color: var(--teal); font-size: 11px; font-weight: 900; letter-spacing: .12em; margin: 0 0 6px; text-transform: uppercase; }
.v2-hero .v2-kicker { color: #8be0d4; }
.v2-ai-badge {
  align-items: center;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(139,224,212,.55);
  border-radius: 999px;
  box-shadow: 0 0 28px rgba(139,224,212,.18);
  display: inline-flex;
  gap: 7px;
  padding: 6px 9px;
}
.v2-ai-badge span {
  background: #8be0d4;
  border-radius: 999px;
  color: var(--navy);
  display: inline-grid;
  height: 20px;
  place-items: center;
  width: 20px;
}
.v2-hero-actions { align-items: center; display: flex; gap: 8px; justify-content: space-between; margin-top: 10px; }
.v2-pill {
  background: #eef6f5;
  border-radius: 999px;
  color: var(--teal);
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  padding: 7px 10px;
}

.v2-panel { margin-top: 10px; padding: 12px; }
.v2-important-panel { border-color: #cfe3e5; box-shadow: 0 8px 22px rgba(22, 125, 127, .08); }
.v2-panel h2, .v2-section-heading h2 { font-size: 21px; letter-spacing: -.04em; margin: 0; }
.v2-panel p { color: var(--muted); line-height: 1.35; margin: 4px 0 0; }
.v2-text-link, .text-button { background: transparent; border: 0; color: var(--teal); font-weight: 900; text-decoration: none; }
.v2-main-button {
  background: var(--teal);
  border: 0;
  border-radius: 14px;
  color: white;
  font-weight: 900;
  padding: 12px 15px;
}
.v2-primary-button,
.v2-soft-button {
  align-items: center;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  font: inherit;
  font-size: 14px;
  font-weight: 950;
  justify-content: center;
  min-height: 36px;
  padding: 9px 13px;
  text-decoration: none;
  white-space: nowrap;
}
.v2-primary-button {
  background: linear-gradient(135deg, var(--teal), var(--purple));
  box-shadow: 0 14px 30px rgba(22, 125, 127, .22);
  color: white;
}
.v2-soft-button {
  background: linear-gradient(135deg, #edf8f7, #f3edff);
  border: 1px solid #d6e7ee;
  color: var(--navy);
}
.v2-primary-button:disabled,
.v2-soft-button:disabled {
  cursor: default;
  opacity: .65;
}
.v2-ticker-form { display: grid; gap: 8px; grid-template-columns: 1fr auto; margin-top: 10px; }
.v2-ticker-form input { border: 1px solid #b9c7d0; border-radius: 12px; min-width: 0; padding: 10px 11px; text-transform: uppercase; }
.v2-ticker-form button, .v2-card button {
  background: var(--teal);
  border: 0;
  border-radius: 12px;
  color: white;
  font-weight: 900;
  padding: 10px 13px;
}
.v2-message { color: var(--muted); font-size: 13px; min-height: 18px; }
.v2-message.error { color: var(--red); }
.v2-web-notice {
  background: linear-gradient(135deg, #e8f7f3, #f1edff);
  border: 1px solid #b7ddd8;
  border-radius: 18px;
  box-shadow: 0 14px 34px rgba(22, 125, 127, .12);
  color: var(--ink);
  display: grid;
  gap: 4px;
  margin-top: 14px;
  padding: 14px 16px;
}
.v2-web-notice[hidden] { display: none; }
.v2-web-notice strong { color: var(--teal); font-size: 15px; }
.v2-web-notice span { color: var(--muted); font-size: 13px; line-height: 1.4; }

.v2-section-heading { align-items: end; display: flex; gap: 10px; justify-content: space-between; margin: 16px 2px 8px; }
.v2-section-note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  margin: 5px 0 0;
}
.v2-section-note b { color: var(--ink); }
.v2-toggle {
  background: #e7eef2;
  border: 1px solid var(--line);
  border-radius: 14px;
  display: grid;
  gap: 6px;
  grid-template-columns: 1fr 1fr;
  margin: 0 0 8px;
  padding: 4px;
}
.v2-toggle button {
  background: transparent;
  border: 0;
  border-radius: 11px;
  color: var(--muted);
  font-weight: 950;
  padding: 9px 8px;
}
.v2-toggle button.active {
  background: white;
  box-shadow: 0 8px 20px rgba(8, 37, 63, .08);
  color: var(--navy);
}
.portfolio-mode-panel {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-top: 12px;
}
.portfolio-mode-panel .v2-toggle {
  display: inline-grid;
  flex: 0 0 auto;
  grid-template-columns: auto auto;
  margin: 0;
  min-width: 260px;
}
.portfolio-mode-panel .v2-toggle button {
  padding: 10px 18px;
}
.portfolio-mode-panel .v2-view-help {
  flex: 1;
  margin: 0;
}
.v2-view-help {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.4;
  margin: 0 2px 12px;
}
.v2-card-list, .v2-mini-list { display: grid; gap: 9px; }
.v2-card { overflow: hidden; padding: 0; position: relative; }
.ai-live-card::before {
  background: linear-gradient(135deg, rgba(22, 125, 127, .18), rgba(111, 76, 195, .16));
  border-radius: 999px;
  content: "";
  filter: blur(10px);
  height: 54px;
  opacity: .45;
  position: absolute;
  right: -26px;
  top: -26px;
  width: 54px;
}
.v2-card-top {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 9px;
  grid-template-columns: auto minmax(0, 1.25fr) minmax(92px, auto) minmax(74px, auto) minmax(48px, auto);
  padding: 11px 12px 11px 18px;
}
.v2-rank {
  background: var(--teal);
  border-radius: 0 0 9px 0;
  color: white;
  display: grid;
  font-size: 11px;
  font-weight: 950;
  height: 22px;
  left: 0;
  place-items: center;
  position: absolute;
  top: 0;
  width: 26px;
  z-index: 2;
}
.v2-rank.watch { background: var(--teal); }
.v2-rank.best-fit, .v2-rank.buy, .v2-rank.strong-watch { background: var(--teal); }
.v2-rank.reduce { background: var(--amber); }
.v2-rank.avoid, .v2-rank.sell { background: var(--red); }
.v2-card h3 { font-size: 20px; letter-spacing: -.035em; line-height: 1; margin: 3px 0 0; }
.v2-card small { color: var(--muted); display: block; font-size: 12px; font-weight: 800; margin-top: 3px; }
.v2-card em { color: var(--muted); display: block; font-size: 11px; font-style: normal; font-weight: 800; margin-top: 2px; }
.v2-type-pill {
  background: #eef6f5;
  border: 1px solid #d6e7ee;
  border-radius: 999px;
  color: var(--teal);
  display: inline-flex;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .04em;
  line-height: 1;
  margin-top: 5px;
  padding: 4px 6px;
  text-transform: uppercase;
  width: fit-content;
}
.v2-card-logo {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-sizing: border-box;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.9), 0 4px 10px rgba(12, 42, 67, .05);
  display: grid;
  height: 46px;
  justify-content: center;
  margin-left: 4px;
  overflow: hidden;
  padding: 4px;
  place-items: center;
  width: 46px;
}
.v2-card-logo img {
  display: block;
  height: auto;
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  object-position: center;
  width: auto;
}
.v2-card-logo span {
  color: var(--navy);
  display: block;
  font-size: 11px;
  font-weight: 1000;
  letter-spacing: -.03em;
  line-height: 1;
}
.v2-card-name {
  align-content: center;
  display: grid;
  min-width: 0;
}
.v2-card-name h3, .v2-card-name small, .v2-card-name em { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-card-name span {
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 950;
  line-height: 1.05;
}
.v2-card-full-name {
  align-items: center;
  display: flex;
  gap: 6px;
  min-width: 0;
}
.v2-card-full-name small {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.2;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.v2-card-full-name em {
  color: var(--muted);
  flex: 0 0 auto;
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
}
.ai-live-card:not(.holdings-card) .v2-card-top {
  align-items: center;
  grid-template-columns: auto minmax(0, 1fr) minmax(86px, auto) minmax(78px, auto) minmax(70px, auto);
  grid-template-rows: auto auto;
}
.ai-live-card:not(.holdings-card) .v2-card-full-name {
  grid-column: 1 / -1;
  grid-row: 1;
  padding-left: 28px;
  padding-right: 4px;
}
.ai-live-card:not(.holdings-card) .v2-card-logo {
  grid-column: 1;
  grid-row: 2;
}
.ai-live-card:not(.holdings-card) .v2-card-name {
  grid-column: 2;
  grid-row: 2;
}
.ai-live-card:not(.holdings-card) .v2-card-price {
  grid-column: 3;
  grid-row: 2;
  display: grid;
  min-width: 0;
  align-content: center;
}
.ai-live-card:not(.holdings-card) .v2-card-chance {
  grid-column: 4;
  grid-row: 2;
}
.ai-live-card:not(.holdings-card) .v2-card-score {
  grid-column: 5;
  grid-row: 2;
}
.v2-card-chance, .v2-card-score {
  border-left: 1px solid var(--line);
  display: grid;
  justify-items: center;
  min-width: 0;
  padding-left: 9px;
  text-align: center;
}
.v2-card-name span, .v2-card-price span, .v2-card-chance span, .v2-card-score span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  line-height: 1.05;
}
.v2-card-price strong, .v2-card-chance strong, .v2-card-score strong {
  display: block;
  font-size: 20px;
  font-weight: 950;
  line-height: 1;
  margin-top: 3px;
  white-space: nowrap;
}
.v2-card-price strong {
  color: var(--navy);
  letter-spacing: -.035em;
}
.v2-card-chance strong {
  color: var(--teal);
  letter-spacing: -.05em;
}
.v2-card-score strong {
  color: var(--purple);
  letter-spacing: -.04em;
}
.v2-hidden-gem {
  background: linear-gradient(135deg, #f3edff, #e8f6ff);
  border: 1px solid rgba(111, 76, 195, .22);
  border-radius: 8px 0 0 0;
  bottom: 0;
  color: var(--purple);
  display: grid;
  font-size: 11px;
  height: 19px;
  place-items: center;
  position: absolute;
  right: 0;
  width: 22px;
  z-index: 2;
}
.v2-price {
  color: var(--navy);
  display: block;
  font-size: 20px;
  letter-spacing: -.05em;
  line-height: 1;
  margin-top: 5px;
}
.v2-card:first-child .v2-price { font-size: 20px; }
.v2-probability {
  background: #f7fafb;
  border: 1px solid #d8e4ec;
  border-radius: 13px;
  display: grid;
  gap: 8px;
  padding: 9px;
}
.v2-probability.up { background: linear-gradient(135deg, #ecf8f2, #f7fbfb); border-color: #bde2d0; }
.v2-probability.down { background: linear-gradient(135deg, #fff1f2, #f8fbfc); border-color: #f0c5ca; }
.v2-prob-main {
  align-items: center;
  display: grid;
  gap: 2px 10px;
  grid-template-columns: 1fr auto;
}
.v2-prob-main span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.v2-prob-main strong {
  color: var(--green);
  font-size: 27px;
  grid-row: 1 / 3;
  letter-spacing: -.06em;
  line-height: 1;
}
.v2-probability.down .v2-prob-main strong { color: var(--red); }
.v2-prob-main small { color: var(--muted); font-size: 12px; font-weight: 800; }
.v2-prob-grid {
  display: grid;
  gap: 5px;
  grid-template-columns: repeat(4, 1fr);
}
.v2-prob-grid span {
  background: white;
  border-radius: 10px;
  color: var(--ink);
  display: grid;
  font-size: 11px;
  font-weight: 900;
  gap: 2px;
  padding: 6px 5px;
  text-align: center;
}
.v2-prob-grid b {
  color: var(--muted);
  display: block;
  font-size: 10px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.v2-probability p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
  margin: 0;
}
.v2-sparkline {
  background: linear-gradient(135deg, #f6fbfb, #f4f0ff);
  border: 1px solid #d8e4ec;
  border-radius: 13px;
  display: grid;
  gap: 5px;
  padding: 8px;
}
.v2-pulse-top {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}
.v2-pulse-title, .v2-pulse-read {
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.v2-pulse-read {
  background: white;
  border-radius: 999px;
  color: var(--navy);
  letter-spacing: 0;
  padding: 5px 7px;
  text-transform: none;
}
.v2-sparkline.up .v2-pulse-read { color: var(--green); }
.v2-sparkline.down .v2-pulse-read { color: var(--red); }
.v2-year-number {
  color: var(--navy);
  display: block;
  font-size: clamp(23px, 7vw, 32px);
  letter-spacing: -.06em;
  line-height: 1;
}
.v2-sparkline.up .v2-year-number { color: var(--green); }
.v2-sparkline.down .v2-year-number { color: var(--red); }
.v2-year-bar {
  background: #e5ebef;
  border-radius: 999px;
  height: 9px;
  overflow: hidden;
}
.v2-year-bar span {
  background: linear-gradient(90deg, var(--teal), var(--green));
  border-radius: inherit;
  display: block;
  height: 100%;
  min-width: 8%;
}
.v2-sparkline.down .v2-year-bar span { background: linear-gradient(90deg, #f0b4ba, var(--red)); }
.v2-sparkline.flat .v2-year-bar span { background: linear-gradient(90deg, #c7b8ef, var(--purple)); }
.v2-pulse-scale {
  color: var(--muted);
  display: flex;
  font-size: 10px;
  font-weight: 800;
  justify-content: space-between;
}
.v2-action {
  border-radius: 999px;
  color: white;
  font-size: 12px;
  font-weight: 950;
  padding: 6px 9px;
  text-align: center;
  white-space: nowrap;
}
.v2-action.buy, .v2-action.strong-watch, .v2-action.best-fit { background: var(--blue); }
.v2-action.watch { background: var(--teal); }
.v2-action.hold { background: var(--green); }
.v2-action.reduce { background: var(--amber); }
.v2-action.avoid, .v2-action.sell { background: var(--red); }
.v2-card-body { display: grid; gap: 8px; margin-top: 10px; }
.v2-card-body p { color: var(--muted); font-size: 13px; line-height: 1.35; margin: 0; }
.v2-card-body b { color: var(--ink); }
.v2-card-mid {
  align-items: stretch;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 0;
  grid-template-columns: minmax(0, 1fr) auto;
}
.v2-moves {
  align-items: center;
  display: grid;
  gap: 5px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-width: 0;
  padding: 9px 12px;
}
.v2-moves span {
  background: #eef2f5;
  border-radius: 999px;
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: -.03em;
  min-width: 0;
  overflow: hidden;
  padding: 5px 3px;
  text-align: center;
  text-overflow: clip;
  white-space: nowrap;
}
.v2-moves span b { color: var(--navy); margin-right: 1px; }
.v2-moves .v2-move-year {
  background: linear-gradient(135deg, #dff7f4, #eff4ff);
  border: 1px solid rgba(22, 125, 127, .32);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.55);
  color: var(--teal);
  font-size: 11px;
  font-weight: 1000;
  padding: 5px 4px;
}
.v2-moves .v2-move-year b { color: var(--teal); font-weight: 1000; }
.v2-moves .up { background: #e6f3ee; color: var(--green); }
.v2-moves .down { background: #fde9eb; color: var(--red); }
.v2-card-status {
  border-top: 1px solid var(--line);
  display: flex;
  gap: 7px;
  margin: 0;
  padding: 8px 12px;
}
.v2-card-status strong {
  color: var(--ink);
  font-size: 11px;
  white-space: nowrap;
}
.v2-card-status span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}
.v2-card-status.waiting {
  background: linear-gradient(135deg, #fff6dc, #edf6f5);
  border-top-color: #efd08b;
}
.v2-card-status.checked {
  background: #f8fbfc;
  color: var(--muted);
}
.v2-card-status.checked strong {
  color: var(--muted);
}

.holdings-action-row {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}
.portfolio-hero {
  padding: 13px 14px;
}
.portfolio-hero h1 {
  font-size: clamp(23px, 6vw, 34px);
  margin-bottom: 6px;
}
.portfolio-hero .v2-hero-actions {
  justify-content: flex-start;
}
.holdings-action-panel {
  background: rgba(255,255,255,.74);
  border-color: var(--line);
  box-shadow: none;
  padding: 11px;
}
.holdings-action-row h2 {
  font-size: 20px;
  margin-bottom: 4px;
}
.holdings-quick-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.holdings-form,
.cash-form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.holdings-form[hidden] {
  display: none;
}
.cash-form[hidden] {
  display: none;
}
.holdings-form-topline {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: 176px minmax(0, 1fr);
}
.holdings-form-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.holdings-form label,
.cash-form label,
.holdings-form-field {
  color: var(--muted);
  display: grid;
  font-size: 13px;
  font-weight: 900;
  gap: 7px;
}
.holdings-form-field.compact {
  min-width: 0;
}
.holdings-form input,
.holdings-form select,
.cash-form input,
.cash-form select {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  font: inherit;
  font-weight: 850;
  min-width: 0;
  padding: 10px 11px;
  width: 100%;
}
.holdings-form small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}
.holding-kind-toggle {
  background: #e7eef2;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: grid;
  gap: 6px;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
}
.holding-kind-toggle button {
  background: transparent;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 950;
  padding: 8px 10px;
}
.holding-kind-toggle button.active {
  background: white;
  box-shadow: 0 8px 18px rgba(8, 37, 63, .08);
  color: var(--navy);
}
.holding-text-button {
  background: transparent;
  border: 0;
  color: var(--teal);
  font: inherit;
  font-size: 12px;
  font-weight: 950;
  justify-self: start;
  padding: 0;
}
.holding-text-button.danger {
  color: var(--red);
}
.holding-text-button[hidden] {
  display: none;
}
.account-control-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto auto;
}
.holding-mini-button {
  background: #edf8f7;
  border: 1px solid #d6e7ee;
  border-radius: 999px;
  color: var(--navy);
  font: inherit;
  font-size: 12px;
  font-weight: 950;
  min-height: 38px;
  padding: 8px 12px;
  white-space: nowrap;
}
.holding-mini-button.danger {
  background: #fff1f2;
  border-color: #f0b4ba;
  color: var(--red);
}
.holding-mini-button:disabled {
  cursor: default;
  opacity: .55;
}
.holding-mini-button[hidden] {
  display: none;
}
.account-create-row {
  align-items: end;
  background: #f8fbfc;
  border: 1px solid var(--line);
  border-radius: 16px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 12px;
}
.account-create-row[hidden] {
  display: none;
}
.account-create-row label {
  margin: 0;
}
.cash-form {
  align-items: end;
  grid-template-columns: minmax(0, 1fr) 120px auto;
}
.holdings-button-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.holdings-card .v2-card-top {
  grid-template-columns: auto minmax(0, 1.15fr) minmax(88px, auto) minmax(78px, auto) minmax(72px, auto);
}
.v2-holding-value {
  border-left: 1px solid var(--line);
  display: grid;
  gap: 4px;
  justify-items: center;
  padding-left: 9px;
  text-align: center;
}
.v2-holding-value span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}
.v2-holding-value strong {
  color: var(--navy);
  font-size: 17px;
  letter-spacing: -.04em;
  line-height: 1;
  white-space: nowrap;
}
.holdings-card .v2-card-mid {
  grid-template-columns: minmax(0, 1fr) auto;
}
.holdings-card .holdings-button-row {
  border-left: 1px solid var(--line);
  flex-wrap: nowrap;
  gap: 0;
}
.v2-ghost-button.danger {
  border-color: #f0b4ba;
  color: var(--red);
}
.v2-card .holding-pill-button,
.holding-pill-button {
  background: white;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  color: var(--navy);
  font: inherit;
  font-size: 11px;
  font-weight: 950;
  min-height: 38px;
  padding: 7px 10px;
}
.v2-card .holding-pill-button.danger,
.holding-pill-button.danger {
  background: white;
  border-color: var(--line);
  color: var(--red);
}
.holdings-card .v2-rank {
  max-width: 82px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 700px) {
  .portfolio-mode-panel {
    align-items: stretch;
    display: grid;
  }
  .portfolio-mode-panel .v2-toggle {
    min-width: 0;
    width: 100%;
  }
  .holdings-action-row {
    align-items: stretch;
    display: grid;
  }
  .holdings-quick-buttons {
    justify-content: stretch;
  }
  .holdings-quick-buttons button {
    width: 100%;
  }
  .holdings-form-grid,
  .holdings-form-topline,
  .account-create-row,
  .cash-form {
    grid-template-columns: 1fr;
  }
  .portfolio-hero .v2-hero-actions {
    align-items: stretch;
  }
  .account-control-row {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }
  .holdings-card .v2-card-top {
    grid-template-columns: auto minmax(0, 1fr) minmax(76px, auto);
  }
  .holdings-card .v2-holding-value {
    display: none;
  }
  .holdings-card .v2-action {
    font-size: 10px;
    padding: 5px 7px;
  }
  .holdings-card .v2-card-mid {
    grid-template-columns: 1fr;
  }
  .holdings-card .holdings-button-row {
    border-left: 0;
    border-top: 1px solid var(--line);
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .holdings-card .holding-pill-button:first-child {
    border-left: 0;
  }
}
.v2-card-actions {
  align-items: stretch;
  border-left: 1px solid var(--line);
  display: grid;
  gap: 0;
  grid-auto-flow: column;
  grid-auto-columns: minmax(64px, auto);
  margin: 0;
}
.v2-card-actions button.remove { background: transparent; border: 0; color: var(--red); }
.v2-card-actions button.refresh { background: white; color: var(--navy); }
.v2-card-actions button.refresh.requested {
  background: #fff6dc;
  color: #72520d;
}
.v2-card-actions button.watch-add {
  background: white;
  color: var(--navy);
}
.v2-card-actions button:disabled { cursor: default; opacity: .62; }
.v2-card-actions button,
.v2-card-link {
  align-items: center;
  background: white;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  color: var(--navy);
  display: grid;
  font-weight: 900;
  justify-items: center;
  min-height: 40px;
  padding: 4px 5px;
  text-decoration: none;
}
.v2-card-actions > :first-child { border-left: 0; }
.v2-card-actions span, .v2-card-link span {
  display: block;
  font-size: 17px;
  line-height: 1;
}
.v2-card-actions button.watch-add span,
.v2-card-actions button.refresh span,
.v2-card-actions button.remove span,
.v2-card-link.research-link span {
  display: grid;
  font-size: 0;
  height: 18px;
  line-height: 1;
  place-items: center;
  width: 18px;
}
.v2-card-actions button.watch-add span::before,
.v2-card-actions button.refresh span::before,
.v2-card-actions button.remove span::before,
.v2-card-link.research-link span::before {
  background: currentColor;
  content: "";
  display: block;
  height: 18px;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: 18px 18px;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: 18px 18px;
  width: 18px;
}
.v2-card-actions button.watch-add span::before {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 4h2v7h7v2h-7v7h-2v-7H4v-2h7z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 4h2v7h7v2h-7v7h-2v-7H4v-2h7z'/%3E%3C/svg%3E");
}
.v2-card-actions button.refresh span::before {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M18.4 7.6A8 8 0 1 0 20 12h-2a6 6 0 1 1-1.2-3.6L14 11h7V4z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M18.4 7.6A8 8 0 1 0 20 12h-2a6 6 0 1 1-1.2-3.6L14 11h7V4z'/%3E%3C/svg%3E");
}
.v2-card-link.research-link span::before {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10.5 4a6.5 6.5 0 0 1 5.1 10.5l4 4-1.4 1.4-4-4A6.5 6.5 0 1 1 10.5 4m0 2a4.5 4.5 0 1 0 0 9 4.5 4.5 0 0 0 0-9'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10.5 4a6.5 6.5 0 0 1 5.1 10.5l4 4-1.4 1.4-4-4A6.5 6.5 0 1 1 10.5 4m0 2a4.5 4.5 0 1 0 0 9 4.5 4.5 0 0 0 0-9'/%3E%3C/svg%3E");
}
.v2-card-actions button.remove span::before {
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m6.4 5 12.6 12.6-1.4 1.4L5 6.4zm11.2 0L19 6.4 6.4 19 5 17.6z'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m6.4 5 12.6 12.6-1.4 1.4L5 6.4zm11.2 0L19 6.4 6.4 19 5 17.6z'/%3E%3C/svg%3E");
}
.v2-card-actions small, .v2-card-link small {
  color: var(--navy);
  display: block;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.1;
  margin: 2px 0 0;
  white-space: nowrap;
}
.v2-card-lines {
  display: grid;
  gap: 3px;
  padding: 11px 12px 12px;
}
.v2-card-lines p {
  color: var(--ink);
  display: grid;
  font-size: 12px;
  gap: 8px;
  grid-template-columns: 86px minmax(0, 1fr);
  line-height: 1.3;
  margin: 0;
}
.v2-card-lines b {
  color: var(--navy);
  font-weight: 950;
}
.v2-card-lines span {
  color: var(--ink);
  min-width: 0;
}

.v2-weekly-top {
  display: grid;
  gap: 8px;
}
#weekly-top .v2-card {
  background: #f1fbf6;
  border-color: #cceadd;
  box-shadow: 0 8px 20px rgba(31, 138, 91, .08);
}
#weekly-top .v2-card-top,
#weekly-top .v2-card-actions button,
#weekly-top .v2-card-link {
  background: rgba(255,255,255,.78);
}
#weekly-top .v2-card-logo {
  background: rgba(255,255,255,.92);
  border-color: #cceadd;
  border-radius: 11px;
  height: 42px;
  padding: 4px;
  width: 42px;
}
#weekly-top .v2-card-mid,
#weekly-top .v2-card-lines,
#weekly-top .v2-card-status.checked {
  background: rgba(241, 251, 246, .78);
}
.v2-week-card {
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(8, 37, 63, .05);
  display: grid;
  gap: 8px;
  grid-template-columns: auto 1fr auto auto auto;
  min-width: 0;
  padding: 10px;
}
.v2-week-card > span {
  background: var(--navy);
  border-radius: 10px;
  color: white;
  display: grid;
  font-size: 12px;
  font-weight: 950;
  height: 28px;
  place-items: center;
  width: 28px;
}
.v2-week-card strong, .v2-week-card small { display: block; }
.v2-week-card strong { font-size: 14px; line-height: 1.1; }
.v2-week-card small { color: var(--muted); font-size: 11px; margin-top: 2px; }
.v2-week-card b { color: var(--muted); font-size: 13px; white-space: nowrap; }
.v2-week-card b.up { color: var(--green); }
.v2-week-card b.down { color: var(--red); }
.v2-week-card em {
  background: #f1f5f7;
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  padding: 5px 7px;
  white-space: nowrap;
}
.v2-week-card button, .v2-mini-watch {
  background: var(--teal);
  border: 0;
  border-radius: 999px;
  color: white;
  display: grid;
  font-size: 18px;
  font-weight: 950;
  height: 32px;
  place-items: center;
  width: 32px;
}
.v2-week-card button:disabled, .v2-mini-watch:disabled {
  background: #dfe8ec;
  color: var(--teal);
  cursor: default;
}
.v2-history-panel { padding-bottom: 10px; }
.v2-pick-table-wrap { overflow-x: auto; }
.v2-pick-table {
  border-collapse: collapse;
  min-width: 100%;
  width: 100%;
}
.v2-pick-table th, .v2-pick-table td {
  border-bottom: 1px solid var(--line);
  padding: 8px 6px;
  text-align: left;
  vertical-align: middle;
}
.v2-pick-table th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}
.v2-pick-table td strong, .v2-pick-table td small { display: block; }
.v2-pick-table td strong { font-size: 13px; line-height: 1.15; }
.v2-pick-table td small { color: var(--muted); font-size: 11px; margin-top: 2px; }
.v2-table-move {
  color: var(--muted);
  font-size: 13px;
  font-weight: 1000;
  white-space: nowrap;
}
.v2-table-move.up { color: var(--green); }
.v2-table-move.down { color: var(--red); }

.v2-mini-item {
  align-items: center;
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr auto auto;
  padding: 12px;
}
.v2-mini-item strong, .v2-mini-item small { display: block; }
.v2-mini-item small { color: var(--muted); font-size: 12px; margin-top: 2px; }
.v2-mini-item button { border: 0; border-radius: 999px; font-size: 12px; font-weight: 900; padding: 8px 9px; }
.v2-mini-item .refresh { background: #e8f4f2; color: var(--teal); }
.v2-mini-item .remove { background: #fde9eb; color: var(--red); }
.v2-empty { color: var(--muted); padding: 10px 2px; }
.v2-notes { color: var(--muted); font-size: 13px; line-height: 1.55; margin: 8px 0 0; padding-left: 18px; }
.v2-summary-grid { display: grid; gap: 10px; grid-template-columns: repeat(3, 1fr); margin-top: 14px; }
.v2-summary-card { background: white; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 14px; }
.v2-summary-card small, .v2-summary-card span { color: var(--muted); display: block; font-size: 12px; }
.v2-summary-card strong { display: block; font-size: 24px; letter-spacing: -.04em; margin: 5px 0; }
.v2-research-grid { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 12px; }
.v2-research-stat-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 14px;
}
.v2-research-stat {
  background: #f8fbfc;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--ink);
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 13px;
  text-decoration: none;
}
.v2-research-stat span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}
.v2-research-stat strong {
  font-size: 22px;
  letter-spacing: -.04em;
}
.v2-research-stat small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}
.v2-research-stat.up {
  background: #e8f6f1;
  border-color: #b5ded1;
}
.v2-research-stat.up strong { color: var(--green); }
.v2-research-stat.down {
  background: #fdecef;
  border-color: #f0b4ba;
}
.v2-research-stat.down strong { color: var(--red); }
.v2-research-section {
  scroll-margin-top: 90px;
}
.v2-research-stack {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.v2-check-summary {
  background: linear-gradient(135deg, #f8fbfc, #ffffff);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(11, 34, 57, .07);
  display: grid;
  gap: 12px;
  padding: 16px;
}
.v2-check-summary.up {
  background: linear-gradient(135deg, #e8f6f1, #ffffff);
  border-color: #b5ded1;
}
.v2-check-summary.down {
  background: linear-gradient(135deg, #fdecef, #ffffff);
  border-color: #f0b4ba;
}
.v2-check-summary span {
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.v2-check-summary strong {
  color: var(--ink);
  display: block;
  font-size: 24px;
  letter-spacing: -.04em;
  margin-top: 3px;
}
.v2-check-summary small,
.v2-check-summary p {
  color: var(--muted);
  display: block;
  font-size: 12px;
  line-height: 1.35;
  margin: 5px 0 0;
}
.v2-check-summary-head {
  align-items: start;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
}
.v2-check-summary-score {
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  min-width: 110px;
  padding: 10px 12px;
  text-align: center;
}
.v2-check-summary-score b {
  color: var(--teal);
  display: block;
  font-size: 28px;
  letter-spacing: -.05em;
  line-height: 1;
  margin-top: 4px;
}
.v2-check-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.v2-check-counts span {
  align-items: baseline;
  background: #eef4f7;
  border: 1px solid #d9e4ea;
  border-radius: 999px;
  color: var(--ink);
  display: inline-flex;
  font-size: 12px;
  gap: 5px;
  letter-spacing: 0;
  padding: 7px 10px;
  text-transform: none;
}
.v2-check-counts span.up {
  background: #dff4ed;
  border-color: #b5ded1;
  color: var(--green);
}
.v2-check-counts span.down {
  background: #fdecef;
  border-color: #f0b4ba;
  color: var(--red);
}
.v2-check-counts b {
  font-size: 16px;
}
.v2-check-overview-grid {
  display: grid;
  gap: 9px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.v2-check-overview-grid div {
  background: white;
  border: 1px solid var(--line);
  border-radius: 15px;
  min-width: 0;
  padding: 11px;
}
.v2-check-overview-grid strong {
  font-size: 15px;
  letter-spacing: -.02em;
}
.v2-check-group {
  display: grid;
  gap: 8px;
}
.v2-check-group h3 {
  color: var(--ink);
  font-size: 15px;
  letter-spacing: -.02em;
  margin: 6px 0 0;
}
.v2-research-box { background: white; border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.v2-research-box strong { color: var(--ink); display: block; font-size: 14px; }
.v2-research-box p { color: var(--muted); line-height: 1.45; margin: 7px 0 0; }
.v2-research-list { color: var(--muted); display: grid; gap: 7px; line-height: 1.4; margin: 9px 0 0; padding-left: 18px; }
.v2-research-link {
  color: inherit;
  font: inherit;
  font-weight: inherit;
  text-decoration: underline;
  text-decoration-color: #b8c9d2;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.v2-research-link:hover {
  color: var(--teal);
  text-decoration-color: currentColor;
}
.v2-research-list .v2-research-link {
  color: inherit;
  font: inherit;
  font-weight: inherit;
  line-height: inherit;
}
.v2-research-section-head {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}
.v2-research-section-head strong {
  align-items: center;
  display: flex;
  gap: 7px;
  min-width: 0;
}
.v2-check-icon {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 12px;
  height: 22px;
  justify-content: center;
  width: 22px;
}
.v2-check-icon.checked {
  background: var(--green);
  color: white;
}
.v2-check-icon.missing {
  background: var(--amber);
  color: white;
}
.v2-check-icon.skipped {
  background: #dfe7ec;
  color: var(--muted);
}
.v2-research-section-head .v2-pill {
  flex: 0 0 auto;
  font-size: 11px;
  padding: 5px 8px;
  text-transform: capitalize;
}
.v2-research-metrics {
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 11px;
}
.v2-research-metric {
  background: #f8fbfc;
  border: 1px solid var(--line);
  border-radius: 12px;
  min-width: 0;
  padding: 8px;
}
.v2-research-metric span {
  color: var(--muted);
  display: block;
  font-size: 10px;
  font-weight: 950;
  line-height: 1.1;
  text-transform: uppercase;
}
.v2-research-metric strong {
  display: block;
  font-size: 15px;
  letter-spacing: -.03em;
  line-height: 1.15;
  margin-top: 3px;
  overflow-wrap: anywhere;
}
.v2-research-sub {
  margin-top: 10px;
}
.v2-research-takeaway {
  background: rgba(10, 31, 54, .04);
  border: 1px solid rgba(10, 31, 54, .08);
  border-radius: 12px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.35;
  margin-top: 10px;
  padding: 9px 10px;
}
.v2-research-sub b {
  color: var(--ink);
  display: block;
  font-size: 12px;
}
.v2-score-weight-box p {
  color: var(--muted);
  line-height: 1.4;
  margin: 8px 0 0;
}
.v2-score-weight-list {
  display: grid;
  gap: 0;
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
}
.v2-score-weight-head {
  align-items: center;
  background: #f2f7f9;
  color: var(--muted);
  display: grid;
  font-size: 10px;
  font-weight: 950;
  gap: 7px;
  grid-template-columns: minmax(0, 1fr) 46px 62px 48px;
  padding: 7px 9px;
  text-transform: uppercase;
}
.v2-score-weight-row {
  align-items: center;
  background: white;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  display: grid;
  gap: 7px;
  grid-template-columns: minmax(0, 1fr) 46px 62px 48px;
  padding: 8px 9px;
}
.v2-score-weight-row strong {
  font-size: 13px;
  line-height: 1.15;
}
.v2-score-weight-row small {
  color: var(--muted);
  display: block;
  font-size: 11px;
  line-height: 1.2;
  margin-top: 2px;
}
.v2-score-weight-row span,
.v2-score-weight-row b {
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  text-align: right;
}
.v2-score-weight-row b {
  color: var(--teal);
}

/* Research detail page, cleaner professional note layout */
.research-detail-page .v2-shell {
  max-width: 1040px;
}
.research-detail-page .v2-hero,
.research-detail-page .v2-panel {
  border-radius: 16px;
  box-shadow: 0 8px 22px rgba(11, 34, 57, .055);
}
.research-detail-page .v2-hero {
  padding: 20px;
}
.research-detail-page .v2-panel {
  padding: 16px 18px;
}
.research-detail-page .v2-hero h1 {
  font-size: clamp(30px, 4vw, 40px);
  letter-spacing: -.05em;
}
.research-detail-page .v2-hero p {
  color: rgba(255,255,255,.86);
  font-size: 15px;
  line-height: 1.42;
}
.research-detail-page .v2-hero .v2-pill {
  background: rgba(255,255,255,.13);
  border: 1px solid rgba(255,255,255,.22);
  color: white;
}
.research-detail-page .v2-hero .v2-text-link,
.research-detail-page .v2-hero .v2-kicker {
  color: #b8fff3;
}
.v2-research-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.v2-hero-refresh {
  background: #ffffff;
  border: 1px solid rgba(255,255,255,.58);
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(0,0,0,.12);
  color: var(--teal);
  cursor: pointer;
  font-size: 13px;
  font-weight: 950;
  line-height: 1;
  padding: 9px 13px;
}
.v2-hero-refresh:disabled {
  cursor: wait;
  opacity: .72;
}
.v2-research-refresh-status {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 12px;
  color: #eaf6f6;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  margin-top: 10px;
  padding: 9px 10px;
}
.v2-research-refresh-status[hidden] {
  display: none;
}
.v2-research-refresh-status.error {
  background: rgba(255,238,222,.16);
  border-color: rgba(255,210,160,.35);
  color: #fff3df;
}
.research-detail-page .v2-ai-badge {
  background: rgba(255,255,255,.1);
  border-color: rgba(184,255,243,.48);
}
.v2-research-meta {
  border-top: 1px solid rgba(255,255,255,.18);
  display: grid;
  gap: 0;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 16px;
  padding-top: 12px;
}
.v2-research-meta > div {
  border-left: 1px solid rgba(255,255,255,.18);
  min-width: 0;
  padding: 2px 12px;
}
.v2-research-meta > div:first-child {
  border-left: 0;
  padding-left: 0;
}
.v2-research-meta span,
.v2-simple-answer span {
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.v2-research-meta span {
  color: rgba(255,255,255,.7);
}
.v2-research-meta strong {
  color: white;
  display: block;
  font-size: 20px;
  letter-spacing: -.04em;
  line-height: 1.05;
  margin-top: 4px;
}
.v2-research-meta small {
  color: rgba(255,255,255,.74);
  display: block;
  font-size: 12px;
  line-height: 1.3;
  margin-top: 3px;
}
.v2-research-answer-panel {
  background: linear-gradient(135deg, #ffffff, #f7fbfc);
}
.v2-research-answer-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1.15fr 1fr 1fr 1fr;
  margin-top: 10px;
}
.v2-simple-answer {
  border-left: 3px solid #d9e4ea;
  min-width: 0;
  padding: 3px 10px;
}
.v2-simple-answer.up { border-left-color: var(--green); }
.v2-simple-answer.down { border-left-color: var(--red); }
.v2-simple-answer p {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.4;
  margin: 5px 0 0;
}
.research-detail-page .v2-research-at-glance {
  padding-bottom: 12px;
}
.research-detail-page .v2-research-stat-grid {
  gap: 1px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-top: 10px;
  overflow: hidden;
}
.research-detail-page .v2-research-stat {
  background: transparent;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  gap: 2px;
  padding: 5px 10px;
}
.research-detail-page .v2-research-stat:first-child {
  border-left: 0;
  padding-left: 0;
}
.research-detail-page .v2-research-stat strong {
  font-size: 20px;
  line-height: 1.08;
}
.research-detail-page .v2-research-stat small {
  font-size: 11px;
}
.research-detail-page .v2-check-summary {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  gap: 10px;
  padding: 0 0 10px;
}
.research-detail-page .v2-check-summary strong {
  font-size: 20px;
}
.research-detail-page .v2-check-overview-grid {
  gap: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.research-detail-page .v2-check-overview-grid div {
  background: #f8fbfc;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  padding: 8px 12px;
}
.research-detail-page .v2-check-overview-grid div:first-child {
  border-left: 0;
  padding-left: 0;
}
.research-detail-page .v2-check-group {
  border-top: 1px solid var(--line);
  gap: 6px;
  padding-top: 10px;
}
.research-detail-page .v2-check-group h3 {
  font-size: 14px;
  margin: 0;
}
.research-detail-page .v2-research-stack {
  gap: 0;
  margin-top: 8px;
}
.research-detail-page .v2-research-row,
.research-detail-page .v2-research-deeper-panel .v2-research-box {
  background: transparent;
  border: 0;
  border-top: 1px solid #e2ebef;
  border-radius: 0;
  padding: 10px 0;
}
.research-detail-page .v2-research-row:first-child,
.research-detail-page .v2-research-deeper-panel .v2-research-box:first-child {
  border-top: 0;
}
.research-detail-page .v2-research-section-head .v2-pill {
  border-radius: 999px;
  font-size: 10px;
  padding: 4px 7px;
}
.research-detail-page .v2-research-section-head .v2-pill.up {
  background: #e6f3ee;
  color: var(--green);
}
.research-detail-page .v2-research-section-head .v2-pill.down {
  background: #fff3df;
  color: #986409;
}
.research-detail-page .v2-research-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.research-detail-page .v2-research-metric {
  align-items: baseline;
  background: #f8fbfc;
  border: 1px solid #e2ebef;
  border-radius: 999px;
  display: inline-flex;
  gap: 5px;
  padding: 5px 8px;
}
.research-detail-page .v2-research-metric span {
  font-size: 10px;
}
.research-detail-page .v2-research-metric strong {
  font-size: 13px;
  margin-top: 0;
}
.research-detail-page .v2-research-list {
  gap: 4px;
  margin-top: 5px;
}
.v2-research-detail-grid {
  display: grid;
  align-items: start;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr);
  margin-top: 12px;
}
.v2-research-detail-grid > article {
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  min-width: 0;
  padding: 12px 0 0;
}
.v2-research-detail-grid > article:first-child {
  border-top: 0;
  padding-top: 0;
}
.v2-research-detail-grid h3 {
  color: var(--ink);
  font-size: 15px;
  letter-spacing: -.02em;
  margin: 0 0 8px;
}
.v2-research-detail-grid .v2-research-box strong {
  font-size: 13px;
}
.v2-research-detail-grid .v2-research-box p {
  font-size: 13px;
}
.research-detail-page .v2-deeper-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 12px;
}
.research-detail-page .v2-deeper-card + .v2-deeper-card,
.research-detail-page .v2-score-weight-box + .v2-deeper-card {
  margin-top: 8px;
}
.research-detail-page .v2-deeper-card:first-child {
  border-top: 1px solid var(--line);
  padding-top: 11px;
}
.research-detail-page .v2-score-weight-box {
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 12px;
}
.research-detail-page .v2-deeper-card strong {
  color: var(--ink);
  display: block;
  font-size: 13px;
  letter-spacing: -.01em;
  line-height: 1.15;
}
.research-detail-page .v2-deeper-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  margin: 5px 0 0;
}
.research-detail-page .v2-deeper-card dl {
  display: grid;
  gap: 6px;
  margin: 9px 0 0;
}
.research-detail-page .v2-deeper-card dl div {
  align-items: start;
  display: grid;
  gap: 8px;
  grid-template-columns: 104px minmax(0, 1fr);
}
.research-detail-page .v2-deeper-card dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  line-height: 1.2;
  margin: 0;
}
.research-detail-page .v2-deeper-card dd {
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.25;
  margin: 0;
}
.v2-deeper-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.v2-deeper-chip-list span {
  background: #eef6f5;
  border: 1px solid #d6e7ee;
  border-radius: 999px;
  color: var(--teal);
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
  padding: 6px 8px;
}
.v2-family-layout { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.v2-family-layout > div, .v2-family-layout > aside, .v2-family-layout .v2-panel { min-width: 0; }
.v2-simple-heading { align-items: start; display: flex; gap: 10px; justify-content: space-between; margin-bottom: 14px; min-width: 0; }
.v2-simple-heading > div { min-width: 0; }
.v2-form { display: grid; gap: 12px; }
.v2-form label { color: var(--muted); display: grid; font-size: 13px; font-weight: 800; gap: 7px; }
.v2-form small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.v2-form input, .v2-form select, .invitation-result input {
  border: 1px solid #b9c7d0;
  border-radius: 14px;
  font: inherit;
  min-width: 0;
  padding: 12px;
  width: 100%;
}
.family-member-list, .pending-invitations { display: grid; gap: 10px; }
.family-member-card, .pending-invitations > div {
  align-items: center;
  background: #f8fbfc;
  border: 1px solid var(--line);
  border-radius: 16px;
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
  min-width: 0;
  padding: 13px;
}
.family-member-card strong, .family-member-card small, .pending-invitations strong, .pending-invitations small { display: block; }
.family-member-card strong, .family-member-card small, .pending-invitations strong, .pending-invitations small, .invitation-result input { overflow-wrap: anywhere; }
.family-member-card small, .pending-invitations small { color: var(--muted); margin-top: 3px; }
.member-actions, .invite-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 8px; }
.danger-button { color: var(--red); }
.member-active, .permission-yes { color: var(--green); font-weight: 900; }
.member-removed, .permission-no { color: var(--red); font-weight: 900; }
.v2-table-wrap { overflow-x: auto; }
.tracker-table { border-collapse: collapse; min-width: 520px; width: 100%; }
.tracker-table th, .tracker-table td { border-bottom: 1px solid var(--line); padding: 10px; text-align: left; }
.tracker-table th { color: var(--muted); font-size: 12px; }
.invitation-result { background: #f8fbfc; border: 1px solid var(--line); border-radius: 16px; display: grid; gap: 9px; margin-top: 12px; padding: 12px; }
.invitation-result[hidden] { display: none; }

@media (min-width: 760px) {
  .v2-login-shell { grid-template-columns: 1.15fr .85fr; padding: 42px; }
  .v2-login-card { padding: 28px; }
  .v2-topbar { grid-template-columns: 1fr auto auto; padding: 14px 28px; }
  .v2-topbar nav { grid-column: auto; }
  .v2-menu-button { display: none; }
  .v2-shell { padding: 18px 18px 46px; }
  .v2-card-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v2-family-layout { grid-template-columns: 1.1fr .9fr; }
  .family-member-card, .pending-invitations > div { grid-template-columns: 1fr auto; }
}

@media (max-width: 520px) {
  .v2-summary-grid { grid-template-columns: 1fr; }
  .v2-research-grid { grid-template-columns: 1fr; }
  .v2-research-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v2-research-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .v2-check-summary-head { grid-template-columns: 1fr; }
  .v2-check-summary-score { text-align: left; }
  .v2-check-overview-grid { grid-template-columns: 1fr; }
  .research-detail-page .v2-shell { padding-left: 10px; padding-right: 10px; }
  .research-detail-page .v2-hero,
  .research-detail-page .v2-panel { padding: 14px; }
  .v2-research-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 10px; }
  .v2-research-meta > div:nth-child(odd) { border-left: 0; padding-left: 0; }
  .v2-research-answer-grid { grid-template-columns: 1fr; }
  .research-detail-page .v2-research-stat-grid {
    display: grid;
    gap: 0;
    grid-auto-columns: minmax(116px, 1fr);
    grid-auto-flow: column;
    grid-template-columns: none;
    margin-left: -2px;
    overflow-x: auto;
    padding-bottom: 3px;
    -webkit-overflow-scrolling: touch;
  }
  .research-detail-page .v2-research-stat {
    border-left: 1px solid var(--line);
    padding: 5px 9px;
  }
  .research-detail-page .v2-check-overview-grid { grid-template-columns: 1fr; }
  .research-detail-page .v2-check-overview-grid div {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 9px 0;
  }
  .research-detail-page .v2-check-overview-grid div:first-child { border-top: 0; }
  .v2-research-detail-grid { grid-template-columns: 1fr; }
  .v2-score-weight-head,
  .v2-score-weight-row {
    gap: 5px;
    grid-template-columns: minmax(0, 1fr) 38px 50px 40px;
    padding-left: 7px;
    padding-right: 7px;
  }
  .v2-score-weight-row strong { font-size: 12px; }
  .v2-score-weight-row small { font-size: 10px; }
  .v2-score-weight-row span,
  .v2-score-weight-row b { font-size: 11px; }
  .research-detail-page .v2-deeper-card dl div {
    grid-template-columns: 88px minmax(0, 1fr);
  }
  .v2-prob-grid { grid-template-columns: repeat(2, 1fr); }
  .v2-simple-heading { align-items: stretch; flex-direction: column; }
  .v2-section-heading { align-items: stretch; flex-direction: column; }
  .tracker-table.permissions-table { min-width: 0; table-layout: fixed; }
  .permissions-table th, .permissions-table td { font-size: 12px; padding: 8px 6px; }
  .invitation-result { max-width: 100%; }
  .v2-week-card {
    grid-template-columns: auto 1fr auto;
  }
  .v2-week-card em {
    display: none;
  }
  .v2-card-top {
    gap: 7px;
    grid-template-columns: auto minmax(0, 1fr) minmax(78px, auto) minmax(58px, auto) minmax(36px, auto);
    padding: 10px 10px 10px 16px;
  }
  .ai-live-card:not(.holdings-card) .v2-card-top {
    grid-template-columns: auto minmax(0, 1fr) minmax(74px, auto) minmax(63px, auto) minmax(58px, auto);
  }
  .ai-live-card:not(.holdings-card) .v2-card-full-name {
    padding-left: 24px;
  }
  .ai-live-card:not(.holdings-card) .v2-card-full-name small {
    font-size: 11px;
  }
  .ai-live-card:not(.holdings-card) .v2-type-pill {
    font-size: 9px;
    padding: 3px 5px;
  }
  .ai-live-card:not(.holdings-card) .v2-card-name h3 {
    white-space: nowrap;
  }
  .v2-rank {
    font-size: 10px;
    height: 19px;
    width: 23px;
  }
  .v2-card h3 { font-size: 18px; }
  .v2-card small { font-size: 11px; }
  .v2-card-logo { border-radius: 10px; height: 38px; padding: 4px; width: 38px; }
  #weekly-top .v2-card-logo { height: 36px; width: 36px; }
  .v2-card-logo span { font-size: 9px; }
  .v2-card-chance, .v2-card-score { padding-left: 6px; }
  .v2-card-name span, .v2-card-price span, .v2-card-chance span, .v2-card-score span { font-size: 10px; }
  .v2-card-price strong, .v2-card-chance strong, .v2-card-score strong { font-size: 18px; }
  .v2-card-mid { grid-template-columns: 1fr; }
  .v2-card-actions {
    border-left: 0;
    border-top: 1px solid var(--line);
    grid-auto-columns: 1fr;
  }
  .v2-card-actions button,
  .v2-card-link {
    min-height: 38px;
    padding: 4px;
  }
  .v2-card-actions span, .v2-card-link span { font-size: 16px; }
  .v2-card-actions button.watch-add span,
  .v2-card-actions button.refresh span,
  .v2-card-actions button.remove span,
  .v2-card-link.research-link span {
    font-size: 0;
    height: 18px;
    width: 18px;
  }
  .v2-card-actions small, .v2-card-link small { font-size: 10px; }
  .v2-moves { gap: 4px; padding: 8px 8px; }
  .v2-moves span { font-size: 10px; padding: 5px 2px; }
  .v2-moves .v2-move-year { font-size: 10px; padding-left: 2px; padding-right: 2px; }
  .v2-card-lines p {
    font-size: 12px;
    grid-template-columns: 82px minmax(0, 1fr);
  }
}

@media (min-width: 521px) and (max-width: 900px) {
  .v2-research-stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 759px) {
  .v2-topbar { grid-template-columns: 1fr auto; }
  .v2-topbar nav {
    background: #0d304f;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 18px;
    display: none;
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
    overflow: visible;
    padding: 8px;
  }
  body.v2-menu-open .v2-topbar nav { display: grid; }
  .v2-topbar nav a {
    border-radius: 12px;
    font-size: 15px;
    padding: 12px;
  }
  .v2-topbar nav a.active { background: rgba(139,224,212,.16); }
  .v2-topbar > #logout-button {
    display: none;
    grid-column: 1 / -1;
    justify-content: center;
    text-align: center;
  }
  body.v2-menu-open .v2-topbar > #logout-button { display: inline-flex; }
  .v2-hero-actions { align-items: stretch; flex-direction: column; }
  .v2-hero-actions .v2-ghost-button { text-align: center; }
  .v2-research-actions { align-items: stretch; flex-direction: column; }
  .v2-hero-refresh,
  .v2-research-actions .v2-text-link { text-align: center; }
}
