.bs {
  --green: #00a04b;
  --ink: #0b0c0b;
  --paper: #f4f6f3;
  --tint: #d2ecda;
  --row: 29px;
  --wipe: 480ms;
  position: relative;
  width: 540px;
  height: 540px;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: "Archivo Variable", sans-serif;
  font-stretch: 68%;
  font-variant-numeric: tabular-nums lining-nums;
  -webkit-font-smoothing: antialiased;
  cursor: default;
  user-select: none;
}
.bs *, .bs *::before, .bs *::after { box-sizing: border-box; }

/* the printed sheet */
.bs-sheet { position: absolute; inset: 0; }

.bs-head {
  position: relative;
  height: 156px;
  background: var(--green);
  color: #fff;
}
.bs-no {
  position: absolute;
  left: 17px;
  top: 18px;
  font-size: 172px;
  font-weight: 800;
  font-stretch: 62%;
  line-height: 120px;
  height: 120px;
  letter-spacing: -0.035em;
}
.bs-where { position: absolute; left: 176px; top: 18px; height: 120px; display: flex; flex-direction: column; justify-content: space-between; margin: 0; line-height: 1; }
.bs-where span { font-size: 21px; font-weight: 600; font-stretch: 78%; }
.bs-where b { font-size: 52px; font-weight: 800; font-stretch: 66%; letter-spacing: -0.01em; margin-left: -1px; }

/* tabs: a black band; the selected tab is the white of the sheet below it */
.bs-list {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  height: 62px;
  /* chosen so that white through `difference` lands exactly on the paper colour */
  background: #0b090c;
  color: #fff;
  isolation: isolate;
}
.bs-tab {
  all: unset;
  position: relative;
  display: flex;
  align-items: center;
  padding: 1px 0 0 22px;
  font-size: 34px;
  font-weight: 760;
  font-stretch: 72%;
  letter-spacing: -0.005em;
  cursor: pointer;
}
/* hover: the sheet's white starts up into the tab */
.bs-tab::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 9px;
  background: #fff;
  /* above the indicator, so that it stays white while the indicator slides in over it */
  z-index: 1;
  transform-origin: bottom;
  scale: 1 0;
  transition: scale 130ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.bs-tab:hover::after { scale: 1 1; }
.bs-tab[data-selected]::after { scale: 1 0; }
/* the selected tab: white through `difference` turns the band white and the label under it
   black exactly at its moving edge */
.bs-ind {
  position: absolute;
  top: var(--active-tab-top);
  left: var(--active-tab-left);
  width: var(--active-tab-width);
  height: var(--active-tab-height);
  background: #fff;
  mix-blend-mode: difference;
  pointer-events: none;
  transition: left 240ms cubic-bezier(0.3, 0, 0.15, 1), width 240ms cubic-bezier(0.3, 0, 0.15, 1);
}

/* panels overlap: the next day's sheet slides in whole over the one in place */
.bs-stack {
  position: relative;
  display: grid;
  height: 322px;
  overflow: hidden;
}
.bs-panel {
  --stripes: repeating-linear-gradient(var(--tint) 0 var(--row), transparent var(--row) calc(var(--row) * 2));
  grid-area: 1 / 1;
  position: relative;
  z-index: 1;
  padding: 14px 22px 0;
  /* each sheet is opaque and carries its own printed tint stripes */
  background: var(--stripes) 22px 14px / 240px calc(var(--row) * 10) no-repeat, var(--stripes) 278px 14px / 240px calc(var(--row) * 10) no-repeat, var(--paper);
  /* the sheet's leading edge, off the frame once it is home */
  box-shadow: -2px 0 0 var(--ink), 2px 0 0 var(--ink);
  outline: none;
  transition: translate var(--wipe) cubic-bezier(0.3, 0, 0.15, 1);
}
/* no transition into the starting position, only out of it */
.bs-panel[data-starting-style] { translate: 100% 0; transition: none; }
.bs-panel[data-activation-direction="left"][data-starting-style] { translate: -100% 0; }
/* the sheet in place stays exactly where it is, underneath, until the new one has covered it
   (the offset of an outline that is not drawn: it only keeps the panel mounted that long) */
.bs-panel[data-ending-style] { z-index: 0; outline-offset: 1px; transition: outline-offset calc(var(--wipe) + 66ms) linear; }
.bs-grid { display: grid; grid-template-columns: 240px 240px; gap: 16px; }
.bs-block { border-collapse: collapse; table-layout: fixed; width: 240px; }
.bs-block tr { height: var(--row); }
.bs-block th {
  width: 40px;
  padding: 0;
  background: var(--green);
  color: #fff;
  font-size: 23px;
  font-weight: 800;
  font-stretch: 70%;
  text-align: center;
  border-bottom: 2px solid var(--paper);
}
.bs-block tr:last-child th { border-bottom: 0; }
.bs-block td {
  position: relative;
  padding: 0;
  height: var(--row);
  overflow: hidden;
  font-size: 22px;
  font-weight: 620;
  line-height: var(--row);
}
.bs-min { position: absolute; top: 0; left: calc(2px + var(--m) * 3px); }

/* the polycarbonate cover */
.bs-cover { position: absolute; inset: 0; pointer-events: none; }
.bs-cover > div { position: absolute; inset: 0; background-size: 100% 100%; }
/* each scratch shadows the paper a little below itself */
.bs-shade { filter: invert(1); mix-blend-mode: multiply; opacity: 0.45; translate: 0.5px 1px; }
/* the photograph over black: only what the plastic adds */
.bs-light { mix-blend-mode: screen; opacity: 0.62; }
