/* Life Graph interactive tool (website/installation.html).
   Scoped under .lg-scope / lg- prefixed classes so nothing here collides with page.css. */

.lg-scope {
  --lg-bg: var(--white);
  --lg-bg2: var(--green-soft);
  --lg-panel: var(--white);
  --lg-panel2: var(--panel);
  --lg-hair: var(--line);
  --lg-hair2: #c3d2c7;
  --lg-ink: var(--ink);
  --lg-muted: var(--muted);
  --lg-faint: #93a29a;
  --lg-accent: var(--green-dark);
  --lg-cross: var(--blue);
  --lg-robot: #b5651d;
  --lg-now: #1f8f5f;
  --lg-part: var(--gold);
  --lg-horiz: #8a978f;
  --lg-stage: var(--green-soft);
  --lg-stage2: #dcece2;
  --lg-mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
}

.lg-scope .section-inner {
  width: min(1360px, calc(100% - 32px));
}

.lg-boot {
  position: relative;
}

.lg-reveal {
  opacity: 0;
  transition: opacity 0.6s ease;
}

.lg-reveal.is-visible {
  opacity: 1;
}

.lg-intro {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  border-radius: 12px;
  background: linear-gradient(180deg, #ece7dd, #ddd7c9);
  opacity: 1;
  transition: opacity 0.7s ease;
  pointer-events: none;
}

.lg-intro.is-done {
  opacity: 0;
}

.lg-intro__line {
  margin: 0;
  max-width: 620px;
  text-align: center;
  font-size: clamp(1.3rem, 2.6vw, 1.9rem);
  font-weight: 700;
  color: #3a352c;
  opacity: 0;
  transition: opacity 0.28s ease;
}

.lg-intro__line.is-visible {
  opacity: 1;
}

.lg-guide {
  position: absolute;
  top: 12px;
  left: 50%;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(440px, calc(100% - 28px));
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--lg-hair);
  background: var(--lg-panel);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translate(-50%, -6px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
}

.lg-guide.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.lg-guide p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--lg-muted);
}

.lg-guide button {
  flex: none;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--lg-hair2);
  background: var(--lg-bg2);
  color: var(--lg-ink);
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
}

.lg-fact {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
  color: var(--lg-faint);
  font-style: italic;
}

@media (prefers-reduced-motion: reduce) {
  .lg-reveal,
  .lg-intro,
  .lg-intro__line,
  .lg-guide {
    transition: none;
  }
}

.lg-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 340px);
  gap: 22px;
  align-items: start;
  margin-top: 28px;
}

@media (max-width: 940px) {
  .lg-layout {
    grid-template-columns: 1fr;
  }
}

.lg-stagewrap {
  position: relative;
  border: 1px solid var(--lg-hair);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: radial-gradient(130% 110% at 50% 0%, var(--lg-stage), var(--lg-stage2));
}

.lg-stage {
  position: relative;
  width: 100%;
  min-height: 660px;
  height: min(76vh, 820px);
  cursor: grab;
  touch-action: none;
}

.lg-stage.lg-drag {
  cursor: grabbing;
}

.lg-stage.lg-onnode {
  cursor: pointer;
}

#lg-cv {
  width: 100%;
  height: 100%;
  display: block;
}

@media (max-width: 940px) {
  .lg-stage {
    min-height: 460px;
    height: 64vh;
  }
}

.lg-chips {
  position: absolute;
  left: 14px;
  top: 12px;
  z-index: 5;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  max-width: 70%;
}

.lg-chip {
  font-family: var(--lg-mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  background: var(--lg-panel);
  border: 1px solid var(--lg-hair2);
  color: var(--lg-muted);
  padding: 6px 11px;
  border-radius: 20px;
  box-shadow: var(--shadow);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.lg-chip:hover {
  border-color: var(--lg-accent);
  color: var(--lg-ink);
}

.lg-chip .lg-d {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.lg-chip.lg-now .lg-d {
  background: var(--lg-now);
}

.lg-chip.lg-part .lg-d {
  background: var(--lg-part);
}

.lg-chip.lg-horiz .lg-d {
  background: var(--lg-horiz);
}

.lg-chip.lg-off {
  opacity: 0.4;
  text-decoration: line-through;
}

.lg-chip.lg-robo {
  border-color: var(--lg-robot);
  color: var(--lg-robot);
}

.lg-chip.lg-robo.lg-on {
  background: var(--lg-robot);
  color: var(--lg-panel);
}

.lg-arvr-button {
  min-height: 40px;
  cursor: default;
  opacity: 0.82;
}

.lg-hint {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 5;
  font-family: var(--lg-mono);
  font-size: 11px;
  color: var(--lg-faint);
  background: var(--lg-panel);
  border: 1px solid var(--lg-hair);
  padding: 6px 10px;
  border-radius: 9px;
  box-shadow: var(--shadow);
}

.lg-toolbar {
  position: absolute;
  left: 14px;
  bottom: 14px;
  display: flex;
  gap: 8px;
  z-index: 5;
}

.lg-toolbar button {
  font-family: var(--lg-mono);
  font-size: 15px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--lg-hair2);
  background: var(--lg-panel);
  color: var(--lg-ink);
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
}

.lg-toolbar button:hover {
  border-color: var(--lg-accent);
}

.lg-toolbar button:focus-visible {
  outline: 2px solid var(--lg-accent);
  outline-offset: 2px;
}

.lg-rail {
  display: flex;
  flex-direction: column;
  gap: 13px;
  position: sticky;
  top: 88px;
}

@media (max-width: 940px) {
  .lg-rail {
    position: static;
  }
}

.lg-card {
  background: var(--lg-panel);
  border: 1px solid var(--lg-hair);
  border-radius: 10px;
  padding: 15px 15px 14px;
  box-shadow: var(--shadow);
}

.lg-submit-card {
  border-color: rgba(37, 95, 75, 0.28);
  background: linear-gradient(180deg, var(--lg-panel), var(--lg-panel2));
}

.lg-card.lg-robo-card {
  border-color: color-mix(in srgb, var(--lg-robot) 45%, var(--lg-hair));
}

.lg-card h3 {
  margin: 0 0 9px;
  font-family: var(--lg-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--lg-faint);
  font-weight: 700;
}

.lg-card h3 .lg-i {
  color: var(--lg-robot);
}

.lg-card-copy {
  margin: 0 0 13px;
  color: var(--lg-muted);
  font-size: 13px;
  line-height: 1.5;
}

.lg-intake-stub {
  display: grid;
  gap: 10px;
}

.lg-intake-stub label {
  display: grid;
  gap: 5px;
}

.lg-intake-stub label > span {
  color: var(--lg-ink);
  font-size: 12px;
  font-weight: 800;
}

.lg-intake-stub .status-field {
  width: 100%;
  min-height: 40px;
  font-size: 13px;
}

.lg-intake-stub textarea.status-field {
  min-height: 82px;
}

.lg-submit-action {
  width: 100%;
  margin-top: 12px;
}

.lg-capture-summary {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid rgba(37, 95, 75, 0.2);
  border-radius: 8px;
  background: rgba(232, 242, 236, 0.72);
  color: var(--lg-muted);
  font-size: 12px;
  line-height: 1.35;
}

.lg-capture-summary strong {
  color: var(--lg-ink);
  font-size: 13px;
}

.lg-statline {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.lg-stat {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.lg-stat .lg-v {
  font-family: var(--lg-mono);
  font-size: 19px;
  font-weight: 700;
  color: var(--lg-ink);
  font-variant-numeric: tabular-nums;
}

.lg-stat .lg-l {
  font-size: 11px;
  color: var(--lg-faint);
}

.lg-legrow {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
  font-size: 13px;
  color: var(--lg-muted);
}

.lg-legrow .lg-sw {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex: none;
}

.lg-legrow.lg-now .lg-sw {
  background: var(--lg-now);
}

.lg-legrow.lg-part .lg-sw {
  background: var(--lg-part);
}

.lg-legrow.lg-horiz .lg-sw {
  background: var(--lg-horiz);
}

.lg-legrow.lg-cap .lg-sw {
  background: var(--lg-cross);
  border-radius: 3px;
}

.lg-legrow.lg-dom .lg-sw {
  background: var(--lg-accent);
}

.lg-legrow strong {
  color: var(--lg-ink);
  font-weight: 700;
}

.lg-legrow .lg-ct {
  margin-left: auto;
  font-family: var(--lg-mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.lg-note {
  margin: 0;
  font-size: 12px;
  color: var(--lg-muted);
  line-height: 1.5;
}

.lg-note strong {
  color: var(--lg-ink);
}

#lg-tip {
  position: fixed;
  z-index: 60;
  pointer-events: none;
  max-width: 300px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.1s;
  background: var(--lg-panel);
  border: 1px solid var(--lg-hair2);
  border-radius: 12px;
  padding: 12px 13px;
  box-shadow: var(--shadow);
}

#lg-tip.lg-on {
  opacity: 1;
  transform: none;
}

#lg-tip .lg-tt {
  font-size: 15px;
  font-weight: 700;
  color: var(--lg-ink);
  margin-bottom: 3px;
  line-height: 1.2;
}

#lg-tip .lg-tpath {
  font-family: var(--lg-mono);
  font-size: 10.5px;
  letter-spacing: 0.03em;
  color: var(--lg-faint);
  text-transform: uppercase;
  margin-bottom: 9px;
}

#lg-tip .lg-tcov {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  margin-bottom: 9px;
}

#lg-tip .lg-tcov .lg-sw {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

#lg-tip .lg-tcov.lg-now {
  color: var(--lg-now);
  background: color-mix(in srgb, var(--lg-now) 14%, transparent);
}

#lg-tip .lg-tcov.lg-now .lg-sw {
  background: var(--lg-now);
}

#lg-tip .lg-tcov.lg-part {
  color: var(--lg-part);
  background: color-mix(in srgb, var(--lg-part) 15%, transparent);
}

#lg-tip .lg-tcov.lg-part .lg-sw {
  background: var(--lg-part);
}

#lg-tip .lg-tcov.lg-horiz {
  color: var(--lg-horiz);
  background: color-mix(in srgb, var(--lg-horiz) 16%, transparent);
}

#lg-tip .lg-tcov.lg-horiz .lg-sw {
  background: var(--lg-horiz);
}

#lg-tip .lg-alab {
  font-family: var(--lg-mono);
  font-size: 9.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--lg-faint);
  margin: 2px 0 5px;
}

#lg-tip .lg-arow {
  display: flex;
  gap: 8px;
  font-size: 12.5px;
  margin-bottom: 4px;
  color: var(--lg-muted);
  align-items: baseline;
}

#lg-tip .lg-arow .lg-g {
  font-family: var(--lg-mono);
  color: var(--lg-accent);
  width: 14px;
  flex: none;
  text-align: center;
}

#lg-tip .lg-arow strong {
  color: var(--lg-ink);
}

#lg-tip .lg-dl {
  display: flex;
  gap: 4px;
  margin: 5px 0;
}

#lg-tip .lg-dl .lg-pip {
  flex: 1;
  height: 7px;
  border-radius: 3px;
  background: var(--lg-hair2);
}

#lg-tip .lg-dl .lg-pip.lg-on {
  background: var(--lg-accent);
}

#lg-tip .lg-dl .lg-pip.lg-reach {
  background: transparent;
  border: 1.5px dashed var(--lg-accent);
}

#lg-tip .lg-dl .lg-pip.lg-rob.lg-reach {
  border-color: var(--lg-robot);
}

#lg-tip .lg-dl .lg-pip.lg-rob.lg-on {
  background: var(--lg-robot);
}

#lg-tip .lg-dmeta {
  font-family: var(--lg-mono);
  font-size: 10.5px;
  color: var(--lg-muted);
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

#lg-tip .lg-dmeta strong {
  color: var(--lg-ink);
}

#lg-tip .lg-dmeta .lg-rb {
  color: var(--lg-robot);
}

#lg-tip .lg-deps {
  margin-top: 9px;
  font-size: 11.5px;
  color: var(--lg-muted);
}

#lg-tip .lg-deps strong {
  color: var(--lg-cross);
}

#lg-tip .lg-tact {
  margin-top: 8px;
  font-size: 11.5px;
  color: var(--lg-accent);
  font-weight: 700;
}

#lg-tip.lg-cap .lg-tt {
  color: var(--lg-cross);
}

#lg-tip.lg-rob .lg-tt {
  color: var(--lg-robot);
}

@media (prefers-reduced-motion: reduce) {
  #lg-tip {
    transition: none;
  }
}
