/* GP35 M94 Public Surface Navigation + QA Spine
   Next-only. Terminal excluded by Apply script and JS guard.
   This layer is intentionally conservative: no dropdown handlers, no hover overrides,
   no terminal selectors, no admin/operator/provider UI changes. */

:root {
  --gp94-text: #111827;
  --gp94-muted: #4b5563;
  --gp94-border: rgba(15, 23, 42, .14);
  --gp94-soft: #f8fafc;
  --gp94-surface: #ffffff;
  --gp94-shadow: 0 18px 40px rgba(15, 23, 42, .08);
  --gp94-finance-950: #061a35;
  --gp94-finance-900: #08224a;
  --gp94-finance-800: #0d3472;
  --gp94-finance-700: #1554a6;
  --gp94-finance-100: #eef6ff;
  --gp94-finance-line: rgba(147,197,253,.32);
}

html[data-gp-m94-terminal-excluded="true"] .gp-m94-sentinel { display:none !important; }

html[data-gp-m94-public="true"] body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

html[data-gp-m94-public="true"] :where(main, .page, .content, .gp-page, .gp-main) {
  color: inherit;
}

html[data-gp-m94-public="true"] :where(.card, .panel, .box, .tile, .surface, .gp-card, .gp-panel, .result-card, .listing-card, .product-card, .place-card, [class*="card"], [class*="panel"]) {
  border-color: var(--gp94-border);
}

html[data-gp-m94-public="true"] :where(.muted, .subtitle, .subline, .description, .helper, .hint, [class*="muted"], [class*="subtitle"], [class*="description"], [class*="helper"], [class*="hint"]) {
  color: var(--gp94-muted);
}

html[data-gp-m94-public="true"] :where(input, select, textarea) {
  min-height: 42px;
  border-radius: 12px;
}

html[data-gp-m94-public="true"] :where(button, .btn, .button, a[class*="btn"], a[class*="button"]) {
  min-height: 38px;
}

html[data-gp-m94-public="true"] :where(.search, .searchbar, .search-box, .filter, .filters, [class*="search"], [class*="filter"]) :where(input, select, textarea) {
  background: #fff;
  color: #111827;
  border: 1px solid var(--gp94-border);
}

html[data-gp-m94-public="true"][data-gp-theme="dark"] :where(.search, .searchbar, .search-box, .filter, .filters, [class*="search"], [class*="filter"]) :where(input, select, textarea),
html[data-gp-m94-public="true"][data-theme="dark"] :where(.search, .searchbar, .search-box, .filter, .filters, [class*="search"], [class*="filter"]) :where(input, select, textarea),
html[data-gp-m94-public="true"].dark :where(.search, .searchbar, .search-box, .filter, .filters, [class*="search"], [class*="filter"]) :where(input, select, textarea) {
  background: #0e1a2d;
  color: #f8fbff;
  border-color: rgba(226,232,240,.22);
}

/* Safer public footer spacing/readability without changing terminal/admin */
html[data-gp-m94-public="true"] :where(footer, .gp-footer, .site-footer) {
  overflow-wrap: anywhere;
}

html[data-gp-m94-public="true"] :where(footer, .gp-footer, .site-footer) :where(a, button) {
  text-decoration-thickness: .08em;
  text-underline-offset: .22em;
}

/* Finance header/footer blue lock: selected finance pages only */
html[data-gp-m94-finance="true"] body {
  background: linear-gradient(180deg, #eef6ff 0%, #ffffff 48%, #eef6ff 100%);
}

html[data-gp-m94-finance="true"] :where(footer, .gp-footer, .site-footer) {
  background: linear-gradient(135deg, var(--gp94-finance-950), var(--gp94-finance-800)) !important;
  color: #ffffff !important;
  border-color: var(--gp94-finance-line) !important;
}

html[data-gp-m94-finance="true"] :where(footer, .gp-footer, .site-footer) :where(a, p, span, li, h1, h2, h3, h4, h5, h6, small, strong, div) {
  color: #ffffff !important;
}

html[data-gp-m94-finance="true"] :where(footer, .gp-footer, .site-footer) :where(a:hover, a:focus-visible) {
  color: #dbeafe !important;
}

html[data-gp-m94-finance="true"] :where(.card, .panel, .box, .tile, .surface, .gp-card, .gp-panel, [class*="card"], [class*="panel"]) {
  border-color: rgba(21, 84, 166, .18);
}

/* Account/workspace cards: conservative polish, no runtime claims */
html[data-gp-m94-account="true"] :where(.card, .panel, .box, .tile, .account-card, [class*="card"], [class*="panel"]) {
  border-color: var(--gp94-border);
}

/* Text clipping safety on broad public cards */
html[data-gp-m94-public="true"] :where(h1, h2, h3, h4, p, li, a, span) {
  overflow-wrap: anywhere;
}

/* Never affect Terminal by path guard; also protect common terminal class names if a stray ref appears */
html[data-gp-m94-terminal-excluded="true"] :where(.trade-terminal, .terminal-shell, .orderbook, .market-depth, .chart-panel, .ticker-strip, .symbol-bar, .trading-layout) {
  all: revert-layer;
}
