.sdev-st-sdt-wrap {
  max-width: 740px;
  margin: 22px auto;
  padding: 20px;
  background: #ffffff;
  border: 1px solid #d9e2ec;
  border-top: 4px solid #2563eb;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
  font-family: inherit;
  color: #1e293b;
  box-sizing: border-box;
}

.sdev-st-sdt-wrap *,
.sdev-st-sdt-wrap *::before,
.sdev-st-sdt-wrap *::after {
  box-sizing: border-box;
}

.sdev-st-sdt-wrap [hidden] {
  display: none !important;
}

/* हेडर */
.sdev-st-sdt-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid #f1f5f9;
}

.sdev-st-sdt-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  font-size: 16px;
  font-weight: 700;
  padding: 6px 13px;
  border-radius: 999px;
}

.sdev-st-sdt-subtag {
  font-size: 12.5px;
  font-weight: 600;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 4px 10px;
  border-radius: 6px;
}

/* मुख्य टैब्स */
.sdev-st-sdt-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: #f1f5f9;
  padding: 5px;
  border-radius: 12px;
  margin-bottom: 16px;
}

.sdev-st-sdt-wrap .sdev-st-sdt-tab {
  min-height: 42px;
  padding: 8px 10px;
  border: none !important;
  border-radius: 9px;
  background: transparent !important;
  color: #475569 !important;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sdev-st-sdt-wrap .sdev-st-sdt-tab.is-active {
  background: #ffffff !important;
  color: #1d4ed8 !important;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

/* विजुअल सूत्र त्रिभुज बॉक्स */
.sdev-st-sdt-visual-box {
  display: flex;
  align-items: center;
  gap: 18px;
  background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
  border: 1px solid #dbeafe;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.sdev-st-sdt-svg-wrap {
  flex: 0 0 185px;
  max-width: 185px;
}

.sdev-st-sdt-svg {
  width: 100%;
  height: auto;
  display: block;
}

.sdev-st-tri-zone {
  transition: fill 0.25s ease;
}

.sdev-st-tri-zone.is-highlighted {
  fill: #2563eb;
}

.sdev-st-tri-text.is-highlighted {
  fill: #ffffff;
}

.sdev-st-sdt-formula-info {
  flex: 1;
}

.sdev-st-sdt-formula-cap {
  font-size: 12.5px;
  font-weight: 700;
  color: #1d4ed8;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 6px;
}

.sdev-st-sdt-live-formula {
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.35;
}

.sdev-st-sdt-live-sym {
  display: inline-block;
  margin-top: 5px;
  padding: 3px 10px;
  background: #ffffff;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  font-family: Consolas, Monaco, monospace;
  font-size: 14.5px;
  font-weight: 700;
  color: #1d4ed8;
}

.sdev-st-sdt-formula-tip {
  margin: 8px 0 0;
  font-size: 13px;
  color: #475569;
  line-height: 1.5;
}

/* मोड चयन */
.sdev-st-sdt-section-label {
  font-size: 14px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 8px;
}

.sdev-st-sdt-modes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.sdev-st-sdt-wrap .sdev-st-sdt-mode-btn {
  min-height: 44px;
  padding: 9px 8px;
  border-radius: 10px;
  border: 1.5px solid #cbd5e1 !important;
  background: #f8fafc !important;
  color: #334155 !important;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sdev-st-sdt-wrap .sdev-st-sdt-mode-btn:hover {
  border-color: #60a5fa !important;
  background: #eff6ff !important;
}

.sdev-st-sdt-wrap .sdev-st-sdt-mode-btn.is-active {
  background: #2563eb !important;
  border-color: #2563eb !important;
  color: #ffffff !important;
}

/* उदाहरण बटन */
.sdev-st-sdt-examples {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding: 10px 12px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
}

.sdev-st-sdt-ex-label {
  font-size: 13px;
  font-weight: 700;
  color: #92400e;
}

.sdev-st-sdt-wrap .sdev-st-sdt-ex-btn {
  padding: 5px 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: #92400e !important;
  background: #ffffff !important;
  border: 1px solid #fcd34d !important;
  border-radius: 7px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.sdev-st-sdt-wrap .sdev-st-sdt-ex-btn:hover {
  background: #fef3c7 !important;
}

/* इनपुट फ़ील्ड्स */
.sdev-st-sdt-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.sdev-st-sdt-field {
  min-width: 0;
  max-width: 100%;
}

.sdev-st-sdt-field label {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 6px;
}

.sdev-st-field-outunit {
  grid-column: 1 / -1;
}

.sdev-st-sdt-input-group {
  display: flex;
  align-items: stretch;
  gap: 6px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.sdev-st-sdt-input-group input {
  flex: 1 1 0%;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 9px 12px;
  font-size: 16px;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  color: #0f172a;
}

.sdev-st-sdt-wrap .sdev-st-sdt-input-group select,
.sdev-st-sdt-wrap .sdev-st-out-unit {
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
  padding: 9px 32px 9px 10px;
  font-size: 14px;
  font-weight: 700;
  border: 1.5px solid #93c5fd;
  border-radius: 10px;
  background-color: #eff6ff;
  color: #1e3a8a;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%231d4ed8' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 14px;
  transition:
    border-color 0.2s ease,
    background-color 0.2s ease;
}

.sdev-st-sdt-wrap .sdev-st-sdt-input-group select {
  flex: 0 1 auto;
  width: auto !important;
  max-width: 56%;
}

.sdev-st-sdt-wrap .sdev-st-sdt-input-group select:hover,
.sdev-st-sdt-wrap .sdev-st-out-unit:hover {
  background-color: #dbeafe;
  border-color: #2563eb;
}

.sdev-st-sdt-wrap .sdev-st-out-unit {
  width: 100% !important;
  max-width: 100%;
}

.sdev-st-sdt-input-group input:focus,
.sdev-st-sdt-input-group select:focus,
.sdev-st-out-unit:focus {
  outline: none;
  border-color: #2563eb;
}

/* त्रुटि संदेश */
.sdev-st-sdt-error {
  margin-bottom: 14px;
  padding: 11px 14px;
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-left: 4px solid #dc2626;
  border-radius: 9px;
  color: #991b1b;
  font-size: 14px;
  font-weight: 600;
}

/* क्रिया बटन */
.sdev-st-sdt-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.sdev-st-sdt-btn-solve,
.sdev-st-sdt-btn-check {
  flex: 2;
  min-height: 46px;
  padding: 10px 16px;
  background-color: #16a34a !important;
  color: #ffffff !important;
  border: none;
  border-radius: 10px;
  font-size: 15.5px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.sdev-st-sdt-wrap .sdev-st-sdt-btn-clear,
.sdev-st-sdt-wrap .sdev-st-sdt-btn-new-q {
  flex: 1;
  min-height: 46px;
  padding: 10px 12px;
  background: #f1f5f9 !important;
  color: #334155 !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
}

.sdev-st-sdt-btn-solve:hover,
.sdev-st-sdt-btn-check:hover {
  opacity: 0.92;
}

/* Step-by-Step हल कार्ड्स */
.sdev-st-sdt-result {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 2px dashed #e2e8f0;
}

.sdev-st-step-card {
  padding: 13px 15px;
  border-radius: 11px;
  margin-bottom: 11px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #2563eb;
}

.sdev-st-step-given {
  border-left-color: #2563eb;
  background: #eff6ff;
}
.sdev-st-step-convert {
  border-left-color: #d97706;
  background: #fffbeb;
}
.sdev-st-step-formula {
  border-left-color: #7c3aed;
  background: #f5f3ff;
}
.sdev-st-step-calc {
  border-left-color: #0284c7;
  background: #f0f9ff;
}
.sdev-st-step-final {
  border-left-color: #16a34a;
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border-color: #86efac;
}

.sdev-st-step-tag {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 800;
  padding: 2px 9px;
  border-radius: 6px;
  margin-bottom: 6px;
  background: #ffffff;
  color: #0f172a;
  border: 1px solid rgba(15, 23, 42, 0.1);
}

.sdev-st-step-body {
  font-size: 15px;
  line-height: 1.65;
  color: #1e293b;
}

.sdev-st-step-body div + div {
  margin-top: 4px;
}

.sdev-st-final-ans {
  font-size: 21px;
  font-weight: 800;
  color: #14532d;
  margin: 4px 0;
}

.sdev-st-final-note {
  font-size: 14.5px;
  font-weight: 600;
  color: #166534;
}

/* शेयर व कॉपी फुटर */
.sdev-st-sdt-result-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.sdev-st-sdt-btn-copy,
.sdev-st-sdt-btn-wa {
  flex: 1 1 180px;
  min-height: 43px;
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  border: none;
}

.sdev-st-sdt-wrap .sdev-st-sdt-btn-copy {
  background: #f1f5f9 !important;
  color: #334155 !important;
  border: 1px solid #cbd5e1 !important;
}

.sdev-st-sdt-wrap .sdev-st-sdt-btn-wa {
  background: #16a34a !important;
  color: #ffffff !important;
  border: none !important;
}

/* खुद जाँचें (Practice Mode) */
.sdev-st-sdt-pr-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 18px;
}

.sdev-st-sdt-pr-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.sdev-st-sdt-pr-badge {
  font-size: 13px;
  font-weight: 700;
  color: #1d4ed8;
  background: #dbeafe;
  padding: 4px 10px;
  border-radius: 999px;
}

.sdev-st-sdt-pr-score {
  font-size: 13.5px;
  font-weight: 700;
  color: #15803d;
}

.sdev-st-sdt-pr-question {
  margin: 0 0 8px;
  font-size: 17.5px;
  font-weight: 700;
  line-height: 1.55;
  color: #0f172a;
}

.sdev-st-sdt-pr-note {
  margin: 0 0 12px;
  font-size: 13.5px;
  color: #475569;
}

.sdev-st-sdt-pr-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.sdev-st-pr-answer {
  flex: 1 1 0%;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 10px 14px;
  font-size: 16px;
  border: 1.5px solid #94a3b8;
  border-radius: 10px;
  background: #ffffff;
}

.sdev-st-pr-unit-label {
  font-size: 15px;
  font-weight: 700;
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 10px 14px;
  border-radius: 10px;
  white-space: nowrap;
}

.sdev-st-sdt-pr-feedback {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
}

.sdev-st-sdt-pr-feedback.is-right {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.sdev-st-sdt-pr-feedback.is-wrong {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.sdev-st-sdt-pr-steps {
  margin-top: 14px;
}

/* मोबाइल रिस्पॉन्सिव */
@media (max-width: 600px) {
  .sdev-st-sdt-wrap {
    padding: 14px;
  }
  .sdev-st-sdt-visual-box {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
  .sdev-st-sdt-svg-wrap {
    flex: none;
    width: 170px;
  }
  .sdev-st-sdt-inputs {
    grid-template-columns: 1fr;
  }
  .sdev-st-sdt-mode-btn {
    font-size: 13px;
    padding: 8px 4px;
  }
  .sdev-st-sdt-actions {
    flex-direction: column;
  }
  .sdev-st-final-ans {
    font-size: 19px;
  }
}
/* औसत चाल (Average Speed) स्टाइल्स */
.sdev-st-avg-box {
  grid-column: 1 / -1;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 14px;
}

.sdev-st-avg-subtype {
  margin-bottom: 12px;
}

.sdev-st-avg-sublabel {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 7px;
}

.sdev-st-avg-subbtns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.sdev-st-sdt-wrap .sdev-st-avg-type-btn {
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 9px;
  border: 1.5px solid #cbd5e1 !important;
  background: #ffffff !important;
  color: #334155 !important;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
}

.sdev-st-sdt-wrap .sdev-st-avg-type-btn.is-active {
  background: #1d4ed8 !important;
  border-color: #1d4ed8 !important;
  color: #ffffff !important;
}

.sdev-st-avg-presets {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 12.5px;
  font-weight: 700;
  color: #1e40af;
}

.sdev-st-sdt-wrap .sdev-st-avg-preset-btn {
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 600;
  color: #1e40af !important;
  background: #eff6ff !important;
  border: 1px solid #93c5fd !important;
  border-radius: 6px;
  cursor: pointer;
}

.sdev-st-avg-row {
  background: #ffffff;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  padding: 11px 12px;
  margin-bottom: 10px;
}

.sdev-st-avg-row-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.sdev-st-avg-row-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #1d4ed8;
}

.sdev-st-sdt-wrap .sdev-st-avg-remove-btn {
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 700;
  color: #b91c1c !important;
  background: #fef2f2 !important;
  border: 1px solid #fca5a5 !important;
  border-radius: 6px;
  cursor: pointer;
}

.sdev-st-avg-row-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.sdev-st-avg-row-grid > div {
  min-width: 0;
}

.sdev-st-avg-row-grid label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: #475569;
  margin-bottom: 4px;
}

.sdev-st-sdt-wrap .sdev-st-avg-add-btn {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 9px;
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  border: 1.5px dashed #60a5fa !important;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
}

.sdev-st-avg-warning {
  margin-top: 10px;
  padding: 10px 12px;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-left: 4px solid #d97706;
  border-radius: 8px;
  font-size: 13.5px;
  line-height: 1.6;
  color: #78350f;
}

@media (max-width: 600px) {
  .sdev-st-sdt-badge {
    font-size: 14.5px;
    border-radius: 12px;
  }
  .sdev-st-sdt-inputs {
    grid-template-columns: minmax(0, 1fr);
  }
  .sdev-st-sdt-modes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sdev-st-avg-box {
    padding: 10px;
  }
  .sdev-st-avg-row {
    padding: 10px;
  }
  .sdev-st-avg-subbtns,
  .sdev-st-avg-row-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .sdev-st-sdt-wrap .sdev-st-sdt-input-group select {
    max-width: 58%;
    font-size: 13px;
    padding: 9px 26px 9px 8px;
    background-position: right 8px center;
    background-size: 12px;
  }
  .sdev-st-step-body {
    overflow-wrap: anywhere;
  }
}

@media (max-width: 440px) {
  .sdev-st-avg-row .sdev-st-sdt-input-group {
    flex-direction: column;
  }
  .sdev-st-sdt-wrap .sdev-st-avg-row .sdev-st-sdt-input-group select {
    width: 100% !important;
    max-width: 100%;
  }
}

@media (max-width: 380px) {
  .sdev-st-sdt-input-group {
    flex-direction: column;
  }
  .sdev-st-sdt-wrap .sdev-st-sdt-input-group select {
    width: 100% !important;
    max-width: 100%;
  }
}
