/*
  Styling for the static pages that live outside the React app.

  These pages are served as plain files so a crawler gets their text without a
  render pass, which means they cannot reach the app's hashed CSS bundle. The
  tokens below are copied from styles.css and about.css on purpose: a small
  duplicated palette is a cheaper price than a build step, and if the app's
  colours ever move, these pages looking slightly dated is a visible, harmless
  failure rather than a broken one.
*/
:root {
  --ink: #202038;
  --paper: #fff8e9;
  --sky: #83cde0;
  --gold: #f6c851;
  --rule: 3px solid var(--ink);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: ui-rounded, "Avenir Next", system-ui, sans-serif;
  font-weight: 800;
  font-synthesis: none;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
}

/* The dotted print behind the header, borrowed from the About page so the two
   read as the same publication. */
.page-header {
  position: relative;
  background: var(--sky);
  border-bottom: 5px solid var(--ink);
  overflow: hidden;
}

.page-header::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.1;
  pointer-events: none;
  background-image: radial-gradient(var(--ink) 1.4px, transparent 1.8px);
  background-size: 28px 28px;
}

.wrap {
  position: relative;
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 0 max(18px, env(safe-area-inset-left));
}

.page-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding-top: 16px;
  padding-bottom: 8px;
  font-size: 0.9rem;
}

.page-nav a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 2px solid rgba(32, 32, 56, 0.35);
}

.page-nav a:hover,
.page-nav a:focus-visible {
  border-bottom-color: var(--ink);
}

.page-header h1 {
  margin: 8px 0 0;
  font-size: clamp(2rem, 7vw, 3.1rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.page-header .standfirst {
  margin: 14px 0 0;
  font-size: clamp(1.02rem, 2.6vw, 1.2rem);
  font-weight: 700;
}

.page-header .wrap {
  padding-bottom: 30px;
}

main {
  padding: 34px 0 10px;
}

main h2 {
  margin: 40px 0 12px;
  font-size: clamp(1.4rem, 4.2vw, 1.85rem);
  line-height: 1.15;
}

main h3 {
  margin: 26px 0 6px;
  font-size: 1.1rem;
}

p {
  margin: 0 0 14px;
  font-weight: 600;
}

main ul {
  margin: 0 0 16px;
  padding-left: 22px;
  font-weight: 600;
}

main li {
  margin-bottom: 7px;
}

a {
  color: var(--ink);
}

strong {
  font-weight: 900;
}

figure {
  margin: 0 0 20px;
}

figure.figure-lead {
  margin-top: 20px;
}

figure img {
  display: block;
  max-width: 100%;
  height: auto;
  border: var(--rule);
  border-radius: 15px 12px 16px 13px;
  box-shadow: 5px 6px 0 var(--ink);
}

figcaption {
  margin-top: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(32, 32, 56, 0.7);
}

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

/* The chunky bordered card used for callouts and the closing CTA. */
.card {
  margin: 26px 0;
  padding: 20px;
  border: 5px solid var(--ink);
  border-radius: 18px 15px 19px 16px;
  background: var(--paper);
  box-shadow: 8px 9px 0 var(--ink);
}

.card--gold {
  background: var(--gold);
}

.card h2,
.card h3 {
  margin-top: 0;
}

.card > :last-child {
  margin-bottom: 0;
}

.button {
  display: inline-block;
  margin-top: 6px;
  padding: 12px 18px;
  border: var(--rule);
  border-radius: 13px 11px 14px 12px;
  background: var(--gold);
  color: var(--ink);
  text-decoration: none;
  box-shadow: 3px 4px 0 var(--ink);
}

.button:hover,
.button:focus-visible {
  box-shadow: 1px 2px 0 var(--ink);
  transform: translate(2px, 2px);
}

/* Tables carry the action costs and the counter matrix. Wide content scrolls
   inside its own box so the page body never scrolls sideways on a phone. */
.table-scroll {
  overflow-x: auto;
  margin: 0 0 18px;
  border: var(--rule);
  border-radius: 14px 12px 15px 13px;
  box-shadow: 5px 6px 0 var(--ink);
  background: var(--paper);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  min-width: 460px;
}

th,
td {
  padding: 10px 13px;
  text-align: left;
  border-bottom: 2px solid rgba(32, 32, 56, 0.2);
}

th {
  background: var(--sky);
  font-weight: 900;
  white-space: nowrap;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.beats {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: grid;
  gap: 12px;
}

.beats li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 16px;
  border: var(--rule);
  border-radius: 15px 12px 16px 13px;
  background: var(--paper);
  box-shadow: 4px 5px 0 var(--ink);
  font-weight: 600;
}

.beats b {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--gold);
  font-size: 0.95rem;
}

.page-footer {
  margin-top: 46px;
  padding: 24px 0 40px;
  border-top: 5px solid var(--ink);
  background: var(--sky);
  font-size: 0.92rem;
  font-weight: 700;
}

.page-footer p {
  margin-bottom: 8px;
}

@media (prefers-reduced-motion: reduce) {
  .button {
    transition: none;
  }

  .button:hover,
  .button:focus-visible {
    transform: none;
  }
}
