/* /try: the code box, the Run bar and an output screen in the calculator's 1-bit LCD look. Theme tokens only. */

.try-code,
.try-out,
.try-snippet,
.try-meta {
  font-variant-ligatures: none; /* show -> and => as typed, not as arrows */
  font-feature-settings: "liga" 0, "calt" 0;
}

.try-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 12px;
}

.chip {
  font: inherit;
  font-size: 0.9375rem;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.chip:hover {
  background: var(--surface-2);
}

.try-code {
  display: block;
  width: 100%;
  min-height: 12em;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  line-height: 1.5;
  tab-size: 2;
  resize: vertical;
}

.try-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin: 12px 0;
}
.try-bar .button {
  border: 0;
  font: inherit;
  cursor: pointer;
}
.try-bar .button:disabled {
  opacity: 0.5;
  cursor: progress;
}
.try-hint,
.try-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
}
.try-meta {
  margin-left: auto;
  font-family: var(--font-mono);
}
kbd {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
}

/* The output: two colours only, like the calculator's screen. */
.try-screen {
  padding: 10px;
  border-radius: var(--r-md);
  background: var(--device);
}
.try-out {
  margin: 0;
  min-height: 6em;
  max-height: 24em;
  overflow: auto;
  padding: 12px 14px;
  border-radius: var(--r-xs);
  background: var(--lcd);
  color: var(--lcd-ink);
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.try-out.failed::before {
  content: '! ';
  font-weight: 700;
}

.try-snippet {
  margin: 12px 0;
  padding: 12px 14px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.link-button {
  font: inherit;
  padding: 0;
  border: 0;
  background: none;
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.link-button:hover {
  color: var(--link-hover);
}

@media (max-width: 640px) {
  .try-hint {
    display: none;
  }
}
