/*
 * Base rules that turn the tokens into devmutualfund's look: reset, body type, focus ring, the
 * colour field and the glass panel. Taken from devmutualfund's styles.css, with its hard-coded
 * values replaced by the tokens in tokens.css.
 */

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

html {
  background: var(--page);
}

body {
  margin: 0;
  color: var(--ink);
  font: var(--text-body) / 1.5 var(--font);
  font-feature-settings: 'cv11', 'ss03';
  font-optical-sizing: auto;
  letter-spacing: var(--tracking-body);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
dd {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

button,
input {
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

::selection {
  background: rgba(42, 120, 214, 0.22);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Numbers in tables and tiles line up. */
.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---------- The colour field behind the glass ---------- */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: var(--backdrop);
}

/* ---------- Glass ---------- */

.glass {
  background: linear-gradient(180deg, var(--glass-top), var(--glass-bottom));
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--glass-edge);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

/* Without blur support a see-through panel would be hard to read: make it nearly solid. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass {
    background: rgba(255, 255, 255, 0.94);
  }
}

.accent-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

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