.sp-tool-page .div-block-152,
.sp-tool-page .text-rich-text,
.sp-tool,
.sp-table-wrap,
.sp-result {
  min-width: 0;
  max-width: 100%;
}

.sp-tool-page .text-rich-text {
  overflow-wrap: break-word;
}

.sp-tool {
  display: flex;
  flex-direction: column;
  gap: 22px;
  border: 1px solid #d5dbe8;
  border-radius: 12px;
  padding: 1.25rem;
  margin: 1.5rem 0 2rem;
  background: #fff;
}

.sp-tool [hidden] {
  display: none !important;
}

.sp-tool > div:empty {
  display: none;
}

.sp-tool fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.sp-tool legend,
.sp-tool .field-label {
  display: block;
  width: 100%;
  float: none;
  font-weight: 600;
  margin: 0 0 8px;
  padding: 0;
}

.sp-tool .sp-day .field-label {
  margin: 0;
}

.sp-tool label.sp-choice {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  margin: 0;
  font-weight: 500;
  line-height: 1.4;
}

.sp-tool label.sp-choice + label.sp-choice,
.sp-tool .text-field + label.sp-choice {
  margin-top: 22px;
}

.sp-tool fieldset > p {
  margin: 0 0 22px;
}

.sp-tool [data-claim-detail] p {
  margin: 0;
}

.sp-tool .sp-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}

.sp-tool input[type="text"],
.sp-tool input[type="number"],
.sp-tool input[type="date"],
.sp-tool select {
  width: 100%;
  max-width: 100%;
  font-size: 1rem;
  min-height: 2.75rem;
  box-sizing: border-box;
}

.sp-tool .sp-days {
  display: grid;
  gap: 22px;
}

.sp-tool .sp-day {
  display: grid;
  grid-template-columns: 1fr 7rem;
  column-gap: 12px;
  row-gap: 8px;
  align-items: center;
}

.sp-tool button.sp-submit {
  appearance: none;
  background: #2962ff;
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 0.9rem 1.2rem;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  width: 100%;
  margin: 0;
}

.sp-tool button.sp-submit:hover { background: #1e4fd0; }

.sp-tool button.sp-submit:focus-visible,
.sp-tool input:focus-visible,
.sp-tool select:focus-visible {
  outline: 3px solid #101570;
  outline-offset: 2px;
}

.sp-error {
  background: #fff4f4;
  border: 1px solid #9b1c1c;
  color: #6f1212;
  border-radius: 8px;
  padding: 0.8rem 1rem;
  margin-bottom: 1rem;
}

.sp-result {
  margin-top: 0;
  border-left: 4px solid #2962ff;
  background: rgba(0, 98, 254, 0.06);
  border-radius: 0 12px 12px 0;
  padding: 1rem 1.1rem;
  overflow-x: auto;
}

.sp-result:empty { display: none; }

.sp-result h3 { margin: 0 0 0.75rem; font-size: 1.35rem; }

.sp-result-row {
  display: grid;
  grid-template-columns: minmax(8rem, 40%) 1fr;
  gap: 0.35rem 1rem;
  margin: 0.35rem 0;
}

.sp-result dt, .sp-result dd { margin: 0; }

.sp-result table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5rem 0 1rem;
  font-size: 0.95rem;
}

.sp-result caption {
  text-align: left;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.sp-result th, .sp-result td {
  border-bottom: 1px solid #d5dbe8;
  text-align: left;
  padding: 0.4rem 0.35rem;
}

.sp-table-wrap {
  overflow-x: auto;
  margin: 1rem 0 1.5rem;
}

.sp-claims {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.95rem;
}

.sp-claims th, .sp-claims td {
  border-bottom: 1px solid #d5dbe8;
  text-align: left;
  vertical-align: top;
  padding: 0.7rem 0.5rem;
  overflow-wrap: anywhere;
}

.sp-claims th { background: #f6f7f9; }

.sp-disclaimer {
  border: 1px solid #d5dbe8;
  border-radius: 8px;
  padding: 0.9rem 1rem;
  background: #f6f7f9;
}

.sp-sources { font-size: 0.95rem; }

@media (max-width: 640px) {
  .sp-tool .sp-day { grid-template-columns: 1fr; }
  .sp-result-row { grid-template-columns: 1fr; }
}
