/*
 * Typography.
 *
 * Applies the neutral type ramp and body defaults. Colors + font-family come
 * from brand tokens (sss.css / the-dais.css / the-map.css), so this file is
 * brand-neutral.
 */

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--sss-font-body);
  font-size: var(--sss-step-0);
  line-height: var(--sss-line-loose);
  letter-spacing: var(--sss-tracking-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--sss-font-display, var(--sss-font-body));
  color: var(--sss-text);
  line-height: var(--sss-line-tight);
  letter-spacing: var(--sss-tracking-tight);
  margin-top: 0;
  margin-bottom: var(--sss-space-4);
  font-weight: 700;
  text-wrap: balance;
}

h1 { font-size: var(--sss-step-5); }
h2 { font-size: var(--sss-step-4); }
h3 { font-size: var(--sss-step-3); }
h4 { font-size: var(--sss-step-2); }
h5 { font-size: var(--sss-step-1); }
h6 { font-size: var(--sss-step-0); text-transform: uppercase; letter-spacing: var(--sss-tracking-wide); }

p {
  margin-top: 0;
  margin-bottom: var(--sss-space-4);
  text-wrap: pretty;
  max-width: 65ch;
}

small, .sss-text-sm {
  font-size: var(--sss-step--1);
}

strong, b { font-weight: 700; }
em, i { font-style: italic; }

a {
  color: var(--sss-link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(37, 99, 160, 0.4);
  text-underline-offset: 0.15em;
  transition: color var(--sss-motion-fast) var(--sss-ease),
              text-decoration-color var(--sss-motion-fast) var(--sss-ease);
}
a:hover,
a:focus-visible {
  color: var(--sss-link-hover);
  text-decoration-color: currentColor;
}

ul, ol {
  margin-top: 0;
  margin-bottom: var(--sss-space-4);
  padding-left: var(--sss-space-6);
}

li + li { margin-top: var(--sss-space-1); }

blockquote {
  margin: var(--sss-space-6) 0;
  padding-left: var(--sss-space-6);
  border-left: 4px solid var(--sss-accent);
  color: var(--sss-text-soft);
  font-style: italic;
}

code, kbd, samp, pre {
  font-family: var(--sss-font-mono);
  font-size: 0.94em;
}

pre {
  padding: var(--sss-space-4);
  overflow-x: auto;
  background: var(--sss-bg-surface);
  border-radius: var(--sss-radius-md);
}

hr {
  border: 0;
  border-top: 1px solid var(--sss-border);
  margin: var(--sss-space-8) 0;
}

img, svg, video {
  max-width: 100%;
  height: auto;
}

::selection {
  background: var(--sss-accent);
  color: var(--sss-white, #ffffff);
}
