/* mango.onl — /editor chrome.
   Monaco paints the text area itself (its theme is built from these same
   tokens in js/editor/theme.js); everything here is the frame around it. */

.editor-body {
  overflow: hidden;           /* the panes scroll, the page never does */
  height: 100vh;
  height: 100dvh;
}

/* Several elements here are toggled with the `hidden` attribute but carry a
   display value of their own, which would otherwise win. Without this the
   drop overlay and the boot spinner never go away. */
.editor-body [hidden] { display: none !important; }

.ed {
  --top: 46px;
  --status: 26px;
  --side: 232px;
  --dock: 340px;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
}

/* ---------- top bar ---------- */

.ed-top {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  height: var(--top);
  flex: none;
  padding: 0 0.7rem;
  border-bottom: 1px solid var(--rim);
  background: var(--pane);
}

.ed-brand {
  font-family: var(--display);
  font-weight: 800;
  font-size: 0.98rem;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.ed-brand .wm-name { color: var(--text); }
.ed-brand .wm-tld { color: var(--skin); }
.ed-slash { color: var(--dim); }
.ed-where {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--muted);
}

.ed-tools {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: 1rem;
  min-width: 0;
  overflow: hidden;
}

.ed-sep {
  width: 1px;
  height: 18px;
  background: var(--rim);
  margin: 0 0.2rem;
}

.ed-btn {
  font-family: var(--body);
  font-size: 0.8rem;
  line-height: 1;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--rim);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}

.ed-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}

.ed-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.ed-btn-go {
  border-color: rgba(255, 158, 87, 0.35);
  background: rgba(255, 158, 87, 0.12);
  color: var(--skin);
}

.ed-btn-go:hover:not(:disabled) {
  background: rgba(255, 158, 87, 0.2);
  color: var(--skin);
}

.ed-who { margin-left: auto; display: flex; align-items: center; }

.ed-account {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--muted);
  text-decoration: none;
  padding: 0.35rem 0.6rem;
  border-radius: 8px;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ed-account:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.ed-account-out { color: var(--skin); }

.ed-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--leaf);
  flex: none;
}

.ed-icon {
  border: 0;
  background: none;
  color: var(--dim);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0.2rem 0.35rem;
  border-radius: 6px;
}

.ed-icon:hover { color: var(--text); background: rgba(255, 255, 255, 0.07); }

/* ---------- three-pane body ---------- */

.ed-main {
  flex: 1;
  display: flex;
  min-height: 0;
  position: relative;
}

.ed-side {
  width: var(--side);
  flex: none;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--rim);
  background: var(--ink);
  min-height: 0;
}

.ed-side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.4rem 0.5rem 0.75rem;
  border-bottom: 1px solid var(--rim);
}

.ed-side-title {
  font-size: 0.68rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Spelled out rather than an "x" icon: next to a file list, a bare x reads as
   "close this panel", and the one thing it must not be is ambiguous. */
.ed-side-clear {
  flex: none;
  border: 1px solid transparent;
  background: none;
  color: var(--dim);
  font-family: var(--body);
  font-size: 0.68rem;
  padding: 0.18rem 0.4rem;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}

.ed-side-clear:hover {
  color: #e8a294;
  border-color: rgba(224, 139, 122, 0.3);
  background: rgba(224, 139, 122, 0.1);
}

/* Inline rename: the filename span is swapped for this input in place. */
.ed-file-rename {
  flex: 1;
  min-width: 0;
  font-family: var(--mono);
  font-size: 0.76rem;
  padding: 0.05rem 0.25rem;
  border: 1px solid rgba(255, 158, 87, 0.5);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.4);
  color: var(--text);
}

.ed-file-rename:focus { outline: none; border-color: var(--skin); }

.ed-caret { font-size: 0.6em; opacity: 0.7; }

/* ---------- shared popup menu (file right-click, AI menu) ---------- */

.ed-menu {
  position: fixed;
  z-index: 60;
  min-width: 190px;
  padding: 0.3rem;
  border: 1px solid var(--rim);
  border-radius: 10px;
  background: var(--pane);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.95);
}

.ed-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  border: 0;
  background: none;
  color: var(--muted);
  font-family: var(--body);
  font-size: 0.79rem;
  text-align: left;
  padding: 0.42rem 0.55rem;
  border-radius: 7px;
  cursor: pointer;
}

.ed-menu-item:hover { background: rgba(255, 255, 255, 0.07); color: var(--text); }
.ed-menu-item:disabled { opacity: 0.4; cursor: not-allowed; }
.ed-menu-item:disabled:hover { background: none; color: var(--muted); }

.ed-menu-hint {
  font-family: var(--mono);
  font-size: 0.66rem;
  color: var(--dim);
}

.ed-menu-sep {
  height: 1px;
  margin: 0.28rem 0.4rem;
  background: var(--rim);
}

.ed-menu-head {
  font-size: 0.63rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--dim);
  padding: 0.35rem 0.55rem 0.2rem;
}

.ed-files {
  list-style: none;
  margin: 0;
  padding: 0.3rem 0;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.ed-file {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.33rem 0.5rem 0.33rem 0.75rem;
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--muted);
  cursor: pointer;
  border-left: 2px solid transparent;
}

.ed-file:hover { background: rgba(255, 255, 255, 0.04); color: var(--text); }

.ed-file.is-on {
  background: rgba(255, 158, 87, 0.08);
  border-left-color: var(--skin);
  color: var(--text);
}

.ed-file-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.ed-file-dirty {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--flesh);
  flex: none;
}

.ed-file-x {
  opacity: 0;
  border: 0;
  background: none;
  color: var(--dim);
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
  padding: 0 0.15rem;
}

.ed-file:hover .ed-file-x { opacity: 1; }
.ed-file-x:hover { color: var(--text); }

.ed-file-bad { color: #e08b7a; }

.ed-side-empty { padding: 0.9rem 0.85rem; color: var(--dim); font-size: 0.78rem; }
.ed-side-empty p { margin: 0 0 0.5rem; }
.ed-hint { font-size: 0.72rem; line-height: 1.5; }
.ed-hint code {
  font-family: var(--mono);
  background: rgba(255, 255, 255, 0.06);
  padding: 0.05em 0.3em;
  border-radius: 4px;
}

/* ---------- centre / monaco ---------- */

.ed-center {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}

.ed-monaco { flex: 1; min-height: 0; }

.ed-notice {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.6rem 0.45rem 0.85rem;
  font-size: 0.76rem;
  color: var(--flesh);
  background: rgba(243, 197, 102, 0.1);
  border-bottom: 1px solid rgba(243, 197, 102, 0.22);
}

.ed-notice-text { flex: 1; }

.ed-boot {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  color: var(--dim);
  font-size: 0.85rem;
  background: var(--ink);
  z-index: 5;
}

.ed-spin {
  width: 13px;
  height: 13px;
  border: 2px solid var(--rim);
  border-top-color: var(--skin);
  border-radius: 50%;
  animation: ed-spin 700ms linear infinite;
}

@keyframes ed-spin { to { transform: rotate(360deg); } }

/* ---------- right dock ---------- */

/* A body that folds away plus a rail of vertical tabs that never does. The
   rail replaced a "Panels" toolbar button, which was one more thing to find:
   now the way back to a panel is the tab with its name on it. */
.ed-dock {
  flex: none;
  display: flex;
  border-left: 1px solid var(--rim);
  background: var(--ink);
  min-height: 0;
  position: relative;
}

.ed-dock-body {
  width: var(--dock);
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}

.ed.dock-off .ed-dock-body,
.ed.dock-off .ed-dock-resize { display: none; }

.ed-dock-resize {
  position: absolute;
  left: -3px;
  top: 0;
  bottom: 0;
  width: 6px;
  cursor: col-resize;
  z-index: 5;
}
.ed-dock-resize:hover, .ed.is-resizing .ed-dock-resize { background: rgba(255, 158, 87, 0.25); }
.ed.is-resizing, .ed.is-resizing * { cursor: col-resize !important; user-select: none; }
/* Monaco would otherwise swallow the pointer mid-drag. */
.ed.is-resizing .ed-monaco { pointer-events: none; }

.ed-dock-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  height: 34px;
  flex: none;
  padding: 0 0.3rem 0 0.8rem;
  border-bottom: 1px solid var(--rim);
}

.ed-dock-title {
  font-size: 0.68rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--dim);
}

.ed-rail {
  width: 32px;
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.1rem;
  padding: 0.35rem 0;
  border-left: 1px solid var(--rim);
  background: var(--pane);
}
.ed.dock-off .ed-rail { border-left: 0; }

.ed-rail-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.6rem 0;
  border: 0;
  border-right: 2px solid transparent;
  background: none;
  color: var(--dim);
  font-family: var(--body);
  font-size: 0.72rem;
  cursor: pointer;
}
.ed-rail-tab span:first-child { writing-mode: vertical-rl; letter-spacing: 0.02em; }
.ed-rail-tab:hover { color: var(--text); background: rgba(255, 255, 255, 0.03); }
.ed-rail-tab.is-on { color: var(--text); border-right-color: var(--skin); }
.ed.dock-off .ed-rail-tab.is-on { border-right-color: transparent; }
.ed-rail-tab .ed-count { writing-mode: horizontal-tb; }

.ed-count {
  font-family: var(--mono);
  font-size: 0.66rem;
  padding: 0.05rem 0.32rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.ed-count.has-err { background: rgba(224, 139, 122, 0.18); color: #e8a294; }

.ed-panel { display: none; flex: 1; min-height: 0; flex-direction: column; }
.ed-panel.is-on { display: flex; }

.ed-filters {
  display: flex;
  gap: 0.75rem;
  padding: 0.45rem 0.7rem;
  font-size: 0.72rem;
  color: var(--dim);
  border-bottom: 1px solid var(--rim);
}

.ed-filters label { display: inline-flex; align-items: center; gap: 0.3rem; cursor: pointer; }
.ed-filters input { accent-color: var(--skin); margin: 0; }

.ed-diags {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.ed-diag {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.15rem 0.5rem;
  padding: 0.5rem 0.7rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  font-size: 0.76rem;
}

.ed-diag:hover { background: rgba(255, 255, 255, 0.04); }

.ed-diag-badge {
  font-family: var(--mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.1rem 0.34rem;
  border-radius: 4px;
  align-self: start;
  margin-top: 0.1rem;
}

.sev-error   { background: rgba(224, 139, 122, 0.18); color: #e8a294; }
.sev-warning { background: rgba(243, 197, 102, 0.16); color: var(--flesh); }
.sev-info    { background: rgba(143, 170, 100, 0.16); color: var(--leaf); }

.ed-diag-msg { color: var(--text); line-height: 1.45; }
.ed-diag-at {
  grid-column: 2;
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--dim);
}

.ed-diag-rule {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--dim);
}

.ed-empty { padding: 1rem 0.8rem; color: var(--dim); font-size: 0.78rem; margin: 0; }

/* ---------- AST ---------- */

.ed-astbar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid var(--rim);
}

.ed-input {
  font-family: var(--mono);
  font-size: 0.74rem;
  padding: 0.38rem 0.5rem;
  border-radius: 7px;
  border: 1px solid var(--rim);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  width: 100%;
  min-width: 0;
}

.ed-input:focus { outline: none; border-color: rgba(255, 158, 87, 0.45); }
.ed-input::placeholder { color: var(--dim); }

.ed-ast-hits {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--dim);
  white-space: nowrap;
}

.ed-tree {
  flex: 1;
  min-height: 0;
  overflow: auto;
  font-family: var(--mono);
  font-size: 0.73rem;
  position: relative;
}

/* Virtualised: an absolutely positioned window of rows inside a spacer sized
   to the full node count. A 10k-line file is ~100k nodes and rendering them
   all as DOM would hang the tab. */
.ed-tree-space { position: relative; width: 100%; }

.ed-node {
  position: absolute;
  left: 0;
  right: 0;
  height: 20px;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding-right: 0.5rem;
  white-space: nowrap;
  cursor: pointer;
  color: var(--muted);
}

.ed-node:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }
.ed-node.is-hit { background: rgba(255, 158, 87, 0.1); }

.ed-node-twist {
  width: 12px;
  flex: none;
  text-align: center;
  color: var(--dim);
  font-size: 0.6rem;
}

.ed-node-kind { color: var(--skin); }
.ed-node-label { color: var(--muted); }
.ed-node-pos { color: var(--dim); font-size: 0.66rem; margin-left: auto; }

/* ---------- bytecode ---------- */

.ed-bc { flex: 1; min-height: 0; overflow: auto; }

.ed-bc-opt {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  color: var(--dim);
  white-space: nowrap;
}

.ed-bc-opt input { accent-color: var(--skin); margin: 0; }
.ed-bc-select { width: auto; padding: 0.3rem 0.4rem; }

.ed-bc-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.72rem;
  color: var(--dim);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ed-bc-head b { color: var(--text); font-family: var(--mono); font-weight: 500; }

.ed-bc-levels {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ed-bc-level {
  font-family: var(--mono);
  font-size: 0.68rem;
  padding: 0.15rem 0.45rem;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
}

.ed-bc-level.is-on { background: rgba(255, 158, 87, 0.15); color: var(--skin); }
/* Bytes the optimiser saved, so it reads as a win rather than a warning. */
.ed-bc-level em { font-style: normal; color: var(--leaf); }

.ed-bc-hints {
  list-style: none;
  margin: 0;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ed-bc-hints li {
  padding: 0.3rem 0.75rem;
  font-size: 0.74rem;
  line-height: 1.45;
  color: var(--muted);
}

.ed-bc-hints li.is-click { cursor: pointer; }
.ed-bc-hints li.is-click:hover { background: rgba(255, 255, 255, 0.05); color: var(--text); }

.ed-bc-code { font-family: var(--mono); font-size: 0.72rem; padding: 0.3rem 0; }

.ed-bc-fn {
  padding: 0.5rem 0.75rem 0.25rem;
  color: var(--skin);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.ed-bc-code > :first-child { border-top: 0; }

/* The original line, shown above the instructions it produced. This pairing
   is the whole point of the panel: you see what your line actually cost. */
.ed-bc-src {
  display: flex;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem 0.15rem;
  color: var(--dim);
  cursor: pointer;
  white-space: pre;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ed-bc-src:hover { color: var(--muted); background: rgba(255, 255, 255, 0.04); }

.ed-bc-op {
  display: flex;
  gap: 0.5rem;
  padding: 0.06rem 0.75rem 0.06rem 1.6rem;
  cursor: pointer;
  white-space: pre;
}

.ed-bc-op:hover { background: rgba(255, 255, 255, 0.05); }

.ed-bc-ln {
  flex: none;
  width: 2.2em;
  text-align: right;
  color: #584f47;
  font-size: 0.66rem;
}

/* Jump target, shown before the instruction it labels. */
.ed-bc-label { color: var(--leaf); flex: none; min-width: 2.2em; }
.ed-bc-name { color: var(--flesh); flex: none; min-width: 9em; }
.ed-bc-args { color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ed-bc-note { padding: 0.1rem 0.75rem; color: var(--dim); }
.ed-bc-err { color: #e8a294; font-family: var(--mono); font-size: 0.7rem; }

/* ---------- stats ---------- */

.ed-stats { overflow-y: auto; flex: 1; min-height: 0; padding: 0.3rem 0; }

.ed-stat-group { border-bottom: 1px solid rgba(255, 255, 255, 0.05); padding: 0.55rem 0.75rem; }

.ed-stat-head {
  font-size: 0.66rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--dim);
  margin: 0 0 0.45rem;
}

.ed-stat-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.76rem;
  padding: 0.16rem 0;
  color: var(--muted);
}

.ed-stat-row b { color: var(--text); font-weight: 500; font-family: var(--mono); }
.ed-stat-row.is-click { cursor: pointer; }
.ed-stat-row.is-click:hover { color: var(--text); }
.ed-stat-row.is-click:hover b { color: var(--skin); }

/* ---------- status bar ---------- */

.ed-status {
  height: var(--status);
  flex: none;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 0.8rem;
  border-top: 1px solid var(--rim);
  background: var(--pane);
  font-family: var(--mono);
  font-size: 0.69rem;
  color: var(--dim);
}

.ed-st-spacer { flex: 1; }

.ed-tier {
  padding: 0.05rem 0.4rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
}

.ed-tier.is-reduced { background: rgba(243, 197, 102, 0.15); color: var(--flesh); }

/* ---------- drop target ---------- */

.ed-drop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(16, 12, 10, 0.82);
  backdrop-filter: blur(2px);
  pointer-events: none;
}

.ed-drop span {
  border: 2px dashed rgba(255, 158, 87, 0.55);
  color: var(--skin);
  padding: 2rem 3rem;
  border-radius: 16px;
  font-size: 1rem;
}

/* ---------- share modal ---------- */

.ed-modal {
  border: 1px solid var(--rim);
  border-radius: 14px;
  background: var(--pane);
  color: var(--text);
  padding: 0;
  width: min(460px, calc(100vw - 2rem));
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.95);
}

.ed-modal::backdrop { background: rgba(16, 12, 10, 0.7); }

.ed-modal-in { padding: 1.2rem 1.25rem 1rem; }

.ed-modal-title {
  font-family: var(--display);
  font-size: 1.15rem;
  margin: 0 0 0.35rem;
}

.ed-modal-sub { font-size: 0.82rem; color: var(--muted); margin: 0 0 1rem; line-height: 1.5; }

.ed-field { display: block; margin-bottom: 0.85rem; }
.ed-field > span {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 0.3rem;
}
.ed-field em { font-style: normal; text-transform: none; letter-spacing: 0; opacity: 0.7; }

.ed-share-list {
  max-height: 150px;
  overflow-y: auto;
  border: 1px solid var(--rim);
  border-radius: 8px;
  padding: 0.4rem 0;
  margin-bottom: 0.85rem;
  background: rgba(0, 0, 0, 0.2);
}

.ed-share-file {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.22rem 0.6rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
}

.ed-share-file b { color: var(--text); font-weight: 400; }
.ed-share-file.is-over { color: #e8a294; }

.ed-modal-err {
  font-size: 0.78rem;
  color: #e8a294;
  background: rgba(224, 139, 122, 0.12);
  border: 1px solid rgba(224, 139, 122, 0.28);
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  margin: 0 0 0.85rem;
  line-height: 1.45;
}

.ed-modal-done { margin-bottom: 0.5rem; }

.ed-modal-foot {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.6rem;
}

.ed-quota { font-size: 0.7rem; color: var(--dim); margin-right: auto; }

.cf-turnstile { margin-bottom: 0.85rem; min-height: 1px; }

/* ---------- narrow screens ----------
   Editing on a phone is not a thing we pretend to support: below 768px the
   panels fold away and Monaco is put in read-only mode by app.js. */

@media (max-width: 1080px) {
  .ed { --dock: 290px; --side: 190px; }
}

@media (max-width: 860px) {
  .ed-side { display: none; }
  .ed-dock { display: none; }
  .ed-menubar .ed-mb[data-menu="edit"], .ed-menubar .ed-mb[data-menu="go"], .ed-btn-cmd { display: none; }
  .ed-tools { margin-left: 0.5rem; }
  .ed-tools .ed-sep { display: none; }
  .ed-account { max-width: 110px; }
}

@media (max-width: 560px) {
  .ed-where, .ed-slash { display: none; }
  /* Save, Share and the rest are all in the File menu too. */
  .ed-tools { display: none; }
  .ed-menubar { margin-left: 0.3rem; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .ed-mb { padding: 0.4rem 0.4rem; }
  .ed-menubar { flex: 1; }
  /* Signed in: just the dot, still a link to the account page. */
  .ed-account:not(.ed-account-out) { font-size: 0; padding: 0.45rem; }
  .ed-menubar + .ed-tools + .ed-who, .ed-who { margin-left: auto; }
  .ed-btn { padding: 0.4rem 0.5rem; font-size: 0.74rem; }
}
