.wbs-tool {
  --wbs-navy: #10263f;
  --wbs-steel: #596775;
  --wbs-amber: #d28a2e;
  --wbs-paper: #f5f6f3;
  --wbs-ink: #18222c;
  --wbs-line: #d6dadd;
  margin: clamp(1.75rem, 4vw, 3.5rem) 0;
  padding: clamp(1.25rem, 3vw, 2.25rem);
  color: var(--wbs-ink);
  background: #fff;
  border: 1px solid var(--wbs-line);
  border-top: 4px solid var(--wbs-amber);
  border-radius: 6px;
  box-shadow: 0 14px 34px rgba(16, 38, 63, 0.08);
}

.wbs-tool *, .wbs-tool *::before, .wbs-tool *::after { box-sizing: border-box; }
.wbs-tool .wbs-tool-heading { max-width: 52rem; margin-bottom: 1.5rem; }
.wbs-tool .wbs-tool-heading h2 { margin: .25rem 0 .65rem; color: var(--wbs-navy); font-size: clamp(1.65rem, 3vw, 2.35rem); line-height: 1.15; }
.wbs-tool .wbs-tool-heading p:last-child { margin-bottom: 0; color: var(--wbs-steel); }
.wbs-tool .wbs-tool-kicker { margin: 0; color: #8a5514; font: 700 .76rem/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .1em; text-transform: uppercase; }

.wbs-tool .wbs-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.wbs-tool .wbs-field { display: grid; gap: .4rem; margin-bottom: 1rem; }
.wbs-tool .wbs-field label, .wbs-tool .wbs-check-group legend { color: var(--wbs-navy); font-weight: 700; }
.wbs-tool .wbs-field input, .wbs-tool .wbs-field select, .wbs-tool .wbs-field textarea,
.wbs-tool .wbs-score-row select, .wbs-tool table input, .wbs-tool table select {
  width: 100%; min-height: 2.75rem; padding: .62rem .72rem; color: var(--wbs-ink); background: #fff;
  border: 1px solid #aab3bb; border-radius: 4px; font: inherit;
}
.wbs-tool .wbs-field textarea { min-height: 8rem; resize: vertical; }
.wbs-tool .wbs-field input:focus, .wbs-tool .wbs-field select:focus, .wbs-tool .wbs-field textarea:focus,
.wbs-tool .wbs-score-row select:focus, .wbs-tool table input:focus, .wbs-tool table select:focus {
  outline: 3px solid rgba(210, 138, 46, .28); border-color: #9a5e16;
}
.wbs-tool .wbs-hp { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }

.wbs-tool .wbs-button {
  display: inline-flex; min-height: 2.75rem; align-items: center; justify-content: center; gap: .4rem; padding: .68rem 1rem;
  color: var(--wbs-navy); background: #fff; border: 1px solid var(--wbs-navy); border-radius: 4px;
  font-family: inherit; font-size: .92rem; font-weight: 750; line-height: 1.2; text-decoration: none; cursor: pointer;
}
.wbs-tool .wbs-button:hover { transform: translateY(-1px); box-shadow: 0 7px 16px rgba(16, 38, 63, .14); }
.wbs-tool .wbs-button:focus-visible { outline: 3px solid rgba(210, 138, 46, .45); outline-offset: 2px; }
.wbs-tool .wbs-button:disabled, .wbs-tool .wbs-button[aria-disabled="true"] { opacity: .62; cursor: not-allowed; transform: none; box-shadow: none; }
.wbs-tool .wbs-button-primary { color: #fff; background: var(--wbs-navy); }
.wbs-tool .wbs-button-primary:hover { color: #fff; background: #183a5d; }
.wbs-tool .wbs-button-quiet { color: var(--wbs-navy); background: var(--wbs-paper); border-color: #aeb7bf; }
.wbs-tool .wbs-tool-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1rem 0; }
.wbs-tool .wbs-form-status:not(:empty), .wbs-tool .wbs-score-result:not(:empty), .wbs-tool .wbs-matrix-result:not(:empty),
.wbs-tool [data-checklist-result]:not(:empty), .wbs-tool [data-verify-result]:not(:empty) {
  margin-top: 1rem; padding: .9rem 1rem; background: #f1f5f8; border-left: 4px solid var(--wbs-navy); border-radius: 0 4px 4px 0;
}
.wbs-tool .wbs-form-status[data-state="error"] { background: #fff1ef; border-left-color: #a33b2b; }
.wbs-tool .wbs-form-status[data-state="success"] { background: #edf7f1; border-left-color: #2c7450; }
.wbs-tool .wbs-privacy-note, .wbs-tool .wbs-disclaimer { color: var(--wbs-steel); font-size: .86rem; line-height: 1.55; }

.wbs-tool .wbs-stepper { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .35rem; margin: 0 0 1.5rem; padding: 0; list-style: none; }
.wbs-tool .wbs-stepper li { display: grid; gap: .35rem; color: var(--wbs-steel); font: 700 .7rem/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; text-align: center; }
.wbs-tool .wbs-stepper span { display: grid; width: 2rem; height: 2rem; margin: auto; place-items: center; background: #e9ecee; border: 1px solid #c5cbd0; border-radius: 50%; }
.wbs-tool .wbs-stepper li.is-current { color: var(--wbs-navy); }
.wbs-tool .wbs-stepper li.is-current span { color: #fff; background: var(--wbs-navy); border-color: var(--wbs-navy); }
.wbs-tool .wbs-stepper li.is-complete span { color: var(--wbs-navy); background: #f7e9d6; border-color: var(--wbs-amber); }
.wbs-tool .wbs-rfq-step { margin: 0; padding: clamp(1rem, 3vw, 1.6rem); background: var(--wbs-paper); border: 1px solid var(--wbs-line); border-radius: 5px; }
.wbs-tool .wbs-rfq-step > legend { padding: 0 .5rem; color: var(--wbs-navy); font-size: 1.25rem; font-weight: 800; }
.wbs-tool .wbs-rfq-step > legend:focus-visible, .wbs-tool .wbs-rfq-review [tabindex="-1"]:focus-visible { outline: 3px solid rgba(210, 138, 46, .45); outline-offset: 3px; }
.wbs-tool .wbs-rfq-step > legend span { color: #8a5514; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.wbs-tool .wbs-rfq-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1rem; }
.wbs-tool .wbs-rfq-nav [data-rfq-next] { margin-left: auto; }
.wbs-tool .wbs-rfq-review { padding: clamp(1rem, 3vw, 1.5rem); background: #f8fafb; border: 1px solid #c7d0d7; }
.wbs-tool .wbs-summary { display: grid; gap: .5rem; }
.wbs-tool .wbs-summary dl { display: grid; grid-template-columns: minmax(10rem, 1fr) 2fr; margin: 0; border-bottom: 1px solid #dbe0e3; }
.wbs-tool .wbs-summary dt, .wbs-tool .wbs-summary dd { margin: 0; padding: .55rem .4rem; }
.wbs-tool .wbs-summary dt { color: var(--wbs-navy); font-weight: 700; }

.wbs-tool .wbs-check-group { margin: 0 0 1.25rem; padding: 0; border: 0; }
.wbs-tool .wbs-check-group legend { margin-bottom: .65rem; }
.wbs-tool .wbs-check-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; }
.wbs-tool .wbs-check-grid label, .wbs-tool .wbs-verification-grid label {
  display: flex; align-items: flex-start; gap: .55rem; padding: .7rem; background: #fff; border: 1px solid #d0d6da; border-radius: 4px; cursor: pointer;
}
.wbs-tool .wbs-check-grid input, .wbs-tool .wbs-verification-grid input { width: 1rem; height: 1rem; margin-top: .15rem; accent-color: var(--wbs-navy); }
.wbs-tool .wbs-upload-status { margin: 1rem 0; padding: 1rem; color: #644515; background: #fff8e9; border: 1px solid #e0bd82; border-radius: 4px; }
.wbs-tool .wbs-upload-status strong { color: #71460f; }
.wbs-tool .wbs-upload-status p { margin: .4rem 0 .7rem; }
.wbs-tool .wbs-upload-status input[disabled] { display: block; margin-top: .45rem; opacity: .68; }

.wbs-tool .wbs-score-list { border-top: 1px solid var(--wbs-line); }
.wbs-tool .wbs-score-row { display: grid; grid-template-columns: minmax(15rem, 2fr) minmax(10rem, 1fr); gap: 1rem; align-items: center; padding: .7rem 0; border-bottom: 1px solid var(--wbs-line); }
.wbs-tool .wbs-score-row label { display: flex; align-items: baseline; gap: .75rem; color: var(--wbs-navy); font-weight: 700; }
.wbs-tool .wbs-score-row label span { color: #8a5514; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.wbs-tool .wbs-score-result h3 { margin: 0 0 .5rem; color: var(--wbs-navy); }
.wbs-tool .wbs-score-result ul { margin-bottom: 0; }

.wbs-tool .wbs-table-scroll { overflow-x: auto; border: 1px solid #cbd2d7; border-radius: 4px; }
.wbs-tool table { width: 100%; min-width: 49rem; border-collapse: collapse; font-size: .88rem; }
.wbs-tool th, .wbs-tool td { padding: .65rem; vertical-align: top; border-right: 1px solid #d8dde0; border-bottom: 1px solid #d8dde0; }
.wbs-tool thead th { color: #fff; background: var(--wbs-navy); text-align: left; }
.wbs-tool tbody th { width: 26%; color: var(--wbs-navy); background: #f2f4f4; text-align: left; }
.wbs-tool tr:last-child th, .wbs-tool tr:last-child td { border-bottom: 0; }
.wbs-tool th:last-child, .wbs-tool td:last-child { border-right: 0; }
.wbs-tool table input, .wbs-tool table select { min-width: 9rem; min-height: 2.3rem; padding: .4rem; font-size: .82rem; }

.wbs-tool .wbs-verification-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .65rem; }
.wbs-tool .wbs-verification-grid span { display: grid; gap: .25rem; }
.wbs-tool .wbs-verification-grid b { color: #8a5514; font: 700 .72rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

@media (max-width: 760px) {
  .wbs-tool { padding: 1rem; overflow-wrap: anywhere; }
  .wbs-tool .wbs-form-grid, .wbs-tool .wbs-check-grid, .wbs-tool .wbs-verification-grid { grid-template-columns: 1fr; }
  .wbs-tool .wbs-stepper { grid-template-columns: repeat(7, 2.1rem); justify-content: space-between; overflow-x: auto; }
  .wbs-tool .wbs-stepper li { font-size: 0; }
  .wbs-tool .wbs-stepper li span { font-size: .7rem; }
  .wbs-tool .wbs-score-row { grid-template-columns: 1fr; gap: .45rem; }
  .wbs-tool .wbs-summary dl { grid-template-columns: 1fr; }
  .wbs-tool .wbs-summary dd { padding-top: 0; }
  .wbs-tool .wbs-tool-actions .wbs-button { flex: 1 1 12rem; }
  .wbs-tool .wbs-rfq-nav .wbs-button { flex: 1 1 0; }
  .wbs-tool .wbs-table-scroll { -webkit-overflow-scrolling: touch; }
}

@media (max-width: 480px) {
  .wbs-tool .wbs-rfq-nav { flex-direction: column; }
  .wbs-tool .wbs-rfq-nav [data-rfq-next] { margin-left: 0; }
  .wbs-tool .wbs-button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .wbs-tool *, .wbs-tool *::before, .wbs-tool *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .wbs-tool .wbs-button:hover { transform: none; }
}

@media (forced-colors: active) {
  .wbs-tool { border: 1px solid CanvasText; box-shadow: none; }
  .wbs-tool .wbs-button, .wbs-tool .wbs-field input, .wbs-tool .wbs-field select, .wbs-tool .wbs-field textarea,
  .wbs-tool .wbs-score-row select, .wbs-tool table input, .wbs-tool table select { border-color: ButtonText; }
  .wbs-tool .wbs-form-status:not(:empty), .wbs-tool .wbs-score-result:not(:empty), .wbs-tool .wbs-matrix-result:not(:empty),
  .wbs-tool [data-checklist-result]:not(:empty), .wbs-tool [data-verify-result]:not(:empty) { border: 1px solid CanvasText; }
}

@media print {
  body.wbs-tool-printing > *:not(.wbs-print-ancestor):not(.wbs-print-target),
  body.wbs-tool-printing .wbs-print-ancestor > *:not(.wbs-print-ancestor):not(.wbs-print-target) { display: none !important; }
  body.wbs-tool-printing * { visibility: hidden !important; }
  body.wbs-tool-printing .wbs-print-target,
  body.wbs-tool-printing .wbs-print-target * { visibility: visible !important; }
  body.wbs-tool-printing .wbs-print-ancestor {
    display: block !important; position: static !important; float: none !important;
    width: auto !important; min-width: 0 !important; margin: 0 !important; padding: 0 !important;
  }
  body.wbs-tool-printing .wbs-print-target {
    display: block !important; position: static !important; float: none !important; width: 100% !important;
  }
  .wbs-tool, .wbs-tool.wbs-print-target {
    color: #000 !important; background: #fff !important; box-shadow: none !important;
    border: 0 !important; margin: 0 !important; padding: 0 !important;
  }
  .wbs-tool .wbs-tool-actions, .wbs-tool .wbs-rfq-nav, .wbs-tool .wbs-stepper, .wbs-tool .wbs-upload-status input { display: none !important; }
  .wbs-tool .wbs-tool-heading, .wbs-tool .wbs-score-row, .wbs-tool .wbs-summary dl, .wbs-tool .wbs-verification-grid label, .wbs-tool tr { break-inside: avoid; page-break-inside: avoid; }
  .wbs-tool .wbs-table-scroll { overflow: visible !important; border: 0; }
  .wbs-tool table { min-width: 0; font-size: 8pt; }
  .wbs-tool thead th, .wbs-tool tbody th {
    color: #000 !important; background: #fff !important; border-color: #000 !important;
  }
  .wbs-tool th, .wbs-tool td { color: #000 !important; border-color: #777 !important; }
  .wbs-tool table input, .wbs-tool table select {
    color: #000 !important; background: #fff !important; border: 0; padding: 0; min-width: 0;
  }
  .wbs-tool .wbs-rfq-review, .wbs-tool .wbs-rfq-step, .wbs-tool .wbs-check-grid label, .wbs-tool .wbs-verification-grid label,
  .wbs-tool .wbs-form-status:not(:empty), .wbs-tool .wbs-score-result:not(:empty), .wbs-tool .wbs-matrix-result:not(:empty),
  .wbs-tool [data-checklist-result]:not(:empty), .wbs-tool [data-verify-result]:not(:empty) { color: #000 !important; background: #fff !important; }
}
