.cst-intake {
  max-width: 52rem;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--clinic-border, #e0d6dc);
  border-radius: 2px;
  padding: 1.75rem 1.5rem 2rem;
  box-shadow: 0 12px 32px rgba(52, 26, 47, 0.08);
}

.cst-panel {
  margin-bottom: 1.25rem;
}

.cst-panel label {
  display: block;
  font-weight: 700;
  margin: 0.75rem 0 0.35rem;
}

.cst-panel input[type="text"],
.cst-panel input[type="email"],
.cst-panel input[type="tel"],
.cst-panel select,
.cst-panel textarea,
.cst-panel .form-control {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid #cfcfcf;
  border-radius: 2px;
  font: inherit;
  min-height: 44px;
  background: #fff;
}

.cst-progress {
  margin-bottom: 1.75rem;
}

.cst-progress__label {
  font-family: "Raleway", sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cdsm-muted);
  margin-bottom: 0.5rem;
}

.cst-progress__track {
  height: 6px;
  background: #e6e6e6;
  border-radius: 99px;
  overflow: hidden;
}

.cst-progress__bar {
  height: 100%;
  background: var(--cdsm-skin);
  width: 0;
  transition: width 0.2s ease;
}

.cst-intake fieldset {
  border: 1px solid #e4e4e4;
  padding: 1.25rem 1.15rem 1.4rem;
  margin: 0 0 1.25rem;
  border-radius: 2px;
  background: #fff;
}

.cst-intake legend,
.cst-legend {
  font-family: "Raleway", sans-serif;
  font-weight: 700;
  padding: 0 0.4rem;
  color: var(--cdsm-secondary);
}

.cst-legend {
  padding: 0;
  margin-bottom: 0.45rem;
}

details.cst-cond-group {
  border: 1px solid #e4e4e4;
  padding: 0.65rem 0.9rem 0.85rem;
  margin: 0 0 0.75rem;
  border-radius: 2px;
  background: #fafafa;
}

details.cst-cond-group > summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--cdsm-secondary);
  min-height: 44px;
  display: flex;
  align-items: center;
}

.cst-field {
  margin-bottom: 1rem;
}

.cst-field label,
.cst-check {
  display: block;
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 0.35rem;
}

.cst-optional {
  font-weight: 400;
  color: var(--cdsm-muted);
  font-size: 0.82rem;
}

.cst-hint {
  display: block;
  color: var(--cdsm-muted);
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

.cst-intake input[type="text"],
.cst-intake input[type="email"],
.cst-intake input[type="tel"],
.cst-intake input[type="date"],
.cst-intake input[type="number"],
.cst-intake input[type="search"],
.cst-intake select,
.cst-intake textarea {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid #cfcfcf;
  border-radius: 2px;
  font: inherit;
  min-height: 44px;
}

.cst-intake textarea {
  min-height: 96px;
}

.cst-intake input:focus-visible,
.cst-intake select:focus-visible,
.cst-intake textarea:focus-visible,
.cst-intake button:focus-visible,
.cst-intake a:focus-visible {
  outline: 3px solid var(--cdsm-skin);
  outline-offset: 2px;
}

.cst-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.cst-choices {
  display: grid;
  gap: 0.4rem;
}

.cst-check {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  font-weight: 400;
  min-height: 44px;
  padding: 0.35rem 0;
}

.cst-check input {
  margin-top: 0.25rem;
  width: 1.1rem;
  height: 1.1rem;
  flex: 0 0 auto;
}

.cst-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  margin-top: 1.5rem;
}

.cst-actions .cdsm-btn {
  background: var(--cdsm-secondary);
  color: #fff !important;
  min-height: 44px;
}

.cst-error-summary {
  background: #fff4f0;
  border: 1px solid #e2b8a8;
  padding: 1rem 1.15rem;
  margin-bottom: 1.25rem;
}

.cst-error-summary[data-type="server"] {
  background: #f5f7fa;
  border-color: #c5cdd8;
}

.cst-error-summary h2 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.cst-error-summary ul {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
}

.cst-error-summary a {
  color: #7a2e1b;
  text-decoration: underline;
  cursor: pointer;
}

.cst-error-summary[data-type="server"] a {
  color: inherit;
  text-decoration: none;
  cursor: default;
}

.cst-field-error {
  display: none;
  color: #8a2b1a;
  font-size: 0.88rem;
  margin-top: 0.35rem;
}

.cst-field.is-invalid .cst-field-error {
  display: block;
}

.cst-field.is-invalid input,
.cst-field.is-invalid select,
.cst-field.is-invalid textarea {
  border-color: #a33;
}

.cst-field.is-invalid .cst-choices {
  outline: 2px solid #a33;
  outline-offset: 4px;
}

.cst-check.is-invalid {
  outline: 2px solid #a33;
  outline-offset: 2px;
}

.cst-repeat-row {
  border: 1px dashed #d7d7d7;
  padding: 0.85rem;
  margin-bottom: 0.75rem;
}

.cst-hidden {
  display: none;
}

.cst-honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.cst-review-block {
  border-bottom: 1px solid #eee;
  padding: 0.85rem 0;
}

.cst-review-block h3 {
  font-size: 1rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.cst-success {
  text-align: center;
  padding: 2rem 0 3rem;
}

.cst-filter {
  margin-bottom: 0.75rem;
}

@media (max-width: 700px) {
  .cst-grid-2 {
    grid-template-columns: 1fr;
  }
}
