:root {
  --ink: #13202a;
  --teal: #00706b;
  --violet: #5a2a86;
  --paper: #f3f6f5;
  --white: #fff;
  --rule: #c5d1ce;
  --tint: #dfece9;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --wide: 72rem;
  --measure: 40rem;
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1rem/1.6 var(--sans);
}

img { max-width: 100%; height: auto; }

a { color: var(--violet); text-underline-offset: .18em; }
a:hover { color: var(--teal); }

:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 10;
  padding: .6rem 1rem;
  background: var(--ink);
  color: var(--white);
}
.skip:focus { top: .75rem; }

.wrap {
  width: min(100% - 2 * var(--gutter), var(--wide));
  margin-inline: auto;
}

/* header */

.site-head { background: var(--white); border-bottom: 1px solid var(--rule); }

.site-head .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 2rem;
  padding-block: .9rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  font: 700 1.2rem/1.1 var(--serif);
  color: var(--ink);
  text-decoration: none;
}
.brand img { width: 2.2rem; height: 2.2rem; flex: none; }
.brand span { color: var(--violet); font-weight: 400; }

.nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: .15rem 1.4rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav a {
  display: block;
  padding: .35rem 0;
  color: var(--ink);
  font-size: .95rem;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.nav a:hover { border-color: var(--teal); color: var(--ink); }
.nav a[aria-current] { border-color: var(--violet); font-weight: 600; }

/* ribbon: the security-print wave used as a divider */

.ribbon {
  height: 20px;
  background: url("/img/band.svg") repeat-x left center / 96px 20px;
  opacity: .9;
}

/* hero */

.hero { position: relative; overflow: hidden; background: var(--paper); }

.hero::before {
  content: "";
  position: absolute;
  width: min(62rem, 130vw);
  aspect-ratio: 1;
  right: -21rem;
  top: 50%;
  margin-top: calc(min(62rem, 130vw) / -2);
  background: url("/img/rosette.svg") center / contain no-repeat;
  opacity: .8;
  animation: turn 240s linear infinite;
}

@keyframes turn { to { transform: rotate(1turn); } }

.hero .wrap { position: relative; padding-block: clamp(3.5rem, 9vw, 7rem); }

.hero h1 {
  max-width: 14ch;
  margin: 0 0 1.25rem;
  font: 700 clamp(2.4rem, 6.4vw, 4.6rem)/1.04 var(--serif);
  letter-spacing: -.015em;
}

.hero .lead {
  max-width: 34rem;
  margin: 0 0 2rem;
  padding: .1rem 0;
  background: linear-gradient(90deg, var(--paper) 85%, transparent);
  font-size: 1.2rem;
}

.actions { display: flex; flex-wrap: wrap; gap: .75rem; }

.btn {
  display: inline-block;
  padding: .8rem 1.35rem;
  border: 2px solid var(--violet);
  background: var(--violet);
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
  border-radius: 3px;
}
.btn:hover { background: var(--ink); border-color: var(--ink); color: var(--white); }
.btn.plain { background: var(--paper); color: var(--violet); }
.btn.plain:hover { background: var(--violet); color: var(--white); border-color: var(--violet); }

/* home sections */

.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.section + .section { border-top: 1px solid var(--rule); }

.section h2 {
  margin: 0 0 1.5rem;
  font: 700 clamp(1.5rem, 3vw, 2rem)/1.2 var(--serif);
}

.rows { margin: 0; padding: 0; list-style: none; }
.rows li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: .25rem 3rem;
  padding-block: 1.25rem;
  border-top: 1px solid var(--rule);
}
.rows li:last-child { border-bottom: 1px solid var(--rule); }
.rows h3 { margin: 0; font: 700 1.25rem/1.25 var(--serif); }
.rows p { margin: 0; max-width: 38rem; }

.pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.5rem 4rem;
}
.pair h3 { margin: 0 0 .4rem; font: 700 1.25rem/1.25 var(--serif); }
.pair p { margin: 0 0 .5rem; }

.notice {
  background: var(--ink);
  color: #e6edeb;
}
.notice h2 { color: var(--white); }
.notice a { color: #cdb6ea; }
.notice a:hover { color: var(--white); }
.notice .wrap { max-width: 56rem; }

/* article pages */

.page-head { background: var(--white); border-bottom: 1px solid var(--rule); }
.page-head .wrap { padding-block: clamp(2rem, 5vw, 3.5rem) clamp(1.5rem, 3vw, 2.25rem); }

.crumbs { margin: 0 0 1rem; font-size: .9rem; }
.crumbs a { color: var(--teal); }

.page-head h1 {
  max-width: 24ch;
  margin: 0;
  font: 700 clamp(1.9rem, 4.4vw, 3rem)/1.12 var(--serif);
  letter-spacing: -.01em;
  text-wrap: balance;
}

.prose { padding-block: clamp(2rem, 5vw, 3.5rem) clamp(3rem, 7vw, 5rem); }
.prose .wrap { max-width: calc(var(--measure) + 2 * var(--gutter)); margin-inline: max(var(--gutter), calc((100% - var(--wide)) / 2)); }

.prose :is(p, ul, ol, h2, h3, figure) { max-width: var(--measure); }
.prose p, .prose li { font: 1.1rem/1.7 var(--serif); }
.prose p { margin: 0 0 1.15em; }
.prose h2 {
  margin: 2.2em 0 .6em;
  font: 700 1.5rem/1.25 var(--serif);
}
.prose h3 { margin: 1.8em 0 .5em; font: 700 1.2rem/1.3 var(--serif); }
.prose ul, .prose ol { padding-left: 1.3rem; margin: 0 0 1.25em; }
.prose li { margin-bottom: .45em; }
.prose h2:first-child, .prose figure:first-child { margin-top: 0; }
.prose figure { margin: 0 0 2rem; }
.prose figure img { display: block; border-radius: 3px; }

/* article index */

.group + .group { margin-top: 3rem; }
.group h2 { margin: 0 0 1rem; font: 700 1.5rem/1.2 var(--serif); }
.list { margin: 0; padding: 0; list-style: none; }
.list li { padding-block: 1.1rem; border-top: 1px solid var(--rule); }
.list li:last-child { border-bottom: 1px solid var(--rule); }
.list a { font: 700 1.15rem/1.3 var(--serif); }
.list p { margin: .25rem 0 0; max-width: 42rem; }

/* contact */

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 3rem 4rem;
}

.form-field { margin-bottom: 1.15rem; }
.form-field label { display: block; margin-bottom: .3rem; font-weight: 600; }
.form-field .opt { font-weight: 400; color: #4b5b63; }

.form-field :is(input, textarea) {
  width: 100%;
  padding: .7rem .8rem;
  border: 2px solid #7b8c91;
  border-radius: 3px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
}
.form-field textarea { min-height: 11rem; resize: vertical; }
.form-field :is(input, textarea):focus { border-color: var(--violet); outline-offset: 0; }

.field-error { margin: .3rem 0 0; color: #a32020; font-size: .95rem; }
.form-field.has-error :is(input, textarea) { border-color: #a32020; }

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.msg {
  margin: 0 0 1.5rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--teal);
  border-radius: 4px;
  background: var(--tint);
}
.msg.bad { border-color: #a32020; background: #f6e3e3; }
.msg p { margin: 0; }
.msg p + p { margin-top: .4rem; }

.contact-side dl { margin: 0; }
.contact-side dt { margin-top: 1.1rem; font-weight: 600; }
.contact-side dd { margin: .15rem 0 0; }

/* footer */

.site-foot {
  background: var(--ink);
  color: #d4dfdc;
  font-size: .95rem;
}
.site-foot .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem 3rem;
  padding-block: 3rem;
}
.site-foot a { color: #d4dfdc; }
.site-foot a:hover { color: var(--white); }
.site-foot h2 { margin: 0 0 .6rem; font: 700 1rem/1.3 var(--serif); color: var(--white); }
.site-foot p, .site-foot ul { margin: 0; }
.site-foot ul { padding: 0; list-style: none; }
.site-foot li + li { margin-top: .3rem; }
.site-foot address { font-style: normal; }
.site-foot .logo { width: 12.5rem; margin-bottom: 1rem; }
.legal {
  grid-column: 1 / -1;
  padding-top: 1.5rem;
  border-top: 1px solid #34444d;
  font-size: .875rem;
  color: #aebbb8;
}

/* 404 */

.lost { padding-block: clamp(3rem, 9vw, 6rem); }
.lost h1 { margin: 0 0 1rem; font: 700 clamp(2rem, 5vw, 3.2rem)/1.1 var(--serif); }

@media (max-width: 54rem) {
  .rows li { grid-template-columns: 1fr; }
  .pair, .contact-grid { grid-template-columns: 1fr; }
  .site-foot .wrap { grid-template-columns: 1fr; }
  .hero::before { right: -30rem; opacity: .35; }
  .hero .lead { background: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero::before { animation: none; }
}

@media print {
  .site-head, .site-foot, .hero::before, .ribbon, .skip { display: none; }
  body { background: #fff; }
}
