/* Reset and the structural parts (focus, tap sizes, phone WhatsApp button).
   Colour, type and layout live in ../style.css. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-size: 1.0625rem; line-height: 1.55; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
h1, h2, h3 { text-wrap: balance; }
h1 span { display: block; }

/* The whole page sits in .frame, and every width rule below answers to the frame's width
   (container queries). */
.frame { position: relative; container: page / inline-size; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html, .frame { scroll-behavior: auto; } }

.wrap { width: min(100% - 2.5rem, 72rem); margin-inline: auto; }

.vh { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -999rem; top: 0; padding: 0.75rem 1rem; background: #fff; color: #000; z-index: 20; }
.skip:focus { left: 0; }

:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }

.top-in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.25rem; }
.mark { display: inline-flex; align-items: center; min-height: 2.75rem; text-decoration: none; }

/* Section tabs, on phones only: on a computer the sections sit side by side on one screen,
   so there is nothing to jump to. The header stays at the top of the window; on phones only
   its tab row does. */
.tabs { display: flex; gap: 0 1.75rem; margin-left: auto; margin-right: 0.75rem; }
.tabs a { display: inline-flex; align-items: center; min-height: 2.75rem; font-weight: 600; text-decoration: none; }
.tabs a:hover, .tabs a:focus-visible { text-decoration: underline; text-underline-offset: 0.4em; text-decoration-thickness: 2px; }
.top { position: sticky; top: 0; z-index: 9; }
section[id] { scroll-margin-top: 4.25rem; }
@container page (min-width: 48rem) { .tabs { display: none; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  min-height: 3.25rem; padding: 0.75rem 1.5rem; border: 0; cursor: pointer;
  font-weight: 700; line-height: 1.2; text-decoration: none; text-align: center;
}
.btn svg { width: 1.4em; height: 1.4em; flex: none; }

.foot-in { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 0.5rem 2rem; }
.foot-mark { display: none; }
.foot-line { font-size: 0.9375rem; }
.credit { grid-column: 2; font-size: 0.75rem; text-align: right; }
.credit a { text-underline-offset: 0.2em; }

.wa-fixed { display: none; }

@container page (max-width: 47.99rem) {
  .top-in { flex-wrap: wrap; gap: 0 1rem; padding: 0.4rem 0 0.25rem; }
  .tabs { width: 100%; margin: 0; gap: 0 1.5rem; }
  /* The logo row is 3.3rem tall with 0.4rem above it; both scroll away and the tab row stays. */
  .mark { min-height: 3.3rem; }
  .top { top: -3.7rem; }
  section[id] { scroll-margin-top: 3rem; }
  /* The WhatsApp button rides along the bottom of the screen. It is the last thing in the
     frame and sticks to the bottom edge; the footer leaves room for it (see .foot in style.css). */
  .wa-fixed {
    display: flex; position: sticky; bottom: 1rem; z-index: 10; margin: -4.25rem 1rem 1rem;
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.3);
  }
  .foot-in { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .credit { grid-column: 1; text-align: center; }
}
