/* Portigo shared visual language. Page-specific layout remains in its owning stylesheet. */
.v2-app {
  font-family: var(--font-family-ui);
  font-size: var(--text-body);
  line-height: var(--line-body);
}

/* Canonical authenticated application page header. */
.v2-app .app-primary-header {
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 28px !important;
  width: 100% !important;
  min-height: 118px !important;
  padding: 16px 24px !important;
  border: 1px solid rgba(59, 130, 246, .34) !important;
  border-radius: 19px !important;
  background: radial-gradient(circle at 86% 12%, rgba(0, 229, 184, .15), transparent 34%), linear-gradient(135deg, rgba(16, 23, 34, .98), rgba(8, 17, 31, .92)) !important;
  box-shadow: var(--v2-shadow-panel) !important;
}
.v2-app .app-primary-header::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .12;
  background-image: linear-gradient(rgba(148, 163, 184, .1) 1px, transparent 1px), linear-gradient(90deg, rgba(148, 163, 184, .1) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(90deg, #000, transparent 84%);
  pointer-events: none;
}
.v2-app .app-primary-header > * { position: relative; z-index: 1; }
.v2-app .app-primary-header .financial-v2-hero-copy,
.v2-app .app-primary-header > div:first-child { min-width: 0; }
.v2-app .app-primary-header .app-page-eyebrow {
  margin: 0 0 5px !important;
  color: var(--v2-cyan) !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  letter-spacing: .14em !important;
  text-transform: uppercase !important;
}
.v2-app .app-primary-header .app-page-title {
  margin: 0 !important;
  color: #f7fbff !important;
  font-size: clamp(28px, 2.25vw, 32px) !important;
  font-weight: 750 !important;
  line-height: 1.04 !important;
  letter-spacing: -.035em !important;
}
.v2-app .app-primary-header .app-page-subtitle {
  max-width: 760px !important;
  margin: 7px 0 0 !important;
  color: #a9bed2 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1.4 !important;
}
.v2-app .app-primary-header .page-header-logo {
  box-sizing: border-box;
  display: block;
  justify-self: end !important;
  width: 220px !important;
  height: auto !important;
  max-height: 78px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  object-fit: contain !important;
  opacity: .98 !important;
  background: transparent !important;
  box-shadow: none !important;
}
.discovery-disclaimer { margin: 7px 0 0; color: #7898b8; font-size: 10px; line-height: 1.4; }
@media (max-width: 720px) {
  .v2-app .app-primary-header { min-height: 108px !important; gap: 18px !important; padding: 15px 18px !important; }
  .v2-app .app-primary-header .app-page-title { font-size: 28px !important; }
  .v2-app .app-primary-header .app-page-subtitle { font-size: 12px !important; }
  .v2-app .app-primary-header .page-header-logo { width: 150px !important; max-height: 62px !important; }
}
@media (max-width: 520px) {
  .v2-app .app-primary-header { grid-template-columns: minmax(0, 1fr) !important; min-height: 0 !important; }
  .v2-app .app-primary-header .page-header-logo { justify-self: start !important; width: 138px !important; }
}

.v2-app :where(button, input, select, textarea) { font-family: var(--font-family-ui); }
.v2-app :where(.app-page-title, .financial-v2-hero h1, .financial-v2-home-header h1) {
  margin-block: 0;
  font-size: var(--text-display);
  font-weight: var(--weight-bold);
  line-height: var(--line-tight);
  letter-spacing: var(--tracking-heading);
}
.v2-app :where(.app-page-subtitle, .financial-v2-hero .subtitle, .financial-v2-home-header .subtitle) { color: var(--v2-muted); font-size: var(--text-body); font-weight: var(--weight-medium); line-height: var(--line-body); }
.v2-app :where(.app-page-eyebrow, .financial-v2-hero .v2-eyebrow, .financial-v2-home-header .eyebrow) { color: var(--v2-cyan); font-size: var(--text-eyebrow); font-weight: var(--weight-bold); letter-spacing: var(--tracking-eyebrow); text-transform: uppercase; }
.v2-app :where(.section-title, .today-section-heading, .v2-panel-header) h2 { font-size: var(--text-section); font-weight: var(--weight-bold); line-height: var(--line-heading); letter-spacing: var(--tracking-heading); }
.v2-app :where(.panel, .v2-panel, article) h3 { font-size: var(--text-card-title); font-weight: var(--weight-bold); line-height: var(--line-heading); }
.v2-app :where(p, li, .subtitle) { font-size: var(--text-body); line-height: var(--line-body); }
.v2-app :where(small, .caption, time) { font-size: var(--text-secondary); line-height: var(--line-body); }
.v2-app :where(.body-text) { font-size: var(--text-body); font-weight: var(--weight-regular); line-height: var(--line-body); }
.v2-app :where(.secondary-text) { color: var(--v2-muted); font-size: var(--text-secondary); line-height: var(--line-body); }
.v2-app :where(.caption-text) { color: var(--v2-subtle); font-size: 12px; line-height: var(--line-body); }
.v2-app :where(.eyebrow, .v2-eyebrow, .today-section-label > span, .today-section-heading span, .daily-brief-narrative-head > span, .home-decision-eyebrow) {
  font-size: var(--text-eyebrow);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
}

.v2-app :where(.panel, .v2-panel, .daily-brief-card, .today-section, .today-actions, .portfolio-copilot) { border-radius: var(--radius-md); }
.v2-app :where(.financial-v2-hero, .financial-v2-home-header, .daily-brief-narrative) { border-radius: var(--radius-lg); }
.v2-app :where(.badge, .v2-badge, .membership-badge, .daily-brief-card-head b, .daily-brief-narrative-head b) { border-radius: var(--radius-pill); }

.v2-app :where(button, .button-link, .v2-button, .today-quick-actions a) {
  min-height: 40px;
  padding-inline: var(--space-4);
  border-radius: var(--radius-sm);
  font-size: var(--text-control);
  font-weight: var(--weight-semibold);
  line-height: 1;
}
.v2-app :where(.v2-button, button[type="submit"], .primary-button) { background-color: var(--v2-blue); }
.v2-app :where(.secondary, .v2-button-secondary) { border-color: var(--v2-border); background: var(--surface-subtle); color: var(--v2-text); }
.v2-app :where(.ghost-button, .daily-brief-explain) { min-height: auto; padding: var(--space-1) 0; border: 0; background: transparent; box-shadow: none; }
.v2-app :where(.v2-icon-button, .view-switch-button, .holding-sort-button, .portfolio-v3-sort-button, .widget-tool-button, .portfolio-copilot-chip) { min-height: initial; padding: revert; }
.v2-app :where(.danger-button, .sell-button) { background-color: var(--v2-negative); }
.v2-app :where(button, .button-link, input, select, textarea):focus-visible { outline: 2px solid var(--semantic-intelligence); outline-offset: 2px; }
.v2-app :where(button, input, select, textarea):disabled { cursor: not-allowed; opacity: .5; }

.v2-app :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
  min-height: 40px;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--v2-border);
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
  color: var(--v2-text);
  font-size: var(--text-control);
}
.v2-app :where(input, textarea)::placeholder { color: var(--v2-subtle); }

.v2-app :where(.badge, .v2-badge, .membership-badge, .daily-brief-card-head b, .daily-brief-narrative-head b) {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: var(--space-1) var(--space-2);
  font-size: var(--text-eyebrow);
  font-weight: var(--weight-bold);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.v2-app :where(.v2-metric-card strong, .daily-brief-primary-metric > strong, .metric-value, .kpi-value) {
  font-size: var(--text-kpi);
  font-weight: var(--weight-bold);
  line-height: var(--line-tight);
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.v2-app :where(.positive, .v2-positive, .semantic-positive .daily-brief-primary-metric > strong) { color: var(--semantic-positive); }
.v2-app :where(.negative, .v2-negative, .semantic-negative .daily-brief-primary-metric > strong) { color: var(--semantic-negative); }

.v2-app :where(table, .v2-table, .home-quote-table, .holdings-list-table) { font-size: var(--text-table); font-variant-numeric: tabular-nums; }
.v2-app :where(table, .v2-table, .home-quote-table, .holdings-list-table) th { padding: var(--space-3); color: #8ec5ff; font-size: var(--text-eyebrow); font-weight: var(--weight-bold); letter-spacing: .06em; text-transform: uppercase; }
.v2-app :where(table, .v2-table, .home-quote-table, .holdings-list-table) td { padding: var(--space-3); border-bottom-color: var(--v2-border-soft); }
.v2-app :where(table, .v2-table, .home-quote-table, .holdings-list-table) tbody tr:hover { background: rgba(96, 165, 250, .06); }
.v2-app .portfolio-v3-holdings-table :where(th, td) { padding: 10px 5px; font-size: 11px; }

.v2-app .daily-brief-narrative { border-color: var(--semantic-intelligence-border); background: linear-gradient(145deg, var(--semantic-intelligence-bg), rgba(10, 25, 41, .94)); }
.v2-app .daily-brief-narrative-head > span { color: var(--semantic-intelligence); }
.v2-app .today-attention { border-color: var(--semantic-attention-border); background: linear-gradient(145deg, var(--semantic-attention-bg), rgba(11, 23, 40, .96)); }
.v2-app .today-attention .today-section-heading span { color: var(--semantic-attention); }
.v2-app .today-upcoming { border-color: var(--semantic-upcoming-border); background: linear-gradient(145deg, var(--semantic-upcoming-bg), rgba(11, 23, 40, .96)); }
.v2-app .today-upcoming .today-section-heading span { color: var(--semantic-upcoming); }
.v2-app .semantic-data_quality { color: var(--semantic-quality); }
.v2-app .semantic-neutral { color: var(--semantic-neutral); }

.v2-app .main-nav .nav-item { min-height: 44px; border-radius: var(--radius-md); font-size: var(--text-control); font-weight: var(--weight-semibold); }
.v2-app :where(.portfolio-v3-tabs, .analysis-tabs, .discovery-subnav, .reports-subnav) :where(a, button) { font-size: var(--text-secondary); font-weight: var(--weight-semibold); }
.v2-app :where(.card-action, .inline-action, .discovery-card > strong) { font-size: var(--text-secondary); font-weight: var(--weight-semibold); }
.v2-app .portfolio-v3-summary article > span { color: var(--v2-muted); font-size: 12px; font-weight: var(--weight-semibold); line-height: var(--line-body); }
.v2-app .portfolio-v3-summary article > strong { font-size: 20px; font-weight: var(--weight-bold); font-variant-numeric: tabular-nums; }
.v2-app .portfolio-v3-summary article > small,
.v2-app .portfolio-v3-summary .money-display-secondary { color: var(--v2-subtle); font-size: 12px; line-height: var(--line-body); }
.v2-app .global-market-ticker { height: 32px; margin-block: var(--space-2) var(--space-3); border-radius: 0; }
.v2-app .stock-ticker-track { font-size: 12px; }

/* Public marketing intentionally has a roomier hierarchy than the application. */
.v2-app .landing-v2-nav :where(.landing-v2-nav-links a, .landing-v2-login) { font-size: var(--text-control); font-weight: var(--weight-semibold); }
.v2-app .landing-v2-eyebrow { font-size: 12px; font-weight: var(--weight-bold); letter-spacing: var(--tracking-eyebrow); }
.v2-app .landing-v2-hero h2 { font-size: clamp(52px, 5vw, 64px); font-weight: var(--weight-bold); line-height: 1; letter-spacing: -.05em; }
.v2-app :where(.landing-v2-section, .landing-v2-final-cta) h2 { font-size: clamp(36px, 3.5vw, 44px); font-weight: var(--weight-bold); line-height: 1.08; letter-spacing: -.04em; }
.v2-app :where(.landing-v2-hero p, .landing-v2-section-head p, .landing-v2-final-cta p) { font-size: 18px; line-height: 1.65; }

@media (max-width: 1024px) {
  .v2-app :where(.app-page-title, .financial-v2-hero h1, .financial-v2-home-header h1) { font-size: 30px; }
  .v2-app .landing-v2-hero h2 { font-size: clamp(44px, 7vw, 56px); }
}
@media (max-width: 760px) {
  .v2-app { font-size: var(--text-secondary); }
  .v2-app :where(.app-page-title, .financial-v2-hero h1, .financial-v2-home-header h1) { font-size: 28px; }
  .v2-app :where(.section-title, .today-section-heading, .v2-panel-header) h2 { font-size: 18px; }
  .v2-app :where(button, .button-link, .v2-button, input, select, textarea) { font-size: var(--text-secondary); }
  .v2-app :where(table, .v2-table, .home-quote-table, .holdings-list-table) { font-size: 12px; }
  .v2-app .landing-v2-hero h2 { font-size: clamp(40px, 11vw, 48px); }
  .v2-app :where(.landing-v2-section, .landing-v2-final-cta) h2 { font-size: clamp(30px, 8vw, 38px); }
  .v2-app :where(.landing-v2-hero p, .landing-v2-section-head p, .landing-v2-final-cta p) { font-size: 16px; }
}
