/* Cedilla Studio — first-time-user help for the web apps (BLEEDR and Off
   Grid, since 2026-11-11), set up by assets/js/lab-guide.js, which adds
   body.lab-guide. Loaded after off-grid.css. The same look as Overprint's
   (overprint.css): recipe cards, hover tips, the Download menu, the start
   card, the preview tag and the late Get Pro. */

/* Words that only make sense with a mouse, or only without one */
.lab-guide .lg-touch-only { display: none; }
@media (hover: none), (pointer: coarse) {
  .lab-guide .lg-hover-only { display: none; }
  .lab-guide .lg-touch-only { display: inline; }
}
.lab-guide .lab-section > .lab-hint { margin: -4px 0 14px; }
.lab-guide .lg-sub-note { font-style: normal; text-transform: none; letter-spacing: 0; color: var(--faint); margin-left: 6px; font-size: 11px; }
.lab-guide .lg-export-info { margin: 10px 0 12px; }

/* ---------- Recipe cards ---------- */
.lab-guide .recipe-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lab-guide .recipe-card {
  appearance: none; font: inherit; color: #fff; text-align: left; cursor: pointer;
  display: flex; flex-direction: column; padding: 0; overflow: hidden;
  border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03);
  transition: border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
.lab-guide .recipe-card:hover { border-color: rgba(255, 255, 255, .45); transform: translateY(-1px); }
.lab-guide .recipe-card:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.lab-guide .recipe-card.is-on { border-color: #fff; box-shadow: 0 0 0 1px #fff; }
.lab-guide .rc-thumb { display: block; aspect-ratio: 288 / 150; background: #15151b; position: relative; overflow: hidden; }
.lab-guide .rc-thumb canvas { display: block; width: 100%; height: 100%; opacity: 0; transition: opacity .35s var(--ease); }
.lab-guide .rc-thumb.is-ready canvas { opacity: 1; }
.lab-guide .rc-text { display: flex; flex-direction: column; gap: 2px; padding: 7px 9px 9px; }
.lab-guide .rc-name { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 12.5px; font-weight: 600; letter-spacing: -.005em; }
.lab-guide .rc-sub { font-size: 11px; line-height: 1.35; color: var(--muted); }
.lab-guide .lg-pro {
  font: 600 9px/1 var(--mono); font-style: normal; letter-spacing: .08em; text-transform: uppercase;
  padding: 3px 5px 2px; border-radius: 999px; color: #fff;
  background: linear-gradient(135deg, var(--pink), var(--blue));
}
.lab-guide .recipe-card.is-pro .rc-sub { color: var(--faint); }
.lab-guide .recipe-card.is-pro:hover .rc-sub { color: var(--muted); }

/* ---------- Hover tips ---------- */
.lg-tip {
  position: fixed; z-index: 10050; max-width: 260px; pointer-events: none;
  padding: 9px 11px 10px; border-radius: 12px;
  background: rgba(10, 10, 15, .96); border: 1px solid rgba(255, 255, 255, .16);
  box-shadow: 0 16px 40px -14px rgba(0, 0, 0, .9);
  font: 400 12px/1.45 'Open Sans', sans-serif; color: rgba(255, 255, 255, .78);
  animation: lg-tip-in .14s ease;
}
.lg-tip[hidden] { display: none; }
.lg-tip b { display: block; margin-bottom: 2px; font-weight: 600; color: #fff; }
.lg-tip kbd {
  display: table; margin-top: 6px; padding: 1px 6px; border-radius: 5px;
  font: 600 10.5px/1.5 ui-monospace, 'SF Mono', Menlo, Consolas, monospace; color: #fff;
  border: 1px solid rgba(255, 255, 255, .25);
}
.lg-tip kbd::before { content: 'Shortcut '; font-weight: 400; color: rgba(255, 255, 255, .55); }
@keyframes lg-tip-in { from { opacity: 0; transform: translateY(3px); } }
.lab-guide .lab-panel [data-tip]:not(button):not(.chip) { cursor: help; text-decoration: underline dotted rgba(255, 255, 255, .28); text-underline-offset: 3px; }

/* ---------- Toolbar: one primary action ---------- */
@media (min-width: 861px) {
  /* The PNG and SVG pills live in the Download menu on desktop */
  .lab-guide .lab-dock #btnPngLq, .lab-guide .lab-dock #btnPng, .lab-guide .lab-dock #btnPngHq, .lab-guide .lab-dock #btnSvg,
  .lab-guide .lab-dock [data-pro-open="png-hq"], .lab-guide .lab-dock [data-join-open="png-hq"], .lab-guide .lab-dock [data-pro-open="svg"] { display: none; }
  /* The random-look pill steps down from the glow: Download is the one bright button */
  .lab-guide .lab-dock .pill--glow { background: none; animation: none; border-color: rgba(255, 255, 255, .18); }
  .lab-guide .lab-dock .pill--glow:hover { background: rgba(255, 255, 255, .09); }
  .lab-guide .lab-dock .stage-actions { gap: 2px; }
}
.lab-guide .lg-dl { position: relative; display: flex; margin-left: 6px; }
.lab-mob .lg-dl { display: none; }
.lab-guide .lab .pill.lg-dl-btn { gap: 6px; font-weight: 600; color: #000; background: #fff; border-color: #fff; }
/* border-box: the gradient runs to the rim instead of repeating into the 1px border */
.lab-guide .lab .pill.lg-dl-btn:hover,
.lab-guide .lab .pill.lg-start-go:hover { background: linear-gradient(135deg, var(--pink), var(--blue), var(--cyan)) border-box; border-color: transparent; color: #fff; }
.lab-guide .lg-dl-btn svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.lab-guide .lg-dl-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.lab-guide .lg-dl-menu {
  position: absolute; right: -7px; top: calc(100% + 13px); width: 300px; padding: 6px;
  border-radius: 18px; border: 1px solid transparent;
  background:
    linear-gradient(#0a0a0f, #0a0a0f) padding-box,
    linear-gradient(110deg, rgba(252, 95, 173, .45), rgba(81, 100, 246, .45) 45%, rgba(33, 212, 253, .35)) border-box;
  box-shadow: 0 26px 60px -18px rgba(0, 0, 0, .95);
}
.lab-guide .lg-dl-menu[hidden] { display: none; }
.lab-guide .lg-dl-item {
  appearance: none; font: inherit; color: #fff; text-align: left; cursor: pointer; width: 100%;
  display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 12px; border: 0; background: none;
}
.lab-guide .lg-dl-item:hover, .lab-guide .lg-dl-item:focus-visible { background: rgba(255, 255, 255, .07); outline: none; }
.lab-guide .lg-dl-name { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.lab-guide .lg-dl-name em { font-style: normal; font-weight: 400; color: var(--muted); }
.lab-guide .lg-dl-name .lg-pro { margin-left: auto; }
.lab-guide .lg-dl-sub { font-size: 11.5px; color: var(--muted); }
.lab-guide .lg-dl-sub:empty { display: none; }
.lab-guide .lg-dl-foot { margin: 4px 12px 6px; padding-top: 9px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: 11px; line-height: 1.45; color: var(--faint); }
.lab-guide .lg-dl-foot kbd { font: 600 10px/1 var(--mono); padding: 1px 4px; border-radius: 4px; border: 1px solid rgba(255, 255, 255, .2); color: rgba(255, 255, 255, .7); }

/* Get Pro arrives once the visitor has played */
.lab-guide .lab .pill[hidden], .lab-guide [hidden].lg-start, .lab-guide [hidden].lg-preview { display: none; }
.lab-guide #btnGetPro.is-new { animation: lg-pro-in .6s var(--ease) both; }
@keyframes lg-pro-in { from { opacity: 0; transform: translateX(8px) scale(.96); } }

/* ---------- Preview tag ---------- */
.lab-guide .lg-preview {
  position: absolute; left: 50%; top: 16px; z-index: 3; transform: translateX(-50%);
  padding: 7px 14px; border-radius: 999px; white-space: nowrap;
  background: rgba(0, 0, 0, .72); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, .2);
  font-size: 12px; color: #fff; pointer-events: none;
}
.lab-guide .lg-preview[hidden] { display: none; }

/* ---------- Start card ---------- */
.lab-guide .lg-start {
  position: absolute; left: 50%; bottom: 64px; z-index: 4; transform: translateX(-50%);
  width: min(470px, calc(100% - 32px)); padding: 22px 24px 18px;
  border-radius: 22px; border: 1px solid transparent;
  background:
    linear-gradient(rgba(10, 10, 15, .94), rgba(10, 10, 15, .94)) padding-box,
    linear-gradient(120deg, rgba(252, 95, 173, .6), rgba(81, 100, 246, .6) 50%, rgba(33, 212, 253, .5)) border-box;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 30px 70px -24px rgba(0, 0, 0, .95);
  color: #fff; text-align: left; animation: lg-start-in .5s var(--ease) both .3s;
}
.lab-guide .lg-start[hidden] { display: none; }
@keyframes lg-start-in { from { opacity: 0; transform: translate(-50%, 12px); } }
.lab-guide .lg-start-x {
  position: absolute; top: 12px; right: 12px; width: 28px; height: 28px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, .06); cursor: pointer;
}
.lab-guide .lg-start-x::before, .lab-guide .lg-start-x::after {
  content: ''; position: absolute; left: 50%; top: 50%; width: 11px; height: 1.5px; background: rgba(255, 255, 255, .7);
  transform: translate(-50%, -50%) rotate(45deg);
}
.lab-guide .lg-start-x::after { transform: translate(-50%, -50%) rotate(-45deg); }
.lab-guide .lg-start-x:hover { background: rgba(255, 255, 255, .14); }
.lab-guide .lg-start-eyebrow { margin: 0 0 8px; font: 500 10.5px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--cyan); }
.lab-guide .lg-start-title { margin: 0 0 8px; font-size: 22px; line-height: 1.15; font-weight: 600; letter-spacing: -.02em; text-transform: none; }
.lab-guide .lg-start-text { margin: 0 0 16px; font-size: 13px; line-height: 1.55; color: rgba(255, 255, 255, .7); }
.lab-guide .lg-start-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.lab-guide .lab .pill.lg-start-go { padding: 10px 18px; font-size: 13px; font-weight: 600; color: #000; background: #fff; border-color: #fff; }
.lab-guide .lg-start-or { font-size: 12px; color: var(--muted); }
.lab-guide .lg-start-steps { display: flex; gap: 14px; flex-wrap: wrap; margin: 16px 0 0; padding: 14px 0 0; list-style: none; border-top: 1px solid rgba(255, 255, 255, .08); font-size: 12px; color: rgba(255, 255, 255, .7); }
.lab-guide .lg-start-steps b {
  display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 5px; border-radius: 50%;
  font: 600 10px/1 var(--mono); color: #000; background: #fff;
}
.lab-guide .lg-start-zoom {
  appearance: none; margin-top: 12px; padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: 12px; color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(33, 212, 253, .4);
}
.lab-guide .lg-start-zoom:hover { text-decoration-color: currentColor; }
.lab-guide .lab-stage.is-clean .lg-start, .lab-guide .lab-stage.is-clean .lg-preview,
.lab-guide .lab-stage.is-recording .lg-start, .lab-guide .lab-stage.is-recording .lg-preview { display: none; }
@media (max-width: 860px) {
  .lab-guide .lg-start { bottom: 14px; padding: 18px 18px 14px; }
  .lab-guide .lg-start-title { font-size: 19px; }
  .lab-guide .lg-start-text { font-size: 12.5px; margin-bottom: 12px; }
  .lab-guide .lg-start-steps { display: none; }
  .lab-guide .lg-start-zoom { display: none; } /* phones pinch instead (BLEEDR has no zoom buttons there) */
}
