:root {
  --bg: #f5f7fb;
  --surface: #fff;
  --surface-2: #f8fafc;
  --ink: #17233b;
  --muted: #71809a;
  --faint: #a8b3c4;
  --line: #e5eaf1;
  --accent: #e8590c;
  --accent-soft: color-mix(in srgb, var(--accent) 11%, white);
  --shadow: 0 18px 55px rgba(35, 53, 84, 0.09);
  --danger: #d95f70;
  --rail: #16243d;
  --rail-2: #1e3355;
  --radius: 12px;
}
* {
  box-sizing: border-box;
}
html,
body,
#app {
  margin: 0;
  min-height: 100%;
  height: 100%;
  font:
    14px/1.55 Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--bg);
}
button,
input,
textarea,
select {
  font: inherit;
}
button {
  border: 0;
  cursor: pointer;
}
.ico {
  display: block;
  flex: 0 0 auto;
}
.topbar {
  height: 64px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 22px;
  gap: 20px;
  position: relative;
  z-index: 20;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  min-width: 222px;
}
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--accent), #7e63d9);
  color: white;
  display: grid;
  place-items: center;
  box-shadow: 0 7px 18px color-mix(in srgb, var(--accent) 35%, transparent);
}
.brand-text {
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 16px;
}
.brand-text b {
  font-weight: 400;
  color: var(--muted);
}
.global-search {
  height: 38px;
  max-width: 590px;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: 9px;
  padding: 0 11px;
  color: var(--muted);
  position: relative;
}
.global-search input {
  border: 0;
  outline: 0;
  background: transparent;
  flex: 1;
  color: var(--ink);
  min-width: 0;
}
.global-search input::placeholder {
  color: #9da8ba;
}
.global-search kbd {
  font-size: 11px;
  color: var(--faint);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 2px 5px;
  background: #fff;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
}
.icon-button {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  display: grid;
  place-items: center;
}
.icon-button:hover {
  background: var(--accent-soft);
  color: var(--accent);
}
.icon-button.outlined {
  border: 1px solid var(--line);
  background: #fff;
}
.icon-button.subtle {
  color: #8491a6;
}
.user-chip {
  height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  padding: 0 7px 0 4px;
  color: var(--muted);
  border-radius: 9px;
}
.user-chip:hover {
  background: var(--surface-2);
}
.avatar {
  width: 29px;
  height: 29px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e8ecff;
  color: #566bca;
  font-weight: 700;
  font-size: 12px;
}
.app-body {
  display: grid;
  grid-template-columns: 78px 282px minmax(0, 1fr) 286px;
  height: calc(100vh - 64px);
}
.nav-rail {
  background: var(--rail);
  color: #c2cde0;
  padding: 18px 10px 13px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.rail-section {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.rail-label {
  font-size: 9px;
  letter-spacing: 0.14em;
  color: #7284a3;
  padding: 0 8px 7px;
  white-space: nowrap;
  overflow: hidden;
}
.rail-item {
  height: 42px;
  color: #aebbd0;
  background: transparent;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 10px;
  white-space: nowrap;
  overflow: hidden;
}
.rail-item span {
  font-size: 12px;
}
.rail-item:hover,
.rail-item.active {
  background: var(--rail-2);
  color: #fff;
}
.rail-item.active {
  box-shadow: inset 3px 0 var(--accent);
}
.rail-spacer {
  flex: 1;
}
.explorer {
  background: #fbfcfe;
  border-right: 1px solid var(--line);
  padding: 23px 14px 14px;
  overflow: auto;
}
.explorer-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0 4px 17px;
}
.explorer h2 {
  font-size: 20px;
  margin: 2px 0 0;
  letter-spacing: -0.02em;
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 0.16em;
  color: #99a5b8;
  font-weight: 750;
}
.head-actions {
  display: flex;
  gap: 2px;
}
.explorer-toolbar {
  display: flex;
  gap: 7px;
  margin: 0 0 10px;
}
.create-button {
  flex: 1;
  height: 34px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-weight: 650;
  box-shadow: 0 5px 13px color-mix(in srgb, var(--accent) 22%, transparent);
}
.create-button:hover,
.primary:hover {
  filter: brightness(0.96);
  transform: translateY(-1px);
}
.tree-hint {
  font-size: 11px;
  line-height: 1.4;
  color: #9aa6b8;
  padding: 4px 8px 14px;
}
.tree {
  padding-bottom: 20px;
}
.tree-row {
  height: 35px;
  display: flex;
  align-items: center;
  padding-left: calc(4px + var(--depth) * 16px);
  border-radius: 7px;
  color: #506078;
  position: relative;
  margin: 1px 0;
}
.tree-row:hover {
  background: #eef3fb;
}
.tree-row.selected {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 650;
}
.tree-chevron {
  width: 20px;
  height: 28px;
  display: grid;
  place-items: center;
  background: transparent;
  color: #95a2b7;
}
.tree-chevron.empty {
  visibility: hidden;
}
.tree-main {
  background: transparent;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 0;
  flex: 1;
  text-align: left;
  color: inherit;
}
.tree-icon {
  color: var(--node-color);
  display: grid;
  place-items: center;
}
.tree-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tree-rev {
  font-size: 10px;
  color: #9da9ba;
  margin-left: auto;
  margin-right: 5px;
  font-weight: 500;
}
.tree-more {
  width: 24px;
  height: 28px;
  display: grid;
  place-items: center;
  background: transparent;
  color: #b1bbc9;
  opacity: 0;
}
.tree-row:hover .tree-more,
.tree-row.selected .tree-more {
  opacity: 1;
}
.main-stage {
  background: var(--bg);
  overflow: auto;
  min-width: 0;
}
.content-wrap {
  max-width: calc(100% - 84px);
  width: 1080px;
  margin: 0 auto;
  padding: 30px 0 55px;
}
.content-top,
.editor-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 35px;
}
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #8a96a8;
  font-size: 12px;
}
.breadcrumbs strong {
  color: #56647b;
  font-weight: 650;
}
.page-actions,
.editor-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.secondary,
.primary {
  height: 35px;
  padding: 0 12px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-weight: 650;
  white-space: nowrap;
}
.secondary {
  background: #fff;
  color: #53627a;
  border: 1px solid var(--line);
}
.secondary:hover {
  border-color: #c6d0df;
  color: var(--ink);
  background: #fbfcff;
}
.primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 5px 13px color-mix(in srgb, var(--accent) 22%, transparent);
}
.primary kbd {
  font-size: 10px;
  opacity: 0.75;
  margin-left: 4px;
}
.article {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 47px 64px 60px;
  margin-top: 24px;
  box-shadow: var(--shadow);
  min-height: 500px;
}
.article-kicker {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  letter-spacing: 0.15em;
  font-weight: 750;
  color: #9aa7b9;
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #44b882;
  box-shadow: 0 0 0 4px #e4f5ed;
}
.article h1 {
  font-size: 40px;
  line-height: 1.12;
  letter-spacing: -0.04em;
  margin: 17px 0 13px;
  color: #18253d;
}
.article-meta {
  display: flex;
  gap: 18px;
  color: #8a97a9;
  font-size: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.article-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}
.article-rule {
  height: 1px;
  background: var(--line);
  margin: 28px 0 30px;
}
.markdown {
  color: #44536b;
  font-size: 15px;
  max-width: 850px;
}
.markdown h1,
.markdown h2,
.markdown h3 {
  color: #1b2a44;
  letter-spacing: -0.025em;
  margin: 1.65em 0 0.5em;
}
.markdown h1 {
  font-size: 28px;
}
.markdown h2 {
  font-size: 23px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}
.markdown h3 {
  font-size: 18px;
}
.markdown p {
  margin: 0 0 1.05em;
}
.markdown ul,
.markdown ol {
  padding-left: 24px;
}
.markdown li {
  margin: 5px 0;
}
.markdown a {
  color: #3e77d6;
  text-decoration: none;
}
.markdown a:hover {
  text-decoration: underline;
}
.markdown blockquote {
  border-left: 3px solid var(--accent);
  padding: 8px 16px;
  margin-left: 0;
  color: #66758b;
  background: var(--accent-soft);
  border-radius: 0 7px 7px 0;
}
.markdown pre {
  background: #17243b;
  color: #dde7f6;
  padding: 17px;
  border-radius: 9px;
  overflow: auto;
  font-size: 13px;
}
.markdown code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  background: #edf1f7;
  color: #4b5d7a;
  border-radius: 4px;
  padding: 2px 5px;
  font-size: 0.9em;
}
.markdown pre code {
  background: none;
  color: inherit;
  padding: 0;
}
.markdown table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}
.markdown th,
.markdown td {
  border: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
}
.markdown th {
  background: var(--surface-2);
  color: #4a5a73;
}
.article-footer {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  padding: 17px 3px;
}
.ghost-button {
  height: 31px;
  border-radius: 7px;
  color: #718098;
  background: transparent;
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 0 9px;
}
.ghost-button:hover {
  background: #eaf0f8;
  color: var(--accent);
}
.details-panel {
  border-left: 1px solid var(--line);
  background: var(--surface);
  padding: 23px 20px;
  overflow: auto;
}
.details-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.details-head h3 {
  margin: 3px 0 0;
  font-size: 16px;
}
.detail-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--node-color) 12%, white);
  color: var(--node-color);
  display: grid;
  place-items: center;
  margin: 28px 0 14px;
}
.detail-title {
  font-weight: 720;
  font-size: 17px;
  color: #25334c;
  word-break: break-word;
}
.detail-path {
  font-size: 11px;
  color: #8b98ab;
  line-height: 1.45;
  word-break: break-word;
  margin-top: 5px;
}
.detail-list {
  border-top: 1px solid var(--line);
  margin-top: 22px;
  padding-top: 9px;
}
.detail-list > div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
}
.detail-list span {
  color: #97a3b4;
  font-size: 11px;
}
.detail-list b {
  font-size: 11px;
  text-align: right;
  color: #55647b;
  font-weight: 650;
}
.mono {
  font-family: ui-monospace, monospace;
  max-width: 135px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.details-actions {
  border-top: 1px solid var(--line);
  margin-top: 13px;
  padding-top: 11px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.action-row {
  height: 38px;
  border-radius: 7px;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #62728a;
  text-align: left;
  padding: 0 8px;
}
.action-row span {
  flex: 1;
}
.action-row:hover {
  background: var(--accent-soft);
  color: var(--accent);
}
.action-row.danger {
  color: #b87582;
}
.action-row.danger:hover {
  background: #fff0f2;
  color: var(--danger);
}
.folder-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--folder-accent);
  padding: 28px 30px;
  border-radius: 13px;
  box-shadow: var(--shadow);
  margin-top: 24px;
}
.folder-hero-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--folder-accent) 12%, white);
  display: grid;
  place-items: center;
  color: var(--folder-accent);
}
.folder-hero h1 {
  margin: 2px 0 4px;
  font-size: 31px;
  letter-spacing: -0.035em;
}
.folder-hero p {
  margin: 0;
  color: #7d8aa0;
}
.child-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
  gap: 11px;
  margin-top: 18px;
}
.child-card {
  min-height: 78px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 13px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  color: var(--ink);
  transition: 0.15s;
}
.child-card:hover {
  border-color: color-mix(in srgb, var(--accent) 50%, var(--line));
  box-shadow: 0 8px 22px rgba(42, 64, 101, 0.08);
  transform: translateY(-1px);
}
.child-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--node-color) 11%, white);
  color: var(--node-color);
  display: grid;
  place-items: center;
}
.child-card span:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.child-card b,
.child-card small {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.child-card small {
  color: #98a5b8;
  font-size: 11px;
  margin-top: 2px;
}
.empty-card,
.empty-state {
  grid-column: 1/-1;
  border: 1px dashed #cfd8e6;
  border-radius: 12px;
  padding: 45px;
  text-align: center;
  color: #8997ab;
  background: rgba(255, 255, 255, 0.5);
}
.empty-card span,
.empty-state span {
  display: block;
  color: #a8b5c8;
  margin-bottom: 8px;
}
.empty-card b,
.empty-state h2 {
  display: block;
  color: #53637b;
}
.empty-card small,
.empty-state p {
  display: block;
  margin-top: 4px;
}
.editor-shell {
  height: 100%;
  padding: 25px 34px 34px;
  display: flex;
  flex-direction: column;
}
.editor-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 25px;
  max-width: 1200px;
  width: 100%;
  margin: 31px auto 19px;
}
.editor-title-row h1 {
  margin: 0;
}
.editor-title-row input {
  display: block;
  border: 0;
  background: transparent;
  outline: 0;
  font-size: 30px;
  line-height: 1.15;
  color: var(--ink);
  font-weight: 750;
  letter-spacing: -0.035em;
  width: min(730px, 70vw);
  padding: 3px 0;
}
.editor-status {
  font-size: 11px;
  color: #91a0b4;
  display: flex;
  gap: 7px;
  align-items: center;
}
.editor-status .status-dot {
  width: 6px;
  height: 6px;
  box-shadow: none;
}
.editor-tabs {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 2px;
}
.editor-tabs button {
  height: 37px;
  padding: 0 15px;
  background: transparent;
  color: #8996a8;
  border-bottom: 2px solid transparent;
}
.editor-tabs button.active {
  color: var(--accent);
  border-color: var(--accent);
  font-weight: 700;
}
.editor-grid {
  max-width: 1200px;
  width: 100%;
  margin: 17px auto 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  min-height: 0;
  flex: 1;
}
.editor-grid.write {
  grid-template-columns: 1fr;
}
.editor-grid.preview {
  grid-template-columns: 1fr;
}
.editor-grid.write .preview,
.editor-grid.preview textarea {
  display: none;
}
.editor-grid textarea {
  resize: none;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  padding: 18px;
  color: #31415b;
  outline: 0;
  line-height: 1.65;
  font:
    13px/1.65 ui-monospace,
    SFMono-Regular,
    Consolas,
    monospace;
  box-shadow: inset 0 1px 4px rgba(34, 54, 87, 0.03);
}
.editor-grid textarea:focus {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.preview {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  padding: 20px;
}
.search-popover {
  position: absolute;
  top: 45px;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  box-shadow: var(--shadow);
  overflow: hidden;
  z-index: 30;
}
.search-result {
  width: 100%;
  display: flex;
  gap: 11px;
  padding: 11px 13px;
  background: #fff;
  text-align: left;
  color: var(--ink);
}
.search-result:hover {
  background: var(--accent-soft);
}
.search-result-icon {
  color: var(--accent);
  padding-top: 2px;
}
.search-result b,
.search-result small,
.search-result em {
  display: block;
}
.search-result small {
  color: #8d9bae;
  font-size: 11px;
}
.search-result em {
  font-size: 11px;
  color: #a1acba;
  font-style: normal;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  max-width: 480px;
}
.search-empty {
  padding: 17px;
  color: #8c99ad;
  text-align: center;
  font-size: 12px;
}
.modal {
  position: fixed;
  inset: 0;
  background: rgba(20, 31, 50, 0.32);
  backdrop-filter: blur(3px);
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
}
.modal-card {
  width: min(510px, 100%);
  max-height: min(740px, 90vh);
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 15px;
  box-shadow: 0 28px 100px rgba(23, 40, 70, 0.23);
}
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 22px 23px 14px;
}
.modal-head h3 {
  font-size: 20px;
  margin: 3px 0 0;
  letter-spacing: -0.025em;
}
.modal-body {
  padding: 0 23px 23px;
}
.modal-body label {
  display: block;
  color: #6e7c91;
  font-size: 12px;
  font-weight: 650;
  margin: 15px 0;
}
.modal-body input,
.modal-body textarea,
.modal-body select {
  display: block;
  width: 100%;
  margin-top: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  color: var(--ink);
  padding: 10px 11px;
  outline: 0;
}
.modal-body input:focus,
.modal-body textarea:focus,
.modal-body select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.modal-body textarea {
  resize: vertical;
  font:
    13px/1.5 ui-monospace,
    monospace;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 21px;
}
.full {
  width: 100%;
}
.form-error {
  color: var(--danger);
  min-height: 21px;
  font-size: 12px;
  margin-top: -3px;
}
.node-menu {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.menu-action {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  background: transparent;
  color: #5d6c83;
  padding: 12px 8px;
  border-radius: 8px;
}
.menu-action:hover {
  background: var(--accent-soft);
  color: var(--accent);
}
.menu-action > span {
  flex: 1;
}
.menu-action b,
.menu-action small {
  display: block;
}
.menu-action small {
  font-size: 11px;
  color: #9aa6b6;
  font-weight: 400;
}
.menu-action.danger {
  color: var(--danger);
}
.color-row {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 8px;
}
.color-row input[type="color"] {
  height: 40px;
  padding: 3px;
}
.field-help {
  color: #99a5b7;
  font-size: 11px;
}
.settings-modal {
  width: min(620px, 100%);
}
.settings-tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  padding: 0 23px;
  gap: 3px;
}
.settings-tabs button {
  background: transparent;
  height: 37px;
  padding: 0 11px;
  color: #8996a7;
  border-bottom: 2px solid transparent;
}
.settings-tabs button.active {
  color: var(--accent);
  border-color: var(--accent);
  font-weight: 700;
}
.settings-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding: 17px 0;
}
.settings-section b,
.settings-section small {
  display: block;
}
.settings-section b {
  color: #4f5e75;
}
.settings-section small {
  font-size: 11px;
  color: #99a5b5;
  margin-top: 3px;
}
.settings-section > input[type="color"] {
  width: 46px;
  height: 33px;
  padding: 3px;
}
.settings-section > select {
  max-width: 160px;
  margin: 0;
}
.settings-section.stacked {
  display: block;
}
.settings-section.stacked input {
  max-width: 310px;
}
.token-create {
  display: flex;
  gap: 8px;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}
.token-create input {
  flex: 1;
  margin: 0;
}
.token-create select {
  width: 140px;
  margin: 0;
}
.token-list {
  display: flex;
  flex-direction: column;
}
.token-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: var(--accent);
}
.token-row > div {
  flex: 1;
}
.token-row b,
.token-row small {
  display: block;
}
.token-row b {
  color: #52627a;
}
.token-row small {
  font-size: 11px;
  color: #99a5b5;
}
.token-reveal {
  background: #f7fbff;
  border: 1px solid #dce9fa;
  border-radius: 9px;
  padding: 20px;
  margin-top: 12px;
}
.token-reveal code {
  display: block;
  word-break: break-all;
  background: #fff;
  border: 1px solid var(--line);
  padding: 12px;
  border-radius: 7px;
  margin: 10px 0;
  color: #395f9f;
  font-size: 12px;
}
.token-reveal p {
  color: #8794a8;
  font-size: 12px;
}
.revision-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.revision-row {
  display: flex;
  align-items: center;
  gap: 7px;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}
.revision-row > div {
  flex: 1;
  min-width: 0;
}
.revision-row b,
.revision-row small,
.revision-row em {
  display: block;
}
.revision-row small,
.revision-row em {
  font-size: 11px;
  color: #93a0b1;
  font-style: normal;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.revision-row .secondary {
  height: 29px;
  padding: 0 9px;
  font-size: 12px;
}
.revision-preview {
  max-height: 55vh;
  overflow: auto;
}
.auth-screen {
  min-height: 100%;
  background: linear-gradient(135deg, #f4f7fc, #e9eef7);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}
.auth-glow {
  position: absolute;
  width: 720px;
  height: 720px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    color-mix(in srgb, var(--accent) 12%, transparent),
    transparent 66%
  );
  top: -300px;
  right: -160px;
}
.auth-card {
  position: relative;
  width: min(420px, calc(100% - 32px));
  background: #fff;
  border: 1px solid rgba(218, 226, 239, 0.9);
  border-radius: 16px;
  padding: 33px;
  box-shadow: var(--shadow);
}
.auth-mark {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  background: linear-gradient(145deg, var(--accent), #7e63d9);
  color: #fff;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
}
.auth-card h1 {
  margin: 5px 0 7px;
  font-size: 28px;
  letter-spacing: -0.035em;
}
.auth-card p {
  color: #8290a5;
  margin: 0 0 25px;
}
.auth-card label {
  display: block;
  color: #6b7a90;
  font-size: 12px;
  font-weight: 650;
  margin: 14px 0;
}
.auth-card input {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  margin-top: 7px;
  outline: 0;
}
.auth-card input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  background: #1b2b45;
  color: #fff;
  padding: 11px 14px;
  border-radius: 9px;
  box-shadow: 0 10px 30px rgba(20, 34, 58, 0.22);
  display: flex;
  gap: 9px;
  align-items: center;
  z-index: 80;
  font-size: 13px;
}
.toast.success {
  background: #1e7351;
}
.toast.error {
  background: #a84659;
}
.toast.persistent {
  max-width: min(480px, calc(100vw - 48px));
  align-items: flex-start;
}
.toast-dismiss {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin: -5px -7px -5px 2px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: inherit;
  opacity: 0.88;
}
.toast-dismiss:hover,
.toast-dismiss:focus-visible {
  background: rgba(255, 255, 255, 0.18);
  opacity: 1;
}
.mobile-menu {
  display: none;
  background: transparent;
  color: var(--muted);
}
html[data-density="compact"] .tree-row {
  height: 29px;
}
html[data-contentWidth="focused"] .content-wrap {
  width: 900px;
}
html[data-rail="collapsed"] .nav-rail {
  width: 78px;
}
.details-collapsed .details-panel {
  display: none;
}
.details-collapsed .app-body {
  grid-template-columns: 78px 282px minmax(0, 1fr);
}
@media (max-width: 1180px) {
  .app-body {
    grid-template-columns: 78px 258px minmax(0, 1fr) 250px;
  }
  .article {
    padding-left: 40px;
    padding-right: 40px;
  }
  .content-wrap {
    max-width: calc(100% - 48px);
  }
}
@media (max-width: 930px) {
  .app-body {
    grid-template-columns: 78px 250px minmax(0, 1fr);
  }
  .details-panel {
    display: none;
  }
  .details-collapsed .app-body {
    grid-template-columns: 78px 250px minmax(0, 1fr);
  }
  .article h1 {
    font-size: 33px;
  }
}
@media (max-width: 700px) {
  .topbar {
    padding: 0 12px;
    gap: 9px;
  }
  .mobile-menu {
    display: grid;
    place-items: center;
  }
  .brand {
    min-width: auto;
  }
  .brand-text {
    display: none;
  }
  .global-search {
    max-width: none;
  }
  .top-actions .icon-button {
    display: none;
  }
  .user-name {
    display: none;
  }
  .app-body {
    display: block;
    height: calc(100vh - 64px);
  }
  .nav-rail {
    position: fixed;
    z-index: 25;
    left: 0;
    top: 64px;
    bottom: 0;
    width: 220px;
    transform: translateX(-100%);
    transition: 0.2s;
  }
  .mobile-open .nav-rail {
    transform: translateX(0);
  }
  .explorer {
    position: fixed;
    z-index: 24;
    left: 0;
    top: 64px;
    bottom: 0;
    width: 285px;
    transform: translateX(-100%);
    transition: 0.2s;
    box-shadow: var(--shadow);
  }
  .mobile-open .explorer {
    transform: translateX(0);
  }
  .main-stage {
    height: calc(100vh - 64px);
  }
  .content-wrap {
    max-width: calc(100% - 26px);
    padding-top: 18px;
  }
  .article {
    padding: 30px 22px 40px;
  }
  .article h1 {
    font-size: 29px;
  }
  .editor-shell {
    padding: 18px 13px;
  }
  .editor-title-row {
    display: block;
    margin-top: 24px;
  }
  .editor-title-row input {
    width: 100%;
    font-size: 26px;
  }
  .editor-status {
    margin-top: 10px;
  }
  .editor-grid {
    grid-template-columns: 1fr;
  }
  .editor-grid.split .preview {
    display: none;
  }
  .editor-grid.preview textarea {
    display: none;
  }
  .editor-grid {
    min-height: 470px;
  }
  .folder-hero {
    padding: 22px 18px;
  }
  .folder-hero h1 {
    font-size: 27px;
  }
  .page-actions .icon-button {
    display: none;
  }
  .page-actions .secondary {
    height: 33px;
  }
  .search-result em {
    max-width: 250px;
  }
}
