/* Stationary decorative canvas; ordinary content uses one native scroller.
   Artwork geometry is pixel-locked. Only its feathered aperture moves. */
/* The browser owns scrolling, overscroll and pull-to-refresh. The wrapper
   groups foreground content without creating a second scrollport. */
html[data-graphite-shell] {
  height: auto;
  overflow-x: clip;
  overflow-y: visible;
  overscroll-behavior: auto;
}
html[data-graphite-shell] body {
  position: static;
  width: 100%;
  height: auto;
  margin: 0;
  overflow: visible;
  overscroll-behavior: auto;
}
#rp-foreground {
  position: relative;
  width: 100%;
  height: auto;
  min-height: 100svh;
  overflow: visible;
  overscroll-behavior: auto;
  background: #fff;
  z-index: 1;
}
#rp-foreground:focus { outline: none; }
html[data-graphite-shell] body #rp-foreground > .site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
}
html[data-graphite-shell] body #rp-foreground > :is(main, .rp-paper-surface) {
  position: relative;
  z-index: 1;
}
html[data-graphite-shell] body #rp-foreground > a.skip {
  z-index: 100;
}
html[data-graphite-shell] body main#main .rp-threshold-reveal {
  position: relative !important;
  overflow: clip !important;
}
/* The source field supplies authored responsive composition and a visible
   fallback until the separate portal is ready, and for reduced motion. */
html[data-graphite-shell] body main#main .rp-threshold-reveal > :is(.rp-watermark-field, .snap-results-art) {
  position: absolute !important;
  inset: 50% 0 auto !important;
  width: 100% !important;
  height: var(--rp-art-height) !important;
  animation: none !important;
  transform: translateY(-50%) !important;
  transition: none !important;
}
html[data-graphite-shell] body main#main .rp-threshold-reveal[data-graphite-ready] > :is(.rp-watermark-field, .snap-results-art) {
  visibility: hidden;
}
#rp-graphite-stage {
  position: fixed;
  inset: 0 0 auto;
  height: var(--rp-art-height, 100lvh);
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  clip-path: inset(var(--rp-graphite-header, 0px) 0 0);
}
.rp-graphite-portal {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background: #fff;
  --rp-mask-y: -10000px;
  -webkit-mask-image:
    linear-gradient(to bottom, transparent 0%, transparent 3px, rgb(0 0 0 / .1) 6.25%, rgb(0 0 0 / .5) 12.5%, rgb(0 0 0 / .9) 18.75%, #000 25%, #000 75%, rgb(0 0 0 / .9) 81.25%, rgb(0 0 0 / .5) 87.5%, rgb(0 0 0 / .1) 93.75%, transparent calc(100% - 3px), transparent),
    linear-gradient(to right, transparent, rgb(0 0 0 / .5) calc(var(--rp-reveal-side-feather, 24px) / 2), #000 var(--rp-reveal-side-feather, 24px), #000 calc(100% - var(--rp-reveal-side-feather, 24px)), rgb(0 0 0 / .5) calc(100% - var(--rp-reveal-side-feather, 24px) / 2), transparent);
  mask-image:
    linear-gradient(to bottom, transparent 0%, transparent 3px, rgb(0 0 0 / .1) 6.25%, rgb(0 0 0 / .5) 12.5%, rgb(0 0 0 / .9) 18.75%, #000 25%, #000 75%, rgb(0 0 0 / .9) 81.25%, rgb(0 0 0 / .5) 87.5%, rgb(0 0 0 / .1) 93.75%, transparent calc(100% - 3px), transparent),
    linear-gradient(to right, transparent, rgb(0 0 0 / .5) calc(var(--rp-reveal-side-feather, 24px) / 2), #000 var(--rp-reveal-side-feather, 24px), #000 calc(100% - var(--rp-reveal-side-feather, 24px)), rgb(0 0 0 / .5) calc(100% - var(--rp-reveal-side-feather, 24px) / 2), transparent);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: var(--rp-mask-width) var(--rp-mask-height);
  mask-size: var(--rp-mask-width) var(--rp-mask-height);
  -webkit-mask-position: var(--rp-mask-x) var(--rp-mask-y);
  mask-position: var(--rp-mask-x) var(--rp-mask-y);
}
.rp-graphite-portal picture { display: contents; }
.rp-graphite-portal img {
  position: absolute;
  display: block;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  transform: none;
  animation: none;
  transition: none;
  -webkit-user-drag: none;
}
/* Only the opening's mask follows the foreground. Artwork stays pixel-locked;
   the original field remains available until the portal image is ready. */
html[data-graphite-shell][data-graphite-obscured] #rp-graphite-stage { visibility: hidden; }
html[data-graphite-shell] body.snapshot-page:is([data-snapshot-view=question], [data-snapshot-view=estimate]) #rp-foreground > .site-header {
  display: none !important;
}
html[data-graphite-shell] body.snapshot-page .snap-step {
  max-height: none;
  overscroll-behavior-y: auto;
}
html[data-graphite-shell]:has(dialog:modal) { overflow: hidden; }
@media (prefers-reduced-motion: reduce) {
  #rp-graphite-stage { display: none; }
  html[data-graphite-shell] body main#main .rp-threshold-reveal > :is(.rp-watermark-field, .snap-results-art) {
    visibility: visible !important;
    position: absolute !important;
    inset: 50% 0 auto !important;
    transform: translateY(-50%) !important;
  }
}
@media print {
  html[data-graphite-shell], html[data-graphite-shell] body {
    position: static !important;
    height: auto !important;
    width: auto !important;
    overflow: visible !important;
  }
  html[data-graphite-shell] body #rp-foreground {
    display: contents !important;
    position: static !important;
    height: auto !important;
    overflow: visible !important;
  }
  html[data-graphite-shell] body #rp-foreground > .site-header,
  html[data-graphite-shell] body #rp-foreground .site-footer,
  #rp-graphite-stage { display: none !important; }
}
/* Empty decorative windows do not need to disappear with Increase Contrast.
   Forced-color mode and printing retain their existing simplified treatment. */
@media (prefers-contrast: more) and (forced-colors: none) {
  html[data-graphite-shell] body[data-watermark] main#main .rp-threshold-reveal:not(#conversation-reveal) {
    display: block !important;
    height: var(--rp-standard-reveal-height) !important;
    background: #fff;
  }
  html[data-graphite-shell] body[data-watermark] main#main .rp-threshold-reveal > :is(.rp-watermark-field, .snap-results-art) {
    display: grid !important;
  }
}
@media (prefers-contrast: more) and (forced-colors: none) and (max-width: 1040px) {
  html[data-graphite-shell] body[data-watermark] main#main #conversation-reveal {
    display: block !important;
    height: var(--rp-standard-reveal-height) !important;
  }
}
@media (forced-colors: active) {
  #rp-graphite-stage { display: none; }
}
