:where(.seh-demos) .coating-page {
  --coating-panel: var(--theme-inset, #f5f9fc);
  --coating-focus: var(--theme-focus, #257ba1);
  --coating-padding: clamp(16px, 2.8vw, 30px);
  width: min(1280px, calc(100% - 56px));
  margin-top: clamp(24px, 4.5vh, 58px);
}

:where(.seh-demos) .coating-page .page-header :is(h1, .demo-section-title) { overflow-wrap: anywhere; }

:where(.seh-demos) .coating-page :is(.comparison, .features) { padding: var(--coating-padding); }

:where(.seh-demos) .coating-page .features {
  container-type: inline-size;
  margin-top: 18px;
}

:where(.seh-demos) .coating-page .section-heading { margin-bottom: 18px; }

:where(.seh-demos) .coating-page .section-heading h2 {
  font-size: clamp(1.45rem, 2.6vw, 2rem);
  line-height: 1.15;
}

:where(.seh-demos) .coating-page .section-heading p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.55;
}

:where(.seh-demos) .compare-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(245px, 1fr);
  align-items: start;
  gap: 18px;
}

:where(.seh-demos) .comparison-figure { min-width: 0; margin: 0; }

:where(.seh-demos) .comparison-frame {
  --split: 50%;
  --image-pan: min(15mm, 5vw);
  --image-overhang: calc(var(--image-pan) * 1208 / 1920);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  aspect-ratio: 1920 / 1208;
  border-radius: 15px;
  background: var(--coating-panel);
}

:where(.seh-demos) .comparison-image {
  position: absolute;
  top: calc(-1 * var(--image-overhang));
  width: 100%;
  height: calc(100% + 2 * var(--image-overhang));
  object-fit: cover;
  object-position: right center;
  user-select: none;
  pointer-events: none;
}

:where(.seh-demos) .coating-image { clip-path: inset(0 0 0 var(--split)); }

:where(.seh-demos) .image-labels {
  position: absolute;
  inset: 12px 12px auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 6px;
  pointer-events: none;
}

:where(.seh-demos) .image-labels span {
  padding: 5px 9px;
  border: 1px solid rgb(255 255 255 / .24);
  border-radius: 7px;
  background: rgb(22 41 61 / .94);
  color: #fff;
  font-size: clamp(.7rem, 1.4vw, .83rem);
  line-height: 1.35;
}

:where(.seh-demos) .divider {
  position: absolute;
  inset-block: 0;
  left: clamp(1px, var(--split), calc(100% - 1px));
  width: 2px;
  transform: translateX(-50%);
  background: #fff;
  box-shadow: 0 0 3px #16293d;
  pointer-events: none;
}

:where(.seh-demos) .divider span {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--accent);
  box-shadow: 0 2px 10px rgb(22 41 61 / .38);
  font-size: 1.3rem;
  font-weight: 650;
  line-height: 1;
}

:where(.seh-demos) .comparison-frame:not(.interactive) .divider span { display: none; }

:where(.seh-demos) .compare-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  appearance: none;
  opacity: 0;
  cursor: ew-resize;
  touch-action: pan-y;
}

:where(.seh-demos) .compare-range::-webkit-slider-thumb { width: 2px; height: 100%; appearance: none; }
:where(.seh-demos) .compare-range::-moz-range-thumb { width: 2px; height: 100%; border: 0; }

:where(.seh-demos) .coating-page .table-scroll:focus-visible,
:where(.seh-demos) .comparison-frame:has(.compare-range:focus-visible),
:where(.seh-demos) .variant-option:has(input:focus-visible) {
  outline: 3px solid var(--coating-focus);
  outline-offset: 3px;
}

:where(.seh-demos) .comparison-frame:has(.compare-range:focus-visible) .divider span {
  border-color: var(--coating-focus);
  background: var(--accent-light);
}

:where(.seh-demos) .variant-panel {
  padding: clamp(14px, 2.2vw, 22px);
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--coating-panel);
}

:where(.seh-demos) #variant-options { min-width: 0; margin: 0; padding: 0; border: 0; }

:where(.seh-demos) #variant-options legend {
  margin-bottom: 10px;
  padding: 0;
  font-size: 1rem;
  font-weight: 650;
}

:where(.seh-demos) .variant-option {
  display: flex;
  align-items: center;
  min-height: 44px;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  font-size: .875rem;
  font-weight: 650;
  cursor: pointer;
}

:where(.seh-demos) .variant-option + .variant-option { margin-top: 7px; }

:where(.seh-demos) .variant-option:has(:checked) {
  border-color: var(--theme-hover-border, #aaccd7);
  background: var(--accent-light);
  color: var(--accent);
}

:where(.seh-demos) .variant-option input {
  flex: none;
  order: 1;
  margin: 0 0 0 auto;
  accent-color: var(--accent);
}

:where(.seh-demos) .tone-set { --dot: #718c8a; }
:where(.seh-demos) .tone-lotus { --dot: #6c9a71; }
:where(.seh-demos) .tone-ultra { --dot: #85915e; }
:where(.seh-demos) .tone-blue { --dot: #6786d5; }

:where(.seh-demos) .color-dot {
  display: inline-block;
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--dot);
}

:where(.seh-demos) #variant-options:not([hidden]) + .variant-info {
  margin-top: 15px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

:where(.seh-demos) .variant-info h3 { margin: 0 0 6px; font-size: 1.1rem; line-height: 1.25; }
:where(.seh-demos) .variant-info p { color: var(--muted); font-size: .9rem; line-height: 1.55; }

:where(.seh-demos) .coating-page .table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

:where(.seh-demos) .coating-page table {
  width: 100%;
  min-width: 40rem;
  border-collapse: separate;
  border-spacing: 0;
  font-size: .875rem;
}

:where(.seh-demos) .coating-page :is(th, td) {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  text-align: center;
}

:where(.seh-demos) .coating-page thead th {
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 650;
  white-space: nowrap;
}

:where(.seh-demos) .coating-page thead .color-dot { margin-inline-end: 6px; }

:where(.seh-demos) .coating-page :is(thead th:first-child, tbody th) {
  position: sticky;
  inset-inline-start: 0;
  z-index: 1;
  text-align: start;
  box-shadow: 1px 0 var(--border);
}

:where(.seh-demos) .coating-page tbody th { background: var(--surface); font-weight: 600; }
:where(.seh-demos) .coating-page tbody tr:nth-child(even) > * { background: var(--coating-panel); }
:where(.seh-demos) .coating-page tbody tr:last-child > * { border-bottom: 0; }

:where(.seh-demos) .coating-page :is(.yes, .no) {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-weight: 700;
}

:where(.seh-demos) .coating-page .yes { background: var(--accent-light); color: var(--accent); }
:where(.seh-demos) .coating-page .no { color: var(--muted); }
:where(.seh-demos) .coating-page .table-hint { display: none; margin: 0 0 8px; color: var(--muted); font-size: .82rem; }

@container (max-width: 40.125rem) {
  :where(.seh-demos) .coating-page .table-hint { display: block; }
  :where(.seh-demos) .coating-page :is(th, td) { padding-inline: 10px; }
  :where(.seh-demos) .coating-page :is(thead th:first-child, tbody th) { max-width: 8rem; white-space: normal; }
  :where(.seh-demos) .coating-page thead .color-dot { display: none; }
}

@media (max-width: 800px) {
  :where(.seh-demos) .compare-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
}

@media (max-width: 640px) {
  :where(.seh-demos) .coating-page { width: calc(100% - 32px); }
  :where(.seh-demos) .image-labels { inset: 8px 8px auto; }
  :where(.seh-demos) .image-labels span { padding-inline: 6px; }
}

@media (hover: hover) and (pointer: fine) {
  :where(.seh-demos) .variant-option:hover { border-color: var(--theme-hover-border, #91b9c9); }
}

@media (prefers-reduced-motion: no-preference) {
  :where(.seh-demos) .coating-page .comparison { animation: page-enter 400ms var(--ease-out) 45ms backwards; }
  :where(.seh-demos) .variant-option { transition: background-color var(--control-speed), border-color var(--control-speed), color var(--control-speed); }
}
