.fp-panel {
  margin-block: 2rem;
  padding: clamp(1rem, 3.5vw, 2rem);
  color: #17382b;
  background: #fff;
  border: 1px solid #d8e4d1;
  border-radius: 1rem;
  overflow-wrap: anywhere;
}

.fp-panel [hidden],
.fp-panel form[hidden] {
  display: none !important;
}

.fp-panel > :first-child,
.fp-form > :first-child {
  margin-top: 0;
}

.fp-form {
  display: grid;
  gap: 1rem;
  min-width: 0;
  margin-block: 1.25rem;
}

.fp-form p,
.fp-form h3,
.fp-form h4 {
  margin: 0;
}

.fp-form h4 {
  font-size: 1rem;
  line-height: 1.4;
  font-weight: 800;
}

.fp-axis-grid,
.fp-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 1rem;
}

.fp-axis-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.fp-field {
  display: grid;
  align-content: start;
  gap: 0.3rem;
  min-width: 0;
  font-size: 0.94rem;
}

.fp-field > label,
.fp-tool-group > legend,
.fp-form details > summary {
  font-weight: 750;
}

.fp-field input,
.fp-field textarea,
.fp-field select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 0.48rem 0.62rem;
  box-sizing: border-box;
  border: 1px solid #81998a;
  border-radius: 0.4rem;
  font: inherit;
  font-size: max(1rem, 16px);
  color: #17382b;
  background: #fff;
}

.fp-field input[type="file"] {
  font-size: 0.85rem;
}

.fp-field textarea {
  resize: vertical;
}

.fp-field :is(input, textarea, select)[aria-invalid="true"] {
  border-color: #a12022;
  box-shadow: 0 0 0 1px #a12022;
}

.fp-field input::placeholder,
.fp-field textarea::placeholder {
  color: #54665b;
  opacity: 1;
}

.fp-form :focus-visible {
  outline: 3px solid #226b43;
  outline-offset: 2px;
}

.fp-unit {
  width: min(100%, 15rem);
}

.fp-tool-group {
  min-inline-size: 0;
  border: 1px solid #c7d8c4;
  border-radius: 0.6rem;
  padding: 0.8rem;
  margin: 0;
}

.fp-tool-group > legend {
  padding-inline: 0.3rem;
}

.fp-tool-group > p,
.fp-axis-grid .fp-tool-group > .fp-field + .fp-field {
  margin-bottom: 0.5rem;
}

.fp-check {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  font-size: 0.94rem;
  cursor: pointer;
}

.fp-check input {
  flex: 0 0 auto;
  width: 1.2rem;
  height: 1.2rem;
  margin: 0;
  accent-color: #226b43;
}

.fp-demo {
  padding: 0.55rem 0.75rem;
  color: #513407;
  border-radius: 0.35rem;
  background: #fce8ba;
}

.fp-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.fp-panel .fp-button {
  display: inline-flex;
  width: fit-content;
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.85rem;
  box-sizing: border-box;
  border: 1px solid #226b43;
  border-radius: 0.48rem;
  background: #226b43;
  color: white;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 750;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.fp-panel .fp-button:hover {
  background: #17382b;
  color: white;
}

.fp-panel .fp-button:disabled {
  opacity: 0.6;
  cursor: wait;
}

.fp-panel .fp-button-secondary {
  color: #17382b;
  border-color: #81998a;
  background: white;
}

.fp-panel .fp-button-secondary:hover {
  color: #17382b;
  background: #eef5e7;
}

.fp-error,
.fp-form-status[data-kind="error"] {
  color: #921d23;
}

.fp-error {
  font-size: 0.9rem;
}

.fp-error:empty,
.fp-form-status:empty {
  display: none;
}

.fp-form-status[data-kind="success"] {
  color: #185735;
  font-weight: 720;
}

.fp-result {
  display: grid;
  gap: 0.7rem;
  border: 1px solid #c7d8c4;
  border-radius: 0.6rem;
  background: #f8fbf3;
  padding: clamp(0.7rem, 2.5vw, 1.2rem);
}

.fp-result :is(p, h4) + p,
.fp-result-section + .fp-result-section,
.fp-result [data-fp-output] > p {
  margin-block-start: 0.3rem;
}

.fp-result-section {
  border-bottom: 1px solid #d8e4d1;
  padding-block: 0.5rem;
}

.fp-form details > summary {
  display: list-item;
  min-height: 44px;
  padding-block: 0.5rem;
  color: #185735;
  cursor: pointer;
}

.fp-honeypot,
.fp-clipboard {
  position: absolute !important;
  inline-size: 1px;
  block-size: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 700px) {
  .fp-axis-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 470px) {
  .fp-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
