.rw-fit, .rw-fit-preview {
  color: var(--rw-ink);
  font: var(--rw-weight-regular) var(--rw-body-size)/var(--rw-body-leading) var(--rw-font);
}

.rw-fit *, .rw-fit-preview * { box-sizing: border-box; }
.rw-fit :is(h2, h3, p, dl, dd, figure), .rw-fit-preview h1 { margin: 0; }
.rw-fit img { display: block; width: 100%; height: auto; }
.rw-fit button { cursor: pointer; }

.rw-fit {
  background: var(--rw-canvas);
  padding-block: var(--rw-section-gap) 0;
}

.rw-fit__heading { margin-bottom: 32px; }
.rw-fit__heading p { margin-top: 16px; color: var(--rw-muted); }
.rw-fit__grid {
  display: grid;
  gap: var(--rw-grid-gap);
  align-items: stretch;
}

.rw-fit__grid + .rw-fit__grid { margin-top: var(--rw-grid-gap); }
.rw-fit__scene {
  background: var(--rw-surface);
  border-radius: var(--rw-radius-card);
  overflow: hidden;
}

.rw-fit__scene img { aspect-ratio: 4 / 3; object-fit: contain; }

.rw-fit :is(.rw-fit__scene, .rw-card) {
  box-shadow: 0 12px 32px rgba(23, 28, 32, .07);
}

.rw-fit__card {
  min-width: 0;
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 16px;
}

.rw-fit h3, .rw-fit__dialog-head h2 {
  font: var(--rw-weight-semibold) 24px/30px var(--rw-font);
  letter-spacing: -.35px;
}

.rw-fit__dimensions, .rw-fit__list { width: 100%; }
.rw-fit__dimensions > div, .rw-fit__list > div {
  border-bottom: var(--rw-border);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: baseline;
  padding-block: 12px;
}

.rw-fit__dimensions > div:last-child, .rw-fit__list > div:last-child { border-bottom: 0; }
.rw-fit__dimensions dt, .rw-fit__list dt { font-weight: 600; }
.rw-fit__dimensions dd { display: flex; gap: 8px 12px; justify-content: end; align-items: baseline; flex-wrap: wrap; }
.rw-fit__dimensions strong { font: 600 24px/30px var(--rw-font); font-variant-numeric: tabular-nums; }
.rw-fit__dimensions span, .rw-fit__accessory figcaption, .rw-fit__diagrams p {
  font: 400 13px/20px var(--rw-font);
  color: var(--rw-muted);
}

.rw-fit__list > div { grid-template-columns: 72px minmax(0, 1fr); }
.rw-fit__list dd, .rw-fit__note { color: var(--rw-muted); }
.rw-fit__card .rw-button { margin-top: 8px; max-width: 100%; }
.rw-fit__card .rw-button:hover { background-color: var(--rw-line); }

.rw-fit__accessory {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.rw-fit__accessory img {
  width: min(100%, 392px);
  height: auto;
  object-fit: contain;
  border-radius: var(--rw-radius-small);
}

.rw-fit__dialog {
  width: min(var(--rw-dialog-max), calc(100% - 32px));
  max-height: min(88dvh, 900px);
  padding: 0;
  border: 0;
  border-radius: var(--rw-radius-dialog);
  background: var(--rw-surface);
  color: var(--rw-ink);
  overscroll-behavior: contain;
}

.rw-fit__dialog::backdrop { background: rgba(23, 28, 32, .56); }
body:has(.rw-fit__dialog[open]) { overflow: hidden; }

.rw-fit__dialog-head {
  position: sticky;
  z-index: 1;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px var(--rw-card-padding);
  border-bottom: var(--rw-border);
  background: var(--rw-surface);
}

.rw-fit__close {
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: var(--rw-radius-pill);
  color: var(--rw-ink);
  background: var(--rw-subtle);
  font: 400 24px/1 var(--rw-font);
}

.rw-fit__guide, .rw-fit__specs { padding: var(--rw-card-padding); }
.rw-fit__guide { display: grid; align-items: center; gap: var(--rw-grid-gap); }
.rw-fit__machine img { max-height: 320px; object-fit: contain; }
.rw-fit__model { font-weight: 600; }
.rw-fit__specs .rw-fit__list > div { grid-template-columns: minmax(94px, .8fr) minmax(0, 1.2fr); }
.rw-fit__guide-info .rw-fit__list > div { display: block; }
.rw-fit__guide-info .rw-fit__list dd { margin-top: 4px; }

.rw-fit .rw-fit__diagrams {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 16px;
  border-radius: var(--rw-radius-small);
  background: var(--rw-subtle);
  text-align: center;
}

.rw-fit__diagrams p span { display: block; color: var(--rw-ink); font-weight: 600; }

.rw-fit__diagram-frame {
  display: grid;
  place-items: center;
  height: 128px;
  padding: 12px;
  background: var(--rw-surface);
  border-radius: 8px;
  margin-bottom: 8px;
}

.rw-fit__diagram {
  width: min(var(--diagram-width), calc(100% - 12px));
  aspect-ratio: var(--diagram-ratio);
  position: relative;
  border: 1px solid var(--rw-accent);
  background: var(--rw-canvas);
}

.rw-fit__diagram::before, .rw-fit__diagram::after {
  content: "";
  position: absolute;
  border: solid var(--rw-muted);
}

.rw-fit__diagram::before { inset: auto -1px -10px; height: 5px; border-width: 0 1px 1px; }
.rw-fit__diagram::after { inset: -1px -10px -1px auto; width: 5px; border-width: 1px 1px 1px 0; }

.rw-fit-preview { margin: 0; }
.rw-fit-preview__header { border-bottom: var(--rw-border); background: var(--rw-surface); }
.rw-fit-preview__bar {
  min-height: var(--rw-nav-height);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
}

.rw-fit-preview__logo { width: 48px; height: 48px; object-fit: contain; }
.rw-fit-preview__switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  padding: 4px;
  border-radius: var(--rw-radius-pill);
  background: var(--rw-subtle);
}
.rw-fit-preview__switch a {
  display: grid;
  align-items: center;
  min-height: 44px;
  padding: 4px 14px;
  border-radius: var(--rw-radius-pill);
  color: var(--rw-ink);
  text-decoration: none;
  text-align: center;
}

.rw-fit-preview__switch a[aria-current] { background: var(--rw-surface); font-weight: 600; }
.rw-fit-preview__sr-only, .rw-fit-preview__skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  overflow: hidden;
}
.rw-fit-preview__skip:focus { position: absolute; z-index: 10; top: 8px; left: 8px; padding: 12px; background: var(--rw-surface); }
.rw-fit-preview .rw-fit { padding-block: clamp(40px, 5vw, 80px) var(--rw-gutter); }

@media (max-width: 599px) {
  .rw-fit-preview__bar { grid-template-columns: auto minmax(0, 1fr); }
  .rw-fit-preview__switch { justify-self: end; }
  .rw-fit-preview__switch a { padding-inline: 9px; font-size: 13px; line-height: 20px; }
  .rw-fit__dimensions dd { column-gap: 8px; }
}

@media (min-width: 768px) {
  .rw-fit__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rw-fit__card { grid-template-rows: auto 1fr auto auto; }
  .rw-fit__card--counter .rw-fit__dimensions { display: grid; grid-template-rows: repeat(3, 1fr); }
  .rw-fit__card--counter .rw-fit__dimensions > div { align-content: center; }
  .rw-fit__scene { display: grid; align-items: center; }
  .rw-fit__guide { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .rw-fit__diagrams { grid-column: 1 / -1; }
}

@media (min-width: 1024px) {
  .rw-fit-preview__logo { width: 62px; height: 62px; }
}
