:root {
  --paper: #ffffff;
  --card: #ffffff;
  --ink: #0d0e10;
  --on-ink: #f6f5f1;
  --hush: #8e8e8a;
  --hair: #ececea;
  --accent: #2f62ff;
}
* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Mona Sans Variable', system-ui, sans-serif;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
.stage {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 16px;
}
/* the card: GSAP moves it, the CSS keeps its border and shadow */
.lesson {
  width: min(320px, 86vw);
  padding: clamp(16px, 3.4vmin, 22px) clamp(16px, 3.4vmin, 22px) clamp(14px, 3vmin, 18px);
  border-radius: 20px;
  background: var(--card);
  border: 1px solid #ebebe8;
  box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 18px 40px -26px rgba(13,14,16,.32), 0 3px 8px -5px rgba(13,14,16,.12);
  will-change: transform;
}
.lesson__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: clamp(11.5px, 2.2vmin, 12.5px);
  line-height: 1.2;
  letter-spacing: 0.01em;
}
.lesson__state { display: grid; height: 1.2em; overflow: hidden; }
.lesson__tag {
  grid-area: 1 / 1;
  white-space: nowrap;
  color: var(--hush);
  font-variation-settings: 'wght' 520, 'wdth' 100;
}
.lesson__tag--live { color: var(--accent); }
.lesson__left {
  display: flex;
  gap: 0.3em;
  height: 1.2em;
  overflow: hidden;
  color: var(--ink);
  font-variation-settings: 'wght' 560, 'wdth' 100;
}
.lesson__in { color: var(--hush); font-variation-settings: 'wght' 480, 'wdth' 100; }
.lesson__clock { display: inline-block; min-width: 2.2em; text-align: right; }
.lesson__subject {
  margin-top: clamp(12px, 2.6vmin, 16px);
  font-size: clamp(22px, 4.6vmin, 26px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: normal;
  font-variation-settings: 'wght' 600, 'wdth' 96;
  white-space: nowrap;
}
.lesson__topic {
  margin-top: 4px;
  font-size: clamp(13px, 2.5vmin, 14px);
  color: var(--hush);
  font-variation-settings: 'wght' 440, 'wdth' 100;
}
.lesson__who {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: clamp(14px, 3vmin, 18px);
  font-size: clamp(12.5px, 2.4vmin, 13.5px);
}
.lesson__avatar {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #f1f1ee;
}
.lesson__ring {
  position: absolute;
  inset: -3px;
  width: 36px;
  height: 36px;
  overflow: visible;
}
.lesson__ring circle {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.4;
  stroke-linecap: round;
}
.lesson__initials {
  font-size: 11px;
  letter-spacing: 0.02em;
  font-variation-settings: 'wght' 620, 'wdth' 92;
}
.lesson__teacher { font-variation-settings: 'wght' 540, 'wdth' 100; white-space: nowrap; }
.lesson__hours { margin-left: auto; color: var(--hush); white-space: nowrap; font-variation-settings: 'wght' 460, 'wdth' 100; }
/* the slot: the thin line of the time left and, in the same place, the button it opens into */
.lesson__slot {
  position: relative;
  height: clamp(42px, 8vmin, 46px);
  margin-top: clamp(14px, 3vmin, 18px);
}
.lesson__track {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  margin-top: -0.5px;
  background: var(--hair);
}
.lesson__time {
  position: absolute;
  left: 0;
  top: -0.5px;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transform-origin: 0 50%;
}
.lesson__join {
  appearance: none;
  border: 0;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: clamp(14.5px, 2.8vmin, 15.5px);
  cursor: pointer;
  clip-path: inset(calc(50% - 1px) 100% calc(50% - 1px) 0% round 999px);
  visibility: hidden;
}
.lesson__join:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.lesson__joinword {
  display: inline-block;
  white-space: nowrap;
  font-variation-settings: 'wght' 580, 'wdth' 100;
}
.lesson__arrow {
  width: 15px;
  height: 15px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
