:root {
  --bg: #f4f5f7;
  --panel: #ffffff;
  --ink: #111217;
  --muted: #4d5562;
  --accent: #0b6e99;
  --accent-2: #f0b429;
  --accent-3: #1b1f24;
  --border: #d9dee5;
  --grid: rgba(17, 18, 23, 0.05);
  --topbar-height: 72px;
  --panel-soft: #f3f5f8;
  --panel-soft-2: #f7f8fb;
  --panel-soft-3: #f4f6f9;
  --panel-soft-4: #eef1f5;
  --border-soft: #edf0f4;
  --accent-ink: #3a2a10;
  --status-ok: #1c7f4f;
  --status-error: #b34747;
  --overlay-text: #f1f4f8;
  --code-bg: #f7f9fc;
  --code-keyword: #0c2d37;
  --code-string: #b3502a;
  --code-comment: #7b7a77;
  --code-number: #1c8c8c;
  --code-variable: #253237;
  --code-def: #a23c3c;
  --report-bg: #ffffff;
  --report-ink: #111217;
  --report-border: #d9dee5;
  --report-keyword: #0c2d37;
  --report-string: #b3502a;
  --report-comment: #7b7a77;
  --report-number: #1c8c8c;
  --report-variable: #253237;
  --report-def: #a23c3c;
  --report-builtin: #0b6e99;
  --report-operator: #1b1f24;
  --report-type: #1b1f24;
  --report-meta: #6b7280;
  --report-attribute: #1c8c8c;
}

:root[data-theme="dark"] {
  --bg: #0f1115;
  --panel: #151a22;
  --ink: #e6edf3;
  --muted: #a1a9b3;
  --accent: #4bb0d9;
  --accent-2: #d9a323;
  --accent-3: #e6edf3;
  --border: #283141;
  --grid: rgba(255, 255, 255, 0.035);
  --panel-soft: #1b2230;
  --panel-soft-2: #11161e;
  --panel-soft-3: #18202b;
  --panel-soft-4: #1a2230;
  --border-soft: #222c3a;
  --accent-ink: #2a210b;
  --status-ok: #45c27a;
  --status-error: #f27070;
  --overlay-text: #e6edf3;
  --code-bg: #0f141b;
  --code-keyword: #8ed3f5;
  --code-string: #f2a06b;
  --code-comment: #7b8794;
  --code-number: #7bd0d0;
  --code-variable: #d2dae3;
  --code-def: #f29c9c;
  --report-bg: #ffffff;
  --report-ink: #111217;
  --report-border: #d9dee5;
  --report-keyword: #0c2d37;
  --report-string: #b3502a;
  --report-comment: #7b7a77;
  --report-number: #1c8c8c;
  --report-variable: #253237;
  --report-def: #a23c3c;
  --report-builtin: #0b6e99;
  --report-operator: #1b1f24;
  --report-type: #1b1f24;
  --report-meta: #6b7280;
  --report-attribute: #1c8c8c;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", sans-serif;
  color: var(--ink);
  background-color: var(--bg);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
  min-height: 100vh;
}

.app {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--accent-3);
  text-decoration: none;
  flex: 0 0 auto;
}

.brand:hover {
  color: var(--accent);
}

.brand-logo {
  width: 28px;
  height: 28px;
  display: block;
}

.tool-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1 1 auto;
  justify-content: center;
}

.tool-tab {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  border: 1px solid var(--border);
  background: transparent;
  padding: 8px 12px;
  border-radius: 2px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
  color: var(--accent-3);
}

.tool-tab.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.tool-tab:hover {
  background: var(--panel-soft);
}

:root[data-theme="dark"] .tool-tab {
  background: var(--panel-soft-3);
  border-color: var(--border);
  color: var(--ink);
}

:root[data-theme="dark"] .tool-tab:hover {
  background: var(--panel-soft);
  border-color: var(--panel-soft-4);
}

:root[data-theme="dark"] .tool-tab.active {
  background: linear-gradient(135deg, #2aa4cc, var(--accent));
  color: #071018;
  border-color: var(--accent);
}


.topbar-meta {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.lang-label {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.lang-select {
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--ink);
  font-size: 11px;
  padding: 6px 8px;
  border-radius: 2px;
  outline: none;
  min-width: 72px;
}

.lang-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(11, 110, 153, 0.18);
}

:root[data-theme="dark"] .lang-select {
  background: var(--panel-soft-3);
  border-color: var(--border);
  color: var(--ink);
}

.theme-toggle {
  padding: 6px 10px;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.workspace {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr auto;
  min-height: 0;
  min-height: calc(100vh - var(--topbar-height));
  min-height: calc(100dvh - var(--topbar-height));
  position: relative;
}

.panel {
  background: var(--panel);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.input-panel {
  border-right: 1px solid var(--border);
}

.output-panel {
  border-left: 1px solid var(--border);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.panel-header h2 {
  margin: 0;
  font-size: 18px;
}

.panel-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.panel-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.editor {
  flex: 1;
  min-height: 0;
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.editor-fallback {
  width: 100%;
  height: 100%;
  border: none;
  resize: none;
  padding: 12px;
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  line-height: 1.5;
  outline: none;
}

.input-surface {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.editor-wrap {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
}

.output-preview {
  flex: 1;
  min-height: 0;
  width: 100%;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 16px;
  font-size: 13px;
  line-height: 1.6;
  text-align: left;
}

.markdown-preview {
  background: var(--panel);
  color: var(--ink);
}

.report-preview {
  background: var(--report-bg);
  color: var(--report-ink);
}

.report-preview pre {
  margin: 0;
}

.markdown-preview h1,
.markdown-preview h2,
.markdown-preview h3 {
  margin: 0 0 10px;
  font-weight: 600;
  color: var(--accent-3);
}

.markdown-preview h1 {
  font-size: 20px;
}

.markdown-preview h2 {
  font-size: 16px;
}

.markdown-preview h3 {
  font-size: 14px;
}

.markdown-preview p {
  margin: 0 0 10px;
}

.markdown-preview ul,
.markdown-preview ol {
  margin: 0 0 10px 18px;
  padding: 0;
}

.markdown-preview li {
  margin: 4px 0;
}

.markdown-preview code {
  background: var(--panel-soft);
  padding: 1px 4px;
  border-radius: 2px;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
}

.markdown-preview blockquote {
  border-left: 2px solid var(--border);
  margin: 0 0 10px;
  padding: 4px 12px;
  color: var(--muted);
}

.CodeMirror {
  height: 100%;
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
}

button,
select,
input[type="file"] {
  font-family: inherit;
}

button {
  border: none;
  padding: 8px 14px;
  border-radius: 2px;
  cursor: pointer;
  font-weight: 600;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.primary {
  background: var(--accent);
  color: #fff;
}

.accent {
  background: var(--accent-2);
  color: var(--accent-ink);
}

.ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--accent-3);
}

select {
  padding: 6px 10px;
  border-radius: 2px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--ink);
}

.panel-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.validation,
.usage {
  color: var(--muted);
  font-size: 12px;
}

.status-line {
  color: var(--accent-3);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  flex: 1 1 200px;
}

.status-line.error {
  color: var(--status-error);
}

.usage {
  flex: 1 1 200px;
  text-align: right;
}

.upload {
  display: flex;
  align-items: center;
  gap: 10px;
}

.upload-label {
  background: var(--panel-soft);
  padding: 6px 10px;
  border-radius: 2px;
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 12px;
}

.upload input {
  display: none;
}

.tool-controls {
  display: none;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.tool-controls.active {
  display: block;
}

.tool-controls-title {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.tool-control {
  display: grid;
  grid-template-columns: 90px 1fr 32px;
  gap: 12px;
  align-items: center;
  font-size: 13px;
  margin-bottom: 8px;
}

.tool-control-col {
  display: grid;
  gap: 6px;
  font-size: 13px;
  margin-bottom: 10px;
}

.tool-control-col input,
.tool-control-col textarea {
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 6px 8px;
  font-family: inherit;
  font-size: 13px;
  background: var(--panel);
  color: var(--ink);
}

.tool-control-col textarea {
  resize: vertical;
}

.tool-control input[type="range"] {
  width: 100%;
}

.tool-value {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.tool-hint {
  font-size: 12px;
  color: var(--muted);
}

.tool-info {
  grid-column: 1 / -1;
  padding: 10px 18px;
  border-top: 1px solid var(--border);
  background: var(--panel);
  font-size: 13px;
  color: var(--muted);
  min-height: 36px;
}

.tool-info p {
  margin: 0 0 6px;
}

.tool-info p:last-child {
  margin-bottom: 0;
}

.home {
  padding: 28px 20px 10px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.home-hero {
  display: grid;
  gap: 16px;
  margin-bottom: 24px;
}

.hero-title {
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-3);
}

.hero-code {
  margin: 10px 0 14px;
  padding: 18px;
  border: 1px solid var(--border);
  background: var(--code-bg);
  font-family: "JetBrains Mono", monospace;
  font-size: 16px;
  letter-spacing: 0.02em;
  border-radius: 2px;
  color: var(--code-keyword);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
  position: relative;
  cursor: ew-resize;
}

.hero-code::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 12px;
  width: 6px;
  height: 18px;
  background: var(--accent-2);
  opacity: 0.7;
}

.hero-subhead {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
  max-width: 640px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 2px;
  font-weight: 600;
  text-decoration: none;
}

.cta-primary {
  background: var(--accent-2);
  color: var(--accent-ink);
}

.cta-secondary {
  border: 1px solid var(--border);
  color: var(--accent-3);
  background: transparent;
}

.home-timeline h2 {
  margin: 0 0 14px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.home-timeline {
  margin-bottom: 24px;
}

.timeline {
  position: relative;
  padding-left: 22px;
}

.timeline-line {
  position: absolute;
  left: 6px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-items {
  display: grid;
  gap: 16px;
}

.timeline-item {
  position: relative;
  padding-left: 12px;
}

.timeline-dot {
  position: absolute;
  left: -2px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--bg);
}

.timeline-content h3 {
  margin: 0 0 6px;
  font-size: 14px;
}

.timeline-content a {
  color: var(--accent-3);
  text-decoration: none;
}

.timeline-content a:hover {
  text-decoration: underline;
}

.timeline-content p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.legal-page {
  padding: 30px 20px;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

.legal-inner h1 {
  margin: 0 0 12px;
  font-size: 20px;
}

.legal-inner p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.seo-content {
  border-top: 1px solid var(--border);
  background: var(--panel-soft-2);
  padding: 20px;
}

.seo-inner {
  max-width: 1100px;
  margin: 0 auto;
  color: var(--accent-3);
}

.seo-inner h1 {
  margin: 0 0 8px;
  font-size: 20px;
  letter-spacing: 0.02em;
}

.seo-inner p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
}

.seo-mode {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.seo-mode h2 {
  margin: 0 0 8px;
  font-size: 16px;
}

.seo-mode p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
}

.seo-mode ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
}

.seo-mode li {
  margin: 0 0 6px;
}

.seo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.seo-grid h2 {
  margin: 0 0 8px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.seo-grid ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
}

.seo-grid a {
  color: inherit;
  text-decoration: none;
}

.seo-grid a:hover {
  text-decoration: underline;
}

.seo-grid li {
  margin-bottom: 6px;
}

.faq-section {
  border-top: 1px solid var(--border);
  background: var(--panel);
  padding: 24px 20px 32px;
}

.faq-inner {
  max-width: 1100px;
  margin: 0 auto;
  color: var(--accent-3);
}

.faq-inner h2 {
  margin: 0 0 14px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.faq-item {
  border: 1px solid var(--border);
  background: var(--panel-soft-3);
  padding: 14px 16px;
  border-radius: 2px;
}

.faq-item h3 {
  margin: 0 0 8px;
  font-size: 13px;
  letter-spacing: 0.02em;
}

.faq-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 980px) {
  .seo-grid {
    grid-template-columns: 1fr;
  }
  .faq-grid {
    grid-template-columns: 1fr;
  }
  .hero-code {
    font-size: 14px;
  }
}

.batch {
  display: none;
  padding: 16px 18px;
  border-top: 1px solid var(--border);
  background: var(--panel);
}

.batch.active {
  display: block;
}

.batch.loading {
  opacity: 0.7;
}

.batch-header h2 {
  margin: 0 0 4px;
  font-size: 16px;
}

.batch-header p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
}

.input-tree {
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
  background: var(--panel);
  flex: 1;
  min-height: 0;
  display: none;
  flex-direction: column;
}

.input-tree.active {
  display: flex;
}

.input-tree.loading {
  opacity: 0.7;
}

.output-tree {
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
  background: var(--panel);
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.output-tree[hidden] {
  display: none;
}

.tree-header {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 120px 120px 120px;
  gap: 12px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.tree-body {
  padding: 6px 12px 12px;
  overflow: auto;
  flex: 1;
}

.tree-dir {
  margin: 4px 0;
}

.tree-summary {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 120px 120px 120px;
  gap: 12px;
  align-items: center;
  cursor: pointer;
  list-style: none;
  padding: 4px 0;
  font-weight: 600;
  color: var(--accent-3);
}

.tree-summary::-webkit-details-marker {
  display: none;
}

.tree-summary::after {
  content: "[+]";
  justify-self: end;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  grid-column: 4;
}

.tree-dir[open] .tree-summary::after {
  content: "[-]";
}

.tree-children {
  margin-left: 0;
  padding-left: 0;
  border-left: none;
}

.tree-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 120px 120px 120px;
  gap: 12px;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-soft);
}

.tree-row:last-child {
  border-bottom: none;
}

.tree-cell {
  min-width: 0;
}

.tree-line {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: var(--accent-3);
  white-space: pre;
  word-break: break-all;
}

.tree-summary .tree-line {
  grid-column: 1 / 4;
}

.tree-header.output,
.tree-row.output,
.tree-summary.output {
  grid-template-columns: minmax(180px, 1fr) 120px;
}

.tree-summary.output::after {
  grid-column: 2;
}

.tree-summary.output .tree-line {
  grid-column: 1 / 2;
}

@media (max-width: 980px) {
  .tree-header,
  .tree-row,
  .tree-summary {
    grid-template-columns: 1fr;
  }

  .tree-header {
    display: none;
  }

  .tree-row {
    padding: 10px 0;
  }
}

.batch-actions {
  margin-top: 12px;
}

.batch-table table {
  width: 100%;
  border-collapse: collapse;
}

.batch-table th,
.batch-table td {
  padding: 8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  text-align: left;
  font-size: 12px;
}

.status.ok {
  color: var(--status-ok);
}

.status.error {
  color: var(--status-error);
}

.footer {
  padding: 10px 20px;
  border-top: 1px solid var(--border);
  background: var(--panel);
  color: var(--muted);
  font-size: 12px;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-social {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.footer-social a {
  color: var(--muted);
  text-decoration: none;
}

.footer-social a:hover {
  color: var(--accent);
}

.footer-legal {
  font-size: 11px;
  color: var(--muted);
}

.output-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(12, 18, 22, 0.76);
  backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
  border-radius: 2px;
}

.output-overlay.active {
  opacity: 1;
  visibility: visible;
}

.output-loader {
  text-align: center;
  color: var(--overlay-text);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.loader-bars {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
}

.loader-bars span {
  width: 5px;
  height: 24px;
  background: var(--accent-2);
  border-radius: 1px;
  animation: barPulse 0.9s infinite ease-in-out;
}

.loader-bars span:nth-child(2) {
  animation-delay: 0.1s;
}

.loader-bars span:nth-child(3) {
  animation-delay: 0.2s;
}

.loader-bars span:nth-child(4) {
  animation-delay: 0.3s;
}

.loader-status {
  max-width: 280px;
}

.input-fullscreen .input-panel {
  position: fixed;
  inset: 12px;
  z-index: 20;
  border: 1px solid var(--border);
}

.input-fullscreen .output-panel,
.input-fullscreen .tool-info,
.input-fullscreen .batch,
.input-fullscreen .footer,
.input-fullscreen .topbar {
  opacity: 0;
  pointer-events: none;
}

.admin {
  background: var(--bg);
}

.admin-wrap {
  padding: 32px;
}

.admin-header h1 {
  margin-bottom: 4px;
}

.admin-table table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  border-radius: 4px;
  overflow: hidden;
}

.admin-table th,
.admin-table td {
  padding: 10px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 13px;
}

.admin-table thead {
  background: var(--panel-soft-3);
}

.admin-table a {
  color: var(--accent-3);
}

@keyframes barPulse {
  0%,
  100% {
    transform: scaleY(0.4);
    opacity: 0.5;
  }
  50% {
    transform: scaleY(1.1);
    opacity: 1;
  }
}

.cm-s-codecraft .CodeMirror-gutters {
  background: var(--panel-soft-4);
  border-right: 1px solid var(--border);
}

.cm-s-codecraft .CodeMirror-cursor {
  border-left: 1px solid var(--accent);
}

.cm-s-codecraft.CodeMirror {
  background: var(--code-bg);
  color: var(--ink);
}

.cm-s-codecraft .cm-keyword {
  color: var(--code-keyword);
  font-weight: 600;
}

.cm-s-codecraft .cm-string {
  color: var(--code-string);
}

.cm-s-codecraft .cm-comment {
  color: var(--code-comment);
  font-style: italic;
}

.cm-s-codecraft .cm-number {
  color: var(--code-number);
}

.cm-s-codecraft .cm-variable {
  color: var(--code-variable);
}

.cm-s-codecraft .cm-def {
  color: var(--code-def);
}

@media (max-width: 900px) {
  .workspace {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }

  .split-swap {
    position: static;
    transform: none;
    grid-column: 1 / -1;
    justify-self: center;
    margin: 10px 0;
  }

  .input-panel,
  .output-panel {
    border: none;
    border-bottom: 1px solid var(--border);
  }

  .topbar {
    flex-wrap: wrap;
  }

  .usage {
    text-align: left;
  }
}
.split-swap {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
}

.swap-btn {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.swap-btn svg {
  width: 18px;
  height: 18px;
  color: var(--accent-3);
}
