.spt-split {
  box-sizing: border-box;
  max-width: 860px;
  margin: 2rem auto;
  padding: clamp(1rem, 3vw, 2rem);
  border: 1px solid #d9dde3;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(17, 24, 39, 0.08);
  color: #172033;
}

.spt-split *,
.spt-split *::before,
.spt-split *::after {
  box-sizing: inherit;
}

.spt-split__header {
  margin-bottom: 1.25rem;
  text-align: center;
}

.spt-split__title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.15;
}

.spt-split__intro {
  max-width: 680px;
  margin: 0 auto;
  color: #526076;
  line-height: 1.65;
}

.spt-split__dropzone {
  display: flex;
  min-height: 250px;
  padding: 2rem 1rem;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.65rem;
  border: 2px dashed #8b98aa;
  border-radius: 16px;
  background: #f8fafc;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.spt-split__dropzone:hover,
.spt-split__dropzone:focus,
.spt-split__dropzone.is-drag-over {
  border-color: #3157d5;
  background: #eef3ff;
  outline: none;
}

.spt-split__dropzone.is-drag-over {
  transform: scale(1.01);
}

.spt-split__drop-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.spt-split__drop-subtitle,
.spt-split__limits,
.spt-split__file-meta,
.spt-split__help,
.spt-split__mode-option small,
.spt-split__results-help,
.spt-split__download-details span {
  color: #667085;
}

.spt-split__limits {
  margin: 0.75rem 0 0;
  text-align: center;
  font-size: 0.9rem;
}

.spt-split__workspace {
  margin-top: 1.5rem;
}

.spt-split__file-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid #d9dde3;
  border-radius: 12px;
  background: #f8fafc;
}

.spt-split__file-details,
.spt-split__download-details {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.spt-split__file-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spt-split__file-meta,
.spt-split__download-details span {
  font-size: 0.88rem;
}

.spt-split__options {
  display: grid;
  gap: 0.85rem;
  margin: 1.25rem 0 0;
  padding: 0;
  border: 0;
}

.spt-split__options legend {
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
  font-weight: 750;
}

.spt-split__mode-option {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.9rem 1rem;
  border: 1px solid #d9dde3;
  border-radius: 12px;
  cursor: pointer;
}

.spt-split__mode-option:has(input:checked) {
  border-color: #3157d5;
  background: #f3f6ff;
  box-shadow: inset 0 0 0 1px #3157d5;
}

.spt-split__mode-option input {
  margin-top: 0.25rem;
  accent-color: #3157d5;
}

.spt-split__mode-option span {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.spt-split__custom-fields {
  padding: 0.2rem 0 0.4rem 2rem;
}

.spt-split__custom-fields label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 700;
}

.spt-split__groups {
  width: 100%;
  min-height: 46px;
  padding: 0.7rem 0.8rem;
  border: 1px solid #aeb7c5;
  border-radius: 10px;
  background: #fff;
  color: #172033;
  font: inherit;
}

.spt-split__groups:focus {
  border-color: #3157d5;
  outline: 3px solid rgba(49, 87, 213, 0.18);
  outline-offset: 1px;
}

.spt-split__help {
  margin: 0.45rem 0 0;
  font-size: 0.88rem;
}

.spt-split__help code {
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  background: #eef1f5;
  color: #172033;
}

.spt-split-button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease;
}

.spt-split-button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.spt-split-button:focus-visible {
  outline: 3px solid rgba(49, 87, 213, 0.28);
  outline-offset: 2px;
}

.spt-split-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.spt-split-button--primary {
  min-width: 200px;
  padding: 0.85rem 1.25rem;
  background: #3157d5;
  color: #fff;
}

.spt-split-button--secondary {
  margin-top: 0.35rem;
  padding: 0.75rem 1.1rem;
  background: #172033;
  color: #fff;
}

.spt-split-button--text {
  padding: 0.5rem;
  background: transparent;
  color: #3157d5;
}

.spt-split-button--download {
  flex: 0 0 auto;
  padding: 0.65rem 0.9rem;
  background: #3157d5;
  color: #fff;
}

.spt-split__actions {
  display: flex;
  justify-content: center;
  margin-top: 1.35rem;
}

.spt-split__results {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #d9dde3;
}

.spt-split__results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.spt-split__results-header h3 {
  margin: 0;
}

.spt-split__results-help {
  margin: 0.45rem 0 0.85rem;
  font-size: 0.9rem;
}

.spt-split__downloads {
  display: grid;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.spt-split__download-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid #d9dde3;
  border-radius: 12px;
  background: #fff;
}

.spt-split__status {
  min-height: 1.5em;
  margin-top: 1rem;
  text-align: center;
  line-height: 1.5;
}

.spt-split__status--success {
  color: #176b3a;
}

.spt-split__status--error,
.spt-split__error {
  color: #a61b1b;
}

@media (max-width: 600px) {
  .spt-split {
    margin: 1rem auto;
    border-radius: 14px;
  }

  .spt-split__dropzone {
    min-height: 210px;
  }

  .spt-split__file-card,
  .spt-split__download-item,
  .spt-split__results-header {
    align-items: stretch;
    flex-direction: column;
  }

  .spt-split__custom-fields {
    padding-left: 0;
  }

  .spt-split-button--download {
    width: 100%;
  }
}
