/*
 * Liteleaf interface theme.
 * SPDX-License-Identifier: AGPL-3.0-or-later
 *
 * Color, spacing and radius foundations are adapted from Overleaf Community
 * Edition, services/web/frontend/stylesheets/foundations, AGPL-3.0.
 * Copyright belongs to the respective Overleaf contributors.
 * Page selectors below adapt those foundations to Liteleaf's independent HTML.
 */

:root {
  --white: #fff;
  --neutral-10: #f4f5f6;
  --neutral-20: #e7e9ee;
  --neutral-30: #d0d5dd;
  --neutral-40: #afb5c0;
  --neutral-50: #8d96a5;
  --neutral-60: #677283;
  --neutral-70: #495365;
  --neutral-80: #2f3a4c;
  --neutral-90: #1b222c;
  --green-10: #edf7fa;
  --green-20: #b4dbe5;
  --green-30: #82c2d2;
  --green-40: #4ba2b9;
  --green-50: #287f9c;
  --green-60: #166782;
  --green-70: #12546b;
  --blue-10: #f1f4f9;
  --blue-30: #97b6e5;
  --blue-50: #366cbf;
  --blue-60: #28518f;
  --red-10: #f9f1f1;
  --red-40: #e36d66;
  --red-50: #b83a33;
  --yellow-10: #fcf1e3;
  --yellow-40: #de8014;
  --spacing-01: 2px;
  --spacing-02: 4px;
  --spacing-03: 6px;
  --spacing-04: 8px;
  --spacing-05: 12px;
  --spacing-06: 16px;
  --spacing-07: 20px;
  --spacing-08: 24px;
  --spacing-09: 32px;
  --border-radius-base: 4px;
  --border-radius-medium: 8px;
  --border-radius-large: 16px;
  --border-radius-full: 9999px;
  --content-primary: var(--neutral-90);
  --content-secondary: var(--neutral-70);
  --border-divider: var(--neutral-20);
  --link-web: var(--green-60);
  --link-ui: var(--blue-50);
  --focus-ring: 0 0 0 3px rgb(54 108 191 / 24%);
  font-family: Inter, "Noto Sans", "Segoe UI", Arial, sans-serif;
  color-scheme: light;
}


* { box-sizing: border-box; }
button, input, select, textarea { font-family: inherit; }
button, [role="button"], summary { transition: background-color .12s ease, border-color .12s ease, color .12s ease; }
:focus-visible { outline: 2px solid var(--blue-50); outline-offset: 1px; box-shadow: var(--focus-ring); }

/* Project dashboard: compact, flat and table-oriented. */
.project-list-page {
  margin: 0;
  min-height: 100vh;
  background: var(--white);
  color: var(--content-primary);
  font-size: 14px;
}
.project-list-page .navbar {
  height: 68px;
  padding: 0 var(--spacing-08);
  border-bottom: 0;
  background: var(--white);
  box-shadow: none;
}
.project-list-page .brand { color: var(--green-60); font-size: 20px; font-weight: 700; }
.project-list-page .navbar button {
  min-height: 32px;
  padding: var(--spacing-03) var(--spacing-05);
  border-radius: var(--border-radius-base);
  font-size: 13px;
}
.project-list-page .navbar > * { flex: 0 0 auto; }
.project-list-page .navbar-spacer { flex: 1 1 auto; min-width: var(--spacing-04); }
.project-list-page .account-email { max-width: 14rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-list-page .layout { min-height: calc(100vh - 68px); grid-template-columns: 216px minmax(0, 1fr); background: var(--white); }
.project-list-page .layout > aside {
  min-width: 0;
  padding: var(--spacing-09) var(--spacing-06);
  border-right: 0;
  background: var(--white);
}
.project-list-page aside nav a {
  min-height: 36px;
  padding: var(--spacing-04) var(--spacing-05);
  border-radius: var(--border-radius-base);
  color: var(--content-primary);
  font-size: 14px;
}
.project-list-page aside nav a:hover { background: var(--neutral-20); }
.project-list-page aside nav a[aria-current="page"] { background: var(--neutral-20); color: var(--content-primary); font-weight: 700; }
.project-list-page .new-project {
  margin-top: var(--spacing-08);
  padding-top: var(--spacing-06);
  border-top: 1px solid var(--neutral-30);
}
.project-list-page .new-project label { color: var(--content-secondary); font-size: 12px; text-transform: uppercase; }
.project-list-page main {
  min-width: 0;
  padding: var(--spacing-09) clamp(24px, 3vw, 40px);
  border: 1px solid var(--border-divider);
  border-right: 0;
  border-bottom: 0;
  border-radius: var(--border-radius-large) 0 0 0;
  background: var(--neutral-10);
}
.project-list-page .content { width: 100%; max-width: none; margin: 0; }
.project-list-page .catalog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--spacing-07); }
.project-list-page .navbar-spacer { flex: 1; }
.project-list-page .navbar > a { color: var(--content-primary); text-decoration: none; }
.project-list-page .navbar form { margin: 0; }
.project-list-page .create-menu { position: relative; margin-bottom: var(--spacing-07); }
.project-list-page .create-menu > summary { display: flex; justify-content: space-between; padding: 9px 12px; border-radius: var(--border-radius-base); background: var(--green-50); color: #fff; font-weight: 600; cursor: pointer; }
.project-list-page .create-menu .dropdown { left: 0; right: auto; width: 100%; }
.project-list-page .page-head { margin-bottom: var(--spacing-08); }
.project-list-page h1 { font-size: 24px; line-height: 32px; font-weight: 600; }
.project-list-page .page-head p { margin: var(--spacing-02) 0 0; color: var(--content-secondary); }
.project-list-page input,
.project-list-page select {
  min-height: 36px;
  padding: var(--spacing-04) var(--spacing-05);
  border: 1px solid var(--neutral-40);
  border-radius: var(--border-radius-base);
  background: var(--white);
  color: var(--content-primary);
}
.project-list-page button {
  min-height: 36px;
  padding: var(--spacing-04) var(--spacing-06);
  border: 1px solid var(--green-50);
  border-radius: var(--border-radius-base);
  background: var(--green-50);
  color: var(--white);
  font-weight: 600;
}
.project-list-page button:hover { background: var(--green-60); border-color: var(--green-60); }
.project-list-page button.secondary { border-color: var(--neutral-30); background: var(--white); color: var(--content-primary); }
.project-list-page .project-toolbar { min-height: 40px; margin-bottom: var(--spacing-05); gap: var(--spacing-04); }
.project-list-page .project-toolbar { display: flex; min-width: 0; align-items: center; }
.project-list-page .project-toolbar input[type="search"] { width: min(42rem, 48vw); max-width: 100%; }
.project-list-page .projects { overflow: visible; border: 0; border-radius: 0; background: var(--white); }
.project-list-page .project-row {
  min-height: 58px;
  grid-template-columns: minmax(0, 1fr) 100px 120px;
  padding: var(--spacing-05) var(--spacing-04);
  border-top: 1px solid var(--border-divider);
  border-bottom: 0;
  gap: var(--spacing-06);
}
.project-list-page .project-row:last-child { border-bottom: 1px solid var(--border-divider); }
.project-list-page .project-row:hover { background: var(--neutral-10); }
.project-list-page .project-row label { margin: 0; }
.project-list-page .project-row a { color: var(--link-ui); font-weight: 600; text-decoration: none; }
.project-list-page .project-row a:hover { color: var(--blue-60); text-decoration: underline; }
.project-list-page .project-meta { margin: var(--spacing-02) 0 0 24px; color: var(--content-secondary); font-size: 12px; }
.project-list-page .project-role { color: var(--content-secondary); font-size: 13px; }
.project-list-page .project-actions button,
.project-list-page .project-actions a { min-height: 28px; padding: var(--spacing-02) var(--spacing-04); }
.project-list-page .project-table-container { border: 1px solid var(--border-divider); border-radius: var(--border-radius-base); background: var(--white); overflow-x: auto; }
.project-list-page .project-table { width: 100%; min-width: 680px; border-collapse: collapse; table-layout: fixed; }
.project-list-page .project-table th:first-child { width: auto; }
.project-list-page .project-table th:nth-child(2) { width: 18%; }
.project-list-page .project-table th:nth-child(3) { width: 22%; }
.project-list-page .project-table th:last-child { width: 184px; }
.project-list-page .project-table th,
.project-list-page .project-table td { padding: var(--spacing-05); border-bottom: 1px solid var(--border-divider); text-align: left; }
.project-list-page .project-table tbody tr:hover { background: var(--neutral-10); }
.project-list-page .project-table th:last-child,
.project-list-page .project-table td:last-child { text-align: right; }
.project-list-page .title-select { display: flex; min-width: 0; align-items: center; gap: var(--spacing-04); margin: 0; }
.project-list-page .title-select > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-list-page .title-select > span > a { display: inline; }
.project-list-page .project-table td { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-list-page .project-actions { display: flex; justify-content: flex-end; gap: var(--spacing-02); }
.project-list-page .icon-button { display: inline-grid; width: 32px; height: 32px; min-height: 32px; place-items: center; padding: 6px; border: 1px solid transparent; border-radius: var(--border-radius-base); background: transparent; color: var(--content-secondary); }
.project-list-page .icon-button:hover { border-color: var(--neutral-30); background: var(--neutral-10); color: var(--content-primary); }
.project-list-page .icon-button.danger:hover { color: var(--red-50); }
.project-list-page .icon-button svg { width: 18px; height: 18px; fill: currentColor; }
.project-list-page .bulk-toolbar { display: flex; justify-content: flex-end; align-items: center; gap: var(--spacing-03); margin: var(--spacing-04) 0; }
.project-list-page .bulk-toolbar[hidden] { display: none; }
.project-list-page dialog { width: min(520px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--neutral-30); border-radius: var(--border-radius-large); background: var(--white); color: var(--content-primary); box-shadow: 0 20px 60px rgb(0 0 0 / 28%); }
.project-list-page dialog::backdrop { background: rgb(27 34 44 / 55%); }
.project-list-page dialog form { padding: var(--spacing-08); }
.project-list-page dialog header,
.project-list-page dialog footer { display: flex; align-items: center; justify-content: space-between; gap: var(--spacing-05); }
.project-list-page dialog footer { justify-content: flex-end; margin-top: var(--spacing-07); }
.project-list-page .dialog-close { border: 0; background: transparent; color: var(--content-primary); font-size: 24px; }
.project-list-page .drop-zone { display: grid; min-height: 220px; place-items: center; align-content: center; gap: var(--spacing-05); padding: var(--spacing-08); border: 2px dashed var(--neutral-40); border-radius: var(--border-radius-medium); text-align: center; }
.project-list-page .drop-zone.dragging { border-color: var(--green-50); background: var(--green-10); }

.settings-page,
.admin-page { background: var(--neutral-10) !important; color: var(--content-primary) !important; }
.settings-page .navbar,
.admin-page > header { background: var(--white) !important; color: var(--content-primary) !important; border-bottom: 1px solid var(--border-divider); }
.settings-page aside,
.admin-page aside { background: var(--white) !important; border-color: var(--border-divider) !important; }
.settings-page .card,
.admin-page .card { background: var(--white) !important; border-color: var(--border-divider) !important; box-shadow: none !important; border-radius: var(--border-radius-large) !important; }
.settings-page input,
.settings-page select,
.admin-page input,
.admin-page select { background: var(--white); color: var(--content-primary); border-color: var(--neutral-40); }
.settings-page aside a[aria-current="page"],
.admin-page aside a[aria-current="page"] { background: var(--neutral-20) !important; color: var(--content-primary) !important; }
.project-list-page .dropdown {
  width: min(22rem, calc(100vw - 16px));
  max-height: calc(100vh - 84px);
  overflow: auto;
  margin-top: var(--spacing-02);
  padding: var(--spacing-04);
  border: 1px solid var(--neutral-30);
  border-radius: var(--border-radius-medium);
  background: var(--white);
  box-shadow: 0 8px 24px rgb(27 34 44 / 16%);
}
.project-list-page .dropdown a:hover,
.project-list-page .dropdown button:hover { background: var(--neutral-10); color: var(--content-primary); }

/* IDE: dark chrome, 40px toolbar and uninterrupted working panes. */
.ide-page { margin: 0; background: var(--neutral-90); color: var(--neutral-10); font-size: 13px; }
.ide-page .topbar {
  min-height: 40px;
  height: 40px;
  padding: 0 var(--spacing-02);
  gap: var(--spacing-05);
  border-bottom: 1px solid var(--neutral-70);
  background: var(--neutral-90);
  color: var(--neutral-10);
  overflow: visible;
}
.ide-page .identity { flex: 1 1 0; overflow: hidden; }
.ide-page .actions { flex: 1 1 0; justify-content: flex-end; overflow: visible; }
.ide-page .identity > *, .ide-page .actions > * { min-width: 0; flex: 0 0 auto; }
.ide-page .menu-bar { min-width: 0; overflow: hidden; }
.ide-page .identity > a { order: 2; }
.ide-page .identity > .menu-bar { order: 1; }
.ide-page .menu-bar > .toolbar-menu:first-child > summary { width: 64px; overflow: hidden; font-size: 0; white-space: nowrap; }
.ide-page .menu-bar > .toolbar-menu:first-child > summary::before { content: "☘  Menu"; font-size: 12px; }
.ide-page .topbar a { color: var(--neutral-10); text-decoration: none; }
.ide-page .identity { height: 100%; gap: var(--spacing-04); }
.ide-page .identity > a {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: var(--border-radius-full);
  font-size: 18px;
}
.ide-page .identity > a:hover { background: var(--neutral-80); }
.ide-page .identity h1 { max-width: 260px; font-size: 13px; font-weight: 600; }
.ide-page .project-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ide-page .menu-bar,
.ide-page .actions { height: 100%; gap: var(--spacing-02); }
.ide-page .toolbar-menu summary,
.ide-page .actions > a {
  display: flex;
  height: 28px;
  align-items: center;
  margin: 6px 0;
  padding: var(--spacing-02) var(--spacing-04);
  border-radius: var(--border-radius-base);
  color: var(--neutral-10);
  font-weight: 400;
  white-space: nowrap;
}
.ide-page .toolbar-menu summary:hover,
.ide-page .actions > a:hover { background: var(--neutral-70); }
.ide-page .actions button {
  min-height: 28px;
  padding: var(--spacing-03) var(--spacing-05);
  border: 0;
  border-radius: var(--border-radius-base);
  background: var(--green-50);
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
}
.ide-page .toolbar-dropdown {
  top: 38px;
  width: min(24rem, calc(100vw - 16px));
  max-width: calc(100vw - 16px);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: var(--spacing-04);
  border: 1px solid var(--neutral-60);
  border-radius: var(--border-radius-medium);
  background: var(--neutral-80);
  color: var(--neutral-10);
  box-shadow: 0 8px 24px rgb(0 0 0 / 35%);
}
.ide-page .toolbar-dropdown a:hover,
.ide-page .toolbar-dropdown button:hover { background: var(--neutral-70); }
.ide-page .toolbar-dropdown input,
.ide-page .toolbar-dropdown select,
.ide-page .toolbar-dropdown textarea,
.ide-page .toolbar-dropdown code,
.ide-page .toolbar-dropdown li,
.ide-page .toolbar-dropdown small { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.ide-page .actions > a { display: none; }
.ide-page .actions > .toolbar-menu > .toolbar-dropdown { right: 0; left: auto; }
.ide-page .account-menu > summary { max-width: 8rem; overflow: hidden; text-overflow: ellipsis; }
.ide-page #assistant-menu[open] .assistant-dropdown,
.ide-page #history-menu[open] .assistant-dropdown { top: 40px; background: var(--neutral-80); border-color: var(--neutral-70); }
.ide-page .workspace { height: calc(100vh - 40px); background: var(--neutral-90); }
.ide-page .panel { background: var(--neutral-90); color: var(--neutral-10); }
.ide-page .tree,
.ide-page .editor-panel { border-right: 1px solid var(--neutral-70); }
.ide-page .tree { width: 230px; background: var(--neutral-80); }
.ide-page .tree-toolbar { overflow: visible; }
.ide-page .file-actions-menu { margin-left: auto; }
.ide-page .file-actions-menu > summary,
.ide-page .current-file-actions > summary { display: grid; width: 28px; height: 28px; place-items: center; padding: 0; font-size: 18px; }
.ide-page .file-actions-menu .toolbar-dropdown { width: min(22rem, calc(100vw - 16px)); }
.ide-page .file-create { display: grid; gap: var(--spacing-04); margin: 0; padding: var(--spacing-04); }
.ide-page .file-create + .file-create { border-top: 1px solid var(--neutral-60); }
.ide-page .file-create label { overflow-wrap: anywhere; }
.ide-page .file-create input { min-width: 0; width: 100%; }
.ide-page .editor-panel { position: relative; }
.ide-page .current-file-actions { position: static; z-index: 6; margin-left: var(--spacing-02); }
.ide-page .current-file-actions .toolbar-dropdown { right: 0; left: auto; width: min(22rem, calc(100vw - 16px)); }
.ide-page .current-file-actions form { display: grid; gap: var(--spacing-04); padding: var(--spacing-04); }
.ide-page .current-file-actions input { min-width: 0; width: 100%; }
.ide-page .editor-panel > .panel-heading { overflow: visible; }
.ide-page .editor-panel > .panel-heading h2 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ide-page .editor-panel > .panel-heading small { margin-left: auto; white-space: nowrap; }
.ide-page .editor-panel > .panel-heading #assistant-menu { flex: 0 0 auto; }
.ide-page .editor-panel > .panel-heading #assistant-menu > summary { display: grid; width: 28px; height: 28px; place-items: center; padding: 0; overflow: hidden; font-size: 0; }
.ide-page .editor-panel > .panel-heading #assistant-menu > summary::before { content: "✦"; font-size: 15px; }
.ide-page .editor-panel > .panel-heading #assistant-menu[open] .assistant-dropdown { position: absolute; top: 35px; right: 0; bottom: auto; left: auto; width: min(30rem, calc(100vw - 16px)); max-height: calc(100vh - 84px); border-radius: var(--border-radius-medium); }
.ide-page .panel-heading {
  min-height: 36px;
  padding: var(--spacing-04) var(--spacing-05);
  border-bottom: 1px solid var(--neutral-70);
  background: var(--neutral-80);
}
.ide-page .panel-heading h2 { font-size: 12px; font-weight: 600; }
.ide-page .files { padding: var(--spacing-04); }
.ide-page .files li {
  min-height: 30px;
  padding: var(--spacing-03) var(--spacing-05);
  border-radius: var(--border-radius-base);
  background: transparent;
  font-family: Inter, "Noto Sans", sans-serif;
  font-size: 13px;
}
.ide-page .files li:hover { background: var(--neutral-70); }
.ide-page .files li[aria-current="true"] { background: var(--neutral-70); }
.ide-page .files a { color: var(--neutral-10); text-decoration: none; }
.ide-page .editor-tabs { min-height: 36px; border-bottom: 1px solid var(--neutral-70); background: var(--neutral-80); }
.ide-page .editor-tabs a {
  padding: 9px var(--spacing-06);
  border-right: 1px solid var(--neutral-70);
  color: var(--neutral-30);
  font-family: Inter, "Noto Sans", sans-serif;
  font-size: 12px;
}
.ide-page .editor-tabs a[aria-current="page"] { background: var(--neutral-90); color: var(--white); font-weight: 600; }
.ide-page .editor-search { min-height: 38px; border-bottom: 1px solid var(--neutral-70); background: var(--neutral-80); }
.ide-page .editor-search input,
.ide-page .toolbar-dropdown input,
.ide-page .toolbar-dropdown textarea,
.ide-page .toolbar-dropdown select {
  border: 1px solid var(--neutral-60);
  border-radius: var(--border-radius-base);
  background: var(--neutral-90);
  color: var(--neutral-10);
}
.ide-page textarea[name="content"] {
  padding: 18px 20px;
  background: #202733;
  color: #edf0f4;
  caret-color: var(--white);
  font: 14px/1.55 "Source Code Pro", "SFMono-Regular", Consolas, monospace;
}
.ide-page .editor-footer { min-height: 34px; padding: var(--spacing-03) var(--spacing-05); border-color: var(--neutral-70); background: var(--neutral-80); }
.ide-page .pdf-panel { position: relative; overflow: hidden; background: var(--neutral-80); }
.ide-page .pdf-frame { background: #525966; }
.ide-page .pdf-viewer { flex: 1; min-height: 0; overflow: auto; background: #525966; }
.ide-page .pdf-content, .ide-page .pdf-view { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.ide-page .pdf-view[hidden], .ide-page .compile-logs[hidden] { display: none; }
.ide-page .pdf-pages { display: grid; justify-items: center; gap: 16px; min-width: min-content; padding: 16px; }
.ide-page .pdf-pages canvas { display: block; background: #fff; box-shadow: 0 2px 12px rgb(0 0 0 / 38%); }
.ide-page .pdf-toolbar button { min-height: 26px; padding: var(--spacing-02) var(--spacing-04); background: var(--neutral-70); }
.ide-page .pdf-panel-heading { min-width: 0; flex: 0 0 36px; padding: var(--spacing-03) var(--spacing-04); overflow: hidden; }
.ide-page .pdf-primary-actions { width: 100%; min-width: 0; flex-wrap: nowrap; }
.ide-page #compile-button { min-height: 26px; padding: var(--spacing-02) var(--spacing-06); border-radius: var(--border-radius-full); white-space: nowrap; }
.ide-page .pdf-tool-button { position: relative; min-width: 28px; min-height: 26px; padding: var(--spacing-02) var(--spacing-03); border: 0; background: transparent; color: inherit; }
.ide-page .pdf-tool-button:hover, .ide-page .pdf-tool-button[aria-pressed="true"] { background: var(--neutral-70); }
.ide-page .compile-badge { position: absolute; top: -4px; right: -5px; min-width: 16px; padding: 1px 4px; border-radius: var(--border-radius-full); background: var(--yellow-40); color: #fff; font-size: 9px; line-height: 14px; }
.ide-page .compile-badge[data-severity="error"] { background: var(--red-50); }
.ide-page .compile-status { display: flex; min-width: 0; align-items: center; gap: var(--spacing-03); color: var(--neutral-30); font-size: 11px; }
.ide-page .compile-status output { max-width: 9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ide-page .compile-status form { margin: 0; }
.ide-page .compile-status button { min-height: 24px; padding: var(--spacing-01) var(--spacing-04); background: var(--red-50); font-size: 10px; }
.ide-page .compile-state-error { max-width: 13rem; overflow: hidden; color: #ffb3b3; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.ide-page .pdf-toolbar { min-width: 0; margin-left: auto; overflow: hidden; white-space: nowrap; }
.ide-page .compile-logs { flex: 1; min-height: 0; padding: var(--spacing-05); overflow: auto; background: var(--neutral-80); color: var(--neutral-10); }
.ide-page .compile-logs > header { display: flex; align-items: center; justify-content: space-between; gap: var(--spacing-05); margin-bottom: var(--spacing-05); }
.ide-page .compile-logs h2 { margin: 0; font-size: 13px; }
.ide-page .compile-logs header button { min-height: 28px; padding: var(--spacing-02) var(--spacing-05); border-color: var(--neutral-60); background: var(--neutral-70); }
.ide-page .compile-log-summary { display: flex; gap: var(--spacing-04); margin-bottom: var(--spacing-04); color: var(--neutral-30); font-size: 11px; }
.ide-page .diagnostics-list { display: grid; gap: var(--spacing-03); margin: 0; padding: 0; list-style: none; }
.ide-page .diagnostics-list button { width: 100%; min-width: 0; padding: var(--spacing-04); overflow: hidden; border: 0; border-radius: var(--border-radius-base); background: var(--neutral-90); color: inherit; text-align: left; text-overflow: ellipsis; white-space: nowrap; font: 11px/1.35 ui-monospace, monospace; }
.ide-page .diagnostics-list button[data-severity="error"] { color: #ffb3b3; }
.ide-page .diagnostics-list button[data-severity="warning"] { color: #ffd49d; }
.ide-page .raw-log { margin-top: var(--spacing-05); }
.ide-page .raw-log summary { cursor: pointer; font-weight: 600; }
.ide-page .raw-log pre { max-height: 55vh; padding: var(--spacing-05); overflow: auto; border-radius: var(--border-radius-base); background: var(--neutral-90); white-space: pre-wrap; overflow-wrap: anywhere; font: 11px/1.45 ui-monospace, monospace; }
.ide-page .notice { background: var(--green-10); color: var(--green-70); }
.ide-page .error { background: var(--red-10); color: var(--red-50); }
.ide-page .diagnostics { border-color: var(--neutral-70); background: #332d21; color: var(--neutral-10); }
.ide-page .topbar { position: relative; }
.ide-page .project-title { position: absolute; left: 50%; max-width: 32vw !important; transform: translateX(-50%); }
.ide-page .project-title span { opacity: 0; }
.ide-page .project-title:hover span,
.ide-page .project-title:focus-within span { opacity: 1; }
.ide-page .project-settings form { display: grid; gap: var(--spacing-04); padding: var(--spacing-04); }
.ide-page .project-settings label { display: grid; gap: var(--spacing-02); }
.ide-page .shortcuts { min-width: 310px; line-height: 1.9; }
.ide-page .shortcuts kbd { display: inline-block; min-width: 130px; color: inherit; }
.ide-page .embedded-shortcuts { padding: var(--spacing-03); border-top: 1px solid var(--neutral-60); }
.ide-page .embedded-shortcuts > summary { padding: var(--spacing-04); cursor: pointer; font-weight: 600; }
.ide-page .embedded-shortcuts-content { padding: var(--spacing-04); line-height: 1.8; }
.ide-page .embedded-shortcuts-content kbd { display: inline-block; min-width: 125px; }
.ide-page .presence-list { display: flex; flex-direction: row-reverse; padding-left: 8px; }
.ide-page .presence-avatar { display: grid; width: 28px; height: 28px; margin-left: -8px; place-items: center; border: 2px solid #fff; border-radius: 50%; background: var(--presence-color); color: #fff; font-size: 11px; font-weight: 700; }
.ide-page .share-menu > summary { background: var(--green-50); color: #fff; }
.ide-page .share-menu li { display: flex; align-items: center; justify-content: space-between; gap: var(--spacing-05); }
.ide-page .code-editor { position: relative; flex: 1; min-height: 0; display: grid; grid-template-columns: 48px minmax(0, 1fr); overflow: hidden; }
.ide-page .code-editor[data-font="roboto-mono"] textarea { font-family: "Roboto Mono", "SFMono-Regular", Consolas, monospace; }
.ide-page .code-editor[data-font="source-code-pro"] textarea { font-family: "Source Code Pro", "SFMono-Regular", Consolas, monospace; }
.ide-page .code-editor[data-font="system-mono"] textarea { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; }
.ide-page .code-editor textarea { padding: 18px 20px; font-size: var(--editor-font-size); line-height: 1.55; white-space: pre; overflow: auto; }
.ide-page .line-gutter { margin: 0; padding: 18px 10px 18px 0; overflow: hidden; border-right: 1px solid var(--neutral-70); background: var(--neutral-80); color: var(--neutral-50); text-align: right; font: var(--editor-font-size)/1.55 ui-monospace, monospace; user-select: none; }
.ide-page #remote-carets { position: absolute; inset: 0 0 0 48px; overflow: hidden; pointer-events: none; }
.ide-page .remote-caret { position: absolute; left: 0; width: 3px; height: 1.55em; background: var(--presence-color); box-shadow: 0 0 0 1px rgb(255 255 255 / 55%); }
.ide-page .pdf-primary-actions { display: flex; align-items: center; gap: var(--spacing-03); }
.ide-page .pdf-primary-actions form { margin: 0; }
.ide-page .warning-button { background: var(--yellow-40) !important; color: #fff; }
.ide-page .zoom-control select { min-height: 26px; max-width: 120px; }

[data-theme="light"] .ide-page { background: #f4f5f6; color: #1b222c; }
[data-theme="light"] .ide-page .topbar,
[data-theme="light"] .ide-page .panel { background: #fff; color: #1b222c; }
[data-theme="light"] .ide-page .topbar { border-color: #d0d5dd; }
[data-theme="light"] .ide-page .topbar a,
[data-theme="light"] .ide-page .toolbar-menu summary { color: #1b222c; }
[data-theme="light"] .ide-page .tree,
[data-theme="light"] .ide-page .panel-heading,
[data-theme="light"] .ide-page .editor-search,
[data-theme="light"] .ide-page .editor-footer,
[data-theme="light"] .ide-page .editor-tabs,
[data-theme="light"] .ide-page .line-gutter { background: #f4f5f6; border-color: #d0d5dd; color: #495365; }
[data-theme="light"] .ide-page .files a,
[data-theme="light"] .ide-page .editor-tabs a { color: #2f3a4c; }
[data-theme="light"] .ide-page .files li:hover,
[data-theme="light"] .ide-page .files li[aria-current="true"] { background: #e7e9ee; }
[data-theme="light"] .ide-page .editor-tabs a[aria-current="page"] { background: #fff; color: #1b222c; }
[data-theme="light"] .ide-page textarea[name="content"] { background: #fff; color: #1b222c; caret-color: #1b222c; }
[data-theme="light"] .ide-page .toolbar-dropdown { background: #fff; color: #1b222c; border-color: #d0d5dd; }

/* Administration follows the dashboard rather than the IDE chrome. */
.admin-page { margin: 0; background: var(--white); color: var(--content-primary); font-size: 14px; }
.admin-page > header { min-height: 56px; padding: 0 var(--spacing-08); background: var(--neutral-90); color: var(--white); }
.admin-page .admin-layout { min-height: calc(100vh - 56px); grid-template-columns: 240px minmax(0, 1fr); }
.admin-page .admin-layout > aside { padding: var(--spacing-08) var(--spacing-06); border-color: var(--border-divider); background: var(--neutral-10); }
.admin-page aside a { border-radius: var(--border-radius-base); color: var(--content-primary); }
.admin-page aside a:hover,
.admin-page aside a[aria-current="page"] { background: var(--neutral-20); color: var(--content-primary); }
.admin-page main { width: min(1180px, calc(100% - 48px)); margin: var(--spacing-09) auto; }
.admin-page h1 { color: var(--content-primary); font-size: 24px; font-weight: 600; }
.admin-page .card { padding: var(--spacing-07); border-color: var(--border-divider); border-radius: var(--border-radius-medium); box-shadow: none; }
.admin-page th { background: var(--neutral-10); color: var(--content-secondary); font-size: 12px; text-transform: uppercase; }
.admin-page th,
.admin-page td { padding: var(--spacing-05); border-color: var(--border-divider); }
.admin-page button { border-color: var(--green-50); border-radius: var(--border-radius-base); background: var(--green-50); }

@media (max-width: 900px) {
  .project-list-page .layout { display: block; }
  .project-list-page .layout > aside { padding: var(--spacing-05) var(--spacing-06); border-right: 0; border-bottom: 1px solid var(--border-divider); }
  .project-list-page aside nav { display: flex; overflow-x: auto; }
  .project-list-page main { min-height: calc(100vh - 140px); border-left: 0; border-radius: var(--border-radius-large) var(--border-radius-large) 0 0; }
  .project-list-page .create-menu { width: min(20rem, 100%); }
  .project-list-page .catalog-heading { flex-direction: column; }
  .project-list-page .project-toolbar { width: 100%; flex-wrap: wrap; }
  .project-list-page .project-toolbar input[type="search"] { width: 100%; flex: 1 1 16rem; }
  .ide-page { height: 100vh; overflow: hidden; }
  .ide-page .topbar { height: 40px; min-height: 40px; flex-direction: row; align-items: center; }
  .ide-page .actions { width: auto; flex-wrap: nowrap; }
  .ide-page .workspace { height: calc(100vh - 40px); display: grid; grid-template-columns: minmax(18rem, 1fr) minmax(18rem, 1fr); }
  .ide-page .workspace > .tree { display: none; }
  .ide-page .tree, .ide-page .pdf-panel { width: auto; max-width: none; resize: none; }
  .ide-page .editor-form, .ide-page .pdf-panel { min-height: 0; }
}

@media (max-width: 1200px) {
  .ide-page .actions > a { display: none; }
  .ide-page .toolbar-menu summary { max-width: 8rem; overflow: hidden; text-overflow: ellipsis; }
  .ide-page .account-email { display: none; }
  .ide-page .actions { gap: var(--spacing-02); }
  .ide-page #history-menu > summary,
  .ide-page #assistant-menu > summary,
  .ide-page .layout-menu > summary,
  .ide-page .account-menu > summary { display: grid; width: 30px; place-items: center; font-size: 0; }
  .ide-page #history-menu > summary::before { content: "↶"; font-size: 17px; }
  .ide-page #assistant-menu > summary::before { content: "✦"; font-size: 15px; }
  .ide-page .layout-menu > summary::before { content: "▣"; font-size: 15px; }
  .ide-page .account-menu > summary::before { content: "●"; font-size: 13px; }
}

@media (max-width: 760px) {
  .ide-page .topbar { display: flex; height: 40px; min-height: 40px; flex-direction: row; align-items: center; }
  .ide-page .identity { overflow: visible; }
  .ide-page .identity .menu-bar .toolbar-menu:not(:first-child) { display: none; }
  .ide-page .actions { width: auto; flex-wrap: nowrap; overflow: visible; }
  .ide-page .actions > .toolbar-menu:not(.share-menu):not(:last-child) { display: none; }
  .ide-page .share-menu summary { max-width: 2.2rem; overflow: hidden; font-size: 0; }
  .ide-page .share-menu summary::before { content: "+"; font-size: 18px; }
  .ide-page .project-title { max-width: 35vw !important; }
  .ide-page .workspace { height: calc(100vh - 40px); display: grid; grid-template-columns: 1fr; }
  .ide-page .tree, .ide-page .pdf-panel { width: 100%; max-width: none; }
  .ide-page .tree { display: none; }
  .ide-page .pdf-panel { min-height: 0; }
}

@media (max-width: 620px) {
  .project-list-page .navbar { height: 56px; padding: 0 var(--spacing-05); gap: var(--spacing-04); }
  .project-list-page .navbar > a:not(.brand),
  .project-list-page .account-email { display: none; }
  .project-list-page .layout { min-height: calc(100vh - 56px); }
  .project-list-page main { padding: var(--spacing-07) var(--spacing-05); }
  .project-list-page .project-table { min-width: 0; table-layout: auto; }
  .project-list-page .project-table th:nth-child(2),
  .project-list-page .project-table td:nth-child(2),
  .project-list-page .project-table th:nth-child(3),
  .project-list-page .project-table td:nth-child(3) { display: none; }
  .project-list-page .project-table th:last-child { width: 44px; }
  .project-list-page .project-actions { max-width: 40px; overflow-x: auto; justify-content: flex-start; scroll-snap-type: x mandatory; }
  .project-list-page .project-actions > * { flex: 0 0 auto; scroll-snap-align: start; }
}
