.smtoc-wrap,
.smtoc-wrap * {
  box-sizing: border-box;
}

.smtoc-wrap {
  --smtoc-text: #222;
  --smtoc-muted: #666;
  --smtoc-line: #e7e3dc;
  --smtoc-soft: #f7f3ed;
  --smtoc-card: #fff;
  --smtoc-accent: #1f1f1f;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--smtoc-text);
  max-width: 980px;
  margin: 0 auto;
  font-size: 15px;
  line-height: 1.45;
}

.smtoc-head {
  background: linear-gradient(135deg, #f7f3ed, #ffffff);
  border: 1px solid var(--smtoc-line);
  border-radius: 18px;
  padding: 24px;
  margin-bottom: 16px;
}

.smtoc-kicker {
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--smtoc-muted);
  margin-bottom: 5px;
}

.smtoc-head h2 {
  font-size: 30px;
  line-height: 1.1;
  margin: 0 0 8px;
  font-weight: 600;
}

.smtoc-head p {
  margin: 0;
  max-width: 720px;
  color: var(--smtoc-muted);
}

.smtoc-card,
.smtoc-results {
  background: var(--smtoc-card);
  border: 1px solid var(--smtoc-line);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 14px;
}

.smtoc-card h3,
.smtoc-results h3 {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 600;
}

.smtoc-grid {
  display: grid;
  gap: 14px;
}

.smtoc-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.smtoc-top-gap {
  margin-top: 14px;
}

.smtoc-wrap label {
  display: block;
  font-size: 13px;
  color: #3a3a3a;
  font-weight: 500;
}

.smtoc-wrap label span {
  color: var(--smtoc-muted);
  font-weight: 400;
}

.smtoc-wrap input,
.smtoc-wrap select,
.smtoc-wrap textarea {
  width: 100%;
  margin-top: 6px;
  border: 1px solid #d8d2c8;
  border-radius: 12px;
  padding: 11px 12px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  font-weight: 400;
  background: #fff;
  color: var(--smtoc-text);
  outline: none;
}

.smtoc-wrap input:focus,
.smtoc-wrap select:focus,
.smtoc-wrap textarea:focus {
  border-color: #999083;
  box-shadow: 0 0 0 3px rgba(120, 110, 96, .12);
}

.smtoc-custom-plate {
  display: none;
}

.smtoc-custom-on .smtoc-custom-plate {
  display: block;
}

.smtoc-check {
  display: flex !important;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
}

.smtoc-check input {
  width: auto;
  margin: 3px 0 0;
}

.smtoc-result-empty {
  color: var(--smtoc-muted);
  background: var(--smtoc-soft);
  border-radius: 12px;
  padding: 14px;
}

.smtoc-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.smtoc-stat {
  background: var(--smtoc-soft);
  border-radius: 14px;
  padding: 12px;
}

.smtoc-stat strong {
  display: block;
  font-size: 21px;
  line-height: 1.15;
  font-weight: 600;
}

.smtoc-stat span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--smtoc-muted);
}

.smtoc-svg-wrap {
  border: 1px solid var(--smtoc-line);
  background: #fafafa;
  border-radius: 14px;
  padding: 12px;
  overflow: auto;
}

.smtoc-svg-wrap svg {
  display: block;
  width: 100%;
  min-width: 420px;
  max-height: 480px;
}

.smtoc-detail-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
  font-size: 14px;
}

.smtoc-detail-table th,
.smtoc-detail-table td {
  text-align: left;
  border-bottom: 1px solid var(--smtoc-line);
  padding: 9px 6px;
}

.smtoc-detail-table th {
  color: var(--smtoc-muted);
  font-weight: 500;
}

.smtoc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
}

.smtoc-submit,
.smtoc-pdf-link {
  appearance: none;
  border: none;
  border-radius: 999px;
  background: var(--smtoc-accent);
  color: #fff !important;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  font-weight: 500;
  padding: 12px 18px;
  text-decoration: none !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.smtoc-submit[disabled] {
  opacity: .55;
  cursor: wait;
}

.smtoc-submit-state {
  color: var(--smtoc-muted);
  font-size: 14px;
}

.smtoc-submit-state.smtoc-error {
  color: #9b1c1c;
}

.smtoc-submit-state.smtoc-success {
  color: #176b36;
}

@media (max-width: 760px) {
  .smtoc-grid-2,
  .smtoc-grid-3,
  .smtoc-summary {
    grid-template-columns: 1fr;
  }
  .smtoc-head h2 {
    font-size: 24px;
  }
  .smtoc-card,
  .smtoc-results,
  .smtoc-head {
    padding: 15px;
    border-radius: 14px;
  }
}

.smtoc-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.smtoc-lang-switch {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--smtoc-line);
  border-radius: 999px;
  background: #fff;
  flex: 0 0 auto;
}

.smtoc-lang {
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--smtoc-muted);
  padding: 7px 11px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

.smtoc-lang.is-active {
  background: var(--smtoc-accent);
  color: #fff;
}

.smtoc-label-text {
  color: #3a3a3a !important;
  font-weight: 500 !important;
}

.smtoc-unit {
  color: var(--smtoc-muted) !important;
  font-weight: 400 !important;
}

@media (max-width: 640px) {
  .smtoc-head {
    flex-direction: column;
  }
}

.smtoc-help {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--smtoc-muted);
  font-weight: 400;
}

.smtoc-preview-note {
  margin-top: 8px;
  font-size: 12px;
  color: var(--smtoc-muted);
}

.smtoc-top-upload-card input[type="file"] {
  padding: 9px 10px;
  background: #fbfaf8;
}

.smtoc-help,
.smtoc-mode-note {
  display: block;
  margin-top: 7px;
  color: var(--smtoc-muted);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 400;
}

.smtoc-help-block {
  margin: -4px 0 14px;
}

.smtoc-custom-grid-card,
.smtoc-custom-grid-only {
  display: none;
}

.smtoc-grid-mode-custom .smtoc-custom-grid-card,
.smtoc-grid-mode-custom .smtoc-custom-grid-only {
  display: block;
}

.smtoc-grid-buttons {
  display: flex;
  gap: 8px;
  align-items: end;
  padding-top: 22px;
}

.smtoc-secondary {
  appearance: none;
  border: 1px solid #d8d2c8;
  border-radius: 999px;
  background: #fff;
  color: var(--smtoc-text);
  padding: 10px 13px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}

.smtoc-secondary:hover {
  background: var(--smtoc-soft);
}

.smtoc-grid-editor {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.smtoc-grid-dim-group {
  border: 1px solid var(--smtoc-line);
  border-radius: 14px;
  padding: 12px;
  background: #fbfaf8;
}

.smtoc-grid-dim-group h4 {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 600;
}

.smtoc-dim-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.smtoc-dim-list label span {
  font-size: 12px;
}

.smtoc-dim-list input {
  padding: 8px 9px;
  border-radius: 10px;
  font-size: 14px;
}

.smtoc-grid-status {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.smtoc-grid-status span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  background: var(--smtoc-soft);
  padding: 6px 10px;
  font-size: 12px;
  color: var(--smtoc-muted);
}

.smtoc-error-inline {
  color: #8a2d2d;
  background: #fff2f2;
  border: 1px solid #f1c7c7;
}

@media (max-width: 760px) {
  .smtoc-grid-editor {
    grid-template-columns: 1fr;
  }
  .smtoc-dim-list {
    grid-template-columns: 1fr;
  }
  .smtoc-grid-buttons {
    padding-top: 0;
    align-items: stretch;
    flex-direction: column;
  }
}

.smtoc-mini-title {
  margin: 14px 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--smtoc-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.smtoc-board-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.smtoc-board-choice {
  position: relative;
  display: flex !important;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid #d8d2c8;
  border-radius: 14px;
  padding: 14px;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.smtoc-board-choice:hover,
.smtoc-board-choice:has(input:checked) {
  border-color: #999083;
  background: #faf8f4;
  box-shadow: 0 0 0 3px rgba(120, 110, 96, .10);
}

.smtoc-board-choice input {
  width: auto;
  margin: 4px 0 0;
}

.smtoc-board-main {
  display: block;
  color: var(--smtoc-text) !important;
  font-size: 18px;
  font-weight: 600 !important;
  line-height: 1.2;
}

.smtoc-board-sub {
  display: block;
  margin-top: 4px;
  color: var(--smtoc-muted) !important;
  font-size: 13px;
}

@media (max-width: 720px) {
  .smtoc-board-choices {
    grid-template-columns: 1fr;
  }
}

/* v1.6 readability modes */
.smtoc-grid-mode-simple .smtoc-custom-grid-card,
.smtoc-grid-mode-simple .smtoc-individual-card,
.smtoc-grid-mode-simple .smtoc-custom-grid-only {
  display: none;
}

.smtoc-grid-mode-custom .smtoc-individual-card,
.smtoc-grid-mode-individual .smtoc-custom-grid-card,
.smtoc-grid-mode-individual .smtoc-custom-grid-only,
.smtoc-grid-mode-individual .smtoc-project-size-card {
  display: none;
}

.smtoc-grid-mode-custom .smtoc-custom-grid-card,
.smtoc-grid-mode-custom .smtoc-custom-grid-only,
.smtoc-grid-mode-individual .smtoc-individual-card {
  display: block;
}

.smtoc-simple-only {
  display: none;
}

.smtoc-grid-mode-simple .smtoc-simple-only {
  display: block;
}

.smtoc-mode-tip {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  background: var(--smtoc-soft);
  border: 1px solid var(--smtoc-line);
  border-radius: 13px;
  padding: 11px 12px;
  margin: -4px 0 14px;
  font-size: 13px;
  color: var(--smtoc-muted);
}

.smtoc-mode-tip strong {
  color: var(--smtoc-text);
  white-space: nowrap;
}

.smtoc-elements-editor {
  border: 1px solid var(--smtoc-line);
  border-radius: 14px;
  overflow: hidden;
  background: #fbfaf8;
}

.smtoc-elements-head,
.smtoc-element-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr .75fr auto;
  gap: 8px;
  align-items: end;
  padding: 10px;
}

.smtoc-elements-head {
  background: var(--smtoc-soft);
  color: var(--smtoc-muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.smtoc-element-row + .smtoc-element-row {
  border-top: 1px solid var(--smtoc-line);
}

.smtoc-element-row label span {
  display: none;
}

.smtoc-element-row input {
  margin-top: 0;
  padding: 9px 10px;
  border-radius: 10px;
  font-size: 14px;
}

.smtoc-remove-element {
  appearance: none;
  border: 1px solid #d8d2c8;
  border-radius: 999px;
  background: #fff;
  color: var(--smtoc-muted);
  padding: 9px 12px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}

.smtoc-remove-element:hover {
  background: #fff2f2;
  color: #8a2d2d;
  border-color: #f1c7c7;
}

.smtoc-elements-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

@media (max-width: 760px) {
  .smtoc-elements-head {
    display: none;
  }
  .smtoc-element-row {
    grid-template-columns: 1fr 1fr;
    border-top: 1px solid var(--smtoc-line);
  }
  .smtoc-element-row label span {
    display: block;
    font-size: 12px;
  }
  .smtoc-remove-element {
    grid-column: 1 / -1;
  }
}

.smtoc-individual-card {
  display: none;
}
.smtoc-send-center{margin-left:10px;padding:9px 14px;border:0;border-radius:8px;background:#23272d;color:#fff;font:inherit;font-weight:700;cursor:pointer}.smtoc-send-center:hover{opacity:.9}.smtoc-send-center:disabled{cursor:default;opacity:.7}.smtoc-send-center.is-sent{background:#247a42}
