@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Serif:ital,wght@0,400;0,500;1,400&display=swap");

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --board: oklch(0.86 0.008 80);
  --paper: oklch(0.95 0.006 80);
  --panel: oklch(0.91 0.006 80);
  --border-subtle: oklch(0.83 0.008 80);
  --border-hard: oklch(0.68 0.012 80);
  --ink: oklch(0.16 0.005 60);
  --graphite: oklch(0.46 0.008 60);
  --draft-red: oklch(0.58 0.18 32);
  --draft-red-bg: oklch(0.89 0.05 32);
  --shadow-strong: 0 22px 60px -24px rgba(28, 22, 16, 0.45);
  --shadow-soft: 0 10px 32px -20px rgba(28, 22, 16, 0.35);
}

html {
  height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  background: var(--board);
  color: var(--ink);
  font-family: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 12px;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  margin: 0;
}

textarea::placeholder,
input::placeholder {
  color: color-mix(in srgb, var(--graphite) 70%, transparent);
}

::selection {
  background: var(--draft-red-bg);
  color: var(--draft-red);
}

[hidden] {
  display: none !important;
}

.sr-metrics {
  display: none;
}

.app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 18px;
  background: var(--panel);
  border: 1px solid var(--border-hard);
  min-height: 72px;
}

.app-topbar-left,
.app-topbar-right {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.app-topbar-right {
  margin-left: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.app-brand {
  font-family: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.05em;
  white-space: nowrap;
}

.app-divider {
  width: 1px;
  height: 28px;
  background: var(--border-hard);
  flex: 0 0 auto;
}

.app-label {
  display: block;
  margin-bottom: 4px;
  color: var(--graphite);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
}

.app-value {
  display: inline-flex;
  align-items: center;
  max-width: min(34vw, 420px);
  min-height: 40px;
  padding: 0 14px;
  background: var(--paper);
  border: 1px solid var(--border-subtle);
  font-size: 0.98rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-value[contenteditable="true"] {
  cursor: text;
  outline: none;
}

.app-value[contenteditable="true"]:focus {
  border-color: var(--draft-red);
  box-shadow: inset 0 -2px 0 var(--draft-red);
}

.app-save .app-value {
  max-width: none;
  min-height: auto;
  padding: 0;
  background: transparent;
  border: 0;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.95rem;
  font-weight: 500;
}

.toolbar-btn,
.toolbar-link,
.module-button,
.selection-chip,
.action-btn,
.filter-apply,
.last-removed-btn,
.tool-picker-close,
.dialog-close {
  appearance: none;
  border-radius: 0;
  border: 1px solid var(--border-subtle);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease, opacity 120ms ease;
}

.toolbar-btn:hover,
.toolbar-link:hover,
.module-button:hover,
.selection-chip:hover,
.action-btn:hover,
.filter-apply:hover,
.last-removed-btn:hover,
.tool-picker-close:hover,
.dialog-close:hover {
  border-color: var(--border-hard);
  background: color-mix(in srgb, var(--paper) 84%, var(--panel));
}

.toolbar-btn:disabled,
.toolbar-link:disabled,
.module-button:disabled,
.selection-chip:disabled,
.action-btn:disabled,
.filter-apply:disabled,
.last-removed-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.toolbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 0 14px;
  font-size: 0.86rem;
  font-weight: 500;
}

.toolbar-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--graphite);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.toolbar-link:hover {
  background: transparent;
  color: var(--ink);
}

.toolbar-shortcut {
  color: var(--graphite);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 14px;
  align-items: start;
  min-height: 0;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 0 12px 6px;
  color: color-mix(in srgb, var(--graphite) 72%, transparent);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.site-footer-label {
  opacity: 0.72;
}

.site-footer-link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.site-footer-link:hover,
.site-footer-link:focus-visible {
  color: var(--ink);
  border-bottom-color: currentColor;
}

.workspace-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.editor {
  display: flex;
  flex-direction: column;
  min-height: max(68vh, 620px);
  background: var(--paper);
  border: 1px solid var(--border-hard);
  overflow: hidden;
}

.editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  background: color-mix(in srgb, var(--paper) 56%, var(--panel));
  border-bottom: 1px solid var(--border-subtle);
}

.editor-header-group {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  min-width: 0;
}

.editor-stat {
  color: var(--graphite);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
}

.editor-stat strong {
  color: var(--ink);
  font-weight: 500;
}

.selection-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--panel);
  border-bottom: 1px solid var(--border-subtle);
}

.selection-toolbar-label {
  margin-right: 2px;
  color: var(--graphite);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.selection-chip {
  min-height: 32px;
  padding: 0 10px;
  font-size: 0.78rem;
  font-weight: 500;
}

textarea {
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  padding: 34px 42px;
  border: 0;
  outline: none;
  resize: none;
  background: var(--paper);
  color: var(--ink);
  font-family: "IBM Plex Serif", ui-serif, Georgia, serif;
  font-size: 1.08rem;
  line-height: 1.85;
}

.last-removed {
  min-height: 18px;
  padding: 0 16px 12px;
  background: var(--paper);
}

.privacy-note {
  padding: 10px 16px 0;
  background: var(--paper);
  color: var(--graphite);
  border-top: 1px solid var(--border-subtle);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.68rem;
  line-height: 1.45;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.last-removed-link {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
  color: var(--graphite);
  font-size: 0.82rem;
}

.last-removed-link.visible {
  display: flex;
}

.last-removed-btn {
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.8rem;
  font-weight: 500;
}

.language-output-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.language-card {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--border-hard);
}

.language-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.language-card-actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.language-card-actions .action-btn {
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.78rem;
}

.language-card-title {
  font-size: 1rem;
  font-weight: 600;
}

.language-status {
  margin-top: 6px;
  color: var(--graphite);
  font-size: 0.86rem;
  line-height: 1.5;
}

.language-preview {
  min-height: 120px;
  padding: 22px 24px;
  background: var(--paper);
  overflow: auto;
  color: var(--ink);
  font-family: "IBM Plex Serif", ui-serif, Georgia, serif;
  font-size: 1.02rem;
  line-height: 1.9;
  white-space: pre-wrap;
  word-break: break-word;
}

.language-placeholder {
  color: color-mix(in srgb, var(--graphite) 78%, transparent);
}

.language-preview ruby {
  ruby-align: center;
}

.language-preview rt {
  color: color-mix(in srgb, var(--graphite) 80%, var(--ink));
  font-size: 0.58em;
  letter-spacing: 0.02em;
}

.tool-rail {
  position: sticky;
  top: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: calc(100vh - 24px);
  overflow: auto;
  padding-right: 2px;
}

.module {
  background: var(--panel);
  border: 1px solid var(--border-hard);
}

.module-header {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.module-label,
.tool-picker-title,
.tool-group-title,
.language-mode-label {
  color: var(--graphite);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.module-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
}

.module-body-compact {
  gap: 6px;
  padding: 10px;
}

.module-grid {
  display: grid;
  gap: 8px;
}

.module-grid-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.language-tool-groups {
  gap: 9px;
}

.language-tool-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border: 1px solid color-mix(in srgb, var(--border-subtle) 72%, transparent);
  background: color-mix(in srgb, var(--paper) 48%, transparent);
}

.language-tool-group-label {
  color: var(--graphite);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.language-tool-group-note {
  color: var(--graphite);
  font-size: 0.74rem;
  line-height: 1.35;
}

.language-tool-group-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.language-tool-primary {
  min-height: 40px;
}

.language-tool-secondary {
  min-height: 34px;
  margin-left: 12px;
  width: calc(100% - 12px);
  border-style: dashed;
}

.module-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  text-align: left;
}

.module-button[data-tooltip]::after {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: calc(100% + 8px);
  z-index: 20;
  width: auto;
  min-width: 0;
  padding: 9px 11px;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid color-mix(in srgb, var(--ink) 78%, var(--paper));
  box-shadow: var(--shadow-soft);
  content: attr(data-tooltip);
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 120ms ease, transform 120ms ease;
  white-space: normal;
}

.module-button[data-tooltip]::before {
  position: absolute;
  left: 24px;
  bottom: calc(100% + 3px);
  z-index: 21;
  width: 10px;
  height: 10px;
  background: var(--ink);
  content: "";
  opacity: 0;
  pointer-events: none;
  transform: rotate(45deg) translateY(4px);
  transition: opacity 120ms ease, transform 120ms ease;
}

.module-button[data-tooltip]:hover::after,
.module-button[data-tooltip]:focus-visible::after,
.module-button[data-tooltip]:hover::before,
.module-button[data-tooltip]:focus-visible::before {
  opacity: 1;
  transform: translateY(0);
}

.module-button[data-tooltip]:hover::before,
.module-button[data-tooltip]:focus-visible::before {
  transform: rotate(45deg) translateY(0);
}

.module-button-label {
  min-width: 0;
  font-size: 0.94rem;
  font-weight: 500;
  line-height: 1.28;
}

.module-button-compact {
  min-height: 36px;
  padding: 8px 10px;
}

.module-button-compact .module-button-label {
  font-size: 0.8rem;
}

.module-shortcut {
  flex: 0 0 auto;
  color: var(--graphite);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
}

.module-log .module-body {
  padding-top: 10px;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 26px;
}

.history-empty,
.history-entry {
  color: var(--graphite);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.74rem;
  line-height: 1.45;
}

.history-entry {
  padding: 0;
  color: var(--ink);
}

.history-entry-current {
  color: var(--ink);
}

.tool-picker {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 72px 16px 16px;
  background: rgba(18, 14, 10, 0.32);
  backdrop-filter: blur(6px);
}

.tool-picker.is-open {
  display: flex;
}

.tool-menu {
  width: min(780px, 100%);
  background: var(--paper);
  border: 1px solid var(--border-hard);
  box-shadow: var(--shadow-strong);
}

.tool-search-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.tool-picker-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  font-size: 0.94rem;
}

.tool-search-shell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  margin: 16px;
  padding: 0 14px;
  background: var(--panel);
  border: 1px solid var(--border-subtle);
}

.tool-search-shell:focus-within {
  border-color: var(--border-hard);
}

.tool-search-icon {
  color: var(--graphite);
  font-size: 0.95rem;
}

.filter-input {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--border-subtle);
  background: var(--paper);
  outline: none;
  font-size: 0.9rem;
}

.tool-search-shell .filter-input {
  min-height: 50px;
  padding: 0;
  border: 0;
  background: transparent;
}

.filter-input:focus {
  border-color: var(--border-hard);
}

.tool-suggestions {
  max-height: min(42vh, 420px);
  overflow: auto;
  padding: 0 10px 14px;
}

.tool-group + .tool-group {
  margin-top: 10px;
}

.tool-group-title {
  padding: 8px 8px 6px;
}

.tool-suggestion,
.tool-suggestion-empty {
  width: 100%;
  text-align: left;
}

.tool-suggestion {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.tool-suggestion:hover,
.tool-suggestion.active {
  background: var(--panel);
}

.tool-suggestion-icon {
  flex: 0 0 auto;
  width: 28px;
  color: var(--graphite);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.9rem;
  line-height: 1.4;
  text-align: center;
}

.tool-suggestion-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.tool-suggestion-label {
  font-size: 0.92rem;
  font-weight: 500;
}

.tool-suggestion-desc,
.tool-suggestion-empty,
.tool-panel-description,
.tool-note,
.override-item-reading,
.override-empty {
  color: var(--graphite);
  font-size: 0.82rem;
  line-height: 1.5;
}

.tool-suggestion-empty {
  padding: 18px 12px 12px;
}

.tool-workspace {
  padding: 0 16px 16px;
  max-height: min(74vh, 760px);
  overflow: auto;
}

.tool-panel {
  background: var(--paper);
  border: 1px solid var(--border-subtle);
  padding: 16px;
}

.tool-panel-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.tool-panel-eyebrow {
  color: var(--graphite);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.tool-panel-title {
  font-size: 1rem;
  font-weight: 600;
}

.tool-panel-actions,
.tool-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.language-sidebar-section .tool-panel-actions {
  padding-top: 10px;
}

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

.tool-row-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.action-btn,
.filter-apply {
  min-height: 40px;
  padding: 0 12px;
  font-size: 0.84rem;
  font-weight: 500;
}

.action-btn-primary {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.action-btn-primary:hover {
  background: color-mix(in srgb, var(--ink) 90%, white);
  border-color: color-mix(in srgb, var(--ink) 90%, white);
}

.action-btn-command {
  min-height: 54px;
  justify-content: center;
  box-shadow: var(--shadow-soft);
  font-size: 0.94rem;
  letter-spacing: 0.02em;
}

.filter-tool {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.filter-toggle,
.language-mode-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-toggle button,
.language-mode-row .action-btn {
  flex: 1 1 auto;
}

.filter-toggle button.active,
.language-mode-row .action-btn.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.filter-input-row {
  display: flex;
  gap: 8px;
}

.language-mode-label {
  margin: 14px 0 8px;
}

.language-mode-label:first-of-type {
  margin-top: 0;
}

.recommended-language {
  border-color: color-mix(in srgb, var(--draft-red) 55%, var(--border-hard));
}

.inactive-language {
  opacity: 0.74;
}

.override-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.override-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--border-subtle);
}

.override-item-content {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.override-item-source {
  font-size: 0.9rem;
  font-weight: 500;
}

.override-remove {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--draft-red);
  cursor: pointer;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hidden-file-input {
  display: none;
}

.dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(18, 14, 10, 0.34);
  opacity: 0;
  visibility: hidden;
  transition: opacity 140ms ease, visibility 140ms ease;
}

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

.dialog {
  display: flex;
  flex-direction: column;
  width: min(560px, 100%);
  max-height: min(76vh, 760px);
  background: var(--paper);
  border: 1px solid var(--border-hard);
  box-shadow: var(--shadow-soft);
}

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

.dialog-title {
  font-size: 0.95rem;
  font-weight: 600;
}

.dialog-count {
  color: var(--graphite);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  font-weight: 500;
}

.dialog-close {
  width: 34px;
  height: 34px;
  padding: 0;
}

.dialog-body {
  overflow: auto;
  padding: 14px 16px 16px;
}

.dialog-line {
  padding: 7px 10px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.82rem;
  line-height: 1.5;
  word-break: break-word;
}

.dialog-line:nth-child(odd) {
  background: color-mix(in srgb, var(--paper) 72%, var(--panel));
}

.dialog-empty {
  color: var(--graphite);
  font-size: 0.84rem;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 50;
  max-width: min(520px, calc(100vw - 24px));
  padding: 12px 18px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.86rem;
  line-height: 1.45;
  box-shadow: var(--shadow-soft);
  transform: translate(-50%, 18px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease, transform 140ms ease;
}

.toast.show {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.toast a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  margin-left: 10px;
  cursor: pointer;
}

@media (max-width: 1100px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr) 320px;
  }

  textarea {
    padding: 28px 30px;
  }
}

@media (max-width: 980px) {
  body {
    padding: 10px;
  }

  .app-topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .app-topbar-left,
  .app-topbar-right {
    flex-wrap: wrap;
  }

  .app-topbar-right {
    margin-left: 0;
    justify-content: flex-start;
  }

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

  .tool-rail {
    position: static;
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 720px) {
  .app-divider {
    display: none;
  }

  .app-buffer,
  .app-save {
    width: 100%;
  }

  .app-value {
    width: 100%;
    justify-content: flex-start;
  }

  .editor {
    min-height: 56vh;
  }

  .editor-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .editor-header-group {
    gap: 16px;
  }

  .selection-toolbar {
    flex-wrap: wrap;
  }

  textarea {
    padding: 24px 22px;
    font-size: 1rem;
  }

  .module-grid-two,
  .tool-row,
  .tool-row-three {
    grid-template-columns: 1fr;
  }

  .filter-input-row {
    flex-direction: column;
  }

  .tool-picker {
    padding-top: 54px;
  }

  .tool-search-shell {
    margin: 12px;
  }

  .tool-workspace {
    padding: 0 12px 12px;
  }

  .dialog-overlay {
    padding: 12px;
  }
}
