.kc {
  --seg: #0e1803;
  --on: 0.94;
  --ghost: 0.07;
  position: absolute;
  inset: 0;
  overflow: hidden;
  /* the controller's face around the window */
  background: linear-gradient(#17180f, #0b0c07);
  font-family: "Barlow Semi Condensed", sans-serif;
  font-weight: 600;
  -webkit-font-smoothing: antialiased;
  cursor: default;
  user-select: none;
}
.kc *,
.kc *::before,
.kc *::after {
  box-sizing: border-box;
}

/* the window: a backlit panel, brightest where the lamp is, under a pane set a little way back */
.kc-glass {
  position: absolute;
  inset: 14px;
  border-radius: 5px;
  overflow: hidden;
  background:
    radial-gradient(130% 100% at 50% 34%, #c3ea1f 0%, #add813 46%, #8fbd04 82%, #7ba600 100%);
  box-shadow:
    0 0 0 1px #000,
    0 1px 0 1.5px rgb(255 255 255 / 0.09);
}
/* the bezel's shadow on the pane, and the room on the glass */
.kc-glass::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(118deg, rgb(255 255 255 / 0.13) 0%, rgb(255 255 255 / 0.04) 28%, transparent 46%);
  box-shadow:
    inset 0 7px 9px -3px rgb(20 30 0 / 0.5),
    inset 5px 0 8px -4px rgb(20 30 0 / 0.36),
    inset -3px 0 6px -4px rgb(20 30 0 / 0.26),
    inset 0 -2px 5px -3px rgb(20 30 0 / 0.26);
  pointer-events: none;
}

/* everything driven on the glass throws a thin shadow onto the reflector behind it */
.kc-live,
.kc-list {
  filter: drop-shadow(1.3px 1.7px 0.5px rgb(44 66 0 / 0.34));
}

.kc-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* bars: always there, dark when driven. They answer slowly, in two steps */
.kc-glyph {
  display: block;
  flex: none;
  overflow: visible;
}
.kc-bar {
  fill: var(--seg);
  opacity: var(--ghost);
  transition: opacity 150ms steps(2, end);
}
.kc-bar[data-on] {
  opacity: var(--on);
}
.kc-figures {
  display: inline-flex;
  align-items: flex-end;
  flex: none;
  transform: skewX(-4deg);
  transform-origin: 0 100%;
}
.kc-figures[data-size="big"] {
  gap: 14px;
}
.kc-figures[data-size="mid"],
.kc-figures[data-size="row"] {
  gap: 4px;
}
.kc-figures[data-size="word"] {
  gap: 4px;
}

/* the marks between figures */
.kc-colon,
.kc-point {
  position: relative;
  flex: none;
  align-self: stretch;
}
.kc-colon::before,
.kc-colon::after,
.kc-point::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  aspect-ratio: 1;
  background: var(--seg);
  opacity: var(--ghost);
  transition: opacity 150ms steps(2, end);
}
.kc-colon[data-on]::before,
.kc-colon[data-on]::after,
.kc-point[data-on]::after {
  opacity: var(--on);
}
.kc-colon {
  width: 3.2px;
  margin: 0 -1px;
}
.kc-colon::before {
  top: 27%;
}
.kc-colon::after {
  bottom: 27%;
}
.kc-figures[data-size="big"] .kc-point {
  width: 14px;
  margin: 0 -6px 0 -8px;
}
.kc-point::after {
  bottom: 0;
}

/* words printed in the glass */
.kc-legend {
  flex: none;
  color: var(--seg);
  font-size: 11px;
  line-height: 11px;
  letter-spacing: 0.07em;
  white-space: nowrap;
  opacity: var(--ghost);
  transition: opacity 150ms steps(2, end);
}
.kc-legend[data-on] {
  opacity: var(--on);
}

/* the kiln's own figures count in whole steps: a tenth of a degree, a second */
.kc-live .kc-bar,
.kc-live .kc-point::after,
.kc-live .kc-colon::before,
.kc-live .kc-colon::after {
  transition: none;
}

/* the kiln now: its temperature, large, and the time run */
.kc-live {
  position: absolute;
  left: 22px;
  top: 0;
  width: 468px;
  height: 232px;
}
.kc-kiln,
.kc-heat {
  position: absolute;
  top: 17px;
  font-size: 12px;
  letter-spacing: 0.12em;
}
.kc-kiln {
  left: 0;
}
.kc-heat {
  right: 0;
}
.kc-temp {
  position: absolute;
  left: 0;
  top: 37px;
  display: flex;
  align-items: flex-start;
}
.kc-unit {
  margin-left: 16px;
  font-size: 34px;
  line-height: 30px;
  letter-spacing: 0;
}
.kc-strip {
  position: absolute;
  left: 0;
  right: 0;
  top: 174px;
  display: flex;
  align-items: flex-end;
  gap: 8px;
}
.kc-strip .kc-legend {
  margin-bottom: 0.5px;
}
.kc-clock {
  margin-left: auto;
}
/* a rule in the glass between the kiln and its programme */
.kc-live::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 214px;
  height: 1.5px;
  background: var(--seg);
  opacity: var(--on);
}

/* the programme */
.kc-list {
  position: absolute;
  left: 22px;
  top: 232px;
  width: 468px;
}
.kc-row {
  position: relative;
  display: grid;
  grid-template-columns: 72px 14px 135px 200px;
  column-gap: 14px;
  align-items: center;
  height: 44px;
  outline: none;
}
.kc-set {
  margin-left: 5px;
}

/* the row in hand stands between brackets */
.kc-row::before,
.kc-row::after {
  content: "";
  position: absolute;
  top: 4px;
  width: 6px;
  height: 36px;
  border: 2px solid var(--seg);
  opacity: var(--ghost);
  transition: opacity 150ms steps(2, end);
}
.kc-row::before {
  left: -13px;
  border-right: 0;
}
.kc-row::after {
  right: -13px;
  border-left: 0;
}
.kc-row:hover::before,
.kc-row:hover::after {
  opacity: 0.3;
}
.kc-row:focus::before,
.kc-row:focus::after {
  opacity: var(--on);
}

.kc-time,
.kc-title,
.kc-set {
  display: flex;
  align-items: flex-end;
}

/* a segment's mark. To come: an empty frame. Fired: solid. Being fired: solid inside a second frame,
   with a pointer at it, the solid beating once a second */
.kc-marker {
  position: relative;
  left: 6px;
  width: 14px;
  height: 14px;
  border: 2px solid var(--seg);
  outline: 2px solid rgb(14 24 3 / 0.075);
  outline-offset: 1.5px;
  opacity: var(--on);
}
.kc-marker[data-current] {
  outline-color: var(--seg);
}
.kc-marker::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--seg);
  opacity: 0.075;
}
.kc-marker::before {
  content: "";
  position: absolute;
  left: -15px;
  top: 0;
  width: 6px;
  height: 10px;
  background: var(--seg);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  opacity: 0.075;
}
.kc-marker[data-current]::before,
.kc-marker[data-complete]::after,
.kc-marker[data-current]::after {
  opacity: 1;
}
.kc-marker[data-current]::after {
  animation: kc-beat 1000ms steps(1) infinite;
}
@keyframes kc-beat {
  50% {
    opacity: 0.075;
  }
}

/* between two marks, four blocks: as many dark as quarters of the segment have run */
.kc-link {
  position: absolute;
  left: 96px;
  top: 34px;
  width: 6px;
  height: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.kc-row[data-last] .kc-link {
  display: none;
}
.kc-link i {
  height: 3px;
  background: var(--seg);
  opacity: var(--ghost);
}
.kc-link i[data-on] {
  opacity: var(--on);
}
.kc-link i[data-now] {
  animation: kc-now 1000ms steps(1) infinite;
}
@keyframes kc-now {
  50% {
    opacity: var(--on);
  }
}

/* SEG 2 RAMP */
.kc-title {
  gap: 0;
  margin-left: 6px;
}
.kc-seg {
  width: 24px;
  margin-bottom: 0.5px;
}
.kc-title .kc-figures[data-size="word"] {
  margin-left: 13px;
}

/* 270 °F/h ▶ 2000 °F */
.kc-units {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 26px;
  margin-left: 5px;
  padding: 1px 0 0.5px;
}
.kc-to {
  align-self: center;
  width: 9px;
  height: 11px;
  margin: 0 10px 0 6px;
  background: var(--seg);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.kc-deg {
  margin: 0 0 0.5px 5px;
  font-size: 13px;
  letter-spacing: 0;
}

@media (prefers-reduced-motion: reduce) {
  .kc-bar,
  .kc-legend,
  .kc-colon::before,
  .kc-colon::after,
  .kc-point::after,
  .kc-row::before,
  .kc-row::after {
    transition: none;
  }
  .kc-marker[data-current]::after,
  .kc-link i[data-now] {
    animation: none;
  }
}
