* {
  margin: 0;
  padding: 0;
}

:root {
  --padding: 1.5rem;
  --color-primary: #006799;
  --color-primary-dark: #00506f;
  --color-accent: #2ea3f2;
  --color-black: #000;
  --color-white: #fff;
  --color-grey: #666;
  --color-light: #f4f4f4;
  --color-text: #333;
  --color-text-grey: #666;
  --color-background: var(--color-white);
  --font-family-sans: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-family-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
}

html {
  font-family: var(--font-family-sans);
  font-size: 14px;
  color: var(--color-text);
  background: var(--color-background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  width: 100%;
}

body {
  max-width: 70rem;
  margin: 0 auto;
  padding: 0 var(--padding);
}

li {
  list-style: none;
}

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button {
  font: inherit;
  background: none;
  border: 0;
  color: currentColor;
  cursor: pointer;
}

strong, b {
  font-weight: 700;
}

small {
  font-size: inherit;
  color: var(--color-text-grey);
}

.bg-light {
  background-color: var(--color-light);
}

.color-grey {
  color: var(--color-text-grey);
}

/* ── Header ─────────────────────────────────────── */

.header {
  background-color: var(--color-primary);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  margin: 0 calc(-1 * var(--padding));
  margin-bottom: 3rem;
  padding: 0 var(--padding);
}

.logo {
  display: flex;
  align-items: center;
  padding: .75rem 0;
}

.logo img {
  height: 56px;
  width: auto;
}

.menu {
  display: flex;
  align-items: center;
}

.menu a {
  padding: 1rem .75rem;
  display: block;
  color: rgba(255,255,255,.85);
  font-size: .9rem;
  font-weight: 500;
}

.menu a:hover,
.menu a[aria-current] {
  color: var(--color-white);
  text-decoration: underline;
}

.social {
  display: flex;
  align-items: center;
  padding: 0 .25rem;
}

.social a {
  padding: .75rem .5rem;
  display: flex;
  align-items: center;
  color: rgba(255,255,255,.75);
}

.social a:hover {
  color: var(--color-white);
  text-decoration: none;
}

.social svg {
  width: 20px;
  height: 20px;
}

/* ── Layout ─────────────────────────────────────── */

.section {
  padding: 3rem 0;
}

.grid {
  --columns: 12;
  --gutter: 3rem;
  display: grid;
  grid-gap: var(--gutter);
  grid-template-columns: 1fr;
}

.grid > .column {
  margin-bottom: var(--gutter);
}

.autogrid {
  --gutter: 3rem;
  --min: 10rem;
  display: grid;
  grid-gap: var(--gutter);
  grid-template-columns: repeat(auto-fit, minmax(var(--min), 1fr));
  grid-auto-flow: dense;
}

h1, h2, h3, h4, h5, h6 {
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  color: #333;
}

/* ── Text ────────────────────────────────────────── */

.text {
  line-height: 1.7em;
}

.text a {
  color: var(--color-accent);
  text-decoration: underline;
}

.text :first-child {
  margin-top: 0;
}

.text :last-child {
  margin-bottom: 0;
}

.text p,
.text ul,
.text ol {
  margin-bottom: 1.5rem;
}

.text ul,
.text ol {
  margin-left: 1rem;
}

.text ul p,
.text ol p {
  margin-bottom: 0;
}

.text ul > li {
  list-style: disc;
}

.text ol > li {
  list-style: decimal;
}

.text ul ol,
.text ul ul,
.text ol ul,
.text ol ol {
  margin-bottom: 0;
}

.text h1,
.h1,
.intro {
  font-size: 2rem;
  margin-bottom: 3rem;
  line-height: 1.25em;
  color: var(--color-primary);
  font-weight: 600;
}

.text h2,
.h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  color: var(--color-primary);
}

.text h3,
.h3 {
  font-weight: 600;
}

.text code {
  font-family: var(--font-family-mono);
  font-size: 1em;
  background: var(--color-light);
  padding: 0 .5rem;
  display: inline-block;
  color: var(--color-black);
}

.text pre {
  margin: 3rem 0;
  background: var(--color-black);
  color: var(--color-white);
  padding: 1.5rem;
  overflow-x: scroll;
  overflow-y: hidden;
  line-height: 1.5rem;
}

.text pre code {
  padding: 0;
  background: none;
  color: inherit;
}

.text hr {
  margin: 6rem 0;
}

.text dt {
  font-weight: 600;
}

.text blockquote {
  font-size: 1.25rem;
  line-height: 1.325em;
  border-left: 4px solid var(--color-primary);
  padding-left: 1rem;
  margin: 3rem 0;
  max-width: 25rem;
  color: var(--color-primary-dark);
}

.text blockquote footer {
  font-size: .875rem;
  font-style: italic;
}

.text figure {
  margin: 3rem 0;
}

.text figcaption {
  padding-top: .75rem;
  color: var(--color-text-grey);
}

.text figure ul {
  line-height: 0;
  display: grid;
  gap: 1.5rem;
  margin: 0;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
}

.text figure ul li {
  list-style: none;
}

hr {
  border: 0;
  background: var(--color-primary);
  height: 3px;
  width: 2rem;
  margin: 3rem auto;
}

.align-center {
  text-align: center;
}

.intro {
  max-width: 40rem;
}

.intro *:not(:last-child) {
  margin-bottom: 1em;
}

.cta {
  background: var(--color-primary);
  color: var(--color-white);
  display: inline-flex;
  justify-content: center;
  padding: .75rem 1.75rem;
  font-weight: 600;
  border-radius: 2px;
}

.cta:hover {
  background: var(--color-primary-dark);
  text-decoration: none;
}

.box {
  background: var(--color-light);
  padding: 1.5rem;
  border-left: 4px solid var(--color-primary);
}

/* ── Media ───────────────────────────────────────── */

.video,
.img {
  position: relative;
  display: block;
  --w: 1;
  --h: 1;
  padding-bottom: calc(100% / var(--w) * var(--h));
  background: var(--color-light);
}

.img img,
.video iframe {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
}

.img[data-contain] img {
  object-fit: contain;
}

.img-caption,
.video-caption {
  padding-top: .75rem;
  line-height: 1.5em;
}

/* ── Footer ──────────────────────────────────────── */

.footer {
  background-color: var(--color-primary);
  color: var(--color-white);
  padding: 3rem var(--padding);
  margin: 6rem calc(-1 * var(--padding)) 0;
  line-height: 1.7em;
}

.footer h2 {
  font-weight: 700;
  margin-bottom: .75rem;
  color: var(--color-white);
  font-size: 1rem;
}

.footer ul,
.footer p {
  color: rgba(255,255,255,.75);
}

.footer a {
  color: rgba(255,255,255,.75);
}

.footer a:hover {
  color: var(--color-white);
  text-decoration: underline;
}

/* ── Utilities ───────────────────────────────────── */

.margin-s  { margin-bottom: .75rem; }
.margin-m  { margin-bottom: 1.5rem; }
.margin-l  { margin-bottom: 3rem; }
.margin-xl { margin-bottom: 4.5rem; }
.margin-xxl { margin-bottom: 6rem; }

/* ── Pagination ──────────────────────────────────── */

.pagination {
  display: flex;
  padding-top: 6rem;
}

.pagination > span {
  color: var(--color-text-grey);
}

.pagination > * {
  padding: .5rem;
  width: 3rem;
  text-align: center;
  border: 2px solid currentColor;
  margin-right: 1.5rem;
}

.pagination > a:hover {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}

/* ── Notes ───────────────────────────────────────── */

.note-excerpt {
  line-height: 1.7em;
}

.note-excerpt header {
  margin-bottom: 1.5rem;
}

.note-excerpt figure {
  margin-bottom: .5rem;
}

.note-excerpt-title {
  font-weight: 600;
}

.note-excerpt-date {
  color: var(--color-text-grey);
}

/* ── Home grid ───────────────────────────────────── */

.home-grid {
  display: grid;
  grid-gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}

.home-grid figure {
  position: relative;
  overflow: hidden;
}

.home-grid figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,103,153,.85));
  color: var(--color-white);
  padding: 2rem 1rem 1rem;
  font-weight: 600;
}

/* ── Responsive ──────────────────────────────────── */

@media screen and (min-width: 60rem) {
  body {
    --padding: 3rem;
  }

  .grid {
    grid-template-columns: repeat(12, 1fr);
  }

  .grid > .column {
    grid-column: span var(--columns);
  }
}
