:where(.contact) {
  --red: #d73c3c;
  --_critical: var(--red);
  --_color: light-dark(var(--color-16), var(--color-1));
  --_color-contrast: light-dark(var(--color-1), var(--color-16));
  --_filled-hover-bg-color: oklch(from var(--primary) calc(l - .1) c h);
  --_border-color: light-dark(var(--color-7), var(--color-10));
  --_query-color: light-dark(var(--color-4), var(--color-12));
  color: var(--text-primary);
  font-size: var(--size-4);
  font-family: var(--ff-base, inherit);
  max-inline-size: 700px;
  border-radius: 1rem;
  width: 100%;
  margin: 0 auto;
  padding: 2rem;
  line-height: 1.6;
  container-type: inline-size;
}

:where(.contact) h1 {
  margin-block: 0;
}

:where(.contact) h2 {
  margin-block: 0;
}

:where(.contact) p {
  margin-block: 0;
}

:where(.contact) input {
  background-color: var(--surface-default);
}

:where(.contact) button {
  background-color: var(--surface-default);
}

:where(.contact) textarea {
  background-color: var(--surface-default);
}

:where(.contact) :where(form.contact-form) {
  gap: var(--size-3);
  display: grid;
}

@container (inline-size > 500px) {
  :where(.contact) :where(form.contact-form) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

:where(.contact) :where(form.contact-form) fieldset {
  gap: var(--size-1) var(--size-3);
  grid-template-columns: inherit;
  border: 0;
  padding: 0;
  display: grid;
}

:where(.contact) :where(form.contact-form) fieldset .error-message {
  grid-column: 1 / -1;
}

:where(.contact) :where(form.contact-form) textarea {
  box-sizing: content-box;
  resize: none;
  field-sizing: content;
  min-block-size: 3lh;
}

:where(.contact) :where(form.contact-form) .form-group {
  grid-auto-rows: min-content;
  display: grid;
}

:where(.contact) :where(form.contact-form) fieldset:has([required]) legend {
  gap: var(--size-2);
  display: flex;
}

:where(.contact) :where(form.contact-form) fieldset:has([required]) legend:after {
  content: "*";
  color: var(--text-muted, #71717a);
}

:where(.contact) :where(form.contact-form) .form-group:has(:not([type="radio"])[required]) label {
  gap: var(--size-2);
  display: flex;
}

:where(.contact) :where(form.contact-form) .form-group:has(:not([type="radio"])[required]) label:after {
  content: "*";
  color: var(--text-muted, #71717a);
}

:where(.contact) :where(form.contact-form) input {
  border: 1px solid var(--_border-color);
  border-radius: .5rem;
  padding: .5em .75em;
}

:where(.contact) :where(form.contact-form) input:focus-visible {
  outline-color: var(--primary);
}

:where(.contact) :where(form.contact-form) textarea {
  border: 1px solid var(--_border-color);
  border-radius: .5rem;
  padding: .5em .75em;
}

:where(.contact) :where(form.contact-form) textarea:focus-visible {
  outline-color: var(--primary);
}

:where(.contact) :where(form.contact-form) .form-group:has(input[type="radio"]) {
  border: 1px solid var(--_border-color);
  border-radius: .5rem;
  padding: .5em .75em;
}

:where(.contact) :where(form.contact-form) .form-group:has(input[type="radio"]):focus-visible {
  outline-color: var(--primary);
}

:where(.contact) :where(form.contact-form) [type="radio"] {
  width: var(--size-3);
  height: var(--size-3);
  flex-shrink: 0;
  margin: 0;
}

:where(.contact) :where(form.contact-form) [type="checkbox"] {
  width: var(--size-3);
  height: var(--size-3);
  flex-shrink: 0;
  margin: 0;
}

:where(.contact) :where(form.contact-form) .form-group:has([type="radio"], [type="checkbox"]) {
  gap: var(--size-2);
  align-items: center;
  display: flex;
}

:where(.contact) :where(form.contact-form) .form-group:has(input[type="radio"]) {
  border: 1px solid var(--_border-color);
  gap: var(--size-2);
  border-radius: .5rem;
  align-items: center;
  padding: .5em .75em;
  display: flex;
  position: relative;
}

:where(.contact) :where(form.contact-form) .form-group:has(input[type="radio"]) label:after {
  content: "";
  cursor: pointer;
  position: absolute;
  inset: 0;
}

:where(.contact) :where(form.contact-form) .form-group:has([type="radio"]:checked) {
  background: var(--_query-color);
  color: contrast-color(var(--_query-color));
  border-color: var(--_border-color);
}

:where(.contact) :where(form.contact-form) button {
  background: var(--primary);
  color: var(--primary-contrast);
  border-radius: var(--radius-2);
  border: 0;
  padding: .75em 1.5em;
}

:where(.contact) :where(form.contact-form) button:hover {
  background: var(--_filled-hover-bg-color);
}

:where(.contact) :where(form.contact-form) button:focus-visible {
  background: var(--_filled-hover-bg-color);
}

:where(.contact) :where(form.contact-form) .error-message {
  color: var(--_critical);
  font-size: var(--size-3);
  display: none;
}

:where(.contact) :where(form.contact-form) fieldset:has([type="radio"][required]):has(:user-invalid) .error-message {
  display: block;
}

:where(.contact) :where(form.contact-form) .form-group:has([required]):has(:user-invalid) .error-message {
  display: block;
}

:where(.contact) :where(form.contact-form) input:user-invalid {
  border-color: var(--red);
}

:where(.contact) :where(form.contact-form) textarea:user-invalid {
  border-color: var(--red);
}

:where(.contact) :where(form.contact-form) .form-group:has([type="checkbox"]) {
  gap: .25rem var(--size-2);
  grid-template-columns: auto 1fr;
  align-items: start;
  display: grid;
}

:where(.contact) :where(form.contact-form) .form-group:has([type="checkbox"]) > input {
  grid-area: 1 / 1;
  margin-top: .25rem;
}

:where(.contact) :where(form.contact-form) .form-group:has([type="checkbox"]) > label {
  grid-area: 1 / 2;
}

:where(.contact) :where(form.contact-form) .form-group:has([type="checkbox"]) .error-message {
  grid-area: 2 / 1 / auto / -1;
}

:where(.contact) :where(form.contact-form) .span-all {
  grid-column: 1 / -1;
}

:where(.theme-toggle) {
  cursor: pointer;
  padding: var(--size-2);
  border-radius: var(--radius-round);
  color: var(--_accent-contrast, var(--gray-0));
  --_hover-color: #ffffff1a;
  background: none;
  border: none;
  justify-content: center;
  align-items: center;
  transition: background-color .2s;
  display: flex;
}

:where(.theme-toggle):hover {
  background-color: var(--_hover-color);
}

.contrast-icon {
  fill: url("#split-gradient");
  stroke: currentColor;
  stroke-width: 2px;
  transform-origin: center;
  transition: transform .5s var(--ease-elastic-out-3);
}

[data-theme="dark"] .contrast-icon {
  transform: rotate(180deg);
}

:where(.navigation-lane) {
  width: 100%;
  padding-inline: var(--size-fluid-3);
  min-height: var(--size-6);
  align-items: center;
  display: flex;
  position: relative;
}

.global-lane {
  background-color: light-dark(var(--primary), var(--surface-filled));
  color: light-dark(var(--primary-contrast), var(--text-primary));
  box-shadow: var(--shadow-2);
  z-index: var(--layer-3);
  justify-content: center;
}

.global-lane .nav-links {
  justify-content: flex-start;
  width: 100%;
  display: flex;
}

.global-lane .menu-toggle-btn {
  left: var(--size-fluid-3);
  z-index: var(--layer-4);
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.global-lane .theme-toggle {
  right: var(--size-fluid-3);
  z-index: var(--layer-4);
  color: inherit;
  --_hover-color: light-dark(#ffffff26, #ffffff0d);
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.context-lane {
  background-color: light-dark(var(--color-4), var(--color-13));
  color: var(--text-primary);
  border-block-end: 1px solid var(--border-dim);
  z-index: var(--layer-2);
  padding-inline: var(--size-fluid-3);
  justify-content: flex-start;
}

.context-lane .nav-links {
  justify-content: flex-start;
  gap: 0;
  width: auto;
  display: flex;
}

.context-lane .nav-links a {
  font-size: var(--font-size-1);
  font-weight: var(--font-weight-4);
  color: var(--text-primary);
  padding-block: var(--size-2);
  padding-inline: var(--size-3);
  border-bottom: 2px solid #0000;
  align-items: center;
  text-decoration: none;
  display: inline-flex;
  position: relative;
}

.context-lane .nav-links a.overview-link {
  font-weight: var(--font-weight-6);
  margin-inline-end: 0;
  padding-inline-start: 0;
  padding-inline-end: var(--size-3);
}

.context-lane .nav-links a:not(:last-child):after {
  content: "";
  background-color: var(--color-9);
  opacity: .8;
  width: 1px;
  height: 50%;
  position: absolute;
  top: 25%;
  right: 0;
}

.context-lane .nav-links a.active {
  color: var(--primary);
  font-weight: var(--font-weight-6);
  text-underline-offset: .5rem;
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.context-lane .nav-links a:hover {
  opacity: .8;
}

.menu-button {
  cursor: pointer;
  padding: var(--size-2);
  color: inherit;
  background: none;
  border: none;
}

.nav-links {
  gap: var(--size-5);
  flex-direction: row;
  display: flex;
}

.nav-links a {
  color: inherit;
  padding-block: var(--size-2);
  text-decoration: none;
  transition: opacity .2s;
}

.global-lane .nav-links a {
  font-size: var(--font-size-2);
  font-weight: var(--font-weight-6);
}

.global-lane .nav-links a.active {
  color: light-dark(var(--primary-contrast), var(--primary));
  font-weight: var(--font-weight-7);
  text-underline-offset: var(--size-1);
  text-decoration: underline;
}

.nav-links a:hover {
  opacity: .8;
}

dialog.ui-drawer {
  background-color: var(--surface-default);
}

dialog.ui-drawer .ui-header {
  border-bottom: 1px solid var(--border-dim);
  padding-inline: var(--size-4);
  padding-block: var(--size-3);
}

dialog.ui-drawer .ui-header span {
  font-size: var(--font-size-3);
  font-weight: var(--font-weight-7);
  letter-spacing: var(--font-letter-spacing-1);
  text-transform: uppercase;
  color: var(--text-secondary);
}

dialog.ui-drawer .nav-links {
  gap: var(--size-3);
  padding: var(--size-4);
  background: none;
  flex-direction: column;
  width: 100%;
  display: flex;
}

dialog.ui-drawer .nav-links a {
  color: var(--text-primary);
  font-size: var(--font-size-2);
  font-weight: var(--font-weight-6);
  padding-block: var(--size-1);
  text-decoration: none;
}

dialog.ui-drawer .nav-links a.active {
  color: var(--primary);
  text-underline-offset: var(--size-1);
  text-decoration: underline;
}

@media (min-width: 768px) {
  .menu-toggle-btn {
    display: none !important;
  }
}

@media (max-width: 767px) {
  .global-lane .nav-links {
    display: none !important;
  }

  .context-lane {
    white-space: nowrap;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-inline: var(--size-3);
    justify-content: flex-start;
    overflow-x: auto;
  }

  .context-lane::-webkit-scrollbar {
    display: none;
  }

  .context-lane .nav-links {
    gap: var(--size-1);
  }

  .context-lane .nav-links a {
    padding-inline: var(--size-2);
  }

  .context-lane .nav-links a.overview-link {
    padding-inline-start: 0;
  }

  .context-lane .nav-links a:after {
    display: none !important;
  }
}

:where(.footer) {
  --footer-background-color: light-dark(#f1f1f1, #1a1a1a);
  --footer-text-color: light-dark(#424242, #bdbdbd);
  --footer-link-color: light-dark(#1b70df, #82b1ff);
  background-color: var(--footer-background-color);
  color: var(--footer-text-color);
  text-align: center;
  padding: 1rem;
  font-size: .875rem;
}

:where(.footer) a {
  color: var(--footer-link-color);
  text-decoration: none;
}

:where(.footer) a:hover {
  text-decoration: underline;
}

:where(.footer) nav {
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: .5rem;
  display: flex;
}

:where(.footer) nav a {
  color: var(--footer-link-color);
  font-weight: 500;
  text-decoration: none;
}

:where(.footer) nav a:hover {
  text-decoration: underline;
}

@media (max-width: 767.98px) {
  .footer {
    padding: .75rem;
    font-size: .75rem;
  }
}
