.ws {
  --ws-bg: #17171d;
  --ws-line: #36363f;
  --ws-fg: #f0f0f4;
  --ws-muted: #b1b1bd;
  --ws-accent: #90e4ca;
  --ws-ink: #10231f;
  color: var(--ws-fg);
  font: inherit;
  font-size: 1rem;
  line-height: 1.5;
  color-scheme: dark;
}
.ws-furniture { --ws-accent: #f0be77; --ws-ink: #2a1d0c; }
.ws, .ws * { box-sizing: border-box; }
.ws [hidden] { display: none !important; }
.ws-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}
.ws-panel {
  min-width: 0;
  padding: clamp(18px, 2.4vw, 30px);
  border: 1px solid var(--ws-line);
  border-radius: 17px;
  background: var(--ws-bg);
}
.ws-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.ws p, .ws h3, .ws dl, .ws dd, .ws form { margin: 0; }
.ws h3 {
  color: var(--ws-fg);
  font: inherit;
  font-weight: 575;
  font-size: clamp(1.25rem, 1.85vw, 1.7rem);
  line-height: 1.16;
  letter-spacing: -.045em;
  overflow-wrap: anywhere;
}
.ws .ws-kicker {
  margin-bottom: 8px;
  font: 500 .75rem/1.35 "Cascadia Mono", Consolas, monospace;
  letter-spacing: .105em;
  text-transform: uppercase;
  color: var(--ws-accent);
}
.ws .ws-intro { color: var(--ws-muted); margin: 18px 0 22px; max-width: 47ch; }
.ws-blueprint {
  margin: 20px 0;
  border: 1px solid #344742;
  border-radius: 9px;
  background-color: #14201d;
  background-image: linear-gradient(90deg, #2f514530 1px, transparent 1px), linear-gradient(#2f514530 1px, transparent 1px), linear-gradient(90deg, #345a5155 1px, transparent 1px), linear-gradient(#345a5155 1px, transparent 1px);
  background-size: 14px 14px, 14px 14px, 70px 70px, 70px 70px;
  background-position: center center;
}
.ws-plan { display: block; width: 100%; height: clamp(160px, 19vw, 256px); }
.ws-plan-shape rect { fill: #519c7f3d; stroke: #b3f5db; stroke-width: 2; }
.ws-measure-line { fill: none; stroke: #7cbaaa; stroke-width: .9; }
.ws-corner { fill: #d6ffed; stroke: #11271b; stroke-width: .6; }
.ws-measure-text { fill: #e4fff3; font: 500 14px/1 monospace; }
.ws-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ws-metrics > div + div { border-left: 1px solid var(--ws-line); padding-left: 18px; }
.ws-metrics span, .ws-field span, .ws dt { font-size: .875rem; color: var(--ws-muted); }
.ws-metrics strong {
  display: block;
  margin-top: 5px;
  color: var(--ws-fg);
  font-weight: 515;
  line-height: 1.1;
  letter-spacing: -.055em;
  font-size: clamp(1.35rem, 2.8vw, 2.25rem);
  overflow-wrap: anywhere;
}
.ws-field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.ws-field { display: grid; gap: 7px; }
.ws input {
  appearance: none;
  display: block;
  width: 100%;
  min-width: 0;
  padding: 11px 12px;
  border-radius: 7px;
  border: 1px solid #45454d;
  color: var(--ws-fg);
  background: #111116;
  font: inherit;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}
.ws input[aria-invalid="true"] { border-color: #e98d85; }
.ws .ws-hint { margin: 10px 0 24px; font-size: .8125rem; line-height: 1.5; color: var(--ws-muted); }
.ws .ws-error { color: #ffa9a2; }
.ws button {
  appearance: none;
  display: inline-flex;
  vertical-align: middle;
  align-items: center;
  justify-content: center;
  gap: 9px;
  max-width: 100%;
  min-height: 44px;
  border-radius: 7px;
  padding: 11px 17px;
  cursor: pointer;
  font: inherit;
  font-size: .9375rem;
  font-weight: 575;
  line-height: 1.25;
  text-align: center;
}
.ws-primary { background: var(--ws-accent); color: var(--ws-ink); border: 1px solid transparent; }
.ws-primary:hover { filter: brightness(1.08); }
.ws-secondary { background: transparent; color: var(--ws-accent); border: 1px solid #5b5a64; }
.ws-secondary:hover { background: #24242b; border-color: var(--ws-accent); }
.ws-secondary svg { flex: 0 0 18px; width: 18px; height: 18px; }
.ws :is(input,button,[tabindex="-1"]):focus-visible { outline: 2px solid var(--ws-accent); outline-offset: 3px; }
.ws-result { margin-top: 16px; }
.ws .ws-sheet { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-top: 20px; }
.ws-sheet > div { border-top: 1px solid var(--ws-line); padding-top: 12px; min-width: 0; }
.ws dd { font-variant-numeric: tabular-nums; }
.ws-sheet dd { margin-top: 3px; font-size: 1.1rem; color: var(--ws-fg); overflow-wrap: anywhere; }
.ws-stock-table { width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: .9375rem; }
.ws-stock-table th, .ws-stock-table td { padding: 10px 8px; text-align: left; color: var(--ws-fg); border-bottom: 1px solid var(--ws-line); }
.ws-stock-table th { font-weight: 500; }
.ws-stock-table thead th { padding-top: 0; color: var(--ws-muted); font-size: .8125rem; vertical-align: bottom; }
.ws-stock-table :is(th,td):first-child { padding-left: 0; }
.ws-stock-table :is(th,td):last-child { padding-right: 0; width: 100px; }
.ws-stock-table input { padding: 8px 10px; }
.ws-stock form > .ws-error { margin-bottom: 14px; font-size: .875rem; }
.ws-pending {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  text-align: center;
  min-height: 206px;
  margin-top: 17px;
  padding: 20px;
  border: 1px dashed #504b44;
  border-radius: 8px;
  color: var(--ws-muted);
}
.ws-pending svg { color: var(--ws-accent); }
.ws-pending p { font-size: .9375rem; max-width: 29ch; }
.ws .ws-summary { margin: 19px 0 8px; color: var(--ws-accent); font-weight: 550; }
.ws .ws-comparison { margin-bottom: 20px; }
.ws-comparison > div { display: flex; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--ws-line); }
.ws-comparison dd { font-size: .875rem; text-align: right; }
.ws [data-kind="matched"] { color: #93ddbb; }
.ws [data-kind="short"] { color: #f8a39d; }
.ws [data-kind="extra"] { color: var(--ws-accent); }

@media (max-width: 760px) {
  .ws-grid { grid-template-columns: minmax(0,1fr); gap: 12px; }
  .ws-panel { border-radius: 13px; }
  .ws-plan { height: 185px; }
  .ws-blueprint { margin: 15px 0; }
  .ws-pending { min-height: 145px; }
  .ws .ws-sheet { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 440px) {
  .ws-panel { padding: 16px; }
  .ws-result .ws-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
  .ws-stock-table th, .ws-stock-table td { padding-left: 5px; padding-right: 5px; }
  .ws-stock-table :is(th,td):last-child { width: 82px; }
  .ws-stock-table { font-size: .875rem; }
}
