.analog-wrapper {
  overflow-y: auto;
}

.analog-page {
  flex-grow: 1;
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(230px, 0.75fr) minmax(310px, 1.05fr);
  grid-template-rows: auto auto;
  gap: 24px;
  align-items: center;
  padding: 18px 60px 12px;
}

.analog-intro {
  max-width: 360px;
}

.eyebrow {
  margin-bottom: 10px;
  color: #00e5ff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.analog-intro h1 {
  margin-bottom: 14px;
  padding-bottom: 0.08em;
  font-size: clamp(2.35rem, 4.8vw, 4.85rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
  background: linear-gradient(to bottom, #fff, #b9b9b9);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.short-text {
  max-width: 330px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.92rem;
  line-height: 1.55;
}

.analog-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
}

.analog-actions button,
.back-link {
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid rgba(188, 19, 254, 0.36);
  color: #fff;
  background: rgba(29, 0, 58, 0.72);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.analog-actions button:hover,
.back-link:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 229, 255, 0.7);
  box-shadow: 0 0 22px rgba(188, 19, 254, 0.28);
}

.analog-stage {
  display: flex;
  justify-content: center;
  align-items: center;
}

.sketch-holder {
  width: min(520px, 100%);
  aspect-ratio: 1 / 1;
  border-radius: 28px;
  overflow: hidden;
  background: #dcdcdc;
  border: 1px solid rgba(255, 255, 255, 0.13);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), 0 0 32px rgba(0, 229, 255, 0.12);
}

.sketch-holder canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.code-panel {
  grid-column: 1 / -1;
  align-self: stretch;
}

.code-panel details {
  width: 100%;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(5, 0, 10, 0.45);
  overflow: hidden;
}

.code-panel summary {
  padding: 15px 20px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  list-style-position: inside;
}

.code-panel pre {
  max-height: 210px;
  overflow: auto;
  margin: 0;
  padding: 0 20px 20px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.75rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

@media (max-width: 900px) {
  .analog-page {
    grid-template-columns: 1fr;
    padding: 24px 28px;
    gap: 22px;
  }

  .analog-intro {
    max-width: 100%;
    text-align: center;
    justify-self: center;
  }

  .short-text {
    max-width: 520px;
  }

  .analog-actions {
    justify-content: center;
  }

  .sketch-holder {
    width: min(520px, 100%);
  }
}

@media (max-width: 600px) {
  .analog-page {
    padding: 20px;
  }

  .analog-actions {
    flex-direction: column;
  }

  .analog-actions button,
  .back-link {
    width: 100%;
  }
}
