/*
 * SPDX-FileCopyrightText: 2026 John Samuel <johnsamuelwrites@gmail.com>
 *
 * SPDX-License-Identifier: GPL-3.0-or-later
 */

/* CSS design tokens - dark mode (default) */
:root,
[data-theme="dark"] {
  --bg: #060614;
  --bg-grid: rgba(100, 90, 220, 0.04);
  --surface: rgba(13, 13, 40, 0.82);
  --surface2: rgba(18, 18, 52, 0.90);
  --surface3: rgba(22, 22, 58, 0.95);
  --border: rgba(124, 106, 247, 0.18);
  --border2: rgba(124, 106, 247, 0.10);
  --accent: #7c6af7;
  --accent-glow: rgba(124, 106, 247, 0.40);
  --accent2: #00d4ff;
  --accent2-glow: rgba(0, 212, 255, 0.25);
  --green: #4ade80;
  --red: #f87171;
  --yellow: #fbbf24;
  --text: #e2e8f0;
  --text-dim: #64748b;
  --text-muted: #94a3b8;
  --code-bg: #0a0a1e;
  --editor-bg: #282a36;
  --cm-theme: dracula;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px var(--accent-glow);
  --mono: 'JetBrains Mono', 'Fira Code', monospace;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
}

[data-theme="light"] {
  --bg: #f0f4ff;
  --bg-grid: rgba(99, 102, 241, 0.05);
  --surface: rgba(255, 255, 255, 0.90);
  --surface2: rgba(248, 250, 255, 0.95);
  --surface3: rgba(241, 245, 255, 1.00);
  --border: rgba(99, 102, 241, 0.20);
  --border2: rgba(99, 102, 241, 0.10);
  --accent: #4f46e5;
  --accent-glow: rgba(79, 70, 229, 0.25);
  --accent2: #0891b2;
  --accent2-glow: rgba(8, 145, 178, 0.20);
  --green: #16a34a;
  --red: #dc2626;
  --yellow: #d97706;
  --text: #1e293b;
  --text-dim: #64748b;
  --text-muted: #475569;
  --code-bg: #f8fafc;
  --editor-bg: #f8f8f2;
  --cm-theme: eclipse;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 0 20px var(--accent-glow);
  --mono: 'JetBrains Mono', 'Fira Code', monospace;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  overflow: hidden;
  transition: background 0.3s ease, color 0.3s ease;
}

a {
  color: var(--accent2);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 10;
  padding: .55rem .9rem;
  border-radius: var(--radius-sm);
  background: var(--surface3);
  color: var(--text);
  border: 1px solid var(--accent);
  box-shadow: var(--shadow);
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 1rem;
}

:focus-visible {
  outline: 2px solid var(--accent2);
  outline-offset: 2px;
}

/* Animated Background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--bg-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px);
  background-size: 48px 48px;
}

@supports ((-webkit-mask-image: radial-gradient(#000, transparent)) or (mask-image: radial-gradient(#000, transparent))) {
  body::before {
    -webkit-mask-image: radial-gradient(ellipse at center, #000 40%, transparent 80%);
    mask-image: radial-gradient(ellipse at center, #000 40%, transparent 80%);
  }
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 20% 20%, var(--accent-glow) 0%, transparent 45%),
    radial-gradient(ellipse at 80% 80%, var(--accent2-glow) 0%, transparent 45%);
  animation: orb-drift 10s ease-in-out infinite alternate;
  opacity: 0.6;
}

@keyframes orb-drift {
  from {
    transform: translate(0, 0) scale(1.00);
  }

  to {
    transform: translate(20px, -15px) scale(1.08);
  }
}

/* App Shell */
#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: relative;
  z-index: 1;
}

/* Glassmorphism */
.glass {
  background: var(--surface);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s ease, border-color 0.3s ease;
}

/* Header */
header {
  padding: .5rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.h-logo {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  box-shadow: 0 0 16px var(--accent-glow);
}

.h-logo img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 10px;
}

.h-text {
  flex: 1;
  min-width: 0;
}

.h-title {
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: -.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.h-sub {
  font-size: .68rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.h-nav {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-shrink: 0;
}

.h-nav a {
  font-size: .8rem;
  color: var(--text-muted);
  padding: .3rem .6rem;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}

.h-nav a:hover {
  color: var(--text);
  background: var(--border2);
  text-decoration: none;
}

/* theme toggle */
#theme-toggle {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 40px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

#theme-toggle,
.btn,
.copy-btn,
.tab-btn,
#lang-select,
#example-select {
  min-height: 40px;
}

#theme-toggle:hover {
  background: var(--border);
  transform: scale(1.1) rotate(15deg);
}

/* Toolbar */
#toolbar {
  padding: .45rem 1rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
  flex-shrink: 0;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  scrollbar-width: thin;
}

#toolbar label {
  font-size: .73rem;
  font-weight: 500;
  color: var(--text-dim);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* Language select — custom styled */
.lang-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.lang-wrap::before {
  content: '🌐';
  position: absolute;
  left: .6rem;
  font-size: .85rem;
  pointer-events: none;
  z-index: 1;
}

#lang-select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--surface3);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: .32rem 2.2rem .32rem 2.2rem;
  font-size: .85rem;
  font-family: var(--sans);
  cursor: pointer;
  min-width: 185px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#lang-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.lang-wrap::after {
  content: '▾';
  position: absolute;
  right: .8rem;
  font-size: .75rem;
  color: var(--text-dim);
  pointer-events: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .36rem .9rem;
  border: none;
  border-radius: 24px;
  font-size: .85rem;
  font-weight: 600;
  font-family: var(--sans);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.15s;
  white-space: nowrap;
}

.btn:active {
  transform: scale(.96);
}

.btn:disabled {
  opacity: .38;
  cursor: not-allowed;
}

#run-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  box-shadow: 0 2px 16px var(--accent-glow);
  position: relative;
  overflow: hidden;
}

#run-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.15));
  opacity: 0;
  transition: opacity 0.2s;
}

#run-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 24px var(--accent-glow), 0 0 40px var(--accent2-glow);
}

#run-btn:hover:not(:disabled)::before {
  opacity: 1;
}

#clear-btn {
  background: var(--surface3);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

#clear-btn:hover {
  background: var(--border);
  color: var(--text);
}

/* Status bar */
#status-bar {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: .75rem;
  color: var(--text-dim);
  white-space: nowrap;
  min-width: -webkit-fill-available;
  min-width: fit-content;
}

.runtime-pill {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .34rem .7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface2);
  color: var(--text-muted);
  font-size: .75rem;
  white-space: nowrap;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-dim);
  flex-shrink: 0;
  transition: background 0.3s;
}

.dot.loading {
  background: var(--yellow);
  animation: ripple-pulse 1.1s ease-in-out infinite;
}

.dot.ready {
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
}

.dot.error {
  background: var(--red);
  box-shadow: 0 0 6px var(--red);
}

.dot.running {
  background: var(--accent2);
  animation: ripple-pulse 0.7s ease-in-out infinite;
}

@keyframes ripple-pulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1)
  }

  50% {
    opacity: .3;
    transform: scale(.8)
  }
}

/* Main split pane */
#main {
  display: grid;
  grid-template-columns: 1fr 4px 1fr;
  flex: 1;
  min-height: 0;
}

/* Panes */
.pane {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--surface);
  border: none;
}

.pane-header {
  padding: .32rem .9rem;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-shrink: 0;
}

.pane-icon {
  color: var(--accent2);
  font-style: normal;
}

.lang-badge {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  border-radius: 20px;
  padding: 1px 8px;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .05em;
  box-shadow: 0 0 8px var(--accent-glow);
}

/* Resizer */
#resizer {
  background: var(--border);
  cursor: col-resize;
  transition: background 0.2s;
  position: relative;
  touch-action: none;
}

#resizer::before {
  content: '⋮';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--text-dim);
  font-size: .9rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}

#resizer:hover,
#resizer.dragging,
#resizer:focus-visible {
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

#resizer:hover::before,
#resizer.dragging::before,
#resizer:focus-visible::before {
  opacity: 1;
}

/* Editor */
#editor-pane {
  border-right: none;
}

#editor-wrapper {
  flex: 1;
  overflow: auto;
  min-height: 0;
}

#editor-wrapper .CodeMirror {
  height: 100%;
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.65;
  direction: ltr;
}

#editor-wrapper .CodeMirror-scroll {
  direction: ltr;
}

#editor-wrapper .CodeMirror-line,
#editor-wrapper .CodeMirror-line-like,
#editor-wrapper .CodeMirror pre {
  unicode-bidi: plaintext;
  text-align: start;
}

#editor-wrapper .CodeMirror.editor-rtl .CodeMirror-lines {
  direction: rtl;
}

#editor-wrapper .CodeMirror span.cm-keyword {
  color: #ff79c6 !important;
  font-weight: 600;
}

#editor-wrapper .CodeMirror span.cm-string {
  color: #50fa7b !important;
}

[data-theme="light"] #editor-wrapper .CodeMirror span.cm-string {
  color: #166534 !important;
}

#editor-wrapper .CodeMirror span.cm-comment {
  color: #6272a4 !important;
  font-style: italic;
}

#editor-wrapper .CodeMirror span.cm-number {
  color: #bd93f9 !important;
}

#editor-wrapper .CodeMirror span.cm-operator {
  color: #8be9fd !important;
}

[data-theme="dark"] #editor-wrapper .CodeMirror {
  background: #1c1e2e;
}

[data-theme="light"] #editor-wrapper .CodeMirror {
  background: #fefefe;
}

/* Output pane */
#output-pane {
  border-left: 1px solid var(--border);
}

/* Tabs */
.tabs {
  display: flex;
  align-items: stretch;
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .48rem 1rem;
  background: none;
  border: none;
  font-size: .75rem;
  font-weight: 600;
  font-family: var(--sans);
  color: var(--text-dim);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: .06em;
  position: relative;
  transition: color 0.2s;
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text-muted);
}

.tab-btn:focus-visible {
  color: var(--text);
}

.tab-btn.active {
  color: var(--accent2);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 2px 2px 0 0;
  animation: tab-slide-in 0.22s ease;
}

@keyframes tab-slide-in {
  from {
    transform: scaleX(0);
    opacity: 0;
  }

  to {
    transform: scaleX(1);
    opacity: 1;
  }
}

.tab-icon {
  font-size: .85rem;
}

.tab-panel {
  display: none;
  flex: 1;
  overflow: auto;
  padding: .75rem;
  min-height: 0;
  min-width: 0;
}

.tab-panel.active {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.tab-panel[hidden] {
  display: none !important;
}

/* Console / Code views */
.console,
.code-view {
  flex: 1;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .85rem 1rem;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.75;
  white-space: pre-wrap;
  overflow: auto;
  color: var(--text);
  transition: background 0.3s, border-color 0.3s;
  position: relative;
  min-width: 0;
  direction: ltr;
  unicode-bidi: plaintext;
  text-align: start;
}

.console {
  unicode-bidi: plaintext;
  text-align: start;
}

.code-view {
  white-space: pre;
  tab-size: 4;
}

.console.has-error {
  color: var(--red);
}

.console.has-warning {
  color: var(--yellow);
}

.console.empty {
  color: var(--text-dim);
  font-style: italic;
}

/* Scanline overlay on console in dark mode */
[data-theme="dark"] .console::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent 0px, transparent 3px,
      rgba(0, 0, 0, 0.04) 3px, rgba(0, 0, 0, 0.04) 4px);
  border-radius: inherit;
}

/* Blinking cursor at end of console output */
.console::after {
  content: '▌';
  color: var(--accent2);
  animation: blink-cursor 1.2s step-end infinite;
  font-size: .85em;
}

.console.empty::after,
.console.has-error::after,
.console.has-warning::after {
  display: none;
}

@keyframes blink-cursor {

  0%,
  100% {
    opacity: 1
  }

  50% {
    opacity: 0
  }
}

/* WAT panel layout */
#panel-wat {
  flex-direction: column;
  gap: .55rem;
}

/* Pipeline diagram */
.pipeline-box {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .65rem .9rem;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.pipeline-box::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(124, 106, 247, .07) 0%, rgba(0, 212, 255, .05) 100%);
  pointer-events: none;
}

.pipeline-title {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--accent2);
  margin-bottom: .4rem;
}

.release-note {
  background: linear-gradient(135deg, rgba(124, 106, 247, .12) 0%, rgba(0, 212, 255, .08) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .8rem .95rem;
  margin-bottom: .65rem;
}

.release-note p {
  color: var(--text-muted);
  font-size: .84rem;
}

.release-note strong {
  color: var(--text);
}

.pipeline-flow {
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
  gap: .15rem;
  font-family: var(--mono);
  font-size: .68rem;
  line-height: 1;
}

.pip-node {
  background: var(--surface3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .25rem .5rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.pip-node.hl {
  color: var(--accent2);
  border-color: var(--accent2);
  box-shadow: 0 0 6px var(--accent2-glow);
}

.pip-arrow {
  color: var(--text-dim);
  padding: 0 .1rem;
  font-size: .75rem;
}

.wat-label {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-dim);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: .4rem;
}

.wasm-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  background: rgba(0, 212, 255, .1);
  border: 1px solid rgba(0, 212, 255, .3);
  border-radius: 4px;
  padding: 2px 7px;
  font-size: .65rem;
  color: var(--accent2);
  font-weight: 700;
  box-shadow: 0 0 6px var(--accent2-glow);
}

#wat-split,
#rust-split {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

#wat-code-wrap,
#rust-code-wrap {
  flex: 3;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}

#wasm-exec-wrap,
#rust-exec-wrap {
  flex: 1;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}

#wat-view,
#wasm-exec-console,
#rust-view,
#rust-run-console {
  min-height: 0;
}

/* Footer */
footer {
  background: var(--surface2);
  border-top: 1px solid var(--border);
  padding: .32rem 1.2rem;
  font-size: .7rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  gap: 1rem;
  flex-wrap: wrap;
}

footer a {
  color: var(--text-dim);
  transition: color 0.15s;
}

footer a:hover {
  color: var(--accent2);
  text-decoration: none;
}

.footer-pill {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  background: var(--border2);
  border-radius: 20px;
  padding: 2px 8px;
}

.footer-pill .dot-sm {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 4px var(--green);
}

/* Example select */
#example-select {
  -webkit-appearance: none;
  appearance: none;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: .78rem;
  font-family: var(--sans);
  padding: .3rem .65rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

#example-select:hover {
  border-color: var(--accent);
  background: var(--surface3);
}

#example-select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Language select focus */
#lang-select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Keyboard hint */
.kbd-hint {
  font-size: .68rem;
  opacity: 0.65;
  font-family: var(--mono);
  margin-left: .25rem;
}

/* Panel toolbar */
.panel-toolbar {
  display: flex;
  justify-content: flex-end;
  flex-shrink: 0;
  padding: .15rem 0;
}

/* Copy button */
.copy-btn {
  background: var(--surface3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: .7rem;
  font-family: var(--sans);
  padding: .2rem .55rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  white-space: nowrap;
}

.copy-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.copy-btn:focus-visible,
.btn:focus-visible,
#theme-toggle:focus-visible,
#lang-select:focus-visible,
#example-select:focus-visible {
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.copy-btn.copied {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

/* Inline variant used inside .wat-label rows */
.copy-btn-inline {
  margin-left: auto;
}

.wat-label {
  display: flex;
  align-items: center;
  gap: .4rem;
}

/* Error line highlight */
.error-line {
  background: rgba(248, 113, 113, 0.14) !important;
}

/* Responsive */
@media (max-width: 800px) {

  html,
  body {
    overflow: auto;
    height: auto;
  }

  #app {
    height: auto;
    min-height: 100dvh;
  }

  #main {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(18rem, 52dvh) 12px minmax(16rem, auto);
  }

  #resizer {
    cursor: row-resize;
    min-height: 12px;
  }

  #resizer::before {
    content: '···';
  }

  #output-pane {
    border-left: none;
    border-top: 1px solid var(--border);
  }

  .h-nav .nav-github {
    display: none;
  }

  .pipeline-flow {
    display: none;
  }

  #toolbar {
    flex-wrap: wrap;
    row-gap: .4rem;
    align-items: stretch;
  }

  #status-bar {
    margin-left: 0;
    width: 100%;
    order: 10;
    white-space: normal;
  }

  .runtime-pill {
    order: 11;
  }

  #editor-wrapper .CodeMirror {
    min-height: 18rem;
  }

  .tab-btn {
    flex: 1 1 auto;
    justify-content: center;
    padding-inline: .6rem;
  }

  #example-select {
    max-width: 110px;
  }
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}