/* A percentage, not px, so the root follows the browser's text-size setting. */
html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

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

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--font-size-sm);
  line-height: var(--line-height);
  overflow-wrap: anywhere;
  /* Home-screen apps draw under the notch and the home indicator. */
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

body.season-spring {
  --season-tint: var(--color-season-spring);
}
body.season-summer {
  --season-tint: var(--color-season-summer);
}
body.season-autumn {
  --season-tint: var(--color-season-autumn);
}
body.season-winter {
  --season-tint: var(--color-season-winter);
}

/* Only the top of the page is tinted, so cards and text further down sit on the usual ground. */
body[class*="season-"] {
  background: linear-gradient(var(--season-tint), var(--color-bg) 22rem) no-repeat var(--color-bg);
}

/* Room for the fixed tab bar, so the last card is never hidden behind it. */
body.with-tabs {
  padding-bottom: calc(var(--tabbar-height) + env(safe-area-inset-bottom) + var(--space-4));
}

h1,
h2,
h3 {
  line-height: 1.4;
  margin: var(--space-6) 0 var(--space-3);
}

h1 {
  font-size: var(--font-size-xl);
}

h2 {
  font-size: var(--font-size-lg);
}

h3 {
  font-size: var(--font-size-md);
}

p,
ol,
ul {
  margin: 0 0 var(--space-4);
}

a {
  color: var(--color-link);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

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

.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--space-4) var(--space-8);
}

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

.skip-link {
  position: absolute;
  left: var(--space-2);
  top: -10rem;
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface);
}

.skip-link:focus {
  top: var(--space-2);
}

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

.lead {
  font-size: var(--font-size-md);
}

/* Components set display, which would otherwise beat the hidden attribute push.js toggles. */
[hidden] {
  display: none !important;
}
