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

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-ui);
  font-size: var(--text-md);
  font-weight: 450;
  line-height: 1.5;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 650;
  line-height: 1.15;
  margin: 0 0 var(--space-3);
  max-width: 100%;
}

h1 {
  font-size: var(--text-2xl);
  width: fit-content;
}

button:not([class]) {
  min-height: 44px;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-sm);
  background: var(--color-surface-raised);
  color: var(--color-text);
}
h2 { font-size: var(--text-xl); }
h3 { font-size: var(--text-lg); }

p { margin: 0 0 var(--space-3); }

a {
  color: var(--color-brand);
  text-underline-offset: 0.15em;
}

a:hover { text-decoration-thickness: 2px; }

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

h1[tabindex="-1"]:focus-visible { outline: none; }

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

button { cursor: pointer; }

img { max-width: 100%; }

.skip {
  position: absolute;
  left: var(--space-3);
  top: var(--space-3);
  transform: translateY(-150%);
  background: var(--color-surface-raised);
  color: var(--color-text);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  z-index: 50;
}

.skip:focus { transform: none; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.aml-display {
  font-family: var(--font-display);
}

.aml-expressive,
.aml-prompt {
  font-family: var(--font-expressive);
}



.aml-score, .aml-mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.aml-measure { max-width: 72ch; }

.page {
  width: min(720px, 100%);
  margin-inline: auto;
  padding: var(--space-4);
  text-align: left;
}

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

.aml-prompt { font-size: clamp(1.75rem, 5vw, 3rem); font-weight: 700; font-optical-sizing: auto; letter-spacing: -0.02em; line-height: 1.15; }
small, time { color: var(--color-text-3); }
