/*
  Steps Inclusive Design
  High-legibility civic style. Four colours, one typeface, large targets.
  Blocks ("treads") step to the right down the page like a flight of stairs.
*/

:root {
  --white: #FFFFFF;
  --navy: #0B2545;
  --yellow: #FFB703;
  --teal: #13715B;
  --pale: #F3F6FA;            /* very light navy tint for quiet backgrounds */
  --error: #A4161A;           /* error text, 7:1 on white */
  --face: "Atkinson Hyperlegible", Verdana, Tahoma, Arial, sans-serif;
  --going: 6px;               /* how far each tread steps to the right */
  --measure: 66ch;
}

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

[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  background: var(--white);
  color: var(--navy);
  font-family: var(--face);
  font-size: 1.1875rem;
  line-height: 1.6;
}

h1,
h2,
h3 {
  margin: 0 0 0.6em;
  font-weight: 700;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

h1 {
  font-size: clamp(2.1rem, 7vw, 3.5rem);
}

h2 {
  font-size: clamp(1.6rem, 5vw, 2.2rem);
}

h3 {
  font-size: 1.35rem;
}

p,
ul,
ol,
dl,
table,
figure {
  margin: 0 0 1.1em;
}

p,
li {
  max-width: var(--measure);
}

a {
  color: var(--teal);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 0.12em;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--navy);
  text-decoration-thickness: 0.22em;
}

svg {
  max-width: 100%;
}

/* One focus style everywhere: yellow inner ring, navy outer ring.
   Visible on white, on navy, on teal and on yellow. */
:focus-visible {
  outline: 4px solid var(--navy);
  outline-offset: 4px;
  box-shadow: 0 0 0 4px var(--yellow);
}

.on-dark :focus-visible,
.on-dark:focus-visible {
  outline-color: var(--white);
}

main:focus {
  outline: none;
}

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

/* ----- skip link ----- */
.skip {
  position: absolute;
  left: 8px;
  top: 8px;
  z-index: 100;
  padding: 14px 20px;
  background: var(--yellow);
  color: var(--navy);
  font-size: 1.1875rem;
  border: 3px solid var(--navy);
  transform: translateY(-200%);
}

.skip:focus {
  transform: none;
}

/* ----- header and stepped navigation ----- */
.site-header {
  background: var(--navy);
  color: var(--white);
  border-bottom: 8px solid var(--yellow);
}

.site-header__inner {
  width: min(1180px, 100%);
  margin-inline: auto;
  padding: 0 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 16px;
}

.logo {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 8px 0;
  color: var(--white);
  font-size: 1.3rem;
  line-height: 1.15;
  text-decoration: none;
}

.logo svg {
  flex: none;
  width: 46px;
  height: 46px;
}

.logo:hover {
  color: var(--yellow);
  text-decoration: underline;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 48px;
  min-height: 52px;
  padding: 0 18px;
  background: var(--white);
  color: var(--navy);
  border: 0;
  border-bottom: 5px solid var(--yellow);
  font: 700 1.1875rem/1 var(--face);
  cursor: pointer;
}

.nav-toggle svg {
  width: 22px;
  height: 22px;
}

.nav-toggle .when-open,
.nav-toggle[aria-expanded="true"] .when-closed {
  display: none;
}

.nav-toggle[aria-expanded="true"] .when-open {
  display: inline;
}

.nav-toggle:hover {
  background: var(--yellow);
}

.stair-nav {
  flex: 1 0 100%;
  padding-bottom: 16px;
}

.js .stair-nav:not(.is-open) {
  display: none;
}

.stair-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.stair-nav li {
  max-width: none;
  margin: 0 0 6px;
}

/* on small screens each link is indented a little more than the last */
.stair-nav li:nth-child(1) { margin-left: 0; }
.stair-nav li:nth-child(2) { margin-left: 10px; }
.stair-nav li:nth-child(3) { margin-left: 20px; }
.stair-nav li:nth-child(4) { margin-left: 30px; }
.stair-nav li:nth-child(5) { margin-left: 40px; }

.stair-nav a {
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: 8px 16px;
  background: var(--white);
  color: var(--navy);
  border-top: 6px solid var(--yellow);
  font-size: 1.1875rem;
  line-height: 1.2;
  text-decoration: none;
}

.stair-nav a:hover {
  background: var(--yellow);
  text-decoration: underline;
  text-decoration-thickness: 3px;
}

.stair-nav a[aria-current="page"] {
  background: var(--yellow);
  border-top-color: var(--white);
  text-decoration: underline;
  text-decoration-thickness: 3px;
}

/* ----- page layout: the flight of treads ----- */
.flight {
  width: min(1180px, 100%);
  margin-inline: auto;
  padding: 24px 12px 56px;
}

.tread {
  --n: 0;
  position: relative;
  min-width: 0;
  margin: 0 calc((5 - var(--n)) * var(--going)) 28px calc(var(--n) * var(--going));
  padding: 24px 16px 28px;
  background: var(--white);
  border: 3px solid var(--navy);
  border-top: 12px solid var(--yellow);
  box-shadow: inset 0 3px 0 var(--navy);
}

.tread:nth-child(2) { --n: 1; }
.tread:nth-child(3) { --n: 2; }
.tread:nth-child(4) { --n: 3; }
.tread:nth-child(5) { --n: 4; }
.tread:nth-child(n+6) { --n: 5; }

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

.tread--navy {
  background: var(--navy);
  color: var(--white);
  box-shadow: none;
}

.tread--teal {
  background: var(--teal);
  color: var(--white);
  box-shadow: none;
}

.tread--pale {
  background: var(--pale);
}

.tread--navy a,
.tread--teal a {
  color: var(--white);
}

.tread--navy a:hover,
.tread--teal a:hover {
  color: var(--yellow);
}

.kicker {
  display: inline-block;
  margin: 0 0 14px;
  padding: 4px 12px;
  background: var(--yellow);
  color: var(--navy);
  font-size: 1.0625rem;
  font-weight: 700;
}

.lede {
  font-size: 1.35rem;
  line-height: 1.5;
}

/* ----- buttons ----- */
.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 10px 24px;
  background: var(--yellow);
  color: var(--navy);
  border: 3px solid var(--navy);
  border-radius: 0;
  box-shadow: 0 5px 0 var(--navy);
  font: 700 1.1875rem/1.2 var(--face);
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  background: var(--white);
  color: var(--navy);
  text-decoration: underline;
  text-decoration-thickness: 3px;
}

.button:active {
  transform: translateY(3px);
  box-shadow: 0 2px 0 var(--navy);
}

.button--plain {
  background: var(--white);
}

.button--plain:hover {
  background: var(--yellow);
}

.tread--navy .button,
.tread--teal .button {
  color: var(--navy);
  border-color: var(--white);
  box-shadow: 0 5px 0 var(--yellow);
}

.tread--navy .button:hover,
.tread--teal .button:hover {
  color: var(--navy);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 16px;
  margin: 1.4em 0 0.4em;
  max-width: none;
}

/* ----- home: three services drawn as rising steps ----- */
.rise {
  list-style: none;
  margin: 1.4em 0 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.rise li {
  max-width: none;
  min-width: 0;
  display: flex;
}

.rise a {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 20px 20px 24px;
  background: var(--white);
  color: var(--navy);
  border: 3px solid var(--navy);
  border-top: 12px solid var(--teal);
  font-weight: 400;
  text-decoration: none;
}

.rise li:nth-child(2) a { margin-left: 12px; }
.rise li:nth-child(3) a { margin-left: 24px; }

.rise strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.45rem;
  line-height: 1.2;
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 0.2em;
}

.rise .rise__num {
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.rise a:hover {
  background: var(--yellow);
  color: var(--navy);
}

/* ----- ordered steps ----- */
.stairs {
  list-style: none;
  margin: 1.2em 0 0;
  padding: 0;
  counter-reset: stair;
}

.stairs li {
  counter-increment: stair;
  position: relative;
  max-width: none;
  margin: 0 0 12px;
  padding: 16px 16px 18px 76px;
  background: var(--white);
  color: var(--navy);
  border: 3px solid var(--navy);
  border-top: 8px solid var(--yellow);
}

.stairs li::before {
  content: counter(stair);
  position: absolute;
  left: 14px;
  top: 14px;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  background: var(--navy);
  color: var(--white);
  font-size: 1.5rem;
  font-weight: 700;
}

.stairs li:nth-child(2) { margin-left: 8px; }
.stairs li:nth-child(3) { margin-left: 16px; }
.stairs li:nth-child(4) { margin-left: 24px; }

.stairs strong {
  display: block;
  font-size: 1.25rem;
}

/* ----- lists ----- */
.checks {
  list-style: none;
  padding: 0;
}

.checks li {
  position: relative;
  margin: 0 0 12px;
  padding-left: 40px;
}

.checks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.28em;
  width: 22px;
  height: 22px;
  background: var(--yellow);
  border: 3px solid var(--navy);
}

.tread--navy .checks li::before,
.tread--teal .checks li::before {
  border-color: var(--white);
}

.split {
  display: grid;
  gap: 28px;
}

.split > * {
  min-width: 0;
}

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

.areas li {
  max-width: none;
  margin: 0;
  padding: 14px 16px;
  background: var(--white);
  color: var(--navy);
  border-left: 10px solid var(--yellow);
}

.areas strong {
  display: block;
}

/* ----- ramp calculator ----- */
.field {
  margin: 0 0 1.2em;
}

.field label {
  display: block;
  margin-bottom: 4px;
  font-weight: 700;
  font-size: 1.25rem;
}

.hint {
  margin: 0 0 8px;
  color: #33475f;
}

.field input,
.field select,
.field textarea {
  display: block;
  width: 100%;
  max-width: 34rem;
  min-height: 56px;
  padding: 10px 14px;
  background: var(--white);
  color: var(--navy);
  border: 3px solid var(--navy);
  border-radius: 0;
  font: 400 1.1875rem/1.4 var(--face);
}

.field input.short {
  max-width: 12rem;
  font-size: 1.5rem;
  font-weight: 700;
}

.field textarea {
  min-height: 190px;
  resize: vertical;
}

.field [aria-invalid="true"] {
  border-color: var(--error);
  border-width: 5px;
}

.field-error {
  margin: 8px 0 0;
  padding-left: 14px;
  border-left: 6px solid var(--error);
  color: var(--error);
  font-weight: 700;
}

.results {
  width: 100%;
  max-width: 34rem;
  table-layout: fixed;
  border-collapse: collapse;
  background: var(--white);
}

.results caption {
  padding: 0 0 10px;
  text-align: left;
  font-size: 1.25rem;
  font-weight: 700;
}

.results th,
.results td {
  padding: 12px 14px;
  border: 3px solid var(--navy);
  text-align: left;
  vertical-align: top;
}

.results thead th {
  background: var(--navy);
  color: var(--white);
}

.results tbody th {
  background: var(--yellow);
  white-space: nowrap;
}

.results td {
  font-variant-numeric: tabular-nums;
}

.results td strong {
  font-size: 1.35rem;
  margin-right: 0.4em;
}

.results td > span {
  display: inline-block;
}

.results th:first-child {
  width: 34%;
}

.ramp-figure {
  margin: 1.4em 0;
  padding: 14px 10px 12px;
  background: var(--white);
  border: 3px solid var(--navy);
}

.ramp-figure svg {
  display: block;
  width: 100%;
  height: auto;
}

.ramp-figure figcaption {
  margin-top: 10px;
}

.ramp-text {
  font-family: var(--face);
  font-size: 16px;
  font-weight: 700;
  fill: var(--navy);
}

.notice {
  max-width: 46rem;
  padding: 16px 18px 18px;
  background: var(--yellow);
  color: var(--navy);
  border: 3px solid var(--navy);
}

.notice p:last-child {
  margin-bottom: 0;
}

.notice strong {
  font-size: 1.25rem;
}

/* ----- contact ----- */
.error-summary {
  max-width: 34rem;
  margin: 0 0 1.4em;
  padding: 16px 18px;
  border: 5px solid var(--error);
  background: var(--white);
}

.error-summary h3 {
  color: var(--error);
}

.error-summary ul {
  margin: 0;
  padding-left: 1.2em;
}

.error-summary a {
  color: var(--error);
}

.after-button {
  margin-top: 1.2em;
}

.form-status {
  max-width: 34rem;
  margin-top: 1.2em;
  padding: 14px 18px;
  border-left: 10px solid var(--teal);
  background: var(--pale);
  font-weight: 700;
}

.details {
  margin: 0;
}

.details > div {
  padding: 14px 0;
  border-top: 3px solid var(--navy);
}

.details dt {
  font-weight: 700;
}

.details dd {
  margin: 2px 0 0;
  font-size: 1.25rem;
  overflow-wrap: anywhere;
}

/* ----- footer ----- */
.site-footer {
  background: var(--navy);
  color: var(--white);
  border-top: 12px solid var(--yellow);
}

.site-footer__inner {
  width: min(1180px, 100%);
  margin-inline: auto;
  padding: 36px 16px 44px;
  display: grid;
  gap: 32px;
}

.site-footer__inner > * {
  min-width: 0;
}

.site-footer h2 {
  font-size: 1.35rem;
}

.site-footer a {
  color: var(--white);
}

.site-footer a:hover {
  color: var(--yellow);
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
}

.site-footer li a[aria-current="page"] {
  color: var(--yellow);
}

.site-footer dl {
  margin: 0;
}

.site-footer dl > div {
  padding: 10px 0;
  border-top: 2px solid rgba(255, 255, 255, 0.45);
}

.site-footer dt {
  font-weight: 700;
}

.site-footer dd {
  margin: 0;
  overflow-wrap: anywhere;
}

/* ----- medium screens ----- */
@media (min-width: 640px) {
  :root {
    --going: 14px;
  }

  .site-header__inner,
  .flight,
  .site-footer__inner {
    padding-left: 32px;
    padding-right: 32px;
  }

  .tread {
    padding: 36px 36px 40px;
  }

  .split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .areas {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-footer__inner {
    grid-template-columns: 1fr 1fr;
  }

  .site-footer__inner > :first-child {
    grid-column: 1 / -1;
  }
}

/* ----- wide screens: the navigation becomes a rising staircase ----- */
@media (min-width: 1000px) {
  :root {
    --going: 3.2%;
  }

  .site-header {
    padding-top: 12px;
  }

  .site-header__inner {
    flex-wrap: nowrap;
    align-items: flex-end;
  }

  .logo {
    flex: 0 1 auto;
    align-self: center;
    font-size: 1.45rem;
    min-height: 0;
    padding: 12px 0 20px;
  }

  .nav-toggle {
    display: none;
  }

  .stair-nav,
  .js .stair-nav:not(.is-open) {
    display: block;
    flex: 0 1 auto;
    padding-bottom: 0;
  }

  .stair-nav ul {
    display: flex;
    align-items: flex-end;
  }

  .stair-nav li,
  .stair-nav li:nth-child(n) {
    margin: 0 0 0 4px;
  }

  .stair-nav a {
    align-items: flex-start;
    width: 136px;
    padding: 10px 12px;
    font-size: 1.0625rem;
  }

  /* each step is 14px taller than the one before it */
  .stair-nav li:nth-child(1) a { height: 58px; }
  .stair-nav li:nth-child(2) a { height: 72px; }
  .stair-nav li:nth-child(3) a { height: 86px; }
  .stair-nav li:nth-child(4) a { height: 100px; }
  .stair-nav li:nth-child(5) a { height: 114px; }

  .flight {
    padding-top: 44px;
    padding-bottom: 80px;
  }

  .tread {
    margin-bottom: 36px;
    padding: 44px 48px 48px;
  }

  .rise {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    align-items: stretch;
  }

  .rise li:nth-child(1) { padding-top: 96px; }
  .rise li:nth-child(2) { padding-top: 48px; }
  .rise li:nth-child(n) a { margin-left: 0; }
  .rise li + li a { border-left-width: 0; }

  .stairs li:nth-child(2) { margin-left: 5%; }
  .stairs li:nth-child(3) { margin-left: 10%; }
  .stairs li:nth-child(4) { margin-left: 15%; }
  .stairs li { margin-right: 15%; }
  .stairs li:nth-child(2) { margin-right: 10%; }
  .stairs li:nth-child(3) { margin-right: 5%; }
  .stairs li:nth-child(4) { margin-right: 0; }

  .areas {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .site-footer__inner {
    grid-template-columns: 1.2fr 0.8fr 1.4fr;
    gap: 48px;
    padding-top: 52px;
    padding-bottom: 60px;
  }

  .site-footer__inner > :first-child {
    grid-column: auto;
  }
}

/* ----- preferences ----- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

@media (forced-colors: active) {
  .tread,
  .button,
  .stair-nav a,
  .rise a,
  .stairs li {
    border: 3px solid CanvasText;
  }

  :focus-visible {
    outline: 4px solid Highlight;
  }
}
