/* ============================================
   Turbo Web Styles - Global Base
   ============================================

   True global element rules that use design tokens from theme.css.
   Applied once per page. Load after theme.css.

   What belongs here: body, and future shared element-level baselines
   (e.g. a, img, form-element resets) if they become genuinely universal.
   What does NOT belong here: component styles, utility classes, or tokens.
   ============================================ */

body {
  font-family: var(--font-family-primary);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--color-text-primary);
  background-color: var(--color-background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Links: no underline at rest (STYLEGUIDE §3.3.1). Overrides Bootstrap Reboot's
   underline-at-rest default for the bare <a> element and for .btn-link (the one
   Bootstrap component that underlines at rest). Every other component link
   (.btn, .nav-link, tabs, .dropdown-item, Radzen rz-* anchors) already renders
   text-decoration:none, so this only changes plain content links. */
a,
.btn-link {
  text-decoration: none;
}

/* Hover underline is for plain content links only: grid name columns, in-prose
   links, footer CTAs. Scoped to class-less anchors because every navigation,
   tab, button, dropdown, Radzen, and whole-card link carries a class — so a
   blanket a:hover would wrongly underline all of them (a:hover at 0,1,1 outranks
   .nav-link at 0,1,0). .btn-link is the lone exception: a button deliberately
   styled as a content link, so it opts back in. */
a:not([class]):hover,
.btn-link:hover {
  text-decoration: underline;
}

/* Inline code: monospace literal, sized to its surrounding text, subtle chip.
   Overrides Bootstrap's shrunk (.875em) + pink (#d63384) defaults. */
code {
  font-family: var(--font-family-monospace);
  font-size: 1em;
  color: var(--color-text-primary);
  background-color: var(--color-surface-active);
  padding: 0.1em 0.35em;
  border-radius: var(--border-radius-sm);
  word-wrap: break-word;
}

/* A code block must not double up the inline chip treatment inside <pre>. */
pre code {
  padding: 0;
  background-color: transparent;
  border-radius: 0;
  font-size: inherit;
  color: inherit;
}

/* SmartFocusOnNavigate (Turbo.Web.Styles/Components) programmatically focuses the
   page <h1> after each route change so keyboard / screen-reader users land on the
   new content. Suppress the visible ring for pointer-driven nav (the heading
   "blink") while keeping it for keyboard users: programmatic focus matches :focus
   but not :focus-visible, which the browser reserves for genuine keyboard input. */
h1:focus:not(:focus-visible) {
  outline: none;
}
