/* GLOBAL CSS */

html {
  font-size: 100%;
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
}

body {
  font: var(--text-md)/var(--leading-md) var(--font-sans);
  letter-spacing: var(--tracking-wide);
  text-rendering: optimizeSpeed;
  font-variant-ligatures: common-ligatures;
  -moz-font-feature-settings: "liga", "clig"; 
  -webkit-font-feature-settings: "liga", "clig"; 
  font-feature-settings: "liga", "clig";
  background-color: var(--color-grey-50);
  color: var(--color-text, currentColor);
  padding: var(--gutter);
}

/* If an element is [hidden] it needs to be max priority */
.hidden, [hidden] {
  display: none !important;
}


/* Disabled state */
.disabled, [disabled] {
  opacity: var(--alpha);
}

/* Placeholder */
::placeholder {
  font: inherit;
  color: rgba(0, 0, 0, .54);
}


/* Main */
main {
  position: relative;
}


/* Headings */

h1, h2, h3, h4, h5, h6 {
  font-size: var(--text-md);
  font-weight: 400;
  text-wrap: balance;
  position: relative;
}

h1 > a, 
h2 > a, 
h3 > a, 
h4 > a, 
h5 > a, 
h6 > a {
  text-decoration: none;
  border-bottom: none;
}

*:not(.sr-only) + h2,
*:not(.sr-only) + h3 {
  margin-top: var(--space-4);
}


/* General typesetting */

p {
  max-width: 40em;
}


/* Lists */

ul:not([class]),
ol:not([class]) {
  list-style: none;
  padding-left: 0;
}


/* Blockquotes */

blockquote {
  padding-left: 0;
}
blockquote > * {
  padding-left: var(--space-12);
}


/* Separators */

hr {
  border: none;
  border-top: var(--border);
  margin-inline: 0;
}

hr,
hr + * {
  --flow-space: var(--space-4);
}

/* Sub and sup */
sub,
sup {
  font-size: 0.75em;
}

sub {
  vertical-align: sub;
}

sup {
  vertical-align: middle;
  position: relative;
  top: -1ex;
}


/* Details */

details {
  position: relative;
}
summary {
  -webkit-appearance: none;
  list-style: none;
  cursor: pointer;
  width: fit-content;
  display: flex;
  -webkit-user-select: none;
  user-select: none;
}
summary::-webkit-details-marker,
summary::marker {
 display: none; 
 content: "";
}
summary::after {
  content: "";
  display: inline-block;
  width: 3rem;
  height: 3rem;
  background-color: var(--color-background);
  background-image: var(--icon-summary);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 1rem;
  position: absolute;
  right: 0;
}
details[open] > summary::after {
  transform: rotate(180deg);
}


/* Media */

figure {
  width: fit-content;
  height: fit-content;
}
figcaption {
  font-size: var(--text-md);
  margin: .16666667em 0;
  position: relative;
}
figcaption::before {
  float: right;
  margin-left: var(--gap);
}
figure + p {
  margin-top: var(--space-4);
}

video {
  background-color: var(--color-gray);
  max-width: 100%;
  border-radius: var(--rounded-md);
}

/* Selects images that are likely to have a transparent BG and applies a */
/* theme-driven mask to them */
img[src$='.svg'],
img[src$='.png'] {
  background-color: transparent;
}
img {
  object-fit: cover;
  background-size: cover;
  background-repeat: no-repeat;
}
[data-ratio="auto"] img {
  height: auto;
}

/* Links */

a {
  color: inherit;
  text-decoration: none;
}
a:visited {
  color: currentColor;
}
a:hover {
  color: currentColor;
}

a.link-full::after {
  content: '';
  display: block;
  position: absolute;
  inset: 0;
  z-index: 1;
  transition: outline var(--timing) var(--easing);
}
a.link-full:focus-visible {
  outline-width: 0;
}
a.link-full:focus-visible::after {
  outline: 2px solid var(--color-focus-ring);
  outline-offset: 2px;
  text-decoration: underline;
}


/* Form, Input, Buttons */

form {
  display: flex;
  gap: var(--space-4);
}
input {
  font: inherit;
  max-height: 1.125rem; /* 18px */
}
[type="search"]::-webkit-search-cancel-button,
[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}
button {
  cursor: pointer;
}

/* General interactive states */

:focus-visible {
  outline: 2px solid var(--color-focus-ring);
}


/* High contrast selection style */
::selection {
  background: var(--color-grey);
}
