/* GP35 M95 Public Commerce / Account / Trust QA Spine
   Next-only. Large public batch, conservative visual layer.
   No terminal selectors, no hover/dropdown JS, no live rollout. */

:root {
  --gp95-text: #111827;
  --gp95-muted: #4b5563;
  --gp95-soft: #f8fafc;
  --gp95-surface: #ffffff;
  --gp95-border: rgba(15, 23, 42, .14);
  --gp95-border-strong: rgba(15, 23, 42, .22);
  --gp95-shadow: 0 20px 48px rgba(15, 23, 42, .08);
  --gp95-focus: #1554a6;
  --gp95-success-bg: #ecfdf5;
  --gp95-success-text: #065f46;
  --gp95-warn-bg: #fffbeb;
  --gp95-warn-text: #92400e;
  --gp95-finance-950: #061a35;
  --gp95-finance-900: #08224a;
  --gp95-finance-800: #0d3472;
  --gp95-finance-700: #1554a6;
  --gp95-finance-line: rgba(147,197,253,.32);
}

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

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

/* Public commerce cards: improve consistency without changing layout logic */
html[data-gp-m95-commerce="true"] :where(.product-card, .listing-card, .result-card, .cart-card, .checkout-card, .order-card, .summary-card, .gp-card, .card, [class*="product"], [class*="listing"], [class*="summary"]) {
  border-color: var(--gp95-border);
}

html[data-gp-m95-commerce="true"] :where(.price, .amount, .total, [class*="price"], [class*="amount"], [class*="total"]) {
  font-variant-numeric: tabular-nums;
}

html[data-gp-m95-commerce="true"] :where(.badge, .chip, .pill, [class*="badge"], [class*="chip"], [class*="pill"]) {
  border-color: var(--gp95-border);
}

/* Account/checkout readability */
html[data-gp-m95-account="true"] :where(input, select, textarea) {
  min-height: 42px;
  border-radius: 12px;
  border-color: var(--gp95-border);
}

html[data-gp-m95-account="true"] :where(label, .label, [class*="label"]) {
  font-weight: 650;
}

html[data-gp-m95-account="true"] :where(.help, .helper, .hint, .muted, .description, [class*="help"], [class*="hint"], [class*="muted"], [class*="description"]) {
  color: var(--gp95-muted);
}

html[data-gp-m95-account="true"] :where(.account-card, .dashboard-card, .order-card, .payment-card, .delivery-card, .support-card, .checkout-card, .cart-card, [class*="account"], [class*="checkout"], [class*="payment"]) {
  border-color: var(--gp95-border);
}

/* Trust/action rails: only visual rhythm, no new claims */
html[data-gp-m95-public="true"] :where(.trust, .trust-band, .trust-card, .security, .support, .guarantee, [class*="trust"], [class*="security"], [class*="support"]) {
  border-color: var(--gp95-border);
}

html[data-gp-m95-public="true"] :where(a, button, .btn, .button, [class*="btn"], [class*="button"]) {
  text-underline-offset: .22em;
}

html[data-gp-m95-public="true"] :where(a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible) {
  outline: 3px solid color-mix(in srgb, var(--gp95-focus) 55%, transparent);
  outline-offset: 2px;
}

html[data-gp-m95-public="true"] :where(table) {
  border-collapse: separate;
  border-spacing: 0;
}

html[data-gp-m95-public="true"] :where(th, td) {
  border-color: var(--gp95-border);
}

/* Finance remains blue, especially footer */
html[data-gp-m95-finance="true"] :where(footer, .gp-footer, .site-footer) {
  background: linear-gradient(135deg, var(--gp95-finance-950), var(--gp95-finance-800)) !important;
  color: #ffffff !important;
  border-color: var(--gp95-finance-line) !important;
}

html[data-gp-m95-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-m95-finance="true"] :where(footer, .gp-footer, .site-footer) :where(a:hover, a:focus-visible) {
  color: #dbeafe !important;
}

/* Dark compatibility: only for account/commerce utility surfaces, not terminal */
html[data-theme="dark"][data-gp-m95-public="true"] :where(input, select, textarea),
html[data-gp-theme="dark"][data-gp-m95-public="true"] :where(input, select, textarea),
html.dark[data-gp-m95-public="true"] :where(input, select, textarea) {
  background: #0e1a2d;
  color: #f8fbff;
  border-color: rgba(226,232,240,.22);
}

html[data-theme="dark"][data-gp-m95-public="true"] :where(.muted, .description, .helper, .hint, [class*="muted"], [class*="description"], [class*="helper"], [class*="hint"]),
html[data-gp-theme="dark"][data-gp-m95-public="true"] :where(.muted, .description, .helper, .hint, [class*="muted"], [class*="description"], [class*="helper"], [class*="hint"]),
html.dark[data-gp-m95-public="true"] :where(.muted, .description, .helper, .hint, [class*="muted"], [class*="description"], [class*="helper"], [class*="hint"]) {
  color: #c7d2e5;
}

/* Explicit terminal guard; if accidentally loaded, it still returns immediately via JS and does not target terminal classes. */
html[data-gp-m95-terminal-excluded="true"] :where(.trade-terminal, .terminal-shell, .orderbook, .market-depth, .chart-panel, .ticker-strip, .symbol-bar, .trading-layout) {
  all: revert-layer;
}
