:root {
  color-scheme: dark;
  --bg: #141412;
  --panel: #20201c;
  --panel-2: #292820;
  --line: #3f3d33;
  --text: #f4f7fb;
  --muted: #aaa58f;
  --accent: #5dd4a7;
  --accent-2: #7db4ff;
  --danger: #ff7a7a;
  --warn: #ffd166;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
}

.login-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background: #141412;
}

.login-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: min(420px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.login-panel h1 {
  margin: 2px 0 0;
  font-size: 1.45rem;
}

.access-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 100vh;
  background: var(--bg);
}

.access-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: #181813;
}

.access-header h1 {
  margin: 2px 0 0;
  font-size: 1.2rem;
}

.access-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 18px;
  min-height: 0;
  padding: 18px;
  overflow: hidden;
}

.access-panel,
.access-output-panel {
  min-height: 0;
}

.access-library-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: auto;
}

.access-library-row {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  background: #171811;
}

.access-library-select {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 9px;
}

.access-library-select span,
.access-library-select strong {
  min-width: 0;
}

.access-library-select span {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.access-library-select small,
.access-library-select em {
  color: var(--muted);
  font-size: 0.78rem;
}

.access-alias-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  padding-left: 24px;
}

.access-alias-list label {
  gap: 4px;
  color: var(--muted);
  font-size: 0.72rem;
}

.access-alias-list input {
  min-height: 30px;
  padding: 5px 7px;
  text-transform: uppercase;
}

.access-output-panel textarea {
  flex: 1;
  min-height: 420px;
  resize: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  background: #10110d;
  color: var(--text);
  font-family: "Cascadia Mono", Consolas, "Courier New", monospace;
  line-height: 1.5;
}

button,
input,
textarea {
  font: inherit;
}

button,
.file-import {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #24231d;
  color: var(--text);
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease;
}

button:hover,
.file-import:hover {
  border-color: var(--accent-2);
  background: #2b2a23;
}

.app-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  height: 100vh;
  overflow: hidden;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  min-height: 0;
  padding: 18px;
  border-right: 1px solid var(--line);
  background: #191914;
  overflow: hidden;
}

.brand {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex: 0 0 auto;
  gap: 12px;
}

.brand h1,
.editor-header h2,
.panel h2 {
  margin: 0;
  letter-spacing: 0;
}

.brand h1 {
  font-size: 1.25rem;
}

.brand p,
.eyebrow {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.status-pill {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 5px 9px;
  color: var(--accent);
  font-size: 0.72rem;
}

.toolbar,
.split-buttons,
.header-actions,
menu {
  display: flex;
  gap: 8px;
}

.toolbar,
.project-panel {
  flex: 0 0 auto;
}

.sidebar > .brand {
  flex: 0 0 auto;
}

.header-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.toolbar button {
  width: 38px;
  font-weight: 700;
}

.toolbar #compactListButton {
  width: auto;
  flex: 1;
  padding: 0 10px;
}

.toolbar .active-tool {
  border-color: var(--accent);
  background: rgba(93, 212, 167, 0.14);
}

.file-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-right: 3px;
}

.file-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.file-group summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  margin: 8px 2px 2px;
  padding: 5px 4px;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0;
  list-style: none;
  text-transform: uppercase;
}

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

.file-group summary strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-group summary small {
  color: var(--accent);
  font-size: 0.72rem;
}

.file-group:not([open]) .collapse-arrow {
  transform: rotate(-90deg);
}

.file-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: start;
  gap: 8px;
  width: 100%;
  padding: 9px 10px;
  text-align: left;
}

.file-item span:first-child {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.file-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-item em {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.75rem;
  font-style: normal;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.load-state {
  width: fit-content;
  border: 1px solid rgba(93, 212, 167, 0.35);
  border-radius: 999px;
  padding: 2px 7px;
  color: var(--accent) !important;
  font-size: 0.68rem !important;
}

.load-state.disabled {
  border-color: rgba(255, 122, 122, 0.35);
  color: var(--danger) !important;
}

.file-item.active {
  border-color: var(--accent);
  background: rgba(93, 212, 167, 0.12);
}

.file-item small {
  color: var(--muted);
}

.file-sync-button {
  align-self: start;
  width: 24px;
  min-width: 24px;
  height: 24px;
  min-height: 24px;
  border-radius: 50%;
  padding: 0;
  border-color: rgba(125, 180, 255, 0.25);
  color: #bcd7ff;
  font-size: 0.68rem;
  font-weight: 800;
}

.file-sync-button.synced {
  border-color: rgba(93, 212, 167, 0.72);
  background: rgba(93, 212, 167, 0.2);
  color: var(--accent);
}

.compact-list {
  gap: 3px;
}

.compact-list .file-group {
  gap: 3px;
}

.compact-list .file-group h2 {
  margin-top: 5px;
  font-size: 0.68rem;
}

.compact-list .file-group summary {
  margin-top: 5px;
  font-size: 0.68rem;
}

.compact-list .file-item {
  align-items: center;
  min-height: 34px;
  padding: 5px 8px;
}

.compact-list .file-item span:first-child {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
}

.compact-list .file-item em,
.compact-list .mini-tags {
  display: none;
}

.compact-list .load-state {
  padding: 1px 6px;
  font-size: 0.62rem !important;
}

.mini-tags,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.mini-tags small,
.tag-row span {
  border: 1px solid rgba(125, 180, 255, 0.32);
  border-radius: 999px;
  padding: 2px 7px;
  background: rgba(125, 180, 255, 0.08);
  color: #bcd7ff;
  font-size: 0.7rem;
}

.tag-row .empty-tag {
  border-color: var(--line);
  background: transparent;
  color: var(--muted);
}

.user-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 120px;
  overflow: auto;
}

.user-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px auto;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 6px 8px;
  background: #171811;
  font-size: 0.8rem;
}

.user-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-row select,
.user-row button {
  min-height: 30px;
  font-size: 0.78rem;
}

.panel {
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--panel);
}

.panel h2 {
  font-size: 0.95rem;
}

.project-panel {
  gap: 7px;
  padding: 10px;
}

.project-panel label {
  gap: 4px;
  font-size: 0.7rem;
}

.project-panel input {
  min-height: 30px;
  padding: 5px 8px;
}

.project-panel .primary-save,
.project-panel #openWorkspaceButton {
  min-height: 31px;
  font-size: 0.76rem;
}

.project-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.project-heading button {
  min-height: 30px;
  padding: 0 10px;
}

.collapse-button {
  width: 30px;
  min-height: 28px;
  padding: 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1;
}

.project-advanced {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.primary-save {
  width: 100%;
  border-color: rgba(93, 212, 167, 0.45);
  background: rgba(93, 212, 167, 0.14);
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-size: 0.8rem;
}

.toggle-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: #171811;
}

.toggle-row span {
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: var(--text);
}

.toggle-row small {
  color: var(--muted);
}

.toggle-row input,
.load-row input {
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
}

input,
select,
.metadata-textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 9px 10px;
  background: #151510;
  color: var(--text);
}

.metadata-textarea {
  min-height: 92px;
  resize: vertical;
  outline: 0;
  line-height: 1.4;
}

.file-import {
  position: relative;
  display: grid;
  flex: 1;
  place-items: center;
  padding: 0 12px;
  color: var(--text);
}

.wide-import {
  min-height: 38px;
}

.file-import input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.split-buttons button {
  flex: 1;
}

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

.workspace-actions button,
.tool-nav button {
  min-width: 0;
  padding: 0 8px;
}

.tool-nav {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding-top: 2px;
}

.tool-nav button {
  min-height: 34px;
  font-size: 0.78rem;
}

.tool-nav .active-view {
  border-color: var(--accent);
  background: rgba(93, 212, 167, 0.14);
}

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

.workspace-status {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.workspace-status.problem {
  color: var(--warn);
}

.editor-area {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 20px;
  border-bottom: 1px solid var(--line);
  background: #181813;
}

.editor-header h2 {
  margin-top: 2px;
  font-size: 1.15rem;
}

.header-actions button {
  min-width: 86px;
  padding: 0 14px;
}

.header-actions .active-view {
  border-color: var(--accent);
  background: rgba(93, 212, 167, 0.14);
}

.header-actions .active-tool {
  border-color: var(--accent-2);
  background: rgba(125, 180, 255, 0.12);
}

.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.panel-actions {
  display: flex;
  gap: 7px;
}

.panel-actions button {
  min-height: 32px;
  padding: 0 9px;
  font-size: 0.78rem;
}

.collapsible-panel {
  display: block;
  padding: 0;
  overflow: hidden;
}

.panel-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  font-size: 0.95rem;
  font-weight: 700;
}

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

.collapse-arrow {
  color: var(--muted);
  font-size: 0.72rem;
  transition: transform 140ms ease;
}

.collapsible-panel:not([open]) .collapse-arrow {
  transform: rotate(-90deg);
}

.panel-body {
  display: flex;
  flex-direction: column;
  gap: 11px;
  padding: 0 12px 12px;
}

.version-actions {
  justify-content: stretch;
}

.version-actions button {
  flex: 1;
}

#insertEditorStandardButton {
  width: 100%;
}

.hidden {
  display: none !important;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.editor-wrap {
  position: relative;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  height: 100%;
  min-height: 0;
  background: #10110d;
  overflow: hidden;
}

.line-numbers,
.syntax-highlight,
#editor {
  padding: 44px 0 18px;
  font-family: "Cascadia Mono", Consolas, "Courier New", monospace;
  font-size: 15px;
  line-height: 1.65;
}

.line-numbers {
  overflow: hidden;
  border-right: 1px solid var(--line);
  color: #68768d;
  text-align: right;
  white-space: pre;
  user-select: none;
}

.syntax-highlight,
#editor {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding-left: 18px;
  padding-right: 22px;
  tab-size: 2;
}

.syntax-highlight {
  z-index: 0;
  margin: 0;
  overflow: hidden;
  color: #dce7d7;
  pointer-events: none;
}

#editor {
  z-index: 1;
  resize: none;
  border: 0;
  outline: 0;
  background: transparent;
  color: transparent;
  caret-color: #f4f7ef;
}

.editor-switch {
  position: absolute;
  top: 10px;
  left: 70px;
  z-index: 2;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  width: auto;
  border: 1px solid rgba(125, 180, 255, 0.24);
  border-radius: 999px;
  padding: 5px 9px 5px 6px;
  background: rgba(16, 17, 13, 0.94);
  color: var(--text);
  font-size: 0.74rem;
  line-height: 1;
  cursor: pointer;
}

.editor-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-track {
  position: relative;
  width: 30px;
  height: 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #151510;
}

.switch-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 140ms ease, background 140ms ease;
}

.editor-switch input:checked + .switch-track {
  border-color: rgba(93, 212, 167, 0.7);
  background: rgba(93, 212, 167, 0.18);
}

.editor-switch input:checked + .switch-track::after {
  transform: translateX(14px);
  background: var(--accent);
}

.editor-switch:focus-within {
  border-color: var(--accent-2);
}

.editor-find {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 3;
  width: min(320px, calc(100% - 92px));
}

.editor-find summary {
  display: block;
  width: max-content;
  margin-left: auto;
  border: 1px solid rgba(125, 180, 255, 0.22);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(16, 17, 13, 0.9);
  color: var(--muted);
  cursor: pointer;
  list-style: none;
  font-size: 0.72rem;
  font-weight: 700;
}

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

.editor-find[open] summary {
  border-color: var(--accent-2);
  color: var(--text);
}

.find-panel {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  border: 1px solid rgba(125, 180, 255, 0.26);
  border-radius: 6px;
  padding: 10px;
  background: rgba(24, 24, 19, 0.98);
  box-shadow: var(--shadow);
}

.find-panel label {
  gap: 4px;
  color: var(--muted);
  font-size: 0.72rem;
}

.find-panel input {
  min-height: 30px;
  padding: 5px 8px;
  font-size: 0.78rem;
}

.find-option {
  flex-direction: row;
  align-items: center;
  width: max-content;
}

.find-option input {
  min-height: auto;
}

.find-actions {
  display: grid;
  grid-template-columns: 0.7fr 1fr;
  gap: 7px;
}

.find-actions button {
  min-height: 30px;
  padding: 0 8px;
  font-size: 0.76rem;
}

.find-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.find-panel p.problem {
  color: var(--warn);
}

#editor.no-wrap {
  overflow-x: auto;
  white-space: pre;
}

#editor.wrap-lines {
  overflow-x: hidden;
  white-space: pre-wrap;
}

.syntax-highlight.no-wrap {
  white-space: pre;
}

.syntax-highlight.wrap-lines {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.syntax-keyword {
  color: #8fd4ff;
  font-weight: 700;
}

.syntax-string {
  color: #f1c97a;
}

.syntax-number {
  color: #a8e6a1;
}

.syntax-comment {
  color: #7d8a83;
  font-style: italic;
}

.syntax-paren {
  color: #f49fbc;
  font-weight: 700;
}

.editor-wrap-status {
  position: absolute;
  right: 12px;
  bottom: 10px;
  max-width: min(420px, calc(100% - 92px));
  border: 1px solid rgba(125, 180, 255, 0.28);
  border-radius: 999px;
  padding: 4px 9px;
  background: rgba(16, 17, 13, 0.9);
  color: var(--muted);
  font-size: 0.72rem;
  pointer-events: none;
}

.inspector {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  min-height: 0;
  max-height: 100%;
  padding: 16px;
  overflow: auto;
  border-left: 1px solid var(--line);
  background: #191914;
}

.inspector > .panel,
.inspector > .collapsible-panel {
  flex: 0 0 auto;
}

.version-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
}

.version-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #171811;
}

.version-open {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-height: 0;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.version-delete {
  min-height: 30px;
  align-self: start;
  border-color: rgba(255, 122, 122, 0.35);
  color: var(--danger);
}

.version-open time,
.version-open small {
  color: var(--muted);
  font-size: 0.75rem;
}

.command-list,
.alias-command-list,
.function-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.function-list {
  max-height: 240px;
  overflow: auto;
  padding-right: 3px;
}

.standard-function-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: auto;
}

.command-row,
.alias-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 96px;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #171811;
  color: var(--text);
}

.command-row span,
.alias-row span {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.command-row strong,
.alias-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.command-row small,
.alias-row small,
.function-jump small,
.section-heading p,
.empty-state {
  color: var(--muted);
  font-size: 0.78rem;
}

.function-jump {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 7px 9px;
  text-align: left;
}

.function-jump strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.standard-function-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}

.standard-select {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  min-height: 48px;
  text-align: left;
}

.standard-function-row.active .standard-select {
  border-color: var(--accent);
  background: rgba(93, 212, 167, 0.12);
}

.standard-select strong,
.standard-select small {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.standard-select small {
  color: var(--muted);
  font-size: 0.76rem;
}

.standard-insert {
  min-width: 72px;
  padding: 0 10px;
  font-size: 0.78rem;
}

.command-row input,
.alias-row input {
  text-align: center;
  text-transform: uppercase;
}

.alias-view,
.standards-view,
.users-view,
.loader-view,
.library-view {
  min-height: 0;
  overflow: auto;
  padding: 18px;
}

.alias-layout,
.standards-layout,
.users-layout,
.loader-layout,
.library-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
  min-height: 100%;
}

.loader-layout {
  grid-template-columns: minmax(320px, 0.85fr) minmax(300px, 1fr) minmax(300px, 1fr);
}

.library-layout {
  grid-template-columns: minmax(0, 1fr) 420px;
}

.standards-layout {
  grid-template-columns: minmax(320px, 0.8fr) minmax(360px, 1fr);
}

.users-layout {
  grid-template-columns: minmax(0, 760px);
}

.alias-panel,
.alias-output,
.standards-panel,
.standard-editor-panel,
.users-panel,
.loader-panel,
.loader-output,
.library-panel {
  min-height: 0;
}

.standard-editor-panel textarea {
  flex: 1;
  min-height: 360px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  background: #10110d;
  color: var(--text);
  font-family: "Cascadia Mono", Consolas, "Courier New", monospace;
  line-height: 1.55;
  tab-size: 2;
}

.standard-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 0.8fr;
  gap: 8px;
}

.user-create-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 10px;
}

.section-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.section-heading p {
  margin: 4px 0 0;
}

.alias-command-list,
.load-set-list,
.library-list {
  overflow: auto;
}

.load-set-list,
.library-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.load-row,
.library-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #171811;
  color: var(--text);
}

.library-row {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
}

.load-row span {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.library-row span {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.library-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.load-row strong,
.load-row small,
.library-row strong,
.library-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.load-row small,
.library-row small,
.library-row em {
  color: var(--muted);
}

.library-row em {
  display: -webkit-box;
  overflow: hidden;
  font-size: 0.78rem;
  font-style: normal;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.alias-output textarea,
.loader-output textarea {
  flex: 1;
  min-height: 420px;
  resize: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  background: #10110d;
  color: var(--text);
  font-family: "Cascadia Mono", Consolas, "Courier New", monospace;
  line-height: 1.5;
}

.alias-output button,
.loader-output button {
  width: 100%;
}

.check-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}

.check-row strong {
  color: var(--accent);
  font-size: 0.85rem;
}

.check-row strong.problem {
  color: var(--warn);
}

dialog {
  width: min(760px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.6);
}

dialog h2 {
  margin-top: 0;
}

pre {
  max-height: 50vh;
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #10110d;
  white-space: pre-wrap;
}

.syntax-highlight {
  max-height: none;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
}

menu {
  justify-content: flex-end;
  padding: 0;
  margin-bottom: 0;
}

.danger-button {
  border-color: rgba(255, 122, 122, 0.42);
  color: var(--danger);
}

@media (max-width: 960px) {
  .app-shell,
  .access-layout,
  .workspace,
  .alias-layout,
  .standards-layout,
  .loader-layout,
  .library-layout {
    grid-template-columns: 1fr;
  }

  .sidebar,
  .inspector {
    border: 0;
  }

  .workspace {
    grid-template-rows: minmax(52vh, 1fr) auto;
  }

  .editor-wrap {
    min-height: 52vh;
  }
}

@media (max-width: 620px) {
  .sidebar,
  .editor-header,
  .inspector {
    padding: 14px;
  }

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

  .header-actions button {
    flex: 1;
  }
}
