/* The Shores Fund: shared kit styles (the forms sheet).
   Theme it per site by setting these on :root. Every pair must hold 4.5:1.

   --sk-bg            sheet ground
   --sk-ink           primary text
   --sk-soft          secondary text (4.5:1 on --sk-bg)
   --sk-line          hairlines and field borders
   --sk-field         input ground
   --sk-accent        primary button fill
   --sk-accent-hover  primary button fill on hover (keep the label readable on it)
   --sk-on-accent     primary button label
   --sk-accent-text   accent-coloured text and focus rings on --sk-bg (4.5:1)
   --sk-tint          selected-row tint
   --sk-scrim         overlay behind the sheet
   --sk-radius        panel radius      --sk-ctl-radius  field radius      --sk-btn-radius  button radius
   --sk-font          text face         --sk-display     title face
   --sk-display-weight / --sk-display-style / --sk-display-tracking / --sk-title-size

   Layout: <html data-sk-layout="drawer | modal | full">  (drawer is the default) */

:root {
  --sk-bg: #f7f0e4;
  --sk-ink: #22160e;
  --sk-soft: #5e4e42;
  --sk-line: rgba(34, 22, 14, 0.2);
  --sk-field: #fffcf6;
  --sk-accent: #22160e;
  --sk-accent-hover: #3a2a1e;
  --sk-on-accent: #f7f0e4;
  --sk-accent-text: #7a4a1c;
  --sk-tint: rgba(34, 22, 14, 0.06);
  --sk-scrim: rgba(34, 22, 14, 0.44);
  --sk-error: #a4281b;
  --sk-radius: 22px;
  --sk-ctl-radius: 12px;
  --sk-btn-radius: 999px;
  --sk-font: system-ui, -apple-system, 'Segoe UI', sans-serif;
  --sk-display: inherit;
  --sk-display-weight: 500;
  --sk-display-style: normal;
  --sk-display-tracking: -0.02em;
  --sk-title-size: clamp(2rem, 4.4vw, 2.9rem);
  --sk-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

html.sk-locked {
  overflow: hidden;
}

.sk-sheet {
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: none;
  visibility: hidden;
  transition: visibility 0s linear 0.6s;
  font-family: var(--sk-font);
  color: var(--sk-ink);
  -webkit-font-smoothing: antialiased;
}
.sk-sheet.is-open {
  pointer-events: auto;
  visibility: visible;
  transition-delay: 0s;
}
.sk-sheet *,
.sk-sheet *::before,
.sk-sheet *::after {
  box-sizing: border-box;
}

.sk-scrim {
  position: absolute;
  inset: 0;
  background: var(--sk-scrim);
  opacity: 0;
  transition: opacity 0.5s var(--sk-ease);
}
.sk-sheet.is-open .sk-scrim {
  opacity: 1;
}

.sk-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(580px, 100vw);
  background: var(--sk-bg);
  color: var(--sk-ink);
  padding: clamp(22px, 3.2vw, 40px) clamp(20px, 3.4vw, 44px) 28px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--sk-radius) 0 0 var(--sk-radius);
  transform: translate3d(104%, 0, 0);
  transition: transform 0.7s var(--sk-ease);
  outline: none;
  box-shadow: -30px 0 80px rgba(20, 12, 6, 0.16);
}
.sk-sheet.is-open .sk-panel {
  transform: none;
}

/* modal */
html[data-sk-layout='modal'] .sk-panel {
  top: 50%;
  left: 50%;
  right: auto;
  bottom: auto;
  width: min(720px, calc(100vw - 32px));
  max-height: min(90dvh, 940px);
  border-radius: var(--sk-radius);
  transform: translate3d(-50%, calc(-50% + 36px), 0) scale(0.97);
  opacity: 0;
  transition:
    transform 0.6s var(--sk-ease),
    opacity 0.35s ease;
  box-shadow: 0 40px 120px rgba(20, 12, 6, 0.28);
}
html[data-sk-layout='modal'] .sk-sheet.is-open .sk-panel {
  transform: translate3d(-50%, -50%, 0);
  opacity: 1;
}

/* full takeover */
html[data-sk-layout='full'] .sk-panel {
  left: 0;
  width: 100vw;
  border-radius: 0;
  box-shadow: none;
  padding-inline: max(20px, calc((100vw - 720px) / 2));
  transform: translate3d(0, 6%, 0);
  opacity: 0;
  transition:
    transform 0.7s var(--sk-ease),
    opacity 0.4s ease;
}
html[data-sk-layout='full'] .sk-sheet.is-open .sk-panel {
  transform: none;
  opacity: 1;
}

@media (max-width: 640px) {
  .sk-panel,
  html[data-sk-layout='modal'] .sk-panel,
  html[data-sk-layout='full'] .sk-panel {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    max-height: 94dvh;
    height: auto;
    min-height: 60dvh;
    border-radius: var(--sk-radius) var(--sk-radius) 0 0;
    padding: 20px 18px calc(22px + env(safe-area-inset-bottom));
    transform: translate3d(0, 104%, 0);
    opacity: 1;
    transition: transform 0.6s var(--sk-ease);
    box-shadow: 0 -20px 60px rgba(20, 12, 6, 0.2);
  }
  html[data-sk-layout='full'] .sk-panel {
    max-height: 100dvh;
    min-height: 100dvh;
    border-radius: 0;
  }
  .sk-sheet.is-open .sk-panel,
  html[data-sk-layout='modal'] .sk-sheet.is-open .sk-panel,
  html[data-sk-layout='full'] .sk-sheet.is-open .sk-panel {
    transform: none;
  }
}

/* entrance stagger */
@keyframes sk-rise {
  from {
    opacity: 0;
    transform: translate3d(0, 18px, 0);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.sk-sheet.is-open .sk-panel.sk-in > * {
  animation: sk-rise 0.8s var(--sk-ease) both;
}
.sk-sheet.is-open .sk-panel.sk-in > *:nth-child(1) {
  animation-delay: 0.1s;
}
.sk-sheet.is-open .sk-panel.sk-in > *:nth-child(2) {
  animation-delay: 0.15s;
}
.sk-sheet.is-open .sk-panel.sk-in > *:nth-child(3) {
  animation-delay: 0.2s;
}
.sk-sheet.is-open .sk-panel.sk-in > *:nth-child(n + 4) {
  animation-delay: 0.26s;
}
@keyframes sk-step {
  from {
    opacity: 0;
    transform: translate3d(20px, 0, 0);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.sk-step-in {
  animation: sk-step 0.55s var(--sk-ease) both;
}
@media (prefers-reduced-motion: reduce) {
  .sk-panel,
  .sk-scrim {
    transition-duration: 0.01s !important;
  }
  .sk-sheet.is-open .sk-panel.sk-in > *,
  .sk-step-in {
    animation: none !important;
  }
}

/* head */
.sk-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.sk-kicker {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--sk-accent-text);
}
.sk-x {
  flex: none;
  width: 44px;
  height: 44px;
  margin: -6px -8px -6px 0;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid var(--sk-line);
  background: transparent;
  color: var(--sk-ink);
  cursor: pointer;
  transition:
    background-color 0.3s,
    border-color 0.3s,
    transform 0.5s var(--sk-ease);
}
.sk-x:hover {
  background: var(--sk-tint);
  border-color: var(--sk-ink);
  transform: rotate(90deg);
}
.sk-i {
  width: 18px;
  height: 18px;
  flex: none;
  display: block;
}
.sk-title {
  margin: 18px 0 0;
  font-family: var(--sk-display);
  font-weight: var(--sk-display-weight);
  font-style: var(--sk-display-style);
  font-size: var(--sk-title-size);
  line-height: 1.02;
  letter-spacing: var(--sk-display-tracking);
  color: var(--sk-ink);
  text-wrap: balance;
}
.sk-intro {
  margin: 12px 0 0;
  max-width: 46ch;
  font-size: 16px;
  line-height: 1.5;
  color: var(--sk-soft);
}
.sk-intro:empty {
  display: none;
}

/* tabs */
.sk-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-top: 22px;
  padding: 4px;
  border: 1px solid var(--sk-line);
  border-radius: var(--sk-btn-radius);
}
.sk-tabs[hidden] {
  display: none;
}
.sk-tabs button {
  min-height: 42px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--sk-btn-radius);
  cursor: pointer;
  background: transparent;
  color: var(--sk-ink);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  transition:
    background-color 0.3s,
    color 0.3s;
}
.sk-tabs button:hover {
  background: var(--sk-tint);
}
.sk-tabs button[aria-selected='true'] {
  background: var(--sk-ink);
  color: var(--sk-bg);
}

/* forms */
.sk-form {
  display: grid;
  gap: 18px;
  margin-top: 26px;
}
.sk-form[hidden],
.sk-step[hidden],
.sk-row[hidden],
.sk-sent[hidden],
.sk-warn[hidden],
.sk-btn[hidden] {
  display: none;
}
.sk-step {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.sk-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.sk-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 520px) {
  .sk-row {
    grid-template-columns: 1fr;
  }
}
.sk-field {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.sk-field > label,
.sk-field > legend {
  padding: 0;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--sk-ink);
}
.sk-field input[type='text'],
.sk-field input[type='email'],
.sk-field input[type='month'],
.sk-field select,
.sk-field textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  background: var(--sk-field);
  color: var(--sk-ink);
  border: 1px solid var(--sk-line);
  border-radius: var(--sk-ctl-radius);
  font: inherit;
  font-size: 16px;
  line-height: 1.35;
  transition:
    border-color 0.25s,
    box-shadow 0.25s;
  -webkit-appearance: none;
  appearance: none;
}
.sk-field textarea {
  resize: vertical;
  min-height: 96px;
}
.sk-field select {
  padding-right: 40px;
  text-overflow: ellipsis;
  background-image:
    linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position:
    calc(100% - 21px) 52%,
    calc(100% - 15px) 52%;
  background-size:
    6px 6px,
    6px 6px;
  background-repeat: no-repeat;
}
.sk-field ::placeholder {
  color: var(--sk-soft);
  opacity: 0.75;
}
.sk-field input:hover,
.sk-field select:hover,
.sk-field textarea:hover {
  border-color: var(--sk-soft);
}
.sk-field input:focus,
.sk-field select:focus,
.sk-field textarea:focus {
  outline: none;
  border-color: var(--sk-ink);
  box-shadow: 0 0 0 3px var(--sk-tint);
}
.sk-field.is-invalid input,
.sk-field.is-invalid select,
.sk-field.is-invalid textarea {
  border-color: var(--sk-error);
  box-shadow: 0 0 0 3px rgba(164, 40, 27, 0.12);
}
.sk-field--sign input {
  font-family: var(--sk-display);
  font-style: italic;
  font-size: 20px;
}

/* chips */
.sk-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.sk-chips legend {
  margin-bottom: 9px;
}
.sk-chips label {
  position: relative;
  cursor: pointer;
}
.sk-chips input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}
.sk-chips span {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--sk-line);
  border-radius: var(--sk-btn-radius);
  font-size: 14px;
  color: var(--sk-ink);
  background: transparent;
  transition:
    background-color 0.25s,
    color 0.25s,
    border-color 0.25s;
}
.sk-chips label:hover span {
  border-color: var(--sk-ink);
}
.sk-chips input:checked + span {
  background: var(--sk-ink);
  border-color: var(--sk-ink);
  color: var(--sk-bg);
}
.sk-chips input:focus-visible + span {
  outline: 2px solid var(--sk-accent-text);
  outline-offset: 2px;
}

/* questionnaire */
.sk-progress {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}
.sk-progress i {
  height: 3px;
  border-radius: 3px;
  background: var(--sk-line);
  transition: background-color 0.4s;
}
.sk-progress i.is-on {
  background: var(--sk-accent-text);
}
.sk-stepline {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin: -6px 0 2px;
  font-size: 13.5px;
  color: var(--sk-soft);
}
.sk-stepline span:last-child {
  color: var(--sk-ink);
  font-weight: 600;
  text-align: right;
}
.sk-hint {
  margin: 0;
  font-size: 15px;
  color: var(--sk-ink);
  font-weight: 500;
}
.sk-choices {
  display: grid;
  gap: 8px;
  border-radius: var(--sk-ctl-radius);
}
.sk-choice,
.sk-ack {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 12px;
  align-items: start;
  padding: 13px 14px;
  border: 1px solid var(--sk-line);
  border-radius: var(--sk-ctl-radius);
  font-size: 14px;
  line-height: 1.45;
  color: var(--sk-ink);
  cursor: pointer;
  transition:
    border-color 0.25s,
    background-color 0.25s;
}
.sk-choice input,
.sk-ack input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--sk-accent-text);
  cursor: pointer;
}
.sk-choice:hover,
.sk-ack:hover {
  border-color: var(--sk-soft);
}
.sk-choice:has(input:checked),
.sk-ack:has(input:checked) {
  border-color: var(--sk-ink);
  background: var(--sk-tint);
}
.sk-choices.is-invalid .sk-choice,
.sk-ack.is-invalid {
  border-color: var(--sk-error);
}
.sk-acks {
  display: grid;
  gap: 8px;
}
.sk-warn {
  margin: 0;
  padding: 13px 14px;
  border-radius: var(--sk-ctl-radius);
  border: 1px solid var(--sk-ink);
  background: var(--sk-tint);
  font-size: 14px;
  line-height: 1.45;
  color: var(--sk-ink);
}

/* buttons: label, fill and ground hold contrast in every state */
.sk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 4px;
}
.sk-actions--steps {
  justify-content: space-between;
}
.sk-actions--steps .sk-btn:not(.sk-btn--ghost) {
  margin-left: auto;
}
.sk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: var(--sk-btn-radius);
  border: 1px solid var(--sk-accent);
  background: var(--sk-accent);
  color: var(--sk-on-accent);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background-color 0.3s,
    border-color 0.3s,
    color 0.3s,
    transform 0.4s var(--sk-ease);
}
.sk-btn:hover {
  background: var(--sk-accent-hover);
  border-color: var(--sk-accent-hover);
  color: var(--sk-on-accent);
}
.sk-btn:active {
  transform: scale(0.98);
}
.sk-btn .sk-i {
  transition: transform 0.5s var(--sk-ease);
}
.sk-btn:hover .sk-i {
  transform: translateX(3px);
}
.sk-btn--ghost {
  background: transparent;
  color: var(--sk-ink);
  border-color: var(--sk-line);
}
.sk-btn--ghost:hover {
  background: var(--sk-tint);
  color: var(--sk-ink);
  border-color: var(--sk-ink);
}
.sk-btn--ghost:hover .sk-i {
  transform: translateX(-3px);
}
.sk-btn:focus-visible,
.sk-x:focus-visible,
.sk-tabs button:focus-visible,
.sk-link:focus-visible {
  outline: 2px solid var(--sk-accent-text);
  outline-offset: 3px;
}
.sk-btn:disabled {
  opacity: 0.55;
  cursor: default;
}
.sk-link {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  font: inherit;
  color: var(--sk-accent-text);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.sk-link:hover {
  color: var(--sk-ink);
}
.sk-fine {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--sk-soft);
}
.sk-msg {
  margin: 0;
  min-height: 1.3em;
  font-size: 14px;
  font-weight: 500;
  color: var(--sk-error);
}
.sk-msg:empty {
  min-height: 0;
}

/* confirmation */
.sk-sent {
  display: grid;
  gap: 12px;
  justify-items: start;
  margin-top: 34px;
}
.sk-sent__mark {
  width: 68px;
  height: 68px;
  color: var(--sk-accent-text);
  margin-bottom: 10px;
}
.sk-sent__mark svg {
  width: 100%;
  height: 100%;
  display: block;
}
.sk-sent__title {
  margin: 0;
  font-family: var(--sk-display);
  font-weight: var(--sk-display-weight);
  font-style: var(--sk-display-style);
  font-size: clamp(1.8rem, 3.6vw, 2.4rem);
  line-height: 1.05;
  letter-spacing: var(--sk-display-tracking);
}
.sk-sent__text {
  margin: 0 0 12px;
  max-width: 44ch;
  font-size: 16px;
  line-height: 1.5;
  color: var(--sk-soft);
}
/* sending */
.sk-btn[aria-busy='true'] {
  cursor: progress;
}

/* the honeypot: off screen and out of the tab order */
.sk-hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media print {
  .sk-sheet {
    display: none !important;
  }
}
