/* Shared base layer for the WebSwift-hosted GoStargazing surfaces. */

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

html,
body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(circle at 50% -20%, rgb(40 62 108 / .18), transparent 44%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: var(--fs-md);
}

html { min-height: 100%; }

body {
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-style: normal;
  font-weight: var(--sg-weight-semibold);
  letter-spacing: 0;
  text-wrap: balance;
}

h1 { font-size: var(--fs-3xl); line-height: var(--sg-leading-largetitle); }
h2 { font-size: var(--fs-2xl); line-height: var(--sg-leading-title); }
h3 { font-size: var(--fs-xl); line-height: var(--sg-leading-title2); }

p {
  margin: 0;
  color: var(--ink-dim);
  line-height: 1.55;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--t-fast) var(--ease), opacity var(--t-fast) var(--ease);
}

a:hover { color: var(--ink); }
a:active { opacity: .68; }

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

:focus { outline: none; }

:focus-visible {
  outline: var(--sg-focus-ring-width) solid var(--sg-focus-ring-color);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

::selection {
  background: var(--accent);
  color: var(--sg-accent-text);
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--sg-label-tertiary) 70%, transparent);
  background-clip: padding-box;
}
::-webkit-scrollbar-track { background: transparent; }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }
}
