:root {
  color: #171717;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

button {
  color: inherit;
  font: inherit;
}

#canvas {
  position: fixed;
  inset: 0;
  cursor: grab;
  overflow: hidden;
  background-color: #f3f2ef;
  background-image: radial-gradient(circle, rgba(20, 20, 20, 0.12) 1px, transparent 1px);
  background-size: 24px 24px;
  touch-action: none;
  user-select: none;
}

#canvas.is-dragging {
  cursor: grabbing;
}

#scene {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  will-change: transform;
}

.slide {
  position: absolute;
  display: flex;
  flex-direction: column;
  width: 1200px;
  height: 675px;
  padding: 72px 84px 62px;
  overflow: hidden;
  border: 1px solid #d8d6d1;
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(31, 29, 25, 0.12);
  user-select: text;
}

.slide:focus {
  outline: none;
}

.slide-kicker {
  margin: 0 0 16px;
  color: #67645d;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.slide h2 {
  max-width: 1000px;
  margin: 0 0 32px;
  font-size: 52px;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.slide-content {
  display: grid;
  flex: 1;
  min-height: 0;
  gap: 50px;
  align-items: start;
}

.slide.has-image .slide-content {
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
}

.copy {
  min-width: 0;
}

.copy p,
.copy li {
  font-size: 31px;
  line-height: 1.35;
  letter-spacing: -0.014em;
}

.copy p {
  margin: 0 0 22px;
}

.copy ul {
  display: grid;
  margin: 0;
  padding-left: 1.15em;
  gap: 18px;
}

.copy li::marker {
  color: #185eeb;
}

.example {
  margin-top: 26px;
  padding: 20px 24px;
  border-left: 7px solid #185eeb;
  background: #f1f5ff;
  font-size: 27px;
  line-height: 1.35;
}

.example strong {
  display: block;
  margin-bottom: 6px;
  font-size: 17px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.visual {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  align-self: stretch;
}

.visual img {
  width: 100%;
  min-height: 0;
  flex: 1;
  border: 1px solid #dadada;
  border-radius: 8px;
  object-fit: contain;
  background: #fafafa;
}

.visual figcaption {
  margin-top: 10px;
  color: #6d6961;
  font-size: 17px;
  line-height: 1.3;
}

.slide-number {
  position: absolute;
  right: 32px;
  bottom: 25px;
  color: #9a968e;
  font-size: 17px;
  font-weight: 700;
}

.chrome {
  position: fixed;
  z-index: 20;
  transition: opacity 160ms ease, transform 160ms ease;
}

body.hide-chrome .zoom-controls,
body.hide-chrome .hint {
  pointer-events: none;
  opacity: 0;
}

body.hide-chrome .lesson-name {
  display: none;
}

.top-bar {
  top: 18px;
  left: 18px;
  display: flex;
  max-width: min(620px, calc(100vw - 180px));
  align-items: center;
  gap: 12px;
}

.icon-button,
.zoom-controls,
.lesson-name,
.hint,
.lesson-menu {
  border: 1px solid rgba(28, 27, 25, 0.14);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 28px rgba(22, 21, 18, 0.1);
  backdrop-filter: blur(12px);
}

.icon-button {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-content: center;
  gap: 4px;
  padding: 0;
  border-radius: 10px;
  cursor: pointer;
}

.icon-button span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: #222;
}

.lesson-name {
  display: flex;
  min-width: 0;
  height: 44px;
  align-items: baseline;
  gap: 10px;
  padding: 11px 15px;
  border-radius: 10px;
}

.lesson-name strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lesson-name span {
  flex: none;
  color: #77736b;
  font-size: 13px;
}

.zoom-controls {
  top: 18px;
  right: 18px;
  display: flex;
  overflow: hidden;
  border-radius: 10px;
}

.zoom-controls button {
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  border: 0;
  border-right: 1px solid #e5e3df;
  background: transparent;
  cursor: pointer;
}

.zoom-controls button:last-child {
  border-right: 0;
}

#zoom-level {
  min-width: 68px;
  font-size: 13px;
  font-weight: 700;
}

.hint {
  right: 18px;
  bottom: 18px;
  padding: 9px 12px;
  border-radius: 8px;
  color: #656159;
  font-size: 12px;
}

.lesson-menu {
  top: 72px;
  left: 18px;
  width: min(350px, calc(100vw - 36px));
  max-height: calc(100vh - 90px);
  overflow: auto;
  padding: 16px;
  border-radius: 12px;
}

.lesson-menu[hidden] {
  display: none;
}

.menu-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px 4px 12px;
}

.menu-section-title {
  margin: 14px 4px 7px;
  color: #858078;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.menu-actions {
  display: grid;
  gap: 5px;
}

.menu-action {
  width: 100%;
  padding: 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.menu-action:hover {
  background: #eef3ff;
}

.menu-action strong,
.menu-action span {
  display: block;
}

.menu-action span {
  margin-top: 4px;
  color: #77736b;
  font-size: 13px;
  line-height: 1.3;
}

.text-button {
  border: 0;
  background: transparent;
  color: #185eeb;
  cursor: pointer;
}

#lesson-list {
  display: grid;
  gap: 5px;
}

.lesson-link {
  display: block;
  padding: 12px;
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
}

.lesson-link:hover,
.lesson-link.is-active {
  background: #eef3ff;
}

.lesson-link strong,
.lesson-link span {
  display: block;
}

.lesson-link span {
  margin-top: 4px;
  color: #77736b;
  font-size: 13px;
}

@media (max-width: 700px) {
  .hint {
    display: none;
  }
}
