.tut-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--bg);
  color: var(--text);
  z-index: 10000;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
}
.tut-overlay[hidden] {
  display: none !important;
}
.tut-overlay [hidden] {
  display: none !important;
}
.tut-container {
  max-width: 800px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.tut-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.tut-title {
  font-size: 24px;
  font-weight: 800;
  margin: 0;
  line-height: 1.2;
}
.tut-intro {
  font-size: 15px;
  color: var(--muted);
  margin-top: 8px;
}
.tut-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.tut-close-link {
  font-size: 14px;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  padding: 4px;
}
.tut-content {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
@media (min-width: 768px) {
  .tut-content {
    flex-direction: row;
    align-items: flex-start;
  }
}
.tut-video-col {
  flex: 0 0 auto;
  width: 100%;
  max-width: 280px;
  margin: 0 auto;
}
.tut-video-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 9/16;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.tut-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tut-play-btn {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 64px; height: 64px;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: opacity 0.2s;
}
.tut-play-btn:hover {
  background: rgba(0,0,0,0.8);
}
.tut-video-error {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.8);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  z-index: 3;
}
.tut-video-error-retry {
  margin-top: 12px;
  background: #fff;
  color: #000;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
}
.tut-formula {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 48px;
}
.tut-step {
  background: var(--panel);
  padding: 16px;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.tut-step-title {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 6px;
  color: var(--accent);
}
.tut-step-desc {
  font-size: 14px;
  line-height: 1.4;
  margin-bottom: 10px;
}
.tut-mapping {
  font-size: 13.5px;
  background: var(--panel-2);
  padding: 10px;
  border-radius: 6px;
  border-left: 3px solid var(--accent);
}
.tut-mapping button {
  background: none;
  border: none;
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  font-weight: 600;
  font-family: inherit;
}
.tut-screenshot {
  margin: 16px 0 0;
}
.tut-screenshot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.tut-screenshot figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

/* ---- Entry button: the only way into the guide ---------------------------
   Sits directly under the Studio header.  The white tile shows the account's
   own logo (studio.js keeps <img data-studio-logo> current); accounts without
   a logo yet get the play glyph instead, and a logo tile wears a small play
   badge so the button still reads as "watch a guide". */
.st-tut-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
  margin: 6px 0 2px;
  padding: 12px 14px;
  border: 0;
  border-radius: 16px;
  /* Every stop keeps white text >= 5.4:1 (the 12.5px second line needs 4.5:1). */
  background: linear-gradient(135deg, #064e3b 0%, #065f46 55%, #047857 100%);
  color: #fff;
  text-align: left;
  font: inherit;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(4, 120, 87, 0.26);
}
.st-tut-cta:hover { filter: brightness(1.06); }
.st-tut-cta:active { filter: brightness(0.95); }
.st-tut-cta:focus-visible { outline: 3px solid #14231e; outline-offset: 2px; }
.st-tut-cta-tile {
  position: relative;
  flex: 0 0 auto;
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.st-tut-cta-tile img {
  display: block;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding: 4px;
  object-fit: contain;
  border-radius: 12px;
}
.st-tut-cta-tile img[hidden] { display: none; }
.st-tut-cta-fallback { width: 28px; height: 28px; fill: #047857; margin-left: 3px; }
.st-tut-cta-tile img:not([hidden]) ~ .st-tut-cta-fallback { display: none; }
.st-tut-cta-badge {
  position: absolute;
  right: -7px;
  bottom: -7px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #14231e;
  border: 2px solid #fff;
  display: none;
  align-items: center;
  justify-content: center;
}
.st-tut-cta-badge svg { width: 11px; height: 11px; fill: #fff; margin-left: 1px; }
.st-tut-cta-tile img:not([hidden]) ~ .st-tut-cta-badge { display: flex; }
.st-tut-cta-text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.st-tut-cta-title {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  line-height: 1.2;
  text-wrap: balance; /* phones: "SEE HOW TO MAKE / A GREAT VIDEO", no orphan */
}
.st-tut-cta-sub {
  font-size: 12.5px;
  line-height: 1.3;
  color: #fff;
}
.st-tut-cta-chevron {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: rgba(255, 255, 255, 0.75);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
