/* Scoped to the warehouse case study and its public companion. */
.w-study, .w-lab {
  max-width: 1120px;
  margin: 64px auto 96px;
  color: var(--ink, #20211c);
}
.w-study > h1 {
  font-size: clamp(2.8rem, 7vw, 5.8rem);
  line-height: 1.02;
  letter-spacing: -0.055em;
  max-width: 1000px;
  margin: 22px 0;
}
.w-study > p, .w-study section > p {
  max-width: 820px;
  line-height: 1.75;
  font-size: 1.08rem;
}
.w-lead {
  font-size: clamp(1.25rem, 2.5vw, 1.7rem) !important;
  line-height: 1.5 !important;
}
.w-study section {
  margin: 64px 0;
}
.w-study h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.7rem);
  letter-spacing: -0.035em;
  line-height: 1.2;
}
.w-study h3 {
  font-size: 1.15rem;
  line-height: 1.4;
}
.w-study li {
  line-height: 1.7;
  margin: 12px 0;
}
.w-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin: 24px 0;
}
.w-primary, .w-secondary, .w-lab button {
  font: inherit;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 46px;
  gap: 8px;
  border: 2px solid currentColor;
  padding: 12px 18px;
  text-decoration: none;
  font-weight: 650;
  cursor: pointer;
  border-radius: 0;
}
.w-primary {
  background: #ef5b30;
  color: #171b17 !important;
  border-color: #171b17;
}
.w-secondary {
  background: transparent;
  color: inherit;
}
.w-primary:hover, .w-lab button:hover:not(:disabled) {
  background: #d9f27a;
  color: #171b17;
}
.w-lab button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.w-lab input, .w-lab select {
  font: inherit;
  border: 2px solid #383a32;
  padding: 10px;
  border-radius: 0;
  background: #fffef6;
  max-width: 100%;
  min-height: 44px;
}
.w-lab input:focus-visible,
.w-lab select:focus-visible,
.w-lab button:focus-visible,
.w-study a:focus-visible {
  outline: 3px solid #b54d24;
  outline-offset: 4px;
}
.w-facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 2px solid #272a21;
  margin: 42px 0 64px;
}
.w-facts > div {
  padding: 22px;
  border-right: 2px solid #272a21;
}
.w-facts > div:last-child {
  border: 0;
}
.w-facts strong {
  font-size: 2.5rem;
  display: block;
  letter-spacing: -0.04em;
}
.w-facts span {
  font-size: 0.87rem;
  display: block;
}
.w-concepts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 2px solid #272a21;
}
.w-concepts > div {
  padding: 20px;
  border-right: 2px solid #272a21;
}
.w-concepts > div:last-child {
  border: 0;
}
.w-concepts p {
  line-height: 1.6;
  font-size: 0.98rem;
}
.w-concepts > div:nth-child(2) {
  background: #e8edb7;
}
.w-concepts > div:nth-child(3) {
  background: #e3edf0;
}
.w-chapters > a {
  display: grid;
  grid-template-columns: 60px 1fr 25px;
  gap: 20px;
  align-items: center;
  color: inherit;
  text-decoration: none;
  padding: 25px 0;
  border-top: 2px solid #292b24;
}
.w-chapters > a:last-child {
  border-bottom: 2px solid #292b24;
}
.w-chapters > a:hover h3 {
  text-decoration: underline;
}
.w-chapters h3 {
  font-size: 1.55rem;
  margin: 0;
}
.w-chapters p {
  margin: 8px 0 0;
  line-height: 1.6;
}
.w-chapter-number {
  font-size: 1.5rem;
  color: #716d5e;
}
.w-decisions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
.w-decisions p {
  line-height: 1.7;
}
.w-note {
  border-left: 5px solid #787e4d;
  padding: 22px 26px;
  background: #ecebdc;
  margin: 22px 0;
}
.w-note h2 {
  margin-top: 0;
}
.w-note p:last-child {
  margin-bottom: 0;
}
.w-exercise {
  background: #e8edb7;
  border: 2px solid #252a1e;
  padding: 28px;
}
.w-exercise h2 {
  margin-top: 12px;
}
.w-source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.w-source-links a {
  background: #ebe8db;
  padding: 10px;
  color: inherit;
}
.w-lesson > h1 {
  font-size: clamp(2.8rem, 6vw, 4.8rem);
}
.w-lesson details {
  border-top: 2px solid #272a21;
  padding: 20px 0;
}
.w-lesson summary {
  font-weight: 650;
  cursor: pointer;
}
.w-next {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  border-top: 2px solid #272a21;
  padding-top: 26px;
}
.w-code {
  background: #21251d;
  color: #eaf0df;
  white-space: pre;
  overflow: auto;
  padding: 25px;
  font-size: 0.87rem;
  line-height: 1.7;
  max-height: 75vh;
}
.w-file-title {
  font-size: clamp(1.8rem, 4vw, 3rem) !important;
  overflow-wrap: anywhere;
}
.w-feature {
  display: grid;
  grid-template-columns: 1fr 270px;
  gap: 36px;
  border: 3px solid #252a1e;
  background: #e9eccd;
  padding: 36px;
  margin: 0 0 72px;
}
.w-feature h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  letter-spacing: -0.035em;
  line-height: 1.12;
  margin: 16px 0;
}
.w-feature p {
  max-width: 700px;
  line-height: 1.7;
}
.w-feature-proof {
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-left: 3px solid #252a1e;
  padding-left: 28px;
  gap: 12px;
}
.w-feature-proof strong {
  font-size: 1.4rem;
}
.w-lab-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin: 24px 0;
}
.w-lab-title h1 {
  font-size: clamp(2.3rem, 5vw, 4rem);
  line-height: 1.1;
  letter-spacing: -0.05em;
  margin: 12px 0;
}
.w-badge {
  display: inline-block;
  padding: 7px 10px;
  border: 2px solid #33382a;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  font-weight: 700;
  white-space: nowrap;
  text-transform: uppercase;
}
.w-toolbar {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  padding: 20px;
  background: #e7e7d5;
  border: 2px solid #33382a;
}
.w-toolbar label {
  display: grid;
  gap: 6px;
  font-size: 0.85rem;
}
.w-toolbar small {
  display: block;
  margin-top: 6px;
  font-size: 0.78rem;
}
.w-toolbar-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}
.w-toolbar button {
  padding: 9px 12px;
  background: transparent;
  font-size: 0.85rem;
}
.w-status, .w-error {
  padding: 16px 20px;
  margin: 14px 0;
  border: 2px solid #65723a;
  background: #eff3dc;
  line-height: 1.6;
}
.w-error {
  border-color: #b33c29;
  background: #fae4dc;
}
.w-status button, .w-error button {
  margin-left: 15px;
}
.w-scenario-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 22px 0;
}
.w-scenario-actions button {
  background: transparent;
  font-size: 0.9rem;
}
.w-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 3px solid #252a1e;
  gap: 0;
}
.w-tabs button {
  border: 0;
  border-top: 2px solid transparent;
  background: transparent;
  font-size: 0.95rem;
}
.w-tabs button[aria-current] {
  background: #252a1e;
  color: #faf9ef;
  border-color: #252a1e;
}
.w-workspace {
  border: 2px solid #252a1e;
  border-top: 0;
  padding: 30px;
}
.w-workspace h2 {
  font-size: 1.7rem;
  letter-spacing: -0.03em;
  margin: 0 0 20px;
}
.w-workspace p {
  line-height: 1.65;
}
.w-request {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 42px;
}
.w-request h2, .w-request .w-form-help {
  grid-column: 1/-1;
}
.w-request label {
  display: grid;
  gap: 8px;
  font-size: 0.9rem;
}
.w-request button {
  width: max-content;
}
.w-form-help {
  font-size: 0.87rem;
  color: #555a49;
  margin: 0;
}
.w-booking {
  border-top: 2px solid #3c4232;
  padding: 24px 0;
  margin: 20px 0;
}
.w-booking:first-child {
  margin-top: 0;
}
.w-booking h3 {
  font-size: 1.2rem;
  margin: 0;
}
.w-booking-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.w-estimate strong {
  font-size: 1.5rem;
}
.w-muted {
  color: #5a604d;
  font-size: 0.88rem;
}
.w-empty {
  padding: 32px;
  background: #eeeee4;
  border: 2px dashed #8a8f77;
  line-height: 1.7;
}
.w-checkpoints {
  background: #eee9d3;
  padding: 20px;
  margin: 24px 0;
}
.w-checkpoints .w-actions {
  margin-bottom: 0;
}
.w-checkpoints button {
  font-size: 0.85rem;
  padding: 10px;
}
.w-quantity {
  width: 85px;
}
.w-pallet {
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid #aaa992;
  padding: 13px 0;
}
.w-pallet input {
  width: 21px;
  height: 21px;
  min-height: 0;
}
.w-pallet small {
  display: block;
  margin-top: 7px;
  color: #596049;
}
.w-release fieldset {
  border: 0;
  padding: 15px 0;
}
.w-release legend {
  font-weight: 650;
}
.w-release button {
  background: #e3eabf;
}
.w-legend {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin: 24px 0;
  font-size: 0.85rem;
}
.w-legend > span {
  display: flex;
  align-items: center;
  gap: 7px;
}
.w-legend i {
  display: inline-block !important;
  width: 15px;
  height: 15px;
  min-height: 0 !important;
  padding: 0 !important;
}
.w-positions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.w-position {
  padding: 14px;
  border: 2px solid #5b624d;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 85px;
}
.w-position strong {
  font-size: 0.9rem;
}
.w-position > span {
  font-size: 0.78rem;
}
.w-position.available {
  background: #f7f7ec;
}
.w-position.held {
  background: #f1dd90;
}
.w-position.committed {
  background: #d6dfa6;
}
.w-position.occupied {
  background: #bcd1db;
}
.w-position.blocked {
  background: #e5b6a4;
}
.w-position button {
  font-size: 0.7rem;
  min-height: 34px;
  padding: 6px;
  background: transparent;
}
.w-invoice-total {
  display: flex;
  align-items: baseline;
  gap: 18px;
  flex-wrap: wrap;
  margin: 24px 0;
}
.w-invoice-total strong {
  font-size: 3rem;
  letter-spacing: -0.055em;
}
.w-invoice-total span {
  font-size: 0.9rem;
}
.w-table-wrap {
  overflow: auto;
}
.w-workspace table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.85rem;
}
.w-workspace th, .w-workspace td {
  text-align: left;
  padding: 15px 10px;
  border-bottom: 1px solid #abae99;
  vertical-align: top;
}
.w-workspace th {
  border-bottom: 2px solid #3d4332;
}
.w-workspace td details {
  font-size: 0.78rem;
  margin-top: 8px;
  max-width: 340px;
}
.w-workspace td details p {
  overflow-wrap: anywhere;
}
.w-audit {
  margin-top: 28px;
}
.w-audit summary {
  font-weight: 650;
  cursor: pointer;
}
.w-audit > div {
  border-top: 1px solid #abae99;
  padding: 18px 0;
}
.w-audit code {
  display: block;
  font-size: 0.72rem;
  margin-top: 5px;
}
.w-audit pre {
  overflow: auto;
  background: #eeeee4;
  padding: 15px;
  font-size: 0.8rem;
}
.w-loading {
  padding: 50px;
  text-align: center;
  border: 2px solid #3d4332;
}
.w-lab-footnote {
  font-size: 0.83rem;
  line-height: 1.7;
  color: #5a604d;
  margin-top: 22px;
}
@media (max-width: 760px) {
  .w-study, .w-lab {
    margin-top: 35px;
  }
  .w-facts {
    grid-template-columns: repeat(2, 1fr);
  }
  .w-facts > div {
    border-bottom: 2px solid #272a21;
  }
  .w-facts > div:nth-child(2) {
    border-right: 0;
  }
  .w-facts > div:nth-child(3) {
    border-bottom: 0;
  }
  .w-concepts {
    grid-template-columns: repeat(2, 1fr);
  }
  .w-concepts > div {
    border-bottom: 2px solid #272a21;
  }
  .w-concepts > div:nth-child(2) {
    border-right: 0;
  }
  .w-concepts > div:nth-child(3) {
    border-bottom: 0;
  }
  .w-decisions {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .w-feature {
    grid-template-columns: 1fr;
    padding: 24px;
  }
  .w-feature-proof {
    border-left: 0;
    border-top: 2px solid #252a1e;
    padding: 20px 0 0;
  }
  .w-toolbar {
    gap: 18px;
  }
  .w-toolbar-actions {
    margin-left: 0;
  }
  .w-workspace {
    padding: 19px;
  }
  .w-positions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .w-lab-title {
    display: block;
  }
  .w-lab-title > .w-badge {
    margin-top: 12px;
  }
  .w-next {
    align-items: stretch;
    flex-direction: column;
  }
}
@media (max-width: 450px) {
  .w-request {
    grid-template-columns: 1fr;
  }
  .w-tabs button {
    font-size: 0.8rem;
    padding: 12px 4px;
  }
  .w-chapters > a {
    grid-template-columns: 36px 1fr 15px;
    gap: 10px;
  }
  .w-chapters h3 {
    font-size: 1.2rem;
  }
  .w-actions > a {
    width: 100%;
  }
  .w-facts > div {
    padding: 16px;
  }
  .w-booking-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .w-toolbar-actions {
    flex-wrap: wrap;
  }
  .w-primary, .w-secondary {
    font-size: 0.9rem;
  }
  .w-request button {
    width: 100%;
  }
}
