/* FlipForge customer readability system
 * Presentation only. Java/Core remains the sole intelligence authority.
 * This is the single customer-facing typography/readability owner.
 */
:root {
  --ff-type-xs: .875rem;   /* 14px absolute customer text floor */
  --ff-type-sm: .9375rem;  /* 15px supporting copy */
  --ff-type-md: 1rem;      /* 16px normal reading copy */
  --ff-type-lg: 1.125rem;  /* 18px emphasis */
  --ff-type-xl: 1.375rem;  /* 22px section emphasis */
  --ff-text-secondary: #d7dde5;
  --ff-text-muted: #cbd3dd;
  --ff-text-subtle: #c0cad6;
  --text-soft: var(--ff-text-secondary);
  --muted: var(--ff-text-muted);
  --ff-guide-muted: var(--ff-text-muted);
}

html,
body {
  font-size: 16px;
  line-height: 1.55;
}

/* Shell and global navigation */
.prototype-banner,
.prototype-banner strong,
.prototype-banner span,
.prototype-chip,
.forge-nav-state,
.brand-tagline {
  font-size: var(--ff-type-xs) !important;
}

.primary-nav a {
  min-height: 46px;
  font-size: var(--ff-type-sm) !important;
  line-height: 1.3;
}

.primary-nav a small,
.primary-nav .nav-description,
.ff-secondary-nav-link,
.ff-advanced-nav > summary {
  font-size: var(--ff-type-xs) !important;
  line-height: 1.4;
}

.ff-advanced-nav > summary {
  min-height: 42px;
}

.plan-card .eyebrow,
.plan-card strong,
.usage-row,
.plan-card small,
.account-link strong,
.account-link small,
.profile-copy strong,
.profile-copy small {
  font-size: var(--ff-type-xs) !important;
  line-height: 1.45;
}

.global-search input {
  font-size: var(--ff-type-md) !important;
}

kbd,
.date-button {
  font-size: var(--ff-type-xs) !important;
}

/* Main customer workspace */
#main-content .page-heading .eyebrow,
#main-content .forge-heat-title-row .eyebrow,
#main-content .panel .eyebrow,
#main-content .eyebrow,
.eyebrow {
  font-size: var(--ff-type-xs) !important;
  line-height: 1.4;
}

#main-content .page-heading p,
#main-content .forge-heat-lead,
#main-content .customer-lifecycle-page > header p,
#main-content .customer-portfolio-page > header p,
#main-content .customer-management-page > header p {
  font-size: var(--ff-type-md) !important;
  line-height: 1.55;
}

#main-content .panel-header h2 {
  font-size: var(--ff-type-lg);
}

#main-content .panel-header p,
.panel-header p,
#main-content .boundary-note,
#main-content .customer-lifecycle-notice,
#main-content .customer-portfolio-boundaries p,
#main-content .customer-portfolio-key-grid strong {
  font-size: var(--ff-type-sm) !important;
  line-height: 1.52;
}

#main-content .panel-body,
#main-content .panel-body p,
#main-content .panel-body li,
#main-content .customer-lifecycle-page p,
#main-content .customer-portfolio-page p,
#main-content .customer-management-page p {
  font-size: var(--ff-type-sm);
  line-height: 1.52;
}

#main-content small,
#main-content .panel-link,
#main-content .metric-top,
#main-content .metric-note,
#main-content .metric-top > span:first-child,
#main-content .status-pill,
#main-content .staging-status {
  font-size: var(--ff-type-xs) !important;
  line-height: 1.5;
}

.button,
#main-content button,
#main-content input,
#main-content select,
#main-content textarea {
  font-size: var(--ff-type-sm) !important;
}

.button,
#main-content button {
  min-height: 44px;
  padding-inline: 16px;
}

#main-content input,
#main-content select,
#main-content textarea {
  min-height: 46px;
  line-height: 1.4;
}

/* Tables and dense evidence surfaces */
th,
#main-content th {
  font-size: var(--ff-type-xs) !important;
  line-height: 1.42;
}

td,
#main-content td,
.card-cell strong {
  font-size: var(--ff-type-sm) !important;
  line-height: 1.5;
}

.card-cell small,
.customer-portfolio-table small,
.customer-portfolio-boundaries small {
  font-size: var(--ff-type-xs) !important;
  line-height: 1.5;
}

.customer-dashboard-metrics span,
.customer-management-metrics span,
.customer-portfolio-metrics span,
.customer-portfolio-key-grid span,
.ff-v2-table th,
.ff-v2-table td small,
.ff-evidence-metric span,
.forge-heat-summary span,
.forge-heat-intelligence-bar span,
.forge-heat-metrics span {
  font-size: var(--ff-type-xs) !important;
}

/* Lifecycle / Tracking */
.customer-lifecycle-fields label,
.customer-lifecycle-submit small,
.customer-lifecycle-history span,
.customer-lifecycle-history p,
.customer-lifecycle-alerts p {
  font-size: var(--ff-type-xs) !important;
  line-height: 1.5;
}

.customer-lifecycle-fields input,
.customer-lifecycle-fields select {
  min-height: 48px;
  font-size: var(--ff-type-md) !important;
}

.customer-lifecycle-history strong,
.customer-lifecycle-alerts h3 {
  font-size: var(--ff-type-md) !important;
}

/* Decision Intelligence */
.ff-di-hero-copy .eyebrow,
.ff-di-state-top span,
.ff-di-state-meta span,
.ff-di-mini-label,
.ff-di-control label,
.ff-di-state-value div span,
.ff-di-authority strong,
.ff-di-pop-column span,
.ff-di-compare-metrics span,
.ff-di-decision {
  font-size: var(--ff-type-xs) !important;
}

.ff-di-hero-copy p {
  font-size: var(--ff-type-md) !important;
  line-height: 1.55;
}

.ff-di-card h2 {
  font-size: 1.1875rem;
}

.ff-di-card > p,
.ff-di-bar-row > span,
.ff-di-factor-head span,
.ff-di-evidence-head span,
.ff-di-factor-head strong,
.ff-di-evidence-head strong,
.ff-di-authority span,
.ff-di-gap span {
  font-size: var(--ff-type-sm) !important;
  line-height: 1.5;
}

.ff-di-bar-row > strong,
.ff-di-pop-column strong,
.ff-di-compare-metrics strong {
  font-size: var(--ff-type-md) !important;
}

.ff-di-compare-side h3 {
  font-size: var(--ff-type-md);
}

/* Dashboard, charts, state cards, and compact utility surfaces */
.signal-label,
.signal-value,
.check-item strong,
.activity-item strong,
.check-item small,
.check-item > span:last-child,
.activity-item small,
.activity-time,
.hero-price span,
.key-value span,
.readiness-ring-copy span,
.chart-legend,
.chart-tooltip,
.chart-axis {
  font-size: var(--ff-type-xs) !important;
  line-height: 1.5;
}

.hero-title p {
  font-size: var(--ff-type-sm) !important;
}

.key-value strong {
  font-size: var(--ff-type-md) !important;
}

/* Forge Heat */
.forge-heat-title-row .eyebrow,
.forge-heat-boundary strong,
.forge-heat-boundary small,
.forge-heat-summary span,
.forge-heat-intelligence-bar span,
.forge-heat-tabs button,
.forge-heat-section-label,
.forge-heat-card-head .forge-heat-kicker,
.forge-heat-card-head p,
.forge-heat-score span,
.forge-heat-card-foot span,
.forge-heat-empty p,
.forge-heat-history .eyebrow {
  font-size: var(--ff-type-xs) !important;
  line-height: 1.5;
}

.forge-heat-boundary span,
.forge-heat-card li,
.forge-heat-history p,
.forge-heat-empty strong {
  font-size: var(--ff-type-sm) !important;
  line-height: 1.5;
}

/* Guided Mode */
.ff-guide-launcher,
.ff-guide-kicker,
.ff-guide-location,
.ff-guide-body > p,
.ff-guide-why,
.ff-guide-action,
.ff-guide-progress-top,
.ff-guide-footer,
.ff-guide-footer button,
.ff-discover-coach span,
.ff-discover-coach p,
.ff-discover-results-label span,
.ff-guide-modal .ff-guide-kicker,
.ff-guide-modal-step span,
.ff-guide-modal-step p,
.ff-guide-modal-note {
  font-size: var(--ff-type-xs) !important;
  line-height: 1.5;
}

.ff-guide-head strong {
  font-size: var(--ff-type-md) !important;
}

.ff-guide-body h2 {
  font-size: 1.25rem !important;
  line-height: 1.22;
}

.ff-guide-body > p,
.ff-guide-action,
.ff-discover-coach p,
.ff-guide-modal-step strong,
.ff-guide-modal .ff-guide-intro {
  font-size: var(--ff-type-sm) !important;
}

.ff-guide-action {
  min-height: 44px;
}

.ff-discover-results-label strong,
.ff-guide-modal-step strong {
  font-size: var(--ff-type-sm) !important;
  line-height: 1.45;
}

.ff-guide-icon-button {
  font-size: var(--ff-type-md) !important;
}

.brand-tagline {
  color: rgba(238, 241, 245, .92);
}

.forge-nav-state {
  color: rgba(238, 241, 245, .9) !important;
}

.ff-guide-icon-button,
.ff-guide-location,
.ff-guide-progress-top,
.ff-guide-footer,
.ff-guide-footer button,
.ff-guide-modal-note {
  color: var(--ff-text-subtle);
}

.ff-guide-why,
.ff-guide-modal-step p,
.ff-discover-results-label span {
  color: var(--ff-text-muted);
}

/* Commercial shell overrides previously kept in a separate typography patch. */
.ff-commercial-shell .brand-block {
  padding: 17px 8px 14px 16px;
  overflow: hidden;
}

.ff-commercial-shell .brand {
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 8px;
  max-width: 100%;
}

.ff-commercial-shell .brand-copy {
  min-width: 0;
  max-width: 100%;
}

.ff-commercial-shell .brand-mark,
.ff-commercial-shell .brand-mark.ff-approved-brand-mark img {
  width: 40px;
  height: 40px;
}

.ff-commercial-shell .brand-name {
  font-size: 1.125rem !important;
  letter-spacing: .08em;
  white-space: nowrap;
}

.ff-commercial-shell .brand-subtitle {
  margin-top: 5px;
  font-size: var(--ff-type-xs) !important;
  letter-spacing: .055em;
  line-height: 1.3;
  white-space: normal;
  overflow-wrap: anywhere;
}

.ff-commercial-shell .brand-tagline {
  max-width: 100%;
  font-size: var(--ff-type-xs) !important;
  letter-spacing: .01em;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
}

.ff-commercial-shell .prototype-chip {
  margin: 10px 0 0 48px;
  width: auto;
  max-width: calc(100% - 48px);
  padding: 5px 8px;
  font-size: var(--ff-type-xs) !important;
  line-height: 1.3;
  white-space: normal;
}

.ff-commercial-shell .primary-nav a {
  min-height: 54px;
  font-size: var(--ff-type-sm) !important;
}

.ff-commercial-shell .primary-nav a::after {
  margin-top: 3px;
  color: var(--ff-text-subtle);
  font-size: var(--ff-type-xs) !important;
  line-height: 1.3;
}

.ff-commercial-shell .primary-nav a > span:first-child {
  font-size: var(--ff-type-sm) !important;
}

.ff-data-freshness,
.ff-kpi-label,
.ff-kpi-note,
.ff-v2-panel-head p,
.ff-decision-kicker,
.ff-recommendation-pill,
.ff-confidence-ring-copy span,
.ff-factor-row,
.ff-factor-row strong,
.ff-decision-stats span,
.ff-donut-copy span,
.ff-distribution-row,
.ff-distribution-row strong,
.ff-market-placeholder p,
.ff-v2-table th,
.ff-v2-table td,
.ff-attention-item strong,
.ff-attention-item small,
.ff-dashboard-boundary {
  font-size: var(--ff-type-xs) !important;
  line-height: 1.45;
}

.ff-v2-panel-head h2,
.ff-decision-stats strong,
.ff-source-listing-copy strong {
  font-size: var(--ff-type-md) !important;
}

.ff-dashboard-head p,
.ff-decision-identity p,
.ff-market-placeholder p {
  font-size: var(--ff-type-sm) !important;
  line-height: 1.5;
}

.ff-v2-table td {
  font-size: var(--ff-type-sm) !important;
  line-height: 1.5;
}

.ff-market-baseline::after {
  font-size: var(--ff-type-xs) !important;
  line-height: 1.3;
}

.ff-commercial-shell .ff-source-listing-copy small,
.ff-commercial-shell .ff-source-listing-copy span,
.ff-commercial-shell .ff-source-listing-verified {
  font-size: var(--ff-type-xs) !important;
  line-height: 1.4;
}

.ff-commercial-shell .ff-source-listing-copy strong {
  font-size: var(--ff-type-sm) !important;
}

.ff-guide-highlight::after {
  font-size: var(--ff-type-xs) !important;
  line-height: 1.15;
}

@media (max-width: 900px) {
  .ff-commercial-shell .brand-block {
    padding-left: 14px;
    padding-right: 8px;
  }

  .ff-commercial-shell .primary-nav a {
    min-height: 56px;
  }
}

@media (max-width: 760px) {
  html,
  body {
    font-size: 16px;
  }

  #main-content {
    padding: 20px 16px;
  }

  #main-content .page-heading p,
  #main-content .forge-heat-lead {
    font-size: var(--ff-type-md) !important;
  }

  .primary-nav a {
    font-size: var(--ff-type-md) !important;
  }

  .button,
  #main-content button {
    min-height: 46px;
    font-size: var(--ff-type-sm) !important;
  }

  td,
  #main-content td {
    font-size: var(--ff-type-sm) !important;
  }

  .ff-guide-panel {
    font-size: var(--ff-type-md);
  }
}
