/* Missionplane on the Sendplane design system: base.
 * Box model, the 14px Inter base, headings, code, focus and motion, as in
 * Sendplane's tenant console (components/bundle.css in the design system). */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* The imported pages size text in rem against a 13px root. */
html {
  font-size: 13px;
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  color: var(--ink);
  background: var(--canvas);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  overscroll-behavior-y: contain;
}

/* The shell scrolls its own columns on wide screens. */
@media (min-width: 761px) {
  body:has(.app-shell) { height: 100vh; overflow: hidden; }
}

a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button, a, [role="button"] { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
svg { flex: 0 0 auto; }

h1, h2, h3, h4, h5, h6 { color: var(--ink); font-weight: 700; }
h1 { margin-bottom: 9px; font-size: clamp(30px, 4vw, 42px); line-height: 1.08; letter-spacing: -.045em; font-weight: 690; }
h2 { margin-bottom: 5px; font-size: 16px; line-height: 1.3; letter-spacing: -.02em; }
h3 { margin-bottom: 4px; font-size: 14px; line-height: 1.35; letter-spacing: -.01em; }
h4 { font-size: 13px; letter-spacing: -.01em; }

/* Ids, scopes and values are 11px mono chips (the design system's code style). */
code, kbd, .mono { font-family: var(--font-mono); }
code {
  padding: 3px 6px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-code);
  color: var(--muted);
  background: var(--soft);
  font-size: 11px;
  overflow-wrap: anywhere;
}
kbd {
  padding: 1px 5px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-hairline);
  color: var(--quiet);
  background: var(--surface);
  font-size: 10px;
}

/* Code blocks use Sendplane's code surface, dark in both themes. */
pre {
  overflow-x: auto;
  padding: 14px 16px;
  border-radius: var(--radius-button);
  color: var(--studio-code-fg);
  background: var(--studio-code-bg);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.65;
}
pre code { padding: 0; border: 0; border-radius: 0; color: inherit; background: none; font-size: inherit; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { border: 2px solid transparent; border-radius: var(--radius-pill); background: var(--border-default) padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--border-strong) padding-box; }

::selection { color: var(--ink); background: var(--info-bg); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: var(--z-skip-link);
  top: 10px;
  left: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-control);
  color: var(--fg-inverse);
  background: var(--interactive-primary);
  text-decoration: none;
  font-weight: 650;
  transform: translateY(calc(-100% - 14px));
  transition: transform 140ms var(--ease-out);
}
.skip-link:focus { transform: translateY(0); }

/* Focus is always visible: a 3px focus-ring outline, 2px out. */
:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.main:focus { outline: 0; }

::view-transition-old(root) { animation: 120ms var(--ease-out) both view-fade-out; }
::view-transition-new(root) { animation: 160ms var(--ease-out) both view-fade-in; }
@keyframes view-fade-out { to { opacity: 0; } }
@keyframes view-fade-in { from { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
