/* Cell material adapted from splitflap.org; see THIRD-PARTY-SPLITFLAP.txt. */
.split-flap {
  --flap-height: 20px;
  --flap-inner-height: calc(var(--flap-height) - 2px);
  position: relative;
  display: inline-block;
  box-sizing: border-box;
  width: var(--flap-width, 1.15em);
  height: var(--flap-height);
  flex-shrink: 0;
  overflow: hidden;
  vertical-align: middle;
  border: 1px solid #3b4435;
  border-radius: 3px;
  color: var(--flap-ink, #dce1d3);
  background: #0a1108;
  box-shadow: inset 0 1px 2px #0009, 0 1px 0 #ffffff12;
  font-family: var(--mono, ui-monospace, SFMono-Regular, Consolas, monospace);
  font-variant-numeric: tabular-nums;
  line-height: var(--flap-inner-height);
  perspective: calc(var(--flap-height) * 10);
  contain: layout style paint;
  isolation: isolate;
}
.split-flap__half {
  position: absolute;
  left: 0;
  right: 0;
  height: calc(var(--flap-inner-height) / 2);
  overflow: hidden;
}
.split-flap__top, .split-flap__front {
  top: 0;
  background: linear-gradient(#30392d, #192016);
}
.split-flap__bottom {
  top: calc(var(--flap-inner-height) / 2);
}
.split-flap__bottom, .split-flap__back {
  background: linear-gradient(#1d2619, #10180d 60%, #2a3424);
}
.split-flap__glyph {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--flap-inner-height);
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: var(--flap-inner-height);
  letter-spacing: 0;
  text-align: center;
  text-shadow: 0 1px 1px #000;
  white-space: pre;
}
.split-flap__bottom > .split-flap__glyph,
.split-flap__back > .split-flap__glyph {
  top: calc(var(--flap-inner-height) / -2);
}
.split-flap__leaf {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: calc(var(--flap-inner-height) / 2);
  z-index: 3;
  overflow: visible;
  transform-origin: bottom center;
  transform-style: preserve-3d;
  transform: rotateX(-180deg);
  opacity: 0;
  pointer-events: none;
}
.split-flap__face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.split-flap__front { transform: rotateX(0deg); }
.split-flap__back { transform: rotateX(180deg); }
.split-flap__strip { display: flex; flex-direction: column; }
.split-flap__strip-glyph {
  display: block;
  flex: 0 0 var(--flap-inner-height);
  height: var(--flap-inner-height);
  line-height: var(--flap-inner-height);
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: 0;
  text-align: center;
  text-shadow: 0 1px 1px #000;
  white-space: pre;
}
.split-flap::before {
  content: "";
  position: absolute;
  z-index: 5;
  top: calc(50% - .5px);
  left: 0;
  right: 0;
  height: 1px;
  background: #060b04;
  box-shadow: 0 -1px 1px #0008, 0 1px 0 #ffffff0b;
  pointer-events: none;
}
.split-flap::after {
  content: "";
  position: absolute;
  z-index: 4;
  bottom: 1px;
  left: 2px;
  right: 2px;
  height: 3px;
  background: repeating-linear-gradient(to bottom, #ffffff09 0 1px, #0004 1px 2px);
  opacity: .6;
  pointer-events: none;
}
@media (forced-colors: active) {
  .split-flap { color: CanvasText; background: Canvas; border-color: CanvasText; box-shadow: none; }
  .split-flap__half, .split-flap__face { background: Canvas; }
  .split-flap__glyph, .split-flap__strip-glyph { text-shadow: none; }
}
