/* Element defaults (DESIGN.md §3, §5 Link, §7 "element first"). */
@layer base {
  html {
    scroll-behavior: smooth;
    /* Anchored targets (the Tip ons form) land below the sticky header */
    scroll-padding-top: var(--space-10);
  }

  body {
    font-family: var(--font-text);
    font-size: var(--text-body);
    line-height: var(--leading-body);
    color: var(--color-text);
    background: var(--color-surface);
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100svh;
  }

  main { flex: 1; }

  h1 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: var(--text-display-m);
    line-height: var(--leading-display-m);
    color: var(--color-ink);
    text-wrap: balance;
  }

  h2 {
    font-size: var(--text-title);
    line-height: var(--leading-title);
    font-weight: 500;
    color: var(--color-ink);
    text-wrap: balance;
  }

  h3 {
    font-size: var(--text-lead);
    line-height: var(--leading-lead);
    font-weight: 500;
    color: var(--color-ink);
    text-wrap: balance;
  }

  h4 {
    font-size: var(--text-body);
    line-height: var(--leading-body);
    font-weight: 500;
  }

  strong, b { font-weight: 500; color: var(--color-ink); }

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

    &:hover { color: var(--color-ink); text-decoration-thickness: 2px; }
  }

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

  ::selection {
    background: var(--color-lime);
    color: var(--color-text);
  }

  ul, ol { padding-inline-start: var(--space-6); }

  summary { cursor: pointer; font-weight: 500; }

  details {
    border-top: var(--hairline);
    padding-block: var(--space-3);
  }
}
