﻿@font-face {
  font-family: "Inter";
  src:
    local("Inter"),
    local("Inter Variable"),
    url("../fonts/inter/InterVariable.ttf") format("truetype");
}

@font-face {
  font-family: "Inter";
  font-style: italic;
  src:
    local("Inter Italic"),
    local("Inter Variable Italic"),
    url("../fonts/inter/InterVariable-Italic.ttf") format("truetype");
}

@font-face {
  font-family: "Boldonse";
  src:
    local("Boldonse"),
    url("../fonts/Boldonse-Regular.ttf") format("truetype");
}

*,
:after,
:before {
  box-sizing: border-box;
}

* {
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

:root {
  --font-family:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI Variable Display",
    "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans",
    "Droid Sans", "Helvetica Neue", sans-serif;
  line-height: 1.5;
  color-scheme: light;
  /* Colour variables */
  --primary-colour: #204e4a;
  --secondary-colour: #426b43;
  --tertiary-colour: #fff;
  --lighter-colour: #e5f6d3;
  --site-bg-colour: #e2eee5;
  --site-bg: linear-gradient(173deg, #e2eee5 20%, #c6d4bd 77%, #a8c7a9 120%);
  --wordmark-primary-colour: var(--primary-colour);
  --wordmark-secondary-colour: #5c8b6e;
}

html {
  background: var(--site-bg);
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 100%;
}

html,
body {
  min-height: 100%;
  margin: 0;
  padding: 0;
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font-family);
  color: var(--primary-colour);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 1em;
  padding-top: 0;
  gap: 1em;
}

main,
footer {
  max-width: 1750px;
  margin-inline: auto;
}

main {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.site-footer {
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 1em;
}

@media (max-width: 600px) {
  .site-footer {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 0.5rem;
  }
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  text-wrap: balance;
}

p {
  margin-block: 0.25rem;
  text-wrap: pretty;
  max-inline-size: 75ch;
  word-wrap: break-word;
}

.flex-row {
  display: flex;
  flex-direction: row;
  gap: 1em;
  place-items: center;
}

.heading-group {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2em;
}

@media (max-width: 600px) {
  .heading-group {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

.flex-row-small {
  display: flex;
  flex-direction: row;
  gap: 0.5em;
  place-items: center;
}

.flex-column {
  display: flex;
  flex-direction: column;
  gap: 1em;
}

.flex-column-small {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

.space-between {
  place-content: space-between;
}

.flex-start {
  place-items: flex-start;
}

.max-text {
  max-width: 66ch;
}

.half-real {
  opacity: 0.5;
}

.full-width {
  width: 100%;
}

.full-height {
  height: 100%;
}

.center-content {
  place-items: center;
  place-content: center;
  margin-inline: auto;
}

.center-text {
  text-align: center;
}

a {
  color: var(--primary-colour);
}

nav {
  display: flex;
  background-color: var(--site-bg-colour);
  padding: 0.25em 1.5em;
  place-content: space-between;
  place-items: center;
  flex-direction: row;
  z-index: 10;
  gap: 2rem;
  position: sticky;
  top: 0;

  .site-nav-toggle,
  .site-nav-brand,
  .site-nav-toggle-button.site-nav-toggle-button {
    display: none;
  }

  .site-nav-menu {
    display: contents;
  }

  menu {
    display: flex;
    place-items: center;
    padding: 0;
    gap: 2em;
    margin: 0;

    li {
      display: flex;
      list-style: none;
      place-items: center;

      a {
        display: flex;
        text-decoration: none;
        font-weight: 500;
        place-items: center;
        gap: 0.5rem;
        margin: 0;
        padding: 0;
        border-bottom: 3px solid transparent;
        margin-bottom: -4px;
        transition:
          color 0.3s ease,
          border-color 0.3s ease;

        &:hover,
        &.active {
          color: var(--secondary-colour);
          border-bottom-color: var(--secondary-colour);
        }

        &.app-wordmark {
          font-size: 12px;
          border-bottom: 0;
          margin-bottom: 0;
        }

        &.button {
          display: flex;
          place-items: center;
          margin-bottom: 0;
          border-bottom-color: transparent;
        }
      }
    }
  }
}

@media (max-width: 850px) {
  nav.site-nav {
    flex-wrap: wrap;
    width: calc(100% + 2em);
    margin-inline: -1em;
    padding-block: 0.5rem;
    padding-inline: calc(1em + 0.25rem);
    gap: 0.75rem;

    .site-nav-brand {
      display: initial;
    }

    .site-nav-toggle-button {
      display: inline-flex;
      place-items: center;
    }

    .site-nav-brand {
      font-size: 12px;
      text-decoration: none;
    }

    .site-nav-toggle {
      position: absolute;
      inline-size: 1px;
      block-size: 1px;
      opacity: 0;
      pointer-events: none;
    }

    .site-nav-toggle:focus-visible + .site-nav-brand + .site-nav-toggle-button {
      outline: 2px solid var(--secondary-colour);
      outline-offset: 2px;
    }

    .site-nav-menu {
      display: none;
      position: fixed;
      top: 3em;
      right: 1rem;
      left: 1rem;
      margin: auto;
      flex-basis: 100%;
      flex-direction: column;
      gap: 0.25rem;
      padding: 0.5rem;
      border-radius: 0.5rem;
      background-color: var(--tertiary-colour);
      border: 1px solid rgba(32, 78, 74, 0.12);
      box-shadow: 0 0.5rem 2.5rem rgb(32 78 74 / 49%);
    }

    .site-nav-toggle:checked ~ .site-nav-menu {
      display: flex;
    }

    .site-nav-menu > menu:first-child .app-wordmark {
      display: none;
    }

    #logoutForm {
      width: 100%;
    }

    menu {
      width: 100%;
      flex-direction: column;
      place-items: stretch;
      gap: 0.2rem;

      li {
        width: 100%;

        a,
        button {
          width: 100%;
          justify-content: flex-start;
          padding: 0.65rem 0.75rem;
          border-bottom: 0;
          border-radius: 0.5rem;
          margin-bottom: 0;
        }

        .button[data-size="small"] {
          padding: 0.65rem 0.75rem;
        }

        a:hover,
        a.active,
        button:hover,
        button:focus-visible {
          color: var(--tertiary-colour);
          background-color: var(--secondary-colour);
          border-bottom-color: transparent;
        }
      }
    }
  }
}

.wrapper {
  padding: 1rem 1.5rem;
  border-radius: 1em;
  box-shadow: 0px 4px 50px -20px rgba(0, 0, 0, 25%);
}

.wrapper.glass {
  background-color: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.19);
  backdrop-filter: blur(10px);
}

.wrapper.frosted {
  background-color: rgba(255, 255, 255, 0.33);
  border: 1px solid rgba(255, 255, 255, 0.19);
  backdrop-filter: blur(10px);
}

details.accordion > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  list-style: none;
}

details.accordion > summary::-webkit-details-marker {
  display: none;
}

details.accordion > summary h2 {
  margin: 0;
}

details.accordion > summary .fa-caret-down {
  flex: 0 0 auto;
  transition: transform 150ms ease;
}

details.accordion[open] > summary {
  margin-bottom: 1rem;
}

details.accordion[open] > summary .fa-caret-down {
  transform: rotate(180deg);
}

.wrapper.primary {
  background-color: var(--primary-colour);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.19);
  backdrop-filter: blur(10px);
}

.wrapper.secondary {
  background-color: var(--secondary-colour);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.19);
  backdrop-filter: blur(10px);
}

.getting-started {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(16rem, 0.8fr);
  gap: 1.5rem 2rem;
  align-items: start;

  > h2 {
    grid-column: 1 / -1;
    margin: 0;
  }

  .getting-started-image {
    display: block;
    width: 100%;
    height: auto;
  }

  .steps {
    display: grid;
    gap: 0;
    margin: 0;
    counter-reset: getting-started-step;

    .step {
      position: relative;
      padding: 1rem 0 1rem 3.5rem;
      border-top: 1px solid rgba(255, 255, 255, 0.25);
      counter-increment: getting-started-step;
      text-wrap: pretty;

      &:first-child {
        padding-top: 0;
        border-top: 0;

        &::before {
          inset-block-start: 0;
        }
      }

      &::before {
        content: counter(getting-started-step);
        position: absolute;
        inset-block-start: 1rem;
        inset-inline-start: 0;
        display: grid;
        place-items: center;
        width: 2.75rem;
        aspect-ratio: 1;
        border-radius: 50%;
        background-color: var(--lighter-colour);
        color: var(--secondary-colour);
        font-size: 1.25rem;
        font-weight: 700;
        line-height: 1;
      }

      > h3 {
        margin: 0 0 0.4rem;
        font-size: 1.2rem;
        line-height: 1.25;
      }

      > :last-child {
        margin-bottom: 0;
      }
    }
  }

  @media (max-width: 850px) {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem;

    > h2 {
      grid-column: 1;
    }

    .steps {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 0 1.5rem;

      .step:nth-child(2) {
        padding-top: 0;
        border-top: 0;

        &::before {
          inset-block-start: 0;
        }
      }
    }
  }

  @media (max-width: 550px) {
    .steps {
      grid-template-columns: minmax(0, 1fr);

      .step:nth-child(2) {
        padding-top: 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.25);

        &::before {
          inset-block-start: 1rem;
        }
      }
    }
  }
}

.model-selection-accordion {
  .model-selection-content {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(15rem, 0.25fr);
    gap: 2rem;
    align-items: start;
  }

  .model-selection-copy {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
  }

  .model-selection-figure {
    min-width: 0;
    margin: 0;

    img {
      display: block;
      width: 100%;
      height: auto;
    }

    figcaption {
      margin-top: 0.65rem;
      color: var(--primary-colour);
      text-wrap: pretty;
    }
  }

  @media (max-width: 850px) {
    .model-selection-content {
      grid-template-columns: minmax(0, 1fr);
      gap: 1.25rem;
    }

    .model-selection-figure {
      width: min(100%, 32rem);
    }
  }
}

.references-accordion {
  > p {
    max-inline-size: none;
  }
}

.about-calculator-accordion {
  > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;

    > div {
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
      min-width: 0;
    }
  }

  @media (max-width: 750px) {
    > div {
      grid-template-columns: minmax(0, 1fr);
      gap: 1.25rem;
    }
  }
}

.about-accordions {
  width: 100%;
  max-width: 1250px;
  margin-inline: auto;
}

.about-table {
  margin-block: 1rem;

  &.table-fit-content {
    width: fit-content;
    max-width: 100%;

    table {
      width: max-content;
      min-width: 0;
    }
  }

  > b {
    display: block;
    padding: 0.65rem 0.75rem;
    background-color: var(--primary-colour);
    color: #fff;
  }

  &.log-product-table {
    width: min(45rem, 100%);

    table {
      width: 100%;
      min-width: 40rem;
    }
  }

  &.wrap-column-headings {
    table {
      width: 45rem;
      min-width: 45rem;
    }

    thead th {
      white-space: normal;
      text-wrap: balance;
      overflow-wrap: break-word;
      word-break: normal;
    }
  }
}

.wrapper.error {
  background-color: rgba(255, 222, 222, 0.75);
  border: 1px solid rgba(255, 188, 188, 0.25);
  backdrop-filter: blur(10px);
  color: #961b1b;

  & a {
    color: #961b1b;
  }

  .icon {
    color: #ce6d6d;
  }
}

.rounded {
  border-radius: 1em;
}

.tag {
  background-color: #000;
  color: #fff;
  padding: 0.2em 0.75em;
  border-radius: 0.75em 0.2em;
  /* border-radius: 70% 30% 70% 30% / 0% 100% 0% 100%; */
  text-wrap: nowrap;
  width: fit-content;
}

.tag.primary {
  background-color: var(--primary-colour);
}

.tag.secondary {
  background-color: var(--secondary-colour);
}

.tag.light {
  background-color: #fff;
  color: var(--secondary-colour);
}

.badge.badge {
  background-color: rgba(203, 221, 203, 1);
  color: var(--secondary-colour);
  padding: 0.25em 0.5em;
  border-radius: 0.5em;
  opacity: 1; /* Override default heading opacity */
  -webkit-user-select: none; /* Safari */
  user-select: none; /* Non-Safari browsers */

  &:hover {
    background-color: rgb(195, 214, 195);
  }
}

.badge-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
}

.badge-radio-choice {
  display: inline-flex;
  cursor: pointer;
}

.badge-radio-choice input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.badge-radio-choice input[type="radio"]:checked + .badge {
  background-color: var(--secondary-colour);
  color: var(--tertiary-colour);
}

.badge-radio-choice input[type="radio"]:focus-visible + .badge {
  outline: 2px solid var(--secondary-colour);
  outline-offset: 2px;
}

.dropdown {
  display: inline-flex;
}

.dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
}

.dropdown-panel {
  z-index: 20;
  min-width: max-content;
  gap: 0.15rem;
  padding: 0.35rem;
  border-radius: 0.5rem;
  background-color: var(--tertiary-colour);
  border: 1px solid rgba(32, 78, 74, 0.15);
  box-shadow: -1px 4px 12px 1px #5c6e7930;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-0.25rem);
  margin: 0;
  transition:
    opacity 0.15s ease,
    transform 0.15s ease,
    visibility 0.15s ease;
}

.dropdown-panel:popover-open {
  display: flex;
  flex-direction: column;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.preset-dropdown .dropdown-trigger {
  anchor-name: --preset-dropdown;
}

.preset-dropdown .dropdown-panel {
  position-anchor: --preset-dropdown;
  inset: auto;
  top: calc(anchor(bottom) + 0.35rem);
  right: anchor(right);
}

.event-dropdown-anchor .dropdown-panel {
  inset: auto;
  top: auto;
  right: auto;
  bottom: calc(anchor(top) + 0.35rem);
  left: anchor(left);
  transform: none;
}

.event-dropdown-anchor .dropdown-panel:popover-open {
  transform: none;
}
.dropdown-panel > button {
  appearance: none;
  border: none;
  border-radius: 0.35rem;
  background: transparent;
  color: var(--primary-colour);
  font: inherit;
  text-align: left;
  white-space: nowrap;
  padding: 0.45rem 0.65rem;
  cursor: pointer;
}

.dropdown-panel > button:hover,
.dropdown-panel > button:focus-visible {
  color: var(--tertiary-colour);
  background-color: var(--primary-colour);
  outline: none;
}

.modal {
  --modal-background-colour: #f6f6f6;
  background-color: var(--modal-background-colour);
  padding: 1rem 1.5rem;
  border-radius: 1em;
  min-width: 300px;
  max-width: calc(100vw - 2em);
  max-height: 95vh;
  display: flex;
  flex-direction: column;
  place-items: flex-start;
  gap: 1rem;
  box-shadow: 1px 2px 10px 1px #00000059;
  animation: fade-in 0.5s;
}

dialog.modal:not([open]) {
  display: none;
}

dialog {
  border: none;
  z-index: 9999;
}

.modal::backdrop {
  /*    position: absolute;*/
  /*    z-index: 700;*/
  /*    inset: 0;*/
  /*    display: flex;*/
  /*    flex-direction: column;*/
  /*    align-items: center;*/
  /*    place-content: center;*/
  /*    overflow: hidden;*/
  /*    background: #00000036;*/
}

@keyframes fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.breakout {
  width: 95vw;
  margin-left: calc(50% - 47.5vw);
  /*  padding-inline: 1em;*/
}

.italic {
  font-style: italic;
}

.hidden {
  display: none;
}

.table-wrapper {
  overflow: clip;
  border-radius: 0.75em;
  border: 1px solid rgba(255, 255, 255, 0.19);
  box-shadow: 0px 4px 50px -20px rgba(0, 0, 0, 15%);

  &,
  table {
    width: 100%;
  }

  &.scrollable {
    max-height: 50vh;
    overflow-y: auto;
  }

  &.right-align td,
  table .right-align {
    text-align: right;
  }

  table {
    border-collapse: collapse;
    background-color: color-mix(
      in srgb,
      var(--secondary-colour),
      transparent 95%
    );
    color: var(--primary-colour);

    .monospace {
      font-family: "JetBrains Mono", monospace;
    }
  }

  &.sticky-header thead,
  &.sticky-footer tfoot {
    position: sticky;
    position: -webkit-sticky;
    z-index: 2;
    background-color: inherit;
    box-shadow: 1px 2px 10px 1px #0000001c;
  }

  &.sticky-header thead {
    top: 0px;

    th {
      border-radius: 0;
    }
  }

  &.sticky-footer tfoot {
    bottom: 0px;

    td {
      border: none;
    }
  }

  thead th {
    text-wrap: nowrap;
    -webkit-user-select: none; /* Safari */
    user-select: none; /* Non-Safari browsers */
  }

  tbody td,
  tfoot td {
    text-align: left;
    padding: 0.5em 0.75em;
  }

  .no-wrap {
    text-wrap: nowrap;
  }

  .align-with-parentheses {
    padding-right: 5px;
  }

  tbody tr,
  tbody tr:has(td.odd) {
    background-color: rgba(255, 255, 255, 0.66);
  }

  tbody tr:nth-child(even),
  tbody tr:has(td.even) {
    background-color: rgba(235, 235, 235, 0.66);
  }

  &:not(.table-minimal) {
    thead th {
      color: var(--secondary-colour);
    }

    thead th,
    tbody th {
      text-align: left;
      padding: 0.25em 0.5em;

      &.right-align {
        text-align: right;
      }
    }

    tfoot th {
      color: #000000a2;
      text-align: left;
      padding: 0.25em 1em;
    }
  }

  &.table-minimal {
    th {
      text-align: left;
    }

    tr td,
    table tbody tr th {
      border: none;
    }

    tbody tr {
      background-color: transparent;
    }
  }
}

.table-scrollable {
  overflow: auto;
  position: relative;

  thead {
    top: 0px;
    position: sticky;
    position: -webkit-sticky;
    z-index: 2;
    transition: box-shadow 0.1s;

    &.scrolled {
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
    }
  }

  table {
    thead {
      th {
        min-width: fit-content;
      }

      &.scrolled th {
        border-radius: 0;
        background-color: #e9e9e9;
      }
    }
  }

  tfoot {
    font-weight: bold;
    bottom: 0px;
    position: sticky;
    position: -webkit-sticky;
    width: 100%;
    z-index: 2;
    background-color: #e9e9e9;
    padding: 10px;
    transition: box-shadow 0.1s;

    &.scrolled {
      box-shadow: 0 -2px 7px rgba(0, 0, 0, 0.15);
    }
  }
}

.homepage {
  display: flex;
  flex-direction: column;
  gap: 7.5em;
}

.splash {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.5fr) minmax(0, 1fr);
  align-items: center;

  .splash-wrapper {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 5em 3em;
    gap: 7.5cqi;
    grid-row: 1;
    z-index: 5;
    grid-column: 1 / span 2;
    container-type: inline-size;

    .flex-column {
      flex: 1 1 0;
      min-width: 0;
      width: 100%;
    }

    .app-wordmark {
      flex-basis: 22rem;
      font-size: clamp(3em, 6.5cqi, 80px);
      /* line-height: 1.08; */
    }

    .flex-column {
      flex-basis: 12rem;
      justify-content: center;
      font-size: 1.5em;
    }
  }

  .image-stack {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-template-rows: repeat(12, minmax(0, 1fr));
    grid-column: 2 / span 2;
    grid-row: 1;
    position: relative;
    height: clamp(22rem, 38vw, 50rem);

    > div {
      overflow: hidden;
      border-radius: 1em;
      box-shadow: 0px 4px 50px -20px rgba(0, 0, 0, 25%);
    }

    > div:first-child {
      grid-column: 1 / span 10;
      grid-row: 1 / span 9;
      z-index: 1;
    }

    > div:last-child {
      grid-column: 5 / span 10;
      grid-row: 2 / span 10;
      z-index: 2;
    }

    img {
      display: block;
      width: 100%;
      height: 100%;
      object-fit: cover;
    }
  }
}

@media (max-width: 950px) {
  .splash {
    grid-template-columns: 1fr;

    .splash-wrapper {
      padding: 3em 3em;
      grid-column: 1;
      margin-right: 0;
      flex-direction: column;

      & > .app-wordmark {
        flex-basis: 100%;
      }
    }

    .image-stack {
      grid-column: 1;
      grid-row: 2;
      margin-top: -3em;
      padding: 1em;
      /* height: clamp(22rem, 86vw, 32rem); */
    }
  }
}

.logo-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: clamp(2em, 5vw, 10em);
  place-items: center;
}

.app-wordmark {
  display: inline;
  font-family: Boldonse;
  font-size: 4em;

  .primary {
    color: var(--wordmark-primary-colour);
  }

  .secondary {
    color: var(--wordmark-secondary-colour);
  }

  &.two-lines {
    display: flex;
    flex-direction: column;
  }
}

.homepage-section {
  display: flex;
  gap: 1em;
  place-items: center;
  place-content: space-between;

  img {
    max-width: 33em;
    scale: 0.9;
    transform: rotate(3deg);
    margin-block: 1em;
    box-shadow: 0px 4px 50px -20px rgba(0, 0, 0, 25%);
  }

  &.img-left {
    place-content: flex-start;

    img {
      transform: rotate(355deg);
    }
  }

  .text-content {
    font-size: 1.25em;

    h1 {
      margin-bottom: 1em;
      line-height: 1.2em;
    }

    h2 {
      color: var(--lighter-colour);

      a {
        color: var(--lighter-colour);
      }

      &:not(:last-child) {
        margin-bottom: 1em;
      }
    }
  }
}

@media (min-width: 851px) {
  .homepage-section.img-right {
    padding-left: 3rem;
  }

  .homepage-section.img-left {
    padding-right: 3rem;
  }
}

@media (max-width: 850px) {
  .homepage-section {
    flex-direction: column-reverse;

    .text-content {
      font-size: 1em;
    }

    &.img-left {
      flex-direction: column;
    }

    img,
    &.img-left img {
      /* transform: none; */
      scale: 1;
      margin-bottom: 0;
      max-width: 100%;
    }
  }
}

.all-form-errors ul {
  margin: 0;
}

.image-form-wrapper {
  display: grid;
  gap: 5vw;
  flex-grow: 1;

  > * {
    min-width: 0;
  }

  .login-form {
    place-self: center;
  }

  .image-form-frame {
    display: flex;
    overflow: hidden;
  }

  .image-form-frame > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    box-shadow: 0px 4px 50px -20px rgba(0, 0, 0, 25%);
  }

  &.image-left {
    grid-template-columns: auto auto;
  }
  &.image-right {
    grid-template-columns: auto 1fr;
  }
}

@media (max-width: 850px) {
  .image-form-wrapper {
    gap: 1.5rem;
    flex-grow: 0;

    &.image-left,
    &.image-right {
      grid-template-columns: minmax(0, 1fr);
    }

    > :not(.image-form-frame),
    .login-form {
      grid-row: 2;
      width: 100%;
      place-self: stretch;
    }

    .image-form-frame {
      grid-row: 1;
      width: 100%;
      max-height: 14rem;
    }

    .image-form-frame > img {
      height: auto;
    }
  }
}

@media (max-width: 600px) {
  .image-form-wrapper {
    gap: 1rem;
  }
}

.center-content {
  place-items: center;
  place-content: center;
  margin-inline: auto;
}

.center-text {
  text-align: center;
}

.content-shell {
  min-width: 500px;
  min-height: 300px;
  margin: auto;
}

@media (max-width: 600px) {
  .content-shell {
    width: 100%;
    min-width: 0;
    min-height: 0;
  }
}

.toast {
  padding: 0.5rem 1rem;
  &.success {
    background: #3d8f3d;
    color: #fff;
  }
}

.validation-summary ul {
  margin: 0;
}

.contact-page {
  min-height: 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 1em;
  flex-grow: 1;
  min-height: 0;

  > *,
  .stack {
    min-width: 0;
  }

  img {
    max-width: 100%;
    height: auto;
  }

  .stack {
    display: grid;
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: inherit;
    min-height: 0;
  }

  .postal-address.postal-address {
    padding: 1em !important;
    display: inline-flex;
    flex-direction: row;
    width: 100%;
    font-weight: 600;
    border-color: color-mix(in srgb, var(--secondary-colour), white 50%);
  }
}

.contact-banner {
  object-position: left center;
}

@media (max-width: 950px) {
  .contact-banner {
    object-fit: cover;
    height: clamp(4rem, 12vh, 7rem);
    flex-basis: clamp(4rem, 12vh, 7rem);
  }

  .contact-grid {
    grid-template-columns: 1fr;
    flex: none;
    min-height: auto;

    .stack {
      grid-template-rows: none;
      grid-auto-rows: auto;
    }
  }
}
