/* Contact is an in-flow conversation. No floating surfaces or focus-driven layout. */
#contact  {
  padding: 32px 0 56px;
  margin: 0 0 32px;
}

#goodthing-contact  {
  --gt-mint: var(--mint);
  --gt-muted: var(--contact-muted);
  color: var(--contact-text);
  font: 400 15px/1.6 'DM Sans',system-ui,sans-serif;
  max-width: 900px;
  color-scheme: inherit;
}

#goodthing-contact *  {
  box-sizing: border-box;
}

#goodthing-contact p  {
  margin: 0;
}

#goodthing-contact #gt-form,#goodthing-contact #gt-details  {
  display: grid;
  gap: 36px;
}

#goodthing-contact #gt-form  {
  max-width: 900px;
}

#goodthing-contact #gt-preview  {
  margin: 0 0 24px;
}

#goodthing-contact [hidden]  {
  display: none!important;
}

#goodthing-contact button,#goodthing-contact input,#goodthing-contact textarea  {
  font: inherit;
}

#goodthing-contact button  {
  cursor: pointer;
  color: inherit;
}

#goodthing-contact button:focus-visible  {
  outline: 2px solid var(--gt-mint);
  outline-offset: 5px;
}

#goodthing-contact button:disabled  {
  opacity: .5;
  cursor: default;
}

#goodthing-contact h2  {
  font: 500 clamp(36px,6vw,54px)/1.1 'Space Grotesk',system-ui,sans-serif;
  letter-spacing: -2px;
  margin: 0 0 24px;
}

#goodthing-contact h3,#goodthing-contact .gt-label  {
  display: block;
  font: 500 23px/1.45 'Space Grotesk',system-ui,sans-serif;
  letter-spacing: -.6px;
  margin: 0 0 9px;
}

#goodthing-contact .gt-quiet  {
  font-size: 12px;
  color: var(--gt-muted);
}

#goodthing-contact .gt-link  {
  border: 0;
  padding: 0;
  background: none;
  color: var(--contact-link);
  text-decoration: underline;
  text-decoration-color: var(--link-line);
  text-underline-offset: 4px;
}

#goodthing-contact .gt-choices  {
  display: flex;
  gap: 32px;
  margin-bottom: 32px;
}

#goodthing-contact .gt-choices button  {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1;
  text-align: left;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--choice-line);
  padding: 8px 0 18px;
}

#goodthing-contact svg  {
  width: 23px;
  height: 23px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

#goodthing-contact .gt-choices svg  {
  color: var(--choice-icon);
  margin-top: 3px;
}

#goodthing-contact .gt-choices strong  {
  display: block;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -.4px;
}

#goodthing-contact .gt-choices strong  {
  text-wrap: balance;
}

#goodthing-contact .gt-choices small  {
  display: block;
  color: var(--gt-muted);
  font-size: 13px;
  margin-top: 7px;
}

#goodthing-contact .gt-choices button:hover,#goodthing-contact .gt-choices [aria-pressed=true]  {
  border-color: var(--gt-mint);
  color: var(--gt-mint);
}

#goodthing-contact .gt-choices.is-chosen  {
  gap: 28px;
  margin-bottom: 32px;
}

#goodthing-contact .is-chosen button  {
  flex: initial;
  align-items: center;
  gap: 10px;
  padding: 8px 0 13px;
}

#goodthing-contact .is-chosen strong  {
  font-size: 15px;
}

#goodthing-contact .is-chosen small  {
  display: none;
}

#goodthing-contact .is-chosen svg  {
  width: 18px;
  height: 18px;
  margin: 0;
}

/* A single scheduling surface: dates, their times, then the shared local-clock check. */
#goodthing-contact #gt-schedule  {
  display: grid;
  gap: 24px;
  max-width: 900px;
}

#goodthing-contact #gt-picker  {
  display: grid;
  grid-template-columns: 300px minmax(0,1fr);
  gap: 24px 36px;
  align-items: start;
}

#goodthing-contact .gt-picker-heading  {
  grid-column: 1 / -1;
}

#goodthing-contact .gt-picker-heading h3  {
  margin: 0 0 6px;
}

#goodthing-contact .gt-days  {
  display: grid;
  grid-template-columns: repeat(5,minmax(0,1fr)) 8px repeat(2,minmax(0,1fr));
  gap: 6px;
}

#goodthing-contact .gt-weekday  {
  text-align: center;
  color: var(--day-muted);
  font-size: 12px;
  padding-bottom: 9px;
}

#goodthing-contact .gt-days button  {
  position: relative;
  isolation: isolate;
  border: 1px solid transparent;
  background: var(--code-bg);
  color: var(--day-text);
  border-radius: 8px;
  padding: 0;
  min-width: 0;
  width: 100%;
  min-height: 42px;
  font-size: 15px;
}

#goodthing-contact .gt-days button:hover  {
  background: var(--choice-line);
  color: var(--gt-mint);
}

#goodthing-contact .gt-days [aria-pressed=true]  {
  color: var(--contact-text);
}

#goodthing-contact .gt-days svg  {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  color: var(--pen);
  opacity: 0;
}

#goodthing-contact .gt-days svg path  {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

#goodthing-contact .gt-days [aria-pressed=true] svg  {
  opacity: 1;
}

#goodthing-contact .gt-days [aria-pressed=true] path  {
  animation: gt-circle .48s ease-out forwards;
}

#goodthing-contact .gt-day-label  {
  font: 500 19px/1.4 'Space Grotesk',system-ui,sans-serif;
  color: var(--contact-text);
  margin: 0 0 22px;
}

#goodthing-contact #gt-times  {
  display: grid;
  gap: 22px;
}

#goodthing-contact .gt-group-name  {
  display: block;
  color: var(--gt-muted);
  font-size: 12px;
  margin-bottom: 5px;
}

#goodthing-contact .gt-time-row  {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 5px 12px;
}

#goodthing-contact .gt-time  {
  position: relative;
  background: none;
  border: 0;
  border-radius: 5px;
  padding: 5px 6px;
  font-size: 14px;
  white-space: nowrap;
  color: var(--time-text);
  font-variant-numeric: tabular-nums;
}

#goodthing-contact .gt-time::before  {
  content: '';
  position: absolute;
  inset: -2px 0;
}

#goodthing-contact .gt-time:hover,#goodthing-contact .gt-time:focus-visible  {
  color: var(--gt-mint);
  background: var(--prompt-top);
}

#goodthing-contact .gt-time[aria-pressed=true]  {
  color: var(--gt-mint);
  background: var(--prompt-top);
  box-shadow: inset 0 -2px var(--gt-mint);
  font-weight: 600;
}

#goodthing-contact .gt-schedule-footer  {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--divider);
  padding-top: 20px;
}

#goodthing-contact #gt-picker[hidden]+.gt-schedule-footer  {
  border: 0;
  padding: 0;
}

#goodthing-contact .gt-selected-time  {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  text-align: left;
  border: 0;
  padding: 0;
  background: none;
  font: 600 22px/1.45 'Space Grotesk',system-ui,sans-serif;
  color: var(--contact-text);
  cursor: pointer;
}

#goodthing-contact #gt-chosen  {
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-color: var(--link-line);
  text-underline-offset: 5px;
}

#goodthing-contact .gt-selected-time:hover  {
  color: var(--gt-mint);
}

#goodthing-contact .gt-selected-time svg  {
  width: 14px;
  height: 14px;
  align-self: center;
  color: var(--gt-muted);
}

@keyframes gt-circle  {
  to  {
    stroke-dashoffset: 0;
  }

}

@media(prefers-reduced-motion:reduce)  {
  #goodthing-contact .gt-days [aria-pressed=true] path  {
    animation: none;
    stroke-dashoffset: 0;
  }

}

/* A noticeable invitation to check the clock, subordinate to the appointment. */
#goodthing-contact .gt-clock  {
  max-width: 570px;
  border-left: 2px solid var(--input-line);
  padding: 10px 14px;
  background: var(--prompt-top);
  font-size: 14px;
  line-height: 1.8;
  color: var(--gt-muted);
}

#goodthing-contact .gt-clock-appointment  {
  color: var(--contact-text);
  font-weight: 500;
}

#goodthing-contact .gt-clock .gt-link  {
  white-space: nowrap;
}

#goodthing-contact .gt-clock strong  {
  font-size: 18px;
  white-space: nowrap;
  color: var(--contact-text);
  font-weight: 600;
  margin: 0 2px;
}

#goodthing-contact #gt-clock-editor  {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

#goodthing-contact #gt-clock-input  {
  color: var(--gt-mint);
  background: none;
  border: 0;
  border-bottom: 1px dotted var(--input-line);
  padding: 5px;
  font-size: 16px;
}

#goodthing-contact #gt-contact-row .gt-label  {
  margin-bottom: 12px;
}

#goodthing-contact .gt-input,#goodthing-contact .gt-story  {
  display: block;
  background: none;
  border: 0;
  border-bottom: 1px dotted var(--input-line);
  border-radius: 0;
  color: var(--gt-mint);
  outline: none;
  width: 100%;
  min-width: 0;
}

#goodthing-contact .gt-input  {
  font-size: 20px;
  max-width: 430px;
  padding: 6px 0 10px;
}

#goodthing-contact .gt-input::placeholder  {
  color: var(--placeholder);
}

#goodthing-contact .gt-input:focus,#goodthing-contact .gt-story:focus  {
  border-color: var(--gt-mint);
}

#goodthing-contact #gt-intro-row  {
  display: grid;
  gap: 12px;
  max-width: 680px;
}

#goodthing-contact .gt-intro-heading  {
  display: block;
}

#goodthing-contact .gt-intro-heading .gt-label  {
  text-wrap: balance;
  max-width: 540px;
  margin-bottom: 2px;
}

#goodthing-contact .gt-primary  {
  justify-self: end;
  margin: 4px 0 0;
  background: var(--action-bg);
  color: var(--contact-action-text);
  border: 0;
  border-radius: 7px;
  padding: 13px 20px;
  font-size: 14px;
  font-weight: 600;
  min-height: 44px;
}

#goodthing-contact .gt-primary:hover  {
  background: var(--action-hover);
}

#goodthing-contact .gt-writing  {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

#goodthing-contact .gt-story  {
  order: 2;
  resize: vertical;
  min-height: 84px;
  field-sizing: content;
  max-height: 24rem;
  padding: 14px 0 10px;
  color: var(--contact-text);
  font-size: 18px;
  line-height: 1.65;
}

#goodthing-contact .gt-ai-invitation  {
  position: absolute;
  top: 14px;
  left: 0;
  z-index: 1;
  color: var(--placeholder);
  font-size: 18px;
  cursor: text;
}

#goodthing-contact .gt-ai-invitation .gt-link  {
  color: var(--ai-link);
}

#goodthing-contact .gt-writing.has-text .gt-ai-invitation,#goodthing-contact .gt-writing.ai-open .gt-ai-invitation  {
  position: static;
  order: 0;
  font-size: 14px;
  margin: 8px 0 13px;
}

#goodthing-contact .gt-writing.has-text:not(.ai-open) .gt-ai-invitation  {
  order: 3;
}

/* The prompt is a preamble to the same writing surface, not another tool panel. */
#goodthing-contact .gt-ai-panel  {
  order: 1;
  margin-bottom: 8px;
  scroll-margin-top: 64px;
}

#goodthing-contact .gt-prompt-tools  {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 6px;
  color: var(--prompt-muted);
  font-size: 12px;
}

#goodthing-contact .gt-prompt-tools button  {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 32px;
  min-height: 32px;
  border: 0;
  border-radius: 4px;
  background: none;
  color: var(--prompt-action);
  padding: 5px;
}

#goodthing-contact .gt-prompt-tools button:hover  {
  color: var(--gt-mint);
  background: var(--prompt-top);
}

#goodthing-contact .gt-prompt-tools button:focus-visible  {
  outline-offset: 2px;
}

#goodthing-contact .gt-prompt-tools svg  {
  width: 15px;
  height: 15px;
}

#goodthing-contact #gt-prompt  {
  margin: 0;
  color: var(--gt-muted);
  font: 400 14px/1.75 'DM Sans',system-ui,sans-serif;
}

#goodthing-contact .gt-prompt-sentence  {
  display: block;
  margin-bottom: 7px;
}

#goodthing-contact .gt-paste-guide  {
  margin: 12px 0 4px;
  color: var(--contact-text);
  font-size: 13px;
}

#goodthing-contact #gt-copy-status  {
  margin-top: 8px;
}

#goodthing-contact #gt-description-error  {
  grid-column: 1 / -1;
}

#goodthing-contact .gt-error  {
  font-size: 12px;
  color: var(--error);
  margin: 8px 0;
}

#goodthing-contact .gt-input[aria-invalid=true],#goodthing-contact .gt-story[aria-invalid=true]  {
  border-color: var(--error);
}

#goodthing-contact #gt-receipt  {
  margin: 24px 0;
}

#goodthing-contact #gt-transport  {
  margin: 20px 0 0;
}

@media(max-width:650px)  {
  #contact  {
    padding: 32px 0 40px;
    margin: 0 0 24px;
  }

  #goodthing-contact #gt-form,#goodthing-contact #gt-details  {
    gap: 28px;
  }

  #goodthing-contact .gt-choices  {
    flex-direction: column;
    gap: 12px;
    margin-bottom: 28px;
  }

  #goodthing-contact .gt-choices button  {
    padding: 8px 0 16px;
  }

  #goodthing-contact .gt-choices.is-chosen  {
    flex-direction: row;
    gap: 22px;
    align-items: flex-start;
  }

  #goodthing-contact .is-chosen button  {
    gap: 8px;
  }

  #goodthing-contact .is-chosen strong  {
    font-size: 13px;
  }

  #goodthing-contact .gt-label  {
    font-size: 21px;
  }

  #goodthing-contact .gt-intro-heading .gt-label  {
    font-size: 20px;
  }

  #goodthing-contact .gt-primary  {
    padding: 12px 14px;
    font-size: 12px;
  }

  #goodthing-contact .gt-ai-invitation  {
    font-size: 16px;
  }

}

@media(max-width:700px)  {
  #goodthing-contact #gt-picker  {
    grid-template-columns: minmax(0,1fr);
    gap: 24px;
  }

  #goodthing-contact .gt-calendar-side  {
    max-width: 320px;
  }

  #goodthing-contact .gt-day-label  {
    margin-bottom: 16px;
  }

  #goodthing-contact #gt-times  {
    gap: 16px;
  }

  #goodthing-contact .gt-time-group  {
    display: grid;
    grid-template-columns: 70px minmax(0,1fr);
    gap: 10px;
    align-items: baseline;
  }

  #goodthing-contact .gt-group-name  {
    margin: 0;
  }

  #goodthing-contact .gt-time-row  {
    column-gap: 8px;
  }

}

/* Today is an orientation cue; the red pen still indicates selection. */
#goodthing-contact .gt-days [aria-current=date]::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 3px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gt-mint);
  transform: translateX(-50%);
  pointer-events: none;
}
