/* ==========================================================================
   11 Plus Blocks: reset and element defaults
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Clear the sticky header when jumping to an anchor. */
  scroll-padding-top: 6rem;
}

@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;
  }
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: var(--leading-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Belt and braces. overflow-x on body alone does not always contain an
   oversized child, because the initial containing block can still grow; the
   pair does. `clip` rather than `hidden` so it never creates a scroll
   container, which would break position:sticky on the header. */
html, body { overflow-x: clip; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--deep);
  line-height: var(--leading-tight);
  letter-spacing: -0.015em;
  margin: 0 0 var(--space-s);
  text-wrap: balance;
}

h1 { font-size: var(--step-5); font-weight: 600; }
h2 { font-size: var(--step-4); font-weight: 600; }
h3 { font-size: var(--step-2); font-weight: 600; }
h4 { font-size: var(--step-1); font-weight: 600; }

p  { margin: 0 0 var(--space-s); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--purple);
  text-decoration-color: rgb(104 68 158 / 0.35);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 0.08em;
  transition: color var(--dur-fast) var(--ease-out),
              text-decoration-color var(--dur-fast) var(--ease-out);
}
a:hover { color: var(--deep); text-decoration-color: currentColor; }

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

ul, ol { margin: 0 0 var(--space-s); padding-left: 1.25em; }
li { margin-bottom: 0.35em; }

strong, b { font-weight: 700; color: var(--deep); }

blockquote {
  margin: var(--space-m) 0;
  padding: var(--space-s) var(--space-m);
  border-left: 4px solid var(--lilac);
  background: var(--wash);
  border-radius: 0 var(--radius-row) var(--radius-row) 0;
  color: var(--ink-soft);
  font-style: italic;
}

code, pre, kbd {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: 0.9em;
}
code { background: var(--wash-strong); padding: 0.12em 0.4em; border-radius: 6px; }

hr {
  border: 0;
  height: 1px;
  background: var(--hairline);
  margin: var(--space-xl) 0;
}

table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: var(--space-2xs) var(--space-xs); border-bottom: 1px solid var(--hairline); }
th { font-family: var(--font-label); font-weight: 700; color: var(--deep); }

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

/* Focus: one visible ring everywhere, never removed. */
:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 3px;
  border-radius: 6px;
}
:focus:not(:focus-visible) { outline: none; }

::selection { background: var(--lilac); color: var(--on-accent); }

/* --- Utilities ----------------------------------------------------------- */

.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;
}

.skip-link {
  position: absolute;
  left: var(--space-s);
  top: -4rem;
  z-index: 200;
  padding: var(--space-2xs) var(--space-s);
  background: var(--chrome);
  color: var(--on-accent);
  border-radius: var(--radius-row);
  font-family: var(--font-label);
  font-weight: 700;
  text-decoration: none;
  transition: top var(--dur) var(--ease-out);
}
.skip-link:focus { top: var(--space-s); color: var(--on-accent); }

.wrap {
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--page-pad);
}
.wrap--narrow { max-width: 46rem; }
.wrap--prose  { max-width: 42rem; }

.stack > * + * { margin-top: var(--space-s); }
.stack-m > * + * { margin-top: var(--space-m); }
.stack-l > * + * { margin-top: var(--space-l); }

.section { padding-block: clamp(3rem, 2rem + 5vw, 6rem); }
.section--tight { padding-block: clamp(2rem, 1.5rem + 3vw, 3.5rem); }
.section--surface { background: var(--surface); }
.section--wash { background: var(--wash); }

.lede {
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: var(--measure);
}

.eyebrow {
  font-family: var(--font-label);
  font-size: var(--step--1);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--purple);
  margin: 0 0 var(--space-2xs);
}

.centred { text-align: center; }
.centred .lede { margin-inline: auto; }

.text-soft { color: var(--ink-soft); }
.no-wrap { white-space: nowrap; }
