/* Connections — property enquiry form. Tokens follow connectionscy.com. */

/* The website's own fonts: the same rules as in its pages, so the files are shared with them
   (and often already cached) and nothing loads from another site. */

@font-face {
  font-family: "Newsreader Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(/_astro/newsreader-vietnamese-opsz-normal.BjhtXyW2.woff2) format("woff2-variations");
  unicode-range: U+102-103, U+110-111, U+128-129, U+168-169, U+1A0-1A1, U+1AF-1B0, U+300-301, U+303-304, U+308-309, U+323, U+329, U+1EA0-1EF9, U+20AB;
}

@font-face {
  font-family: "Newsreader Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(/_astro/newsreader-latin-ext-opsz-normal.BQn1nviT.woff2) format("woff2-variations");
  unicode-range: U+100-2BA, U+2BD-2C5, U+2C7-2CC, U+2CE-2D7, U+2DD-2FF, U+304, U+308, U+329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Newsreader Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(/_astro/newsreader-latin-opsz-normal.s-izfB6B.woff2) format("woff2-variations");
  unicode-range: U+??, U+131, U+152-153, U+2BB-2BC, U+2C6, U+2DA, U+2DC, U+304, U+308, U+329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Newsreader Variable";
  font-style: italic;
  font-display: swap;
  font-weight: 200 800;
  src: url(/_astro/newsreader-vietnamese-opsz-italic.DTr-ymY4.woff2) format("woff2-variations");
  unicode-range: U+102-103, U+110-111, U+128-129, U+168-169, U+1A0-1A1, U+1AF-1B0, U+300-301, U+303-304, U+308-309, U+323, U+329, U+1EA0-1EF9, U+20AB;
}

@font-face {
  font-family: "Newsreader Variable";
  font-style: italic;
  font-display: swap;
  font-weight: 200 800;
  src: url(/_astro/newsreader-latin-ext-opsz-italic.CSPGnFdO.woff2) format("woff2-variations");
  unicode-range: U+100-2BA, U+2BD-2C5, U+2C7-2CC, U+2CE-2D7, U+2DD-2FF, U+304, U+308, U+329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Newsreader Variable";
  font-style: italic;
  font-display: swap;
  font-weight: 200 800;
  src: url(/_astro/newsreader-latin-opsz-italic.kJKFiXvB.woff2) format("woff2-variations");
  unicode-range: U+??, U+131, U+152-153, U+2BB-2BC, U+2C6, U+2DA, U+2DC, U+304, U+308, U+329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Instrument Sans Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 400 700;
  src: url(/_astro/instrument-sans-latin-ext-wght-normal.B5bTHO_g.woff2) format("woff2-variations");
  unicode-range: U+100-2BA, U+2BD-2C5, U+2C7-2CC, U+2CE-2D7, U+2DD-2FF, U+304, U+308, U+329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Instrument Sans Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 400 700;
  src: url(/_astro/instrument-sans-latin-wght-normal.BbzFLZTg.woff2) format("woff2-variations");
  unicode-range: U+??, U+131, U+152-153, U+2BB-2BC, U+2C6, U+2DA, U+2DC, U+304, U+308, U+329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Newsreader Subset";
  font-style: normal;
  font-weight: 300 450;
  font-display: swap;
  src: url(/_astro/newsreader-subset-normal.DhMjqE1a.woff2) format("woff2-variations");
  unicode-range: U+20-7E, U+A0, U+A3, U+A9, U+AB, U+B7, U+BB, U+E9, U+2010-2015, U+2018-201D, U+2026, U+20AC;
}

@font-face {
  font-family: "Newsreader Subset";
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url(/_astro/newsreader-subset-italic.DcPULetW.woff2) format("woff2-variations");
  unicode-range: U+20-7E, U+A0, U+A3, U+A9, U+AB, U+B7, U+BB, U+E9, U+2010-2015, U+2018-201D, U+2026, U+20AC;
}

:root {
  --c-ivory: #f6f1eb;
  --c-limestone: #ede6da;
  --c-sandstone: #c7ac92;
  --c-navy: #041f31;
  --c-navy-raised: #0f3147;
  --c-olive: #565e47;
  --c-bronze: #b08453;
  --c-bronze-deep: #7d5a2e;
  --c-teal-deep: #2c6a7a;
  --c-bg: var(--c-ivory);
  --c-text: var(--c-navy);
  --c-text-soft: #43505f;
  --c-line: #041f3124;
  --c-line-strong: #041f3152;
  --c-field: #fffdf9;
  /* The edge is all that shows where a field or an unticked box is, so it keeps 3:1 contrast. */
  --c-field-border: #041f318c;
  --c-error: #9b2f22;
  --c-focus: var(--c-teal-deep);

  /* The site's stacks: the subset is a smaller file with the common characters, and the full
     font fills in the rest. */
  --font-display: "Newsreader Subset", "Newsreader Variable", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-text: "Instrument Sans Variable", "Helvetica Neue", Arial, system-ui, sans-serif;

  --text-xs: .8125rem;
  --text-sm: .9375rem;
  --text-base: 1.0625rem;
  --text-lead: clamp(1.125rem, 1.05rem + .35vw, 1.3125rem);
  --text-h3: clamp(1.375rem, 1.25rem + .6vw, 1.75rem);
  --text-h2: clamp(2rem, 1.35rem + 2.7vw, 3.25rem);
  --text-h1: clamp(2.625rem, 1.6rem + 3.6vw, 4.25rem);

  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;

  --container: 80rem;
  --gutter: clamp(1.25rem, .5rem + 3.5vw, 3rem);
  --grid-gap: clamp(1.25rem, .75rem + 1.6vw, 2.5rem);
  --header-h: 4.5rem;
  --radius: 2px;
  --ease: cubic-bezier(.2, .6, .2, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1.5rem);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* A column, so the footer stays at the bottom of the screen when a step or the thank-you is short. */
body {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-text);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

h1, h2, h3, p, ol, fieldset, legend, address { margin: 0; padding: 0; }
fieldset { border: 0; min-width: 0; }
address { font-style: normal; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

::selection { background: var(--c-sandstone); color: var(--c-navy); }

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

.container {
  width: 100%;
  max-width: var(--container);
  padding-inline: var(--gutter);
  margin-inline: auto;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: .75rem;
  left: .75rem;
  z-index: 100;
  padding: .75rem 1rem;
  border-radius: var(--radius);
  background: var(--c-navy);
  color: var(--c-ivory);
  font-size: var(--text-sm);
  text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

.text-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--c-bronze);
  text-decoration-thickness: 1px;
  text-underline-offset: .3em;
  transition: text-decoration-color .2s var(--ease);
}
.text-link:hover { text-decoration-color: currentColor; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--c-ivory);
  border-bottom: 1px solid var(--c-line);
}

/* Reading progress, as on the main site. */
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .site-header::after {
      content: "";
      position: absolute;
      left: 0;
      bottom: -1px;
      width: 100%;
      height: 2px;
      background: var(--c-bronze);
      transform-origin: 0;
      transform: scaleX(0);
      animation: progress linear both;
      animation-timeline: scroll(root);
    }
  }
}

@keyframes progress { to { transform: scaleX(1); } }

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  min-height: var(--header-h);
}

.logo {
  --logo-left: #5c8b94;
  --logo-right: var(--c-bronze);
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  color: var(--c-navy);
  text-decoration: none;
  white-space: nowrap;
}
.logo__mark { flex: none; width: auto; height: 1.75rem; aspect-ratio: 1.992; }
.logo__left { fill: var(--logo-left); }
.logo__right { fill: var(--logo-right); }
.logo__name {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.site-header__back {
  color: var(--c-navy);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 1px solid var(--c-line-strong);
  padding-block: .125rem;
  transition: border-color .2s var(--ease);
}
.site-header__back:hover { border-bottom-color: var(--c-navy); }

@media (width < 24rem) {
  .logo__name { display: none; }
}

/* ---------- Page layout ---------- */

.page {
  flex: 1 0 auto;
  display: grid;
  align-content: start;
  gap: var(--space-6);
  padding-block: clamp(2.5rem, 7vw, 5rem) clamp(4rem, 3rem + 6vw, 8rem);
}

@media (width >= 60rem) {
  .page {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--grid-gap);
  }
  .intro { grid-column: 1 / span 4; }
  .content { grid-column: 6 / span 7; }
}

/* ---------- Intro column ---------- */

.display {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: var(--text-h1);
  font-weight: 320;
  letter-spacing: -.022em;
  line-height: 1.02;
  text-wrap: balance;
}

.lead {
  font-size: var(--text-lead);
  line-height: 1.55;
  color: var(--c-text-soft);
  text-wrap: pretty;
}

.intro__lead { margin-top: var(--space-5); max-width: 28rem; }

/* ---------- Step list ---------- */

.steps { list-style: none; }

/* Phones: a bar per step just above the form. The step names stay in the page for screen
   readers; the heading of the step itself names it on screen. */
@media (width < 60rem) {
  .steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .375rem;
    margin-top: var(--space-6);
  }
  .steps li {
    height: 3px;
    overflow: hidden;
    color: transparent;
    background: var(--c-line-strong);
    transition: background-color .3s var(--ease);
  }
  .steps li.is-done,
  .steps li[aria-current="step"] { background: var(--c-bronze); }

  /* Continue brings the form to the top of the screen; keep the bars above it in view. */
  .enquiry { scroll-margin-top: calc(var(--space-6) + 3px); }
}

/* Desktop: the list follows the visitor down the side column. */
@media (width >= 60rem) {
  .steps {
    position: sticky;
    top: calc(var(--header-h) + 2.5rem);
    margin-top: var(--space-7);
    border-left: 1px solid var(--c-line);
  }
  .steps li {
    display: flex;
    align-items: baseline;
    gap: .875rem;
    margin-left: -1px;
    padding: .5rem 0 .5rem 1.125rem;
    border-left: 2px solid transparent;
    color: var(--c-text-soft);
    font-size: var(--text-sm);
    transition: color .2s var(--ease), border-color .2s var(--ease);
  }
  .steps li.is-done { color: var(--c-text); }
  .steps li[aria-current="step"] {
    color: var(--c-text);
    border-left-color: var(--c-bronze);
    font-weight: 500;
  }
}

.steps__num {
  min-width: 1ch;
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-style: italic;
  color: var(--c-bronze-deep);
}

/* After sending, the thank-you message replaces the instructions. */
.is-sent .intro__lead,
.is-sent .steps { display: none; }

/* ---------- Steps ---------- */

.step__title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: .75rem;
  margin-bottom: var(--space-6);
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: var(--text-h3);
  font-weight: 400;
  letter-spacing: -.008em;
  line-height: 1.2;
}
.step__title:has(+ .step__note) { margin-bottom: var(--space-3); }

/* Focus lands on the heading at each new step, for screen readers; it needs no ring. */
.step__title:focus { outline: none; }

.step__num {
  font-style: italic;
  font-weight: 300;
  color: var(--c-bronze-deep);
}

.step__note {
  margin-bottom: var(--space-6);
  font-size: var(--text-sm);
  color: var(--c-text-soft);
}

/* Step 2 groups. A rule separates each group on show from the one above it. */
.group:not([hidden]) ~ .group:not([hidden]) {
  margin-top: var(--space-7);
  padding-top: var(--space-7);
  border-top: 1px solid var(--c-line);
}

.group__title {
  margin-bottom: var(--space-5);
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.3;
}

/* ---------- Questions ---------- */

.questions {
  display: grid;
  gap: var(--space-6);
}

.field {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

label,
.question legend {
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1.45;
}

.question legend { margin-bottom: .5rem; }
.question legend + .field__help { margin-top: -.25rem; margin-bottom: .5rem; }
.question .field__error { margin-top: .5rem; }

.field__req {
  margin-left: .25rem;
  font-size: var(--text-xs);
  font-weight: 400;
  color: var(--c-text-soft);
}

.field__help {
  font-size: var(--text-xs);
  line-height: 1.5;
  color: var(--c-text-soft);
}

input:not([type="radio"], [type="checkbox"]),
select,
textarea {
  width: 100%;
  min-height: 3.25rem;
  padding: .8125rem 1rem;
  border: 1px solid var(--c-field-border);
  border-radius: var(--radius);
  background-color: var(--c-field);
  font-size: 1rem;
  line-height: 1.5;
  transition: border-color .2s var(--ease);
}

textarea { min-height: 8.5rem; resize: vertical; }

/* As on connectionscy.com: the native control with its own chevron. */
select {
  appearance: none;
  padding-right: 2.75rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23041f31' stroke-width='1.5'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E");
  background-position: right 1rem center;
  background-repeat: no-repeat;
  cursor: pointer;
}

/* Until something is chosen, the placeholder reads as a hint. */
select:has(option[value=""]:checked) { color: var(--c-text-soft); }
select option { color: var(--c-text); }

input:not([type="radio"], [type="checkbox"]):hover,
select:hover,
textarea:hover { border-color: var(--c-navy); }

input:not([type="radio"], [type="checkbox"]):focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline-offset: 1px;
  border-color: var(--c-navy);
}

[aria-invalid="true"] { border-color: var(--c-error) !important; }

.field__error {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--c-error);
}
.field__error:empty { display: none; }

/* Choice options: native inputs, restyled, inside a full-width hit area. */

.options {
  display: grid;
  gap: .5rem;
}

/* Short answers sit two to a row even on phones. */
.options--short,
.options--yes-no { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.options--yes-no { max-width: 20rem; }

@media (width >= 36rem) {
  .options--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .options--3,
  .options--short { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.option {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-height: 3.25rem;
  padding: .75rem 1rem;
  border: 1px solid var(--c-field-border);
  border-radius: var(--radius);
  background: var(--c-field);
  font-weight: 400;
  line-height: 1.35;
  cursor: pointer;
  transition: border-color .2s var(--ease), background-color .2s var(--ease), box-shadow .2s var(--ease);
}
.option:hover { border-color: var(--c-navy); }

.option:has(input:checked) {
  border-color: var(--c-navy);
  background: var(--c-limestone);
  box-shadow: inset 0 0 0 1px var(--c-navy);
}

.option:has(input[aria-invalid="true"]) { border-color: var(--c-error); }

.option:has(input:focus-visible) {
  outline: 2px solid var(--c-focus);
  outline-offset: 2px;
}

.option input {
  appearance: none;
  flex: none;
  display: grid;
  place-content: center;
  width: 1.125rem;
  height: 1.125rem;
  margin: 0;
  border: 1px solid var(--c-field-border);
  background: var(--c-field);
  cursor: pointer;
}
.option input:focus-visible { outline: none; }

.option input[type="radio"] { border-radius: 50%; }
.option input[type="checkbox"] { border-radius: var(--radius); }

.option input:checked {
  border-color: var(--c-navy);
  background: var(--c-navy);
}

.option input[type="radio"]:checked { box-shadow: inset 0 0 0 3px var(--c-field); }

.option input[type="checkbox"]:checked {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10' fill='none' stroke='%23f6f1eb' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m1.5 5.2 3 3 6-6.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: .75rem;
}

/* A sentence to tick, such as the consent: the box lines up with its first line. */
.option--long { align-items: flex-start; }
.option--long input { margin-top: .0625rem; }

.agreements {
  display: grid;
  gap: .75rem;
}

@media (prefers-reduced-motion: no-preference) {
  .reveal:not([hidden]) { animation: reveal .35s var(--ease); }
}

@keyframes reveal {
  from { opacity: 0; transform: translateY(-.375rem); }
}

/* Off-screen field that only bots fill in. */
.enquiry__trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Without JavaScript the buttons stay hidden, and this note opens the form instead. */
.enquiry__noscript {
  margin-bottom: var(--space-6);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--c-error);
}

.enquiry__footer {
  margin-top: var(--space-7);
  padding-top: var(--space-6);
  border-top: 1px solid var(--c-line);
}

.enquiry__nav {
  display: flex;
  gap: .75rem;
}

/* Continue and Send stay on the right, so they don't move between steps; Back sits left. */
.enquiry__nav [type="submit"] { margin-left: auto; }

@media (width <= 30rem) {
  .enquiry__nav [type="submit"] { flex: 1 1 auto; }
}

.enquiry__status {
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  color: var(--c-text-soft);
}
/* Kept in the page while empty: screen readers only announce a live region they already know. */
.enquiry__status:empty { margin-top: 0; }
.enquiry__status[data-state="error"] { color: var(--c-error); font-weight: 500; }
/* Focus lands here after a failed send, for screen readers and the keyboard; it needs no ring. */
.enquiry__status:focus { outline: none; }

/* ---------- Buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: .875rem 1.75rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-text);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: .01em;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}

.button--primary { background: var(--c-navy); color: var(--c-ivory); }
.button--primary:hover { background: var(--c-navy-raised); }
.button--secondary { border-color: var(--c-line-strong); color: var(--c-navy); background: transparent; }
.button--secondary:hover { border-color: var(--c-navy); }
.button[disabled] { opacity: .6; cursor: progress; }

/* ---------- Thank you ---------- */

.thanks {
  display: grid;
  justify-items: start;
  gap: var(--space-5);
  padding-block: var(--space-5) var(--space-7);
}

.thanks:focus { outline: none; }

.h2 {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: var(--text-h2);
  font-weight: 350;
  letter-spacing: -.015em;
  line-height: 1.08;
  text-wrap: balance;
}

.thanks .lead { max-width: 34rem; }

.thanks__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: var(--space-4);
}

@media (width <= 30rem) {
  .thanks__actions { justify-self: stretch; }
  .thanks__actions .button { flex: 1 1 100%; }
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--c-navy);
  color: var(--c-ivory);
  font-size: var(--text-sm);
  --c-focus: var(--c-sandstone);
}

.site-footer__inner {
  display: grid;
  gap: var(--space-4) var(--grid-gap);
  padding-block: var(--space-7);
}

@media (width >= 48rem) {
  .site-footer__inner { grid-template-columns: repeat(3, minmax(0, auto)); justify-content: space-between; }
}

.site-footer__name { font-weight: 500; }
.site-footer address,
.site-footer p:not(.site-footer__name) { color: #f6f1ebbd; }
.site-footer a { color: inherit; text-decoration-color: #f6f1eb52; text-underline-offset: .2em; }
.site-footer a:hover { color: var(--c-ivory); text-decoration-color: var(--c-ivory); }

/* ---------- Windows contrast themes ---------- */

/* Forced colours drop the backgrounds and shadows that the custom radios, checkboxes and
   phone step bars show their state with, so these are drawn in system colours instead. */
@media (forced-colors: active) {
  .option input {
    forced-color-adjust: none;
    border-color: CanvasText;
    background-color: Canvas;
  }
  /* The error border is set with !important elsewhere, in a red that dark themes hide. */
  .option input[aria-invalid="true"] { border-color: CanvasText !important; }
  .option input:checked {
    border-color: Highlight;
    background-color: Highlight;
  }
  .option input[type="radio"]:checked { box-shadow: inset 0 0 0 3px Canvas; }
  /* The tick image is ivory in every theme; as a mask, it takes the theme's colour. */
  .option input[type="checkbox"]:checked { background-image: none; }
  .option input[type="checkbox"]:checked::before {
    content: "";
    width: .75rem;
    height: .625rem;
    background-color: HighlightText;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m1.5 5.2 3 3 6-6.4'/%3E%3C/svg%3E") center / contain no-repeat;
  }
  .option:has(input:checked) { border-color: Highlight; }

  :focus-visible,
  .option:has(input:focus-visible) { outline-color: Highlight; }

  /* The side list's transparent marks turn CanvasText, so the current step needs its own colour. */
  .steps li[aria-current="step"] { border-left-color: Highlight; }
}

@media (forced-colors: active) and (width < 60rem) {
  .steps li {
    forced-color-adjust: none;
    background: GrayText;
  }
  .steps li.is-done,
  .steps li[aria-current="step"] { background: Highlight; }
}
