/* Brings the older detail and tool pages onto the Graft Robotics design system.
   Loaded last on every page that has its own inline styles; those pages carry body.gr-unified.
   Rules here follow the system: one sans face, mono only for code, 8px buttons in ink or outline,
   quiet labels, small status chips, borders instead of shadows, ink links. */

body.gr-unified { background: var(--gr-paper) !important; color: var(--gr-ink); font-family: var(--gr-font-sans) !important; -webkit-font-smoothing: antialiased; }

/* Type: one sans face everywhere; mono only where the content is code. */
body.gr-unified *:not(svg):not(svg *) { font-family: var(--gr-font-sans) !important; }
body.gr-unified :is(code, code *, pre, pre *, kbd, samp, textarea, .mono, [class*="code"], [class*="cli"], [class*="term"], [class*="hash"], [class*="sha256"]):not(svg):not(svg *) { font-family: var(--gr-font-mono) !important; }
body.gr-unified :is(h1, h2, h3, h4) { font-weight: 700 !important; letter-spacing: -0.01em; text-wrap: balance; }
body.gr-unified h1 { font-size: clamp(32px, 5vw, 44px) !important; line-height: 1.1 !important; letter-spacing: -0.02em !important; }

/* Links inside running text: ink with a quiet underline, as on the plain pages. */
body.gr-unified main a:not([class]), body.gr-unified p a:not([class]) { color: var(--gr-ink) !important; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--gr-line-strong); }
body.gr-unified main a:not([class]):hover { text-decoration-color: var(--gr-ink); }

/* Buttons: outline by default, ink fill for the main action. No pills, no colored fills. */
body.gr-unified .btn { border-radius: 8px !important; font-size: 14.5px !important; font-weight: 600 !important; padding: 9px 16px !important; line-height: 1.3 !important; letter-spacing: normal !important; text-transform: none !important; box-shadow: none !important; transform: none !important;
  background: transparent !important; color: var(--gr-ink) !important; border: 1px solid var(--gr-line-strong) !important; text-decoration: none !important; }
body.gr-unified .btn:is(.primary, .moss, .cobalt, .dark, .ink) { background: var(--gr-ink) !important; color: var(--gr-paper) !important; border-color: var(--gr-ink) !important; }
body.gr-unified .btn:hover { opacity: 0.88; background-image: none !important; }
body.gr-unified .btn.sm { font-size: 13.5px !important; padding: 7px 12px !important; }
body.gr-unified .btn.xs { font-size: 12.5px !important; padding: 5px 10px !important; }
body.gr-unified .btn:disabled, body.gr-unified .btn[aria-disabled="true"] { opacity: 0.5; }

/* Section labels and kickers: plain small text, not outlined chips. */
body.gr-unified :is(.eyebrow, .sec-kicker, .section-kicker, .section-label, .lc-kicker, .comm-step-kicker, .kpi-label, .gate-label, .foot-labs-label, .sec-kicker *) {
  font-size: 13px !important; font-weight: 600 !important; letter-spacing: 0.06em !important; text-transform: uppercase; color: var(--gr-ink-muted) !important;
  background: none !important; border: 0 !important; padding: 0 !important; border-radius: 0 !important; box-shadow: none !important; }

/* Status chips: small, sans, sentence case, 6px corners. They keep their meaning colors. */
body.gr-unified :is(.badge, .tag, .pill, .vi-pill, .demo-badge, .choice-tag, .coach-chip, .insp-chip, .trust-pill, .step-stage, .status-badge, .price-tag, .role-tag, .proof-pill, .pill-moss, .ttl-pill, .stat-pill, .preset-tag, .mini-pill, .matrix-scale-pill, .ladder-state-tag, .ladder-pill, .tip-badge, .step-badge, .delta-pill, .boundary-tag, .verdict-pill, .status-pill) {
  font-size: 12.5px !important; font-weight: 600 !important; letter-spacing: normal !important; text-transform: none !important; border-radius: 6px !important; box-shadow: none !important; }

/* Surfaces: borders, not shadows. A visible focus ring replaces any shadow-based one. */
body.gr-unified *:not(.gr-top):not(.gr-foot) { box-shadow: none !important; text-shadow: none !important; }
body.gr-unified :focus-visible { outline: 2px solid var(--gr-ink) !important; outline-offset: 2px; }

/* The theme now follows the device setting on every page. */
body.gr-unified #themeToggle, body.gr-unified .theme-btn { display: none !important; }

/* Accent: the plain pages use ink for action and selection, and keep vermilion for the logo only.
   Deny and error text keeps gr-verm-ink. */
body.gr-unified { --gr-vermilion: var(--gr-ink); --gr-vermilion-soft: var(--gr-sand); }

/* Context strips under the header: a quiet note line, not a colored band. */
body.gr-unified :is(.companion-bar, .trust-strip) { background: var(--gr-paper) !important; border: 0 !important; border-bottom: 1px solid var(--gr-line) !important; color: var(--gr-ink-muted) !important; font-size: 13.5px !important; }
body.gr-unified :is(.companion-bar, .trust-strip) :is(.companion-tag, .trust-pill) { background: none !important; border: 0 !important; padding: 0 !important; color: var(--gr-ink-soft) !important; }
body.gr-unified :is(.trust-dot, .eyebrow .dot) { display: none !important; }
