html {
  --ec-slab-nav-height: 3.5rem;

  scroll-padding-top: calc(var(--g-header-height) + var(--ec-slab-nav-height) + 0.5rem);
}

.ec-slab-page {
  --ec-slab-gutter: clamp(1.25rem, 5vw, 4rem);

  background: var(--g-ivory);
}

.ec-slab-chrome {
  --ec-slab-chrome-line: color-mix(in srgb, var(--g-ivory) 19%, transparent);

  position: sticky;
  top: 0;
  z-index: 20;
}

.ec-slab-chrome > header,
.ec-slab-nav {
  background: var(--g-showroom);
  color: var(--g-ivory);
  border-bottom: 1px solid var(--ec-slab-chrome-line);
}

.ec-slab-chrome > header {
  position: static;
}

.ec-slab-page .ec-gallery-cta:hover {
  background: var(--g-ivory);
  color: var(--g-ink);
}

.ec-slab-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  min-height: var(--ec-slab-nav-height);
  padding-inline: clamp(0.8rem, 4vw, 2.5rem);
  font-size: 0.875rem;
  line-height: 1.25;
}

.ec-slab-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 44px;
  border-radius: 0.25rem;
  text-decoration: none;
}

.ec-slab-nav a:where(:hover) {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.ec-slab-nav-back {
  font-weight: 500;
}

.ec-slab-nav-steps {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex: none;
}

.ec-slab-nav-steps a {
  justify-content: center;
  min-width: 44px;
  padding-inline: 0.375rem;
}

.ec-slab-nav-arrow {
  font-size: 1.375rem;
  line-height: 1;
}

.ec-slab-nav-count {
  color: var(--g-brass);
  font: 400 0.8125rem/1 var(--g-mono);
}

.ec-slab-swatches,
.ec-slab-nav-name {
  display: none;
}

@media (width >= 900px) {
  .ec-slab-nav {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    justify-items: start;
  }

  .ec-slab-nav-steps {
    justify-self: end;
  }

  .ec-slab-nav-name {
    display: inline;
  }

  .ec-slab-nav-count {
    display: none;
  }

  .ec-slab-swatches {
    display: flex;
    gap: 0.25rem;
  }

  .ec-slab-swatches a {
    position: relative;
    padding: 7px;
  }

  .ec-slab-swatches a:focus-visible {
    outline-offset: -1px;
  }

  .ec-slab-swatches img {
    width: 30px;
    height: 30px;
    border: 1px solid color-mix(in srgb, var(--g-ivory) 42%, transparent);
    border-radius: 0.25rem;
    object-fit: cover;
  }

  .ec-slab-swatches [aria-current="page"] img {
    outline: 2px solid var(--g-brass);
    outline-offset: 2px;
  }

  .ec-slab-swatches span {
    position: absolute;
    top: 100%;
    left: 50%;
    translate: -50% 0;
    visibility: hidden;
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--ec-slab-chrome-line);
    border-radius: 0.25rem;
    background: var(--g-showroom);
    color: var(--g-ivory);
    font-size: 0.8125rem;
  }

  .ec-slab-swatches a:is(:hover, :focus-visible):not([data-tooltip-dismissed]) span {
    visibility: visible;
  }
}

.ec-slab-shell {
  width: min(100%, 83rem);
  padding-inline: var(--ec-slab-gutter);
  margin-inline: auto;
}

.ec-slab-hero {
  position: relative;
  display: grid;
  align-items: end;
  min-height: clamp(22rem, 65svh, 48rem);
  isolation: isolate;
  color: var(--g-ivory);
  background: var(--g-showroom);
}

.ec-slab-hero-media {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.ec-slab-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.ec-slab-hero-media::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(20deg, rgb(23 16 12 / 78%), transparent 65%),
    linear-gradient(0deg, rgb(23 16 12 / 72%) 10%, transparent 82%);
  content: "";
}

.ec-slab-hero-content {
  padding-block: clamp(2rem, 6vh, 4rem);
}

.ec-slab-hero-content > p {
  margin: 0 0 1.25rem;
}

.ec-slab-hero h1 {
  margin-bottom: 0.5rem;
  font-size: clamp(3.5rem, 9vw, 8rem);
}

.ec-slab-intro {
  padding-block: clamp(1.6rem, 4vw, 3rem);
  border-bottom: 1px solid var(--g-line);
}

.ec-slab-intro > p {
  max-width: 46rem;
  margin: 0;
  font: 400 clamp(1.35rem, 2.3vw, 1.8rem)/1.32 var(--g-serif);
}

.ec-slab-section {
  padding-block: clamp(2.5rem, 5vw, 4.5rem);
  border-bottom: 1px solid var(--g-line);
}

.ec-slab-section h2 {
  margin-bottom: 1.5rem;
}

.ec-slab-section h3 {
  margin: 0 0 0.5rem;
  font: 500 1.25rem/1.3 var(--g-serif);
}

.ec-slab-overview p {
  max-width: 65ch;
  margin: 0 0 0.85rem;
}

.ec-slab-overview p:last-child {
  margin-bottom: 0;
}

.ec-slab-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--g-line);
  border-left: 1px solid var(--g-line);
}

.ec-slab-tiles > div {
  display: flex;
  flex-direction: column-reverse;
  justify-content: end;
  gap: 0.45rem;
  padding: clamp(0.9rem, 2.4vw, 1.75rem);
  border-right: 1px solid var(--g-line);
  border-bottom: 1px solid var(--g-line);
}

.ec-slab-tiles dt,
.ec-slab-figure figcaption,
.ec-slab-note {
  color: var(--g-muted);
  font-size: 0.875rem;
}

.ec-slab-tiles dd {
  margin: 0;
  font: 400 clamp(1.2rem, 2.6vw, 2rem)/1.12 var(--g-serif);
}

.ec-slab-figure {
  --ec-dimension-gap: 0.5rem;
  --ec-dimension-width: 1.4rem;

  margin: 0;
}

.ec-slab-figure-image {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--ec-dimension-width);
  gap: var(--ec-dimension-gap);
}

.ec-slab-figure-image img {
  width: 100%;
  border: 1px solid var(--g-line);
}

.ec-slab-width,
.ec-slab-height {
  display: flex;
  align-items: center;
  gap: var(--ec-dimension-gap);
  margin: 0;
  color: var(--g-muted);
  font: 400 0.75rem/1 var(--g-mono);
}

.ec-slab-width {
  margin: 0 calc(var(--ec-dimension-width) + var(--ec-dimension-gap)) 0.5rem 0;
}

.ec-slab-height {
  flex-direction: column;
}

.ec-slab-height span {
  writing-mode: vertical-rl;
}

.ec-slab-width::before,
.ec-slab-width::after {
  flex: 1;
  height: 1px;
  background: currentcolor;
  content: "";
}

.ec-slab-height::before,
.ec-slab-height::after {
  flex: 1;
  width: 1px;
  background: currentcolor;
  content: "";
}

.ec-slab-figure figcaption {
  margin-top: 0.65rem;
}

.ec-slab-larger-image {
  display: inline-block;
  margin-inline-start: 0.4rem;
  text-underline-offset: 0.22em;
}

.ec-slab-care {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem clamp(2rem, 5vw, 5rem);
}

.ec-slab-care ul {
  margin: 0;
  padding-left: 1.15rem;
}

.ec-slab-care li + li {
  margin-top: 0.4rem;
}

.ec-slab-table {
  border: 1px solid var(--g-line);
}

.ec-slab-table table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}

.ec-slab-table :is(th, td) {
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--g-line);
}

.ec-slab-table thead {
  background: var(--g-bg);
}

.ec-slab-table tbody th {
  font-weight: 500;
}

.ec-slab-table td {
  white-space: nowrap;
}

.ec-slab-table tr:last-child td,
.ec-slab-table tbody tr:last-child th {
  border-bottom: 0;
}

.ec-slab-note {
  margin-bottom: 0;
}

.ec-slab-technical-cards {
  display: none;
}

.ec-slab-quote {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-top: clamp(2.5rem, 5vw, 4.5rem);
  padding: clamp(1.5rem, 5vw, 3.5rem);
  border-radius: 0.5rem;
  background: var(--g-showroom);
  color: var(--g-ivory);
}

.ec-slab-quote h2 {
  margin: 0;
}

.ec-slab-neighbours {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}

.ec-slab-neighbours a {
  display: block;
  overflow: hidden;
  border: 1px solid var(--g-line);
  border-radius: 0.35rem;
  text-decoration: none;
}

.ec-slab-neighbours img {
  width: 100%;
}

.ec-slab-neighbours a > div {
  display: grid;
  gap: 0.35rem;
  padding: clamp(0.9rem, 2.4vw, 1.75rem);
}

.ec-slab-neighbours span {
  color: var(--g-muted);
  font-size: 0.8125rem;
}

.ec-slab-neighbours strong {
  font: 400 clamp(1.6rem, 3vw, 2.5rem)/1.1 var(--g-serif);
}

.ec-slab-neighbours a:where(:hover) {
  background: var(--g-bg);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.ec-slab-more-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  margin-bottom: 1rem;
}

.ec-slab-more-heading h2 {
  margin: 0;
}

.ec-slab-more-heading a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.875rem;
  text-underline-offset: 0.2em;
}

.ec-slab-related {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(6.5rem, 1fr));
  gap: 0.65rem;
  margin: 0;
  padding: 0.3rem 0.2rem 0.65rem;
  list-style: none;
}

.ec-slab-related a {
  display: grid;
  border: 1px solid var(--g-line);
  border-radius: 0.35rem;
  overflow: hidden;
  color: inherit;
  text-align: center;
  text-decoration: none;
}

:is(.ec-slab-hero-content, .ec-slab-quote) a {
  background: var(--g-ivory);
  color: var(--g-ink);
}

.ec-slab-related a:hover {
  background: var(--g-bg);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

:is(.ec-slab-hero-content, .ec-slab-quote) a:hover {
  background: var(--g-brass);
}

.ec-slab-page :is(.ec-slab-chrome, .ec-slab-hero, .ec-slab-quote) a:focus-visible {
  outline-color: var(--g-brass);
}

.ec-slab-related img {
  width: 100%;
  height: 5.5rem;
  object-fit: cover;
}

.ec-slab-related span {
  padding: 0.45rem;
  font-size: 0.875rem;
}

@media (width <= 760px) {
  .ec-slab-hero {
    min-height: clamp(23rem, 58svh, 36rem);
  }

  .ec-slab-care {
    grid-template-columns: minmax(0, 1fr);
  }

  .ec-slab-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ec-slab-table {
    display: none;
  }

  .ec-slab-technical-cards {
    display: grid;
    gap: 0.55rem;
    margin: 0;
  }

  .ec-slab-technical-cards > div {
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--g-line);
    border-radius: 0.35rem;
  }

  .ec-slab-technical-cards dd {
    display: grid;
    margin: 0.15rem 0 0;
  }

  .ec-slab-technical-cards strong {
    font-weight: 600;
  }

  .ec-slab-technical-cards dd span {
    color: var(--g-muted);
    font-size: 0.8125rem;
  }
}

@media (width <= 600px) {
  .ec-slab-neighbours {
    grid-template-columns: minmax(0, 1fr);
  }
}
