/* retoor <retoor@molodetz.nl> */
*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--paper);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: var(--leading-tight);
  letter-spacing: -0.01em;
  margin: 0 0 0.5em 0;
  text-wrap: balance;
}

p { margin: 0 0 1em 0; max-width: 68ch; }

a { color: var(--drawing); text-underline-offset: 3px; }
a:hover { color: var(--accent); }

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

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

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

.hidden, [hidden] { display: none !important; }

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

.mono { font-family: var(--font-mono); }

.label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--accent);
}

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

time { font-family: var(--font-sans); font-size: var(--text-xs); letter-spacing: 0.06em; color: var(--muted); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }

.response-time {
  position: fixed;
  right: var(--space-sm);
  bottom: var(--space-sm);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--faint);
  z-index: var(--z-floating-button);
  will-change: transform;
  pointer-events: none;
}

@media (max-width: 768px) {
  .response-time { display: none; }
}

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