/* ==========================================================================
   Work Explorer (css/work-explorer.css)
   100svh full-viewport workspace below the top nav (desktop > 960px).
   Apple / BFS restraint: one surface, hairline dividers, tonal stage mats,
   whisper-soft elevation, no duplicated titles or decorative chrome.
   - Left (236px): client sidebar (segmented filter, spring selection pill)
   - Middle (1fr): pure showcase canvas (tonal mats, screens float unobstructed)
   - Right (284px): ledger inspector (header, spec rows, results, quote, CTA)
   ========================================================================== */

.wx-app {
  --wx-hair: rgba(20, 22, 24, 0.07);
  --wx-mat: #F4F4F2;
  --wx-amb: 0 1px 2px rgba(20, 22, 24, 0.04), 0 8px 24px -12px rgba(20, 22, 24, 0.08);
  --wx-px: 20px;
  --wx-col: 78px;
}

.wx-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Full-viewport app shell on desktop ---------- */
@media (min-width: 961px) {
  body.wx-page {
    height: 100svh;
    overflow: hidden;
    background: var(--surface, #FFFFFF);
  }

  body.wx-page::before,
  body.wx-page::after,
  body.wx-page .meter,
  body.wx-page .wx-foot {
    display: none !important;
  }

  body.wx-page .nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    background: var(--surface, #FFFFFF);
    border-bottom: 1px solid var(--line);
    box-shadow: none;
    backdrop-filter: none;
    z-index: 60;
  }

  body.wx-page .nav__in {
    width: 100%;
    max-width: none;
    margin: 0;
  }

  .wx-main {
    padding-top: 64px;
    height: 100svh;
    display: flex;
    flex-direction: column;
  }

  .wx-app {
    flex: 1;
    min-height: 0;
    width: 100%;
    height: calc(100svh - 64px);
    display: flex;
    flex-direction: column;
    background: var(--surface, #FFFFFF);
    overflow: hidden;
  }
}

/* ---------- Three-pane grid ---------- */
.wx-body {
  flex: 1;
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr) 298px;
}

/* Shared thin scrollbars */
.wx-stage,
.wx-list-wrap,
.wx-insp__scroll {
  scrollbar-width: thin;
  scrollbar-color: var(--line2, #CDCFCE) transparent;
}

.wx-stage::-webkit-scrollbar,
.wx-list-wrap::-webkit-scrollbar,
.wx-insp__scroll::-webkit-scrollbar {
  width: 6px;
}

.wx-stage::-webkit-scrollbar-track,
.wx-list-wrap::-webkit-scrollbar-track,
.wx-insp__scroll::-webkit-scrollbar-track {
  background: transparent;
}

.wx-stage::-webkit-scrollbar-thumb,
.wx-list-wrap::-webkit-scrollbar-thumb,
.wx-insp__scroll::-webkit-scrollbar-thumb {
  background: var(--line2, #CDCFCE);
  border-radius: 99px;
}

/* ==========================================================================
   Left rail: Apple-style sidebar
   ========================================================================== */
.wx-rail {
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--surface, #FFFFFF);
}

.wx-rail__head {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 14px 10px;
}

.wx-rail__title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 0 2px 2px;
}

.wx-rail__eyebrow {
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.wx-rail__badge {
  font-size: 12px;
  line-height: 1;
  color: var(--steel, #8C9197);
  font-variant-numeric: tabular-nums;
}

.wx-search {
  position: relative;
  display: flex;
  align-items: center;
}

.wx-search__ic {
  position: absolute;
  left: 10px;
  width: 13px;
  height: 13px;
  color: var(--steel, #8C9197);
  pointer-events: none;
}

.wx-search__input {
  width: 100%;
  height: 32px;
  padding: 0 32px 0 30px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: var(--paper, #F7F7F5);
  box-shadow: inset 0 0 0 1px var(--wx-hair);
  font: 400 13px/1 var(--f);
  color: var(--ink);
  outline: none;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.wx-search__input::placeholder {
  color: var(--steel, #8C9197);
}

.wx-search__input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.wx-search__input:focus {
  background: var(--surface, #FFFFFF);
  box-shadow: inset 0 0 0 1px var(--blue), 0 0 0 3px var(--blue-wash, rgba(0, 88, 246, 0.08));
}

.wx-kbd kbd,
.wx-search__kbd {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 5px;
  background: var(--surface, #FFFFFF);
  box-shadow: inset 0 0 0 1px var(--wx-hair);
  font: 500 10px/1 var(--mono);
  color: var(--steel, #8C9197);
}

.wx-search__kbd {
  position: absolute;
  right: 7px;
  pointer-events: none;
}

/* Segmented control with a spring-driven thumb */
.wx-seg {
  position: relative;
  display: flex;
  gap: 2px;
  padding: 4px;
  border-radius: 11px;
  background: var(--paper, #F7F7F5);
  box-shadow: inset 0 0 0 1px var(--wx-hair);
}

.wx-seg__thumb {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: 0;
  border-radius: 8px;
  background: var(--surface, #FFFFFF);
  box-shadow: 0 0 0 1px rgba(20, 22, 24, 0.05), 0 1px 2px rgba(20, 22, 24, 0.08);
  opacity: 0;
  pointer-events: none;
  will-change: transform;
}

.wx-seg.is-ready .wx-seg__thumb {
  opacity: 1;
}

.wx-fchip {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  white-space: nowrap;
  background: transparent;
  font: 500 12px/1 var(--f);
  letter-spacing: -0.005em;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s ease;
}

.wx-fchip:hover {
  color: var(--ink);
}

.wx-fchip.is-on {
  color: var(--ink);
}

.wx-seg:not(.is-ready) .wx-fchip.is-on {
  background: var(--surface, #FFFFFF);
  box-shadow: 0 0 0 1px rgba(20, 22, 24, 0.05), 0 1px 2px rgba(20, 22, 24, 0.08);
}

.wx-fchip:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 0;
}

/* Client list */
.wx-list-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px 12px 12px;
}

.wx-sel-pill {
  position: absolute;
  top: 8px;
  left: 12px;
  right: 12px;
  height: 50px;
  border-radius: 10px;
  background: var(--paper, #F7F7F5);
  box-shadow: inset 0 0 0 1px var(--wx-hair);
  opacity: 0;
  pointer-events: none;
  will-change: transform;
  z-index: 0;
}

.wx-list {
  position: relative;
  z-index: 1;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wx-row {
  width: 100%;
  min-height: 50px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: var(--ink);
  transition: background-color 0.15s ease;
}

.wx-row:hover:not(.is-on) {
  background: rgba(20, 22, 24, 0.025);
}

.wx-row:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: -2px;
}

.wx-row__r {
  display: none;
}

/* Client marks: standalone icons, monochrome until selected or hovered */
.wx-row__mk,
.wx-mchip__mk,
.wx-insp__logo {
  display: grid;
  place-items: center;
  flex: none;
  overflow: hidden;
  background: var(--surface, #FFFFFF);
  box-shadow: inset 0 0 0 1px rgba(20, 22, 24, 0.08);
}

.wx-row__mk {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.wx-row__mk img,
.wx-row__mk svg {
  width: 16px;
  height: 16px;
  object-fit: contain;
  display: block;
}

.wx-row:not(.is-on) .wx-row__mk,
.wx-mchip:not(.is-on) .wx-mchip__mk {
  filter: grayscale(1) saturate(0) contrast(0.95);
  opacity: 0.6;
  transition: filter 0.2s ease, opacity 0.2s ease;
}

.wx-row.is-on .wx-row__mk,
.wx-row:hover .wx-row__mk,
.wx-mchip.is-on .wx-mchip__mk,
.wx-mchip:hover .wx-mchip__mk {
  filter: none;
  opacity: 1;
}

.wx-row__mk b,
.wx-mchip__mk b,
.wx-insp__logo b {
  font: 600 11px/1 var(--mono);
  color: var(--ink);
}

.wx-row__txt {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.wx-row__name {
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wx-row:not(.is-on) .wx-row__name {
  color: #2A2D30;
}

.wx-row__cat {
  font-size: 12px;
  line-height: 1.2;
  color: var(--steel, #8C9197);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wx-row.is-on .wx-row__cat {
  color: var(--muted);
}

.wx-rail__foot {
  flex: none;
  height: 36px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.wx-kbd {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  color: var(--steel, #8C9197);
  white-space: nowrap;
}

.wx-kbd kbd + kbd {
  margin-left: -1px;
}

.wx-empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 10px;
  font-size: 13px;
  color: var(--muted);
}

.wx-empty__reset {
  height: 28px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: var(--paper, #F7F7F5);
  box-shadow: inset 0 0 0 1px var(--wx-hair);
  font: 500 12px/1 var(--f);
  color: var(--ink);
  cursor: pointer;
}

/* ==========================================================================
   Middle stage: pure showcase canvas
   ========================================================================== */
.wx-stage {
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--surface, #FFFFFF);
  outline: none;
}

.wx-stage__inner {
  padding: 16px 16px 40px;
}

.wx-bento {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.wx-tile {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: var(--wx-mat);
  box-shadow: inset 0 0 0 1px rgba(20, 22, 24, 0.035);
  overflow: hidden;
  cursor: zoom-in;
  text-align: left;
}

.wx-tile--hero,
.wx-tile--full {
  grid-column: 1 / -1;
}

/* Version separator: dashed rule, small label left, open link right */
.wx-vsep {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 2px 0;
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(20, 22, 24, 0.55);
}

.wx-vsep__line {
  flex: 1;
  height: 0;
  border-top: 1px dashed rgba(20, 22, 24, 0.22);
}

.wx-vsep__link {
  color: var(--blue, #0058F6);
  text-decoration: none;
  white-space: nowrap;
}

.wx-vsep__link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.wx-tile--pair {
  grid-column: span 1;
}

/* Tonal mat: screen floats with generous, proportional breathing room */
.wx-tile__mat {
  width: 100%;
  padding: 5% 6.5%;
  display: flex;
  justify-content: center;
}

.wx-tile--pair .wx-tile__mat {
  padding: 8%;
}

.wx-tile__frame {
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  background: #FFFFFF;
  box-shadow:
    0 0 0 1px rgba(20, 22, 24, 0.08),
    0 4px 12px -2px rgba(20, 22, 24, 0.07),
    0 18px 38px -12px rgba(20, 22, 24, 0.14);
  transition: transform 0.32s cubic-bezier(0.2, 0, 0, 1), box-shadow 0.32s cubic-bezier(0.2, 0, 0, 1);
}

.wx-tile--pair .wx-tile__frame {
  border-radius: 8px;
}

.wx-tile picture {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.wx-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

/* Caption: frosted-glass pill, only on hover / keyboard focus on desktop */
.wx-tile__foot {
  position: absolute;
  left: 12px;
  bottom: 12px;
  max-width: calc(100% - 24px);
  height: 28px;
  padding: 0 4px 0 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  backdrop-filter: blur(16px) saturate(180%);
  box-shadow: 0 0 0 1px rgba(20, 22, 24, 0.06), 0 1px 2px rgba(20, 22, 24, 0.04);
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transform: translate3d(0, 4px, 0);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.22s cubic-bezier(0.2, 0, 0, 1);
}

.wx-tile:hover .wx-tile__foot,
.wx-tile:focus-visible .wx-tile__foot {
  opacity: 1;
  transform: none;
}

@media (hover: none) {
  .wx-tile__foot { opacity: 1; transform: none; }
}

.wx-tile__idx {
  font: 500 10.5px/1 var(--mono);
  color: var(--steel, #8C9197);
  font-variant-numeric: tabular-nums;
}

.wx-tile__lbl {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wx-tile__zoom {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.wx-tile__zoom svg {
  width: 12px;
  height: 12px;
}

.wx-tile:hover .wx-tile__frame {
  transform: translate3d(0, -2px, 0);
  box-shadow:
    0 0 0 1px rgba(20, 22, 24, 0.11),
    0 8px 20px -4px rgba(20, 22, 24, 0.09),
    0 24px 48px -12px rgba(20, 22, 24, 0.18);
}

.wx-tile:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

/* Client change: quiet fade-up */
@keyframes wx-in {
  from { opacity: 0; transform: translate3d(0, 8px, 0); }
  to { opacity: 1; transform: none; }
}

.wx-bento.is-entering > * {
  animation: wx-in 0.24s cubic-bezier(0.2, 0, 0, 1) both;
}

.wx-bento.is-entering > *:nth-child(2) { animation-delay: 0.03s; }
.wx-bento.is-entering > *:nth-child(3) { animation-delay: 0.06s; }
.wx-bento.is-entering > *:nth-child(4) { animation-delay: 0.09s; }
.wx-bento.is-entering > *:nth-child(n + 5) { animation-delay: 0.12s; }

/* ==========================================================================
   Right inspector: ledger structure
   ========================================================================== */
.wx-insp {
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--line);
  background: var(--surface, #FFFFFF);
}

.wx-insp__bar {
  flex: none;
  padding: 14px var(--wx-px) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wx-insp__pos {
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.02em;
  color: var(--steel, #8C9197);
  font-variant-numeric: tabular-nums;
}

.wx-insp__arrows {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.wx-arrow-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 0;
  background: var(--surface, #FFFFFF);
  box-shadow: inset 0 0 0 1px rgba(20, 22, 24, 0.1);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.wx-arrow-btn:hover {
  background: var(--paper, #F7F7F5);
  box-shadow: inset 0 0 0 1px rgba(20, 22, 24, 0.16);
}

.wx-arrow-btn:active {
  transform: scale(0.96);
}

.wx-arrow-btn:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.wx-arrow-btn svg {
  width: 13px;
  height: 13px;
}

.wx-insp__scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* Sections share one horizontal inset and one hairline rhythm */
.wx-sect {
  margin: 0;
  padding: 13px var(--wx-px);
  border-top: 1px solid var(--wx-hair);
}

.wx-head {
  border-top: 0;
  padding-top: 10px;
  padding-bottom: 14px;
}

.wx-head__id {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wx-insp__logo {
  width: 38px;
  height: 38px;
  border-radius: 10px;
}

.wx-insp__logo img,
.wx-insp__logo svg {
  width: 21px;
  height: 21px;
  object-fit: contain;
  display: block;
}

.wx-insp__title {
  min-width: 0;
}

.wx-insp__title h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.wx-insp__cat {
  margin: 2px 0 0;
  font-size: 12.5px;
  line-height: 1.25;
  color: var(--muted);
}

.wx-head__links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 0;
}

.wx-top-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(0, 88, 246, 0.06);
  box-shadow: inset 0 0 0 1px rgba(0, 88, 246, 0.18);
  font: 500 11.5px/1 var(--mono);
  color: var(--blue, #0058F6);
  text-decoration: none;
  transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.wx-top-link:hover {
  background: rgba(0, 88, 246, 0.11);
  box-shadow: inset 0 0 0 1px rgba(0, 88, 246, 0.32);
}

.wx-top-link:active {
  transform: scale(0.98);
}

.wx-insp__sum {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.46;
  letter-spacing: -0.005em;
  color: var(--ink);
  text-wrap: pretty;
}

.wx-concept {
  margin: 8px 0 0;
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--steel, #8C9197);
}

/* Spec rows */
.wx-facts {
  margin: 0;
  border-top: 1px solid var(--wx-hair);
}

.wx-fact {
  display: grid;
  grid-template-columns: var(--wx-col, 78px) minmax(0, 1fr);
  align-items: baseline;
  gap: 10px;
  padding: 7.5px var(--wx-px);
}

.wx-fact + .wx-fact {
  border-top: 1px solid var(--wx-hair);
}

.wx-fact dt {
  font-size: 12px;
  color: var(--steel, #8C9197);
}

.wx-fact dd {
  margin: 0;
  min-width: 0;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--ink);
}

.wx-status {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
}

.wx-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex: none;
  background: var(--steel3, #AEB2B5);
  margin-top: 6px;
}

.wx-status--live i {
  background: #16A34A;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.14);
}

.wx-status--cycle i {
  background: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-wash, rgba(0, 88, 246, 0.08));
}

/* Results ledger: full-bleed rows, value column + label column */
.wx-results {
  padding: 12px 0 0;
}

.wx-sect__h {
  margin: 0 0 6px;
  padding: 0 var(--wx-px);
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
  color: var(--steel, #8C9197);
}

.wx-metrics {
  display: flex;
  flex-direction: column;
}

.wx-metric {
  display: grid;
  grid-template-columns: minmax(var(--wx-col, 78px), max-content) minmax(0, 1fr);
  align-items: baseline;
  gap: 10px;
  padding: 7.5px var(--wx-px);
}

.wx-metric + .wx-metric {
  border-top: 1px solid var(--wx-hair);
}

.wx-metric__val {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.wx-metric__lbl {
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--muted);
}

.wx-metrics__note {
  margin: 0;
  padding: 0 var(--wx-px) 12px;
  font-size: 11.5px;
  color: var(--steel, #8C9197);
}

.wx-scope {
  list-style: none;
  margin: 0;
  padding: 0;
}

.wx-scope li {
  padding: 11px var(--wx-px);
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink);
}

.wx-scope li + li {
  border-top: 1px solid var(--wx-hair);
}

/* Case breakdown story */
.wx-story {
  padding-top: 12px;
  padding-bottom: 14px;
}

.wx-story .wx-sect__h {
  padding: 0;
  margin-bottom: 8px;
}

.wx-story__p {
  margin: 0 0 10px;
  font-size: 12.5px;
  line-height: 1.48;
  color: var(--ink);
  text-wrap: pretty;
}

.wx-story__list {
  margin: 0;
  padding: 0 0 0 15px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wx-story__list li {
  font-size: 12px;
  line-height: 1.44;
  color: var(--muted);
  text-wrap: pretty;
}

/* Editorial quote */
.wx-quote {
  padding-top: 16px;
  padding-bottom: 18px;
}

.wx-quote blockquote {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  letter-spacing: -0.005em;
  color: var(--ink);
  text-wrap: pretty;
}

.wx-quote figcaption {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.wx-quote__av {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  box-shadow: 0 0 0 1px var(--wx-hair);
}

.wx-quote__who {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.wx-quote__who b {
  font-size: 12.5px;
  font-weight: 550;
  color: var(--ink);
}

.wx-quote__who em {
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
}

/* Inspector footer */
.wx-insp__foot {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px var(--wx-px) 14px;
  border-top: 1px solid var(--wx-hair);
  background: var(--surface, #FFFFFF);
}

.wx-cta-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 10px;
  background: var(--blue);
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 550;
  letter-spacing: -0.01em;
  text-decoration: none;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.28) inset, 0 -1px 0 rgba(0, 0, 0, 0.12) inset, 0 1px 2px rgba(0, 58, 169, 0.2);
  transition: background-color 0.15s ease, transform 0.12s ease-out;
}

.wx-cta-primary:hover {
  background: #0050E0;
}

.wx-cta-primary:active {
  background: var(--blue-press, #003AA9);
  transform: scale(0.98);
}

.wx-cta-primary:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.wx-next-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font: 400 13px/1 var(--f);
  color: var(--steel, #8C9197);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.wx-next-btn span { flex: none; }
.wx-next-btn b {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  font-weight: 500;
  color: var(--ink);
}
.wx-next-btn i {
  flex: none;
  font-style: normal;
  color: var(--muted);
  transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1);
}

.wx-next-btn:hover {
  background: var(--paper, #F7F7F5);
}

.wx-next-btn:hover i {
  transform: translateX(2px);
  color: var(--ink);
}

.wx-next-btn:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: -2px;
}

/* ---------- Mobile-only elements ---------- */
.wx-mbar,
.wx-minfo,
.wx-msticky {
  display: none;
}

/* ==========================================================================
   Lightbox
   ========================================================================== */
.wx-lb {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(12, 14, 16, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s cubic-bezier(0.2, 0, 0, 1);
}

.wx-lb.is-open {
  opacity: 1;
  pointer-events: auto;
}

.wx-lb__top {
  height: 60px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 20px;
  color: #FFFFFF;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.wx-lb__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-size: 13px;
}

.wx-lb__cnt {
  flex: none;
  padding: 5px 8px;
  border-radius: var(--r-chip, 6px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.wx-lb__cap {
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wx-lb__close,
.wx-lb__nav {
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #FFFFFF;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.wx-lb__close {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 10px;
}

.wx-lb__close:hover,
.wx-lb__nav:hover {
  background: rgba(255, 255, 255, 0.18);
}

.wx-lb__stage {
  flex: 1;
  min-height: 0;
  position: relative;
  display: grid;
  place-items: center;
  padding: 24px 80px;
}

.wx-lb__img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 32px 80px -20px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.1);
  object-fit: contain;
  transform-origin: center center;
  transition: transform 0.4s cubic-bezier(0.2, 0, 0, 1);
}

.wx-lb__nav {
  position: absolute;
  top: 50%;
  margin-top: -24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.wx-lb__nav--prev { left: 18px; }
.wx-lb__nav--next { right: 18px; }

.wx-lb__nav svg,
.wx-lb__close svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ==========================================================================
   Desktop inspector (scoped to .wx-insp, hidden <= 960px)
   BFS minimal: one white surface, hairlines, Geist Mono eyebrows, blue as accent only.
   Order: header > quiet meta > number grid > case study > quote. Each fact once.
   ========================================================================== */
.wx-insp {
  --wxd-eyebrow: 500 10px/1.2 var(--mono);
  --wxd-gap: 22px;
}

.wx-insp .wx-insp__scroll {
  padding: 0 var(--wx-px) 24px;
}

.wx-insp .wx-insp__scroll.has-more {
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 44px), transparent);
  mask-image: linear-gradient(to bottom, #000 calc(100% - 44px), transparent);
}

.wx-insp .wx-insp__scroll.has-more + .wx-insp__foot {
  box-shadow: 0 -10px 18px -14px rgba(20, 22, 24, 0.18);
}

.wx-insp .wx-insp__foot {
  position: relative;
  gap: 4px;
  padding-top: 12px;
  transition: box-shadow 0.2s ease;
}

/* Header */
.wxd-head {
  padding: 16px 0 var(--wxd-gap);
}

.wxd-id {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wxd-id .wx-insp__logo {
  width: 40px;
  height: 40px;
  border-radius: 11px;
}

.wxd-id__t {
  min-width: 0;
}

.wxd-id__t h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.wxd-id__t p {
  margin: 3px 0 0;
  font-size: 12.5px;
  line-height: 1.25;
  color: var(--muted);
}

.wxd-sum {
  margin: 14px 0 0;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -0.008em;
  color: var(--ink);
  text-wrap: pretty;
}

.wx-insp .wx-head__links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 14px 0 0;
}

.wx-insp .wx-top-link {
  max-width: 100%;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: transparent;
  box-shadow: inset 0 0 0 1px rgba(20, 22, 24, 0.1);
  font: 500 11px/1 var(--mono);
  letter-spacing: -0.01em;
  color: var(--blue, #0058F6);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wx-insp .wx-top-link:hover {
  background: rgba(0, 88, 246, 0.05);
  box-shadow: inset 0 0 0 1px rgba(0, 88, 246, 0.28);
}

/* Quiet meta: Status / Scope / Tools in one compact block */
.wxd-meta {
  margin: 0;
  padding: 14px 0;
  border-top: 1px solid var(--wx-hair);
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.wxd-meta > div {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  align-items: baseline;
  gap: 10px;
}

.wxd-meta dt {
  font: var(--wxd-eyebrow);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--steel, #8C9197);
}

.wxd-meta dd {
  margin: 0;
  min-width: 0;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink);
  text-wrap: pretty;
}

.wxd-meta__aside {
  color: var(--steel, #8C9197);
}

.wxd-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 500;
}

.wxd-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex: none;
  background: var(--steel3, #AEB2B5);
}

.wxd-status--live i {
  background: #16A34A;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.14);
}

.wxd-status--cycle i {
  background: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-wash, rgba(0, 88, 246, 0.08));
}

/* Sections */
.wxd-sec {
  margin: 0;
  padding: var(--wxd-gap) 0 0;
  border-top: 1px solid var(--wx-hair);
}

.wxd-sec + .wxd-sec {
  margin-top: var(--wxd-gap);
}

.wxd-h {
  margin: 0 0 14px;
  font: var(--wxd-eyebrow);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--steel, #8C9197);
}

/* Key numbers: 2-up grid, figure over a short label, hairline cross */
.wxd-nums {
  display: flex;
  flex-direction: column;
}

.wxd-num {
  min-width: 0;
  display: flex;
  flex-direction: row-reverse;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 9px 0;
  border-top: 1px solid var(--wx-hair);
}

.wxd-num:first-child {
  border-top: 0;
  padding-top: 0;
}

.wxd-num__v {
  display: block;
  font-size: 13px !important;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.wxd-num__l {
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--muted);
  text-wrap: pretty;
}

.wxd-note {
  margin: 10px 0 0;
  font-size: 11px;
  color: var(--steel, #8C9197);
}

/* Case study: three numbered parts */
.wxd-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.wxd-step {
  min-width: 0;
}

.wxd-step__k {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.wxd-step__k i {
  flex: none;
  font: 500 10.5px/1 var(--mono);
  font-style: normal;
  color: var(--blue, #0058F6);
  font-variant-numeric: tabular-nums;
}

.wxd-step p,
.wxd-step li {
  font-size: 13.5px;
  line-height: 1.6;
  color: color-mix(in srgb, var(--ink) 72%, transparent);
  text-wrap: pretty;
}

.wxd-step p {
  margin: 6px 0 0;
}

.wxd-step ul {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wxd-step li {
  position: relative;
  padding-left: 12px;
}

.wxd-step li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 5px;
  height: 1px;
  background: var(--steel3, #AEB2B5);
}

.wxd-step li b {
  font-weight: 550;
  color: var(--ink);
}

/* Client quote: plain type, no card */
.wxd-quote blockquote {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  letter-spacing: -0.008em;
  color: var(--ink);
  text-wrap: pretty;
}

.wxd-quote figcaption {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.3;
  color: var(--muted);
}

.wxd-quote img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  box-shadow: 0 0 0 1px var(--wx-hair);
}

.wxd-quote b {
  font-weight: 550;
  color: var(--ink);
}

.wxd-quote__who {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.wxd-quote__who em {
  font-style: normal;
}

.wxd-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.wxd-list li {
  padding: 9px 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink);
}

.wxd-list li + li {
  border-top: 1px solid var(--wx-hair);
}
/* ---------- 961px - 1180px: tighter panes ---------- */
@media (max-width: 1180px) and (min-width: 961px) {
  .wx-body {
    grid-template-columns: 212px minmax(0, 1fr) 256px;
  }
  .wx-app {
    --wx-px: 16px;
    --wx-col: 76px;
  }
  .wx-fchip {
    font-size: 11.5px;
    letter-spacing: -0.01em;
    padding: 0 2px;
  }
}

/* ==========================================================================
   Mobile & tablet (<= 960px)
   ========================================================================== */
@media (max-width: 960px) {
  .wx-main {
    padding-top: 64px;
  }

  .wx-app {
    display: flex;
    flex-direction: column;
    --wx-px: 16px;
  }

  .wx-rail,
  .wx-insp {
    display: none;
  }

  .wx-body {
    display: block;
  }

  /* Sticky client switcher */
  .wx-mbar {
    position: sticky;
    top: 60px;
    z-index: 30;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-top: 1px solid var(--wx-hair);
    border-bottom: 1px solid var(--wx-hair);
  }

  .wx-mbar__row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px 14px;
  }

  .wx-mchips {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding: 2px 20px 2px 0;
    mask-image: linear-gradient(to right, #000 calc(100% - 20px), transparent);
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 20px), transparent);
  }

  .wx-mchips::-webkit-scrollbar {
    display: none;
  }

  .wx-mchip {
    scroll-snap-align: start;
    flex: none;
    min-height: 40px;
    padding: 0 13px 0 8px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface, #FFFFFF);
    color: var(--ink);
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font: 500 13px/1 var(--f);
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  }

  .wx-mchip.is-on {
    background: var(--ink);
    border-color: var(--ink);
    color: #FFFFFF;
  }

  .wx-mchip__mk {
    width: 24px;
    height: 24px;
    border-radius: 50%;
  }

  .wx-mchip__mk img,
  .wx-mchip__mk svg {
    width: 15px;
    height: 15px;
    object-fit: contain;
    display: block;
  }

  .wx-mchips__empty {
    padding: 0 4px;
    font-size: 13px;
    color: var(--muted);
    white-space: nowrap;
  }

  .wx-msearch-btn {
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: var(--surface, #FFFFFF);
    color: var(--ink);
    display: grid;
    place-items: center;
    cursor: pointer;
  }

  .wx-msearch-btn[aria-expanded="true"] {
    background: var(--ink);
    border-color: var(--ink);
    color: #FFFFFF;
  }

  .wx-msearch-drawer {
    display: none;
    flex-direction: column;
    gap: 8px;
    padding: 0 16px 12px;
  }

  .wx-mbar.is-filtering .wx-msearch-drawer {
    display: flex;
  }

  .wx-msearch-drawer .wx-search__input {
    height: 42px;
    font-size: 15px;
  }

  .wx-msearch-drawer .wx-fchip {
    height: 34px;
    font-size: 13px;
  }

  /* Stage */
  .wx-stage {
    overflow: visible;
  }

  .wx-stage__inner {
    padding: 12px 12px 40px;
  }

  .wx-bento {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .wx-tile--pair {
    grid-column: 1 / -1;
  }

  .wx-tile {
    border-radius: 14px;
  }

  .wx-tile__mat,
  .wx-tile--pair .wx-tile__mat {
    padding: 14px;
  }

  .wx-tile__frame,
  .wx-tile--pair .wx-tile__frame {
    border-radius: 6px;
  }

  /* Info card under the hero: same ledger structure as the inspector */
  .wx-minfo {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    border-radius: 14px;
    background: var(--surface, #FFFFFF);
    box-shadow: inset 0 0 0 1px var(--line);
    overflow: hidden;
  }

  .wx-minfo .wx-head {
    padding-top: 18px;
  }

  .wx-minfo__cta {
    padding: 14px 16px 16px;
    border-top: 1px solid var(--wx-hair);
  }

  /* Sticky CTA (appears once the info card scrolls away) */
  .wx-msticky {
    display: flex;
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    padding: 6px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    box-shadow: 0 0 0 1px rgba(20, 22, 24, 0.07), 0 1px 2px rgba(20, 22, 24, 0.04), 0 8px 24px -12px rgba(20, 22, 24, 0.12);
    z-index: 85;
    opacity: 0;
    transform: translate3d(0, 16px, 0);
    pointer-events: none;
    transition: opacity 0.22s cubic-bezier(0.2, 0, 0, 1), transform 0.22s cubic-bezier(0.2, 0, 0, 1);
  }

  .wx-msticky.is-visible {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  .wx-lb__stage {
    padding: 16px 12px 76px;
  }

  .wx-lb__nav {
    top: auto;
    bottom: 16px;
    margin-top: 0;
  }

  .wx-lb__nav--prev { left: calc(50% - 56px); }
  .wx-lb__nav--next { right: calc(50% - 56px); }
}

@media (prefers-reduced-motion: reduce) {
  .wx-tile__frame,
  .wx-tile__foot,
  .wx-row__mk,
  .wx-mchip__mk,
  .wx-lb,
  .wx-lb__img,
  .wx-msticky,
  .wx-cta-primary,
  .wx-next-btn i {
    transition: none !important;
  }
  .wx-bento.is-entering > * {
    animation: none !important;
  }
}
