/* Tool Factory Starter v1.0.0; all selectors are scoped to .tfst. */
.tfst {
  --tfst-primary: #1d4ed8;
  --tfst-primary-hover: #1e40af;
  --tfst-ink: #14233b;
  --tfst-muted: #51617a;
  --tfst-border: #dbe3ef;
  --tfst-surface: #fff;
  --tfst-soft: #f4f8ff;
  --tfst-error: #9f1239;
  box-sizing: border-box;
  width: 100%;
  max-width: 860px;
  margin: 0 auto 24px;
  padding: clamp(18px, 4vw, 32px);
  border: 1px solid var(--tfst-border);
  border-radius: 18px;
  box-shadow: 0 8px 28px rgb(20 35 59 / 6%);
  background: var(--tfst-surface);
  color: var(--tfst-ink);
  font-family: inherit;
}
.tfst *, .tfst *::before, .tfst *::after { box-sizing: border-box; }
.tfst .tfst-heading { font-size: clamp(22px, 3vw, 28px); line-height: 1.25; font-weight: 750; margin: 0 0 9px; color: var(--tfst-ink); }
.tfst .tfst-description { margin: 0 0 24px; color: var(--tfst-muted); line-height: 1.6; }
.tfst .tfst-note { color: var(--tfst-muted); font-size: 12px; line-height: 1.5; margin: 15px 0 0; }
.tfst .tfst-form { margin: 0; }
.tfst .tfst-fields { display: grid; gap: 18px; margin-bottom: 18px; }
.tfst .tfst-fields--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tfst .tfst-field { min-width: 0; margin-bottom: 18px; }
.tfst .tfst-fields .tfst-field { margin-bottom: 0; }
.tfst label { display: block; color: var(--tfst-ink); font-weight: 650; font-size: 14px; margin-bottom: 8px; }
.tfst input, .tfst textarea, .tfst select {
  display: block; width: 100%; margin: 0; min-height: 46px;
  border: 1px solid #a8b8ce; border-radius: 10px;
  background: #fff; color: var(--tfst-ink); padding: 10px 12px;
  font-family: inherit; font-size: 16px; line-height: 1.5;
}
.tfst textarea { min-height: 132px; resize: vertical; }
.tfst input:focus-visible, .tfst textarea:focus-visible, .tfst select:focus-visible, .tfst button:focus-visible {
  outline: 3px solid #93c5fd; outline-offset: 2px;
}
.tfst .tfst-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  max-width: 100%; min-height: 46px; padding: 11px 20px;
  font-family: inherit; font-size: 15px; font-weight: 700; line-height: 1.25;
  background: var(--tfst-primary); color: white; border: 1px solid transparent;
  border-radius: 10px; cursor: pointer; text-decoration: none;
  transition: background-color .15s ease, transform .15s ease;
}
.tfst .tfst-button:hover { background: var(--tfst-primary-hover); color: white; }
.tfst .tfst-button:active { transform: translateY(1px); }
.tfst .tfst-button--secondary { background: var(--tfst-soft); color: var(--tfst-primary-hover); border-color: #bad0fa; }
.tfst .tfst-button--secondary:hover { background: #e0ebff; color: var(--tfst-primary-hover); }
.tfst .tfst-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 20px; }
.tfst .tfst-result {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  align-items: stretch; gap: 12px; margin-top: 22px;
  border: 1px solid #c4d8fa; border-radius: 12px;
  padding: 18px; background: var(--tfst-soft);
}
.tfst .tfst-result[hidden] { display: none; }
.tfst .tfst-result[data-state="error"] { display: block; background: #fff1f2; border-color: #fecdd3; color: var(--tfst-error); }
.tfst .tfst-stat { display: grid; gap: 4px; overflow-wrap: anywhere; }
.tfst .tfst-stat-label { font-size: 13px; color: var(--tfst-muted); }
.tfst .tfst-stat-value { font-size: clamp(18px, 2vw, 24px); color: var(--tfst-ink); font-weight: 800; font-variant-numeric: tabular-nums; }
.tfst .tfst-message { min-height: 21px; font-size: 13px; margin: 12px 0 0; color: var(--tfst-muted); }
@media (max-width: 620px) {
  .tfst .tfst-fields--two { grid-template-columns: 1fr; }
  .tfst .tfst-actions .tfst-button { flex: 1 1 150px; }
  .tfst .tfst-form > .tfst-button { width: 100%; }
  .tfst .tfst-result { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { .tfst .tfst-button { transition: none; } }
