/* Editor hub + workspace pages */
.editor-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  margin: 0 0 0.55rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #e0f2fe;
  background: rgba(0, 174, 239, 0.14);
  border: 1px solid rgba(125, 211, 252, 0.28);
}

.editor-hero-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1rem 0 0;
}

.editor-hero-label {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.22);
}

.editor-hero-meta {
  margin: 0.85rem 0 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: #7dd3fc;
}

.editors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.1rem;
}

.editor-card {
  --ed-c1: #00aeef;
  --ed-c2: #0284c7;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(10, 16, 28, 0.9);
  text-decoration: none;
  color: inherit;
  min-height: 100%;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.editor-card:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--ed-c1) 45%, rgba(148, 163, 184, 0.2));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.32);
}

.editor-card-media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 7.5rem;
  padding: 1.25rem 1rem 1rem;
  background:
    radial-gradient(520px 140px at 15% 0%, color-mix(in srgb, var(--ed-c1) 38%, transparent), transparent 60%),
    radial-gradient(420px 120px at 90% 20%, color-mix(in srgb, var(--ed-c2) 28%, transparent), transparent 55%),
    linear-gradient(160deg, rgba(8, 12, 22, 0.95), rgba(15, 23, 42, 0.8));
}

.editor-card-icon-img {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.35);
  transition: transform 0.22s ease;
}

.editor-card:hover .editor-card-icon-img {
  transform: scale(1.06) translateY(-2px);
}

.editor-card-badges {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.3rem;
}

.editor-card-badge {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.26rem 0.5rem;
  border-radius: 999px;
  color: #e0f2fe;
  background: rgba(2, 8, 20, 0.55);
  border: 1px solid rgba(125, 211, 252, 0.35);
  backdrop-filter: blur(8px);
}

.editor-card-badge.is-browser {
  color: #d1fae5;
  border-color: rgba(52, 211, 153, 0.4);
  background: rgba(6, 78, 59, 0.45);
}

.editor-card-badge.is-ready {
  color: #e0f2fe;
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(7, 89, 133, 0.4);
}

.editor-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
  padding: 1rem 1.15rem 1.15rem;
}

.editor-card-mode {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--ed-c1) 75%, #94a3b8);
}

.editor-card h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: #f8fafc;
}

.editor-card-desc {
  margin: 0;
  flex: 1;
  color: #94a3b8;
  font-size: 0.88rem;
  line-height: 1.5;
}

.editor-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.35rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.editor-card-cta {
  font-size: 0.82rem;
  font-weight: 800;
  color: #38bdf8;
}

.editor-card:hover .editor-card-cta {
  color: #7dd3fc;
}

.editor-runtime-alert {
  margin: 0 1rem 1rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid rgba(251, 191, 36, 0.32);
  border-radius: 12px;
  background: rgba(120, 53, 15, 0.2);
  color: #fde68a;
  font-size: 0.84rem;
  line-height: 1.5;
}

.editor-runtime-alert code {
  color: #fff7ed;
  font-weight: 700;
}

.editor-hub-alert {
  margin: 0 0 1.25rem;
}

.editor-hub-alert--ready {
  border-color: rgba(52, 211, 153, 0.35);
  background: rgba(6, 78, 59, 0.28);
  color: #d1fae5;
}

.editor-browser-note {
  margin: 0.65rem 0 0;
  color: #94a3b8;
  font-size: 0.78rem;
  line-height: 1.45;
}

.editor-lang-hero {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.15rem;
  align-items: center;
  margin: 0 0 1.25rem;
  padding: 1.2rem 1.25rem;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--ed-c1, #00aeef) 30%, rgba(148, 163, 184, 0.16));
  background:
    radial-gradient(700px 160px at 0% -20%, color-mix(in srgb, var(--ed-c1, #00aeef) 28%, transparent), transparent 55%),
    linear-gradient(155deg, rgba(8, 12, 22, 0.95), rgba(15, 23, 42, 0.75));
}

.editor-lang-icon {
  width: 84px;
  height: 84px;
  border-radius: 20px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
}

.editor-lang-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.75rem 0 0;
}

.editor-lang-chip {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.32rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.55);
  color: #cbd5e1;
}

.editor-lang-chip--accent {
  color: #e0f2fe;
  border-color: rgba(0, 174, 239, 0.4);
  background: rgba(0, 174, 239, 0.12);
}

.editor-workspace {
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(10, 16, 28, 0.92);
  overflow: hidden;
}

.editor-workspace-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.95rem 1.1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(15, 23, 42, 0.55);
}

.editor-workspace-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: #e2e8f0;
}

.editor-workspace-note {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  color: #64748b;
}

.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.editor-toolbar .btn-primary {
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(0, 174, 239, 0.22);
}

.editor-runtime-layout,
.editor-web-layout {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 0;
}

.editor-pane {
  padding: 1rem 1.1rem 1.15rem;
  min-width: 0;
}

.editor-pane + .editor-pane {
  border-left: 1px solid rgba(148, 163, 184, 0.12);
  background: rgba(2, 8, 20, 0.35);
}

.editor-pane-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
}

.editor-panel {
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
  overflow: hidden;
  background: #0b1220;
}

.runtime-editor-root {
  min-height: 460px;
}

.editor-stdin {
  width: 100%;
  min-height: 110px;
  padding: 0.8rem 0.85rem;
  background: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  color: #e2e8f0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.84rem;
  resize: vertical;
}

.editor-console {
  padding: 0.9rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.84rem;
  white-space: pre-wrap;
  min-height: 220px;
  max-height: 420px;
  overflow: auto;
  color: #cbd5e1;
  line-height: 1.45;
}

.editor-console.is-error {
  color: #fca5a5;
}

.editor-console.is-running {
  color: #7dd3fc;
}

.editor-web-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.65rem;
}

.editor-web-tab {
  appearance: none;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.65);
  color: #94a3b8;
  border-radius: 999px;
  padding: 0.38rem 0.8rem;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
}

.editor-web-tab.is-active {
  color: #e0f2fe;
  border-color: rgba(0, 174, 239, 0.45);
  background: rgba(0, 174, 239, 0.14);
}

.editor-web-panel {
  display: none;
  min-height: 420px;
}

.editor-web-panel.is-active {
  display: block;
}

.editor-web-panel .editor-panel,
.editor-web-panel.editor-panel {
  border: none;
  border-radius: 0;
  background: transparent;
}

.editor-web-code {
  min-height: 420px;
}

.editor-web-preview {
  width: 100%;
  min-height: 640px;
  border: 0;
  background: #fff;
  display: block;
}

.editor-related {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.editor-related h3 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 800;
  color: #e2e8f0;
}

.editor-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.65rem;
}

.editor-related-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(15, 23, 42, 0.45);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.editor-related-link:hover {
  border-color: rgba(0, 174, 239, 0.45);
  background: rgba(0, 174, 239, 0.08);
}

.editor-related-link img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.editor-related-link strong {
  display: block;
  font-size: 0.82rem;
  color: #e2e8f0;
}

@media (max-width: 1000px) {
  .editor-runtime-layout,
  .editor-web-layout {
    grid-template-columns: 1fr;
  }

  .editor-pane + .editor-pane {
    border-left: 0;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
  }

  .editor-web-preview {
    min-height: 420px;
  }

  .editor-lang-hero {
    grid-template-columns: 1fr;
  }

  .editors-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .editor-hero-labels {
    gap: 0.35rem;
  }

  .editor-hero-label {
    font-size: 0.72rem;
    padding: 0.3rem 0.58rem;
  }

  .editor-hero-meta {
    font-size: 0.8rem;
  }
}
