/* css/base.css */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-15);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  cursor: pointer;
  border: 0;
  background: none;
  padding: 0;
  touch-action: manipulation;
}

button:disabled {
  cursor: default;
}

input {
  -webkit-appearance: none;
  appearance: none;
}

:focus {
  outline: none;
}

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

.num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.icon {
  display: inline-flex;
  flex: none;
  line-height: 0;
}

/* ---------------------------------------------------------------- pages */

#app {
  min-height: 100vh;
  min-height: 100dvh;
}

.page {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: calc(var(--safe-top) + var(--s2)) calc(var(--s4) + var(--safe-right)) calc(var(--s10) + var(--safe-bottom))
    calc(var(--s4) + var(--safe-left));
}

.page--wide {
  --page-max: 1040px;
}

.section {
  margin-top: var(--s8);
}

.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s3);
  margin-bottom: var(--s3);
}

.section__title {
  font-size: var(--fs-17);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.section__note {
  color: var(--ink-3);
  font-size: var(--fs-13);
}

.muted {
  color: var(--ink-2);
}

.faint {
  color: var(--ink-3);
}

/* Screen change: a short settle, only in response to navigation. */
.screen-enter {
  opacity: 0;
  transform: translateY(6px);
}

#app > * {
  transition:
    opacity 180ms var(--ease),
    transform 220ms var(--ease);
}

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

/* Hidden always means hidden, whatever display a component's class sets. */
[hidden] {
  display: none !important;
}
