[hidden] { display: none !important; }

.site-dialog {
  position: fixed;
  inset: 0;
  width: min(600px, calc(100% - 28px));
  max-width: none;
  max-height: calc(100dvh - 28px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--rule);
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 20px 64px rgb(9 18 19 / 30%);
  overscroll-behavior: contain;
}

.site-dialog::backdrop { background: rgb(10 20 22 / 74%); }

html:has(.site-dialog[open]) { overflow: hidden; }

.dialog-content { padding: clamp(19px, 4.4vw, 38px); }

.site-dialog h2 {
  padding-inline-end: 38px;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.03;
}

.site-dialog h3 { font-size: 1.35rem; }

.dialog-close {
  position: absolute;
  inset: 8px 8px auto auto;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: 400 1.65rem / 1 var(--sans);
  cursor: pointer;
}

.dialog-close:hover { background: var(--stone); }

.dialog-intro {
  margin-block: .65rem 1.15rem;
  line-height: 1.45;
}

.contact-form {
  display: grid;
  gap: .85rem;
}

.contact-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
}

.contact-form label {
  position: relative;
  display: block;
  min-width: 0;
  font-size: .94rem;
  font-weight: 600;
}

.contact-form label span {
  font-size: .83rem;
  font-weight: 400;
}

.contact-form input,
.contact-form textarea {
  display: block;
  width: 100%;
  min-height: 44px;
  margin-block-start: .24rem;
  padding: .56rem .65rem;
  border: 1px solid #767c73;
  border-radius: 0;
  background: #fcfaf4;
  color: var(--ink);
  font: 400 1rem / 1.3 var(--sans);
}

.contact-form textarea { resize: vertical; }

.form-trap {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
}

.dialog-copy,
.captcha-note,
.form-status,
.dialog-direct,
.consent-current {
  font-size: .9rem;
  line-height: 1.45;
}

.site-dialog p a,
.text-button { text-underline-offset: .2em; }

.text-button,
.cookie-settings-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.text-button { text-decoration: underline; }

.dialog-action {
  min-height: 44px;
  padding: .48rem .9rem;
  border: 1px solid var(--pine);
  background: var(--pine);
  color: var(--ivory);
  font: 600 .94rem / 1.2 var(--sans);
  cursor: pointer;
}

.dialog-action:hover:not(:disabled) { background: #293a3b; }

.dialog-action:focus-visible { outline-color: var(--pine); }

.dialog-action:disabled { opacity: .55; cursor: default; }

.form-send { width: fit-content; }

.form-status {
  margin-block-start: .8rem;
  padding: .63rem .75rem;
  border-inline-start: 2px solid #565e55;
  background: var(--stone);
}

.dialog-direct {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem 1rem;
  margin-block-start: 1rem;
  padding-block-start: .55rem;
  border-block-start: 1px solid var(--rule);
}

.dialog-direct a { padding-block: .25rem; }

.consent-current { margin-block: .65rem; font-weight: 600; }

.consent-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem;
}

.consent-dialog .consent-actions { margin-block-start: 1rem; }

.consent-banner {
  position: fixed;
  z-index: 20;
  inset: auto auto 12px 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px 22px;
  width: min(760px, calc(100% - 24px));
  padding: 13px 16px;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 9px 28px rgb(9 18 19 / 26%);
}

.consent-banner h2 { font-size: 1.34rem; line-height: 1.1; }

.consent-banner p { margin-block-start: .35rem; font-size: .87rem; line-height: 1.37; }

.consent-actions .dialog-action {
  background: transparent;
  color: var(--pine);
}

.consent-actions .dialog-action:hover { background: var(--stone); }

.cookie-settings-button {
  min-height: 44px;
  text-underline-offset: .24em;
}

.cookie-settings-button:hover { text-decoration: underline; }

.contact-details .footer-contact-form {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  margin-block-start: .2em;
  font-weight: 600;
  text-decoration: underline;
}

.grecaptcha-badge { visibility: hidden; }

body {
  --back-to-top-bottom: max(18px, var(--consent-banner-space, 0px));
  padding-block-end: var(--consent-banner-space, 0px);
}

@media (max-width: 640px) {
  .consent-banner { grid-template-columns: 1fr; }
}

@media (max-width: 470px) {
  .contact-fields { grid-template-columns: 1fr; }
}
