/* Viewer-specific styles. Tokens come from styles/app.css (loaded first). */

#root {
  max-width: 920px;
  margin: 0 auto;
  padding: 80px 32px 120px;
}

.state {
  padding: 120px 0;
  text-align: center;
  color: var(--color-slate-500);
}

/* Header ------------------------------------------------------------------ */

.t-header {
  margin-bottom: 56px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--color-slate-200);
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--color-white);
  border: 1px solid var(--color-slate-200);
  color: var(--color-slate-600);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 20px;
}

.kicker .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-green-500);
}

.t-title {
  font-size: 56px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--color-slate-900);
}

.t-meta {
  color: var(--color-slate-500);
  font-size: 15px;
}

.t-meta .sep { margin: 0 8px; color: var(--color-slate-300); }

/* Steps ------------------------------------------------------------------- */

#t-steps {
  list-style: none;
  counter-reset: step;
}

#t-steps > li {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 24px;
  margin-bottom: 64px;
  counter-increment: step;
  position: relative;
}

/* Vertical connector line between steps */
#t-steps > li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 23px;
  top: 56px;
  bottom: -56px;
  width: 2px;
  background: var(--color-slate-200);
}

#t-steps > li::before {
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-slate-900);
  color: var(--color-white);
  font-weight: 600;
  font-size: 17px;
  position: relative;
  z-index: 1;
  font-feature-settings: "tnum";
}

.step-body {
  padding-top: 6px;
}

.step-body h2 {
  font-size: 22px;
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--color-slate-900);
  margin-bottom: 6px;
}

.step-body .step-text {
  color: var(--color-slate-600);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 20px;
}

.step-body code {
  background: var(--color-slate-100);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.9em;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--color-slate-800);
}

/* Screenshot --------------------------------------------------------------- */

.screenshot-wrap {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: var(--color-white);
  border: 1px solid var(--color-slate-200);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 12px rgba(15, 23, 42, 0.04);
}

.screenshot-wrap img {
  display: block;
  width: 100%;
  height: auto;
}

/* When cropped, the wrap has a fixed aspect ratio and the image overflows. */
.screenshot-wrap.cropped { width: 100%; }

.highlight {
  position: absolute;
  border: 2px solid var(--color-green-500);
  background: rgba(0, 211, 126, 0.15);
  border-radius: 4px;
  box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.42);
  pointer-events: none;
  transition: box-shadow 0.2s ease;
}

/* Blur regions ------------------------------------------------------------ */

.blur-region {
  position: absolute;
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  background: rgba(255, 255, 255, 0.01);
  border-radius: 4px;
  pointer-events: none;
  z-index: 2;
}

/* Cursor markers ---------------------------------------------------------- */

.cursor-marker {
  position: absolute;
  transform: translate(-3px, -3px);
  pointer-events: none;
  z-index: 3;
}

.cursor-marker .cursor-icon,
.edit-cursor .cursor-icon {
  display: block;
  filter: drop-shadow(0 2px 3px rgba(15, 23, 42, 0.45));
}

.cursor-badge {
  position: absolute;
  top: -6px;
  left: 18px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--color-slate-900);
  color: var(--color-white);
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.4);
  font-feature-settings: "tnum";
}

/* Note callout (un-numbered annotation between steps) --------------------- */

#t-steps > li.note-callout {
  counter-increment: none;
  grid-template-columns: 1fr;
}
#t-steps > li.note-callout::before { display: none; }
#t-steps > li.note-callout::after { display: none; }
/* Don't dangle a connector line from the step just before a callout. */
#t-steps > li:has(+ li.note-callout)::after { display: none; }

.note-callout .step-body {
  padding-top: 0;
  background: var(--color-slate-50);
  border: 1px solid var(--color-slate-200);
  border-left: 3px solid var(--color-green-500);
  border-radius: 10px;
  padding: 16px 20px;
}

.note-callout .step-body h2 {
  font-size: 17px;
  margin-bottom: 4px;
}

.note-callout .step-body .step-text { margin-bottom: 0; }

.note-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-green-600);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}
.note-eyebrow svg { display: block; }

/* Navigation step --------------------------------------------------------- */

.nav-step::before {
  background: var(--color-white) !important;
  color: var(--color-slate-500) !important;
  border: 2px solid var(--color-slate-200);
  width: 44px !important;
  height: 44px !important;
}

.nav-step .screenshot-wrap { display: none; }

.nav-step .step-body h2 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-slate-100);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-slate-600);
  margin-bottom: 0;
}

.nav-step .step-body h2::before {
  content: "↗";
  color: var(--color-green-600);
  font-weight: 700;
}

/* Footer ------------------------------------------------------------------ */

.t-footer {
  margin-top: 80px;
  padding-top: 32px;
  border-top: 1px solid var(--color-slate-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.t-footer .brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--color-slate-500);
  font-size: 13px;
}

.t-footer .brand .brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-green-500);
}

/* Responsive -------------------------------------------------------------- */

@media (max-width: 640px) {
  #root { padding: 40px 20px 80px; }
  .t-title { font-size: 36px; }
  .t-header { margin-bottom: 40px; padding-bottom: 24px; }
  #t-steps > li { grid-template-columns: 40px 1fr; gap: 16px; margin-bottom: 48px; }
  #t-steps > li::before { width: 32px; height: 32px; font-size: 14px; }
  #t-steps > li:not(:last-child)::after { left: 15px; top: 40px; bottom: -40px; }
  .step-body h2 { font-size: 18px; }
}
