/* ==========================================================================
   SMUI.HTML: DOE (smui-p-doe.js)
   The design dialogs (responses, factors, the list of designs, output
   options), Evaluate Design and Sample Size and Power. kvot.css's tokens.
   ========================================================================== */

.sm-doe-dialog { width: min(760px, 100%); }
.sm-doe-sec { margin: 0 0 10px; padding: 6px 10px 8px; border: 1px solid var(--border-color); border-radius: 4px; min-width: 0; }
.sm-doe-sec legend { padding: 0 4px; font-size: 11px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-secondary); }
.sm-doe-list { display: flex; flex-direction: column; gap: 4px; margin-bottom: 6px; }
.sm-doe-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.sm-doe-sec input[type="text"], .sm-doe-sec select, .sm-pw-form input[type="text"], .sm-pw-form select {
  padding: 2px 5px; border: 1px solid var(--border-color); border-radius: 3px; background: var(--input-bg); color: var(--text-primary); font: inherit; min-width: 0;
}
.sm-doe-scroll { max-height: 280px; overflow: auto; margin-bottom: 6px; }
.sm-doe-factors { border-collapse: collapse; font-size: 12px; }
.sm-doe-factors th { text-align: left; font-weight: 600; font-size: 11.5px; color: var(--text-secondary); padding: 2px 6px 3px 0; }
.sm-doe-factors td { padding: 2px 6px 2px 0; vertical-align: middle; }
.sm-doe-values { display: flex; align-items: center; gap: 5px; }
.sm-doe-designs { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; gap: 1px 10px; align-items: center; font-size: 12px; max-height: 220px; overflow-y: auto; }
.sm-doe-dhead { display: contents; }
.sm-doe-dhead span { font-size: 11px; font-weight: 600; color: var(--text-secondary); }
.sm-doe-dhead span:first-child { grid-column: 2; }
.sm-doe-design { display: contents; cursor: pointer; }
.sm-doe-design input { grid-column: 1; margin: 2px 0; }
.sm-doe-design span { font-variant-numeric: tabular-nums; }
.sm-doe-design:hover span { color: var(--link-color); }
.sm-doe-terms { margin: 2px 0 6px; font-size: 12px; max-width: 760px; line-height: 1.5; overflow-wrap: anywhere; }

/* Sample Size and Power */
.sm-pw-sits { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 10px; }
.sm-pw-sits .sm-btn.is-on { background: var(--accent-fill); border-color: var(--accent-fill); color: #fff; }
.sm-pw-top { display: flex; flex-wrap: wrap; gap: 14px 30px; align-items: flex-start; }
.sm-pw-form { max-width: 460px; }
.sm-pw-form input.is-solved::placeholder { color: var(--link-color); font-weight: 600; opacity: 1; }
.sm-pw-go { margin-top: 8px; }
.sm-pw-results { min-width: 260px; max-width: 520px; }

@media (max-width: 760px) {
  .sm-doe-designs { grid-template-columns: auto auto minmax(0, 1fr) auto; font-size: 11.5px; }
  .sm-pw-form { max-width: 100%; }
}
