:root {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #31302e;
  background: #fff;
  font-synthesis: none;
  --muted: #77736d;
  --border: #eae8e4;
  --warm: #f7f6f3;
  --blue: #247baf;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-size: 14px;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  border: 1px solid #dedbd5;
  border-radius: 6px;
  background: white;
  color: #4b4843;
  padding: 8px 13px;
  font-weight: 500;
}
button:hover {
  background: #efeeeb;
}
button:disabled {
  opacity: 0.5;
  cursor: wait;
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  color: #176d9e;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 2px solid #247baf;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.primary {
  background: #287dae;
  color: #fff;
  border-color: #287dae;
}
.primary:hover {
  background: #1b608c;
  color: #fff;
}
p {
  line-height: 1.65;
}
h1,
h2,
h3,
h4 {
  color: #302f2b;
}
h1 {
  font-size: 42px;
  line-height: 1.16;
  letter-spacing: -1.5px;
  margin: 18px 0;
  font-weight: 700;
}
h2 {
  font-size: 18px;
  letter-spacing: -0.3px;
}
h3 {
  font-size: 16px;
}
h4 {
  font-size: 12px;
  font-weight: 600;
}
.muted,
.empty,
.footnote {
  color: var(--muted);
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.6px;
  font-weight: 600;
  color: #8a847a;
}
.brand-icon {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 2px solid #383630;
  border-radius: 11px;
  font-family: Georgia, serif;
  font-size: 37px;
  font-weight: 700;
  color: #39372f;
  transform: rotate(-5deg);
  background: #fff;
}
.brand-icon.small {
  width: 29px;
  height: 29px;
  border-radius: 6px;
  font-size: 22px;
  border-width: 1.5px;
  flex-shrink: 0;
}
.auth-screen {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  background: #faf9f6;
  padding: 24px;
}
.auth-card {
  width: min(100%, 380px);
  text-align: left;
}
.auth-card h1 {
  font-size: 36px;
}
.auth-card p {
  color: #77736d;
}
.auth-card small {
  font-size: 11px;
  color: #89847d;
}
.auth-card form {
  display: grid;
  gap: 18px;
  margin: 28px 0 15px;
}
label {
  display: grid;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
}
input,
select {
  min-width: 0;
  background: #fff;
  border: 1px solid #dfdcd7;
  border-radius: 5px;
  padding: 11px;
  color: #31302e;
}
.error {
  color: #ad3d2b !important;
  font-size: 13px;
  white-space: pre-wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 25px 22px 13px;
  font-size: 16px;
  letter-spacing: -0.3px;
}
.private-dot {
  margin-left: auto;
  color: #91a48b;
  font-size: 8px;
}
#sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 272px;
  background: var(--warm);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 4;
}
.workspace-label {
  font-size: 9px;
  font-weight: 600;
  color: #aaa397;
  letter-spacing: 1.7px;
  margin: 9px 23px 20px;
}
.search-box {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 16px 17px;
  border: 1px solid #e5e1db;
  background: #fff;
  border-radius: 6px;
  padding: 0 9px;
  color: #9b958c;
}
.search-box > span {
  font-size: 22px;
}
.search-box input {
  padding: 9px 0;
  background: transparent;
  border: 0;
  width: 100%;
  font-size: 12px;
}
.search-box kbd {
  font-size: 9px;
  white-space: nowrap;
  color: #a29a8e;
}
nav > a,
nav > button {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 2px 12px;
  padding: 10px 12px;
  border: 0;
  background: none;
  text-align: left;
  border-radius: 5px;
  width: calc(100% - 24px);
  color: #6d685f;
  font-size: 13px;
}
nav > a:hover,
nav > button:hover {
  background: #eae7e0;
}
nav > a[aria-current="page"] {
  background: #eae7e0;
}
nav > button {
  color: #82796b;
}
.divider {
  height: 1px;
  background: #e5e1d9;
  margin: 20px 23px;
}
.section-label {
  font-size: 9px;
  letter-spacing: 1.4px;
  color: #999084;
  font-weight: 600;
  margin: 3px 23px 13px;
}
.section-label > span {
  float: right;
  letter-spacing: 0;
}
#note-nav {
  overflow: auto;
  padding-bottom: 24px;
  scrollbar-width: thin;
  flex: 1;
}
details {
  margin: 3px 12px 8px;
}
summary {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  padding: 8px 8px;
  font-weight: 600;
  color: #726c62;
  font-size: 12px;
  list-style: none;
}
summary:before {
  content: "›";
  font-size: 13px;
  color: #a69e93;
}
details[open] > summary:before {
  transform: rotate(90deg);
}
summary small {
  margin-left: auto;
  font-size: 10px;
  color: #a79f92;
  font-weight: 400;
}
details > a.note-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 8px 8px 30px;
  border-radius: 4px;
  color: #898174;
  font-size: 11px;
  line-height: 1.45;
}
details > a.note-item > span {
  color: #b1aa9f;
  flex-shrink: 0;
}
.note-item.active,
details > a:hover {
  background: #eae7df;
  color: #4e493f;
}
.sidebar-footer {
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 18px;
  border-top: 1px solid #e6e2db;
}
.avatar {
  border-radius: 6px;
  background: #e3ddd0;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  font-family: Georgia, serif;
}
.sidebar-footer strong {
  font-size: 11px;
}
.sidebar-footer small {
  display: block;
  font-size: 9px;
  color: #938b7d;
  margin-top: 4px;
}
.sidebar-footer button {
  border: 0;
  background: none;
  margin-left: auto;
  font-size: 10px;
  padding: 5px;
}
.main-shell {
  margin-left: 272px;
}
.topbar {
  height: 66px;
  border-bottom: 1px solid #f0eeeb;
  display: flex;
  align-items: center;
  padding: 0 33px;
  gap: 16px;
}
.topbar > button {
  display: none;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  white-space: nowrap;
}
.top-actions button {
  font-size: 11px;
  padding: 6px 10px;
}
.private-label {
  color: #a29a8e;
  font-size: 10px;
}
#breadcrumb {
  font-size: 11px;
  color: #8d8579;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#breadcrumb span {
  padding: 0 12px;
  color: #c1b9af;
}
.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  min-height: calc(100dvh - 66px);
}
#main {
  max-width: 940px;
  padding: 52px clamp(28px, 5vw, 84px) 70px;
  width: 100%;
  margin: 0 auto;
  min-width: 0;
  outline: 0;
}
.page-icon {
  font-size: 47px;
  color: #92866b;
  margin-bottom: 24px;
  font-weight: 300;
  line-height: 1;
}
.note-icon {
  font-size: 42px;
  color: #a39a89;
}
.lead {
  font-size: 15px;
  color: #9b9286;
  line-height: 1.8;
  margin: 20px 0 30px;
}
.welcome-callout {
  display: flex;
  gap: 17px;
  padding: 20px;
  background: #f8f6f1;
  border-radius: 8px;
  margin: 27px 0 38px;
  border: 1px solid #f0ece3;
}
.welcome-callout > span {
  color: #b49a61;
  font-size: 23px;
}
.welcome-callout strong {
  font-size: 12px;
  font-weight: 600;
}
.welcome-callout p {
  font-size: 12px;
  color: #928676;
  margin: 7px 0 0;
  line-height: 1.8;
}
.welcome-callout a {
  border-bottom: 1px solid #c9bda6;
  color: #776c58;
}
.section-heading {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
  margin: 30px 0 17px;
}
.section-heading h2 {
  margin: 0;
  font-size: 16px;
}
.section-heading > span {
  font-size: 9px;
  color: #a49c90;
}
.collection-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.collection {
  display: flex;
  flex-direction: column;
  gap: 11px;
  text-align: left;
  padding: 18px;
  border: 1px solid #eae6de;
  border-radius: 7px;
  background: #fff;
}
.collection:hover {
  background: #faf9f6;
  border-color: #d8d0c2;
}
.collection > span {
  font-size: 23px;
  color: #b19a72;
}
.collection strong {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
}
.collection small {
  font-size: 10px;
  color: #a39a8b;
  width: 100%;
  margin-top: auto;
}
.collection b {
  float: right;
  color: #b6ad9e;
  font-weight: 400;
}
.recent-list {
  border-top: 1px solid var(--border);
}
.recent-list > a,
.recent-list > div {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 2px;
  border-bottom: 1px solid #f0ece5;
  font-size: 12px;
}
.recent-list > a > span {
  color: #b0a695;
  font-size: 17px;
}
.recent-list strong {
  font-weight: 500;
}
.recent-list small {
  font-size: 9px;
  color: #a79c8d;
  margin-left: auto;
}
.recent-list b {
  font-weight: 400;
  color: #b9af9f;
  font-size: 13px;
}
.footnote {
  font-size: 10px;
  margin: 26px 0;
  color: #b0a799;
}
#relations {
  border-left: 1px solid #f0ede7;
  padding: 52px 25px 30px;
  color: #8c8274;
  display: flex;
  flex-direction: column;
}
#relations > .section-label {
  margin: 0 0 11px;
  font-size: 8px;
}
#relations > h3 {
  margin: 0;
  font-size: 15px;
}
#relations > .muted {
  font-size: 11px;
  line-height: 1.8;
  margin-bottom: 24px;
}
#relations h4 {
  font-size: 10px;
  color: #8e8373;
  margin: 20px 0 10px;
}
#relations h4 span {
  float: right;
  font-weight: 400;
  color: #b2a99b;
}
.relation-list > a {
  display: block;
  padding: 10px 0;
  border-bottom: 1px solid #f0ece5;
  font-size: 11px;
  line-height: 1.5;
}
.relation-list > a:before {
  content: "↗";
  margin-right: 8px;
  color: #b6aa96;
}
.empty {
  font-size: 11px;
  line-height: 1.7;
}
.aside-bottom {
  margin-top: 70px;
  padding-top: 25px;
  border-top: 1px solid #eee9df;
}
.aside-bottom > span {
  font-size: 23px;
  color: #b1a286;
}
.aside-bottom h4 {
  line-height: 1.7;
}
.aside-bottom p {
  font-size: 10px;
  line-height: 1.9;
  color: #a99b88;
}
.metadata {
  display: grid;
  grid-template-columns: 125px 1fr;
  gap: 14px;
  font-size: 11px;
  margin: 30px 0;
  color: #857d71;
}
.metadata dt {
  color: #a2998d;
}
.metadata dd {
  margin: 0;
  line-height: 1.5;
}
.badge,
.tag {
  background: #eeeae2;
  color: #8f7c60;
  padding: 3px 7px;
  border-radius: 4px;
  font-size: 10px;
}
.tag {
  background: #eff1e9;
  color: #7e886c;
}
.reading-divider {
  height: 1px;
  background: #eee9e1;
  margin: 30px 0;
}
.markdown {
  font-size: 14px;
  line-height: 1.85;
  overflow-wrap: anywhere;
}
.markdown h1 {
  font-size: 29px;
  letter-spacing: -0.6px;
  margin-top: 28px;
}
.markdown h2 {
  font-size: 20px;
  margin-top: 30px;
}
.markdown h3 {
  font-size: 16px;
  margin-top: 24px;
}
.markdown p {
  line-height: 1.85;
}
.markdown a {
  color: #557f96;
  text-decoration: underline;
  text-decoration-color: #cad5db;
  text-underline-offset: 3px;
}
.markdown li {
  margin: 7px 0;
}
.markdown ul,
.markdown ol {
  padding-left: 23px;
}
.markdown pre {
  overflow: auto;
  background: #f7f5f0;
  padding: 18px;
  border-radius: 6px;
}
.markdown code {
  font-family: ui-monospace, monospace;
  font-size: 12px;
  background: #f4f1eb;
  padding: 2px 4px;
  border-radius: 3px;
}
.markdown blockquote {
  border-left: 3px solid #d8cfbe;
  margin-left: 0;
  padding-left: 18px;
  color: #8b806e;
}
.markdown table {
  display: block;
  overflow: auto;
  border-collapse: collapse;
  font-size: 12px;
}
.markdown th,
.markdown td {
  border: 1px solid #e5dfd4;
  padding: 10px;
}
.editor-hint {
  color: #a0927d;
  font-size: 11px;
}
textarea {
  width: 100%;
  min-height: 460px;
  resize: vertical;
  border: 1px solid #d9d1c4;
  background: #fdfcf9;
  border-radius: 6px;
  padding: 20px;
  line-height: 1.8;
  font-family: ui-monospace, monospace;
  font-size: 13px;
  color: #4d473d;
}
.editor-actions {
  display: flex;
  gap: 10px;
  margin: 18px 0;
}
#editor-panel > small {
  font-size: 10px;
  color: #a39785;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
dialog {
  width: min(480px, calc(100% - 32px));
  border: 1px solid #e5dfd5;
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 18px 65px #28201322;
}
dialog::backdrop {
  background: #29251f44;
}
dialog h2 {
  font-size: 25px;
  margin: 12px 0;
}
dialog p {
  color: #8d806e;
  font-size: 12px;
}
dialog label {
  margin: 20px 0;
}
dialog .dialog-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 26px;
}
#toast {
  pointer-events: none;
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: #39362f;
  color: #fff;
  padding: 13px 20px;
  border-radius: 8px;
  z-index: 10;
  font-size: 12px;
  max-width: 90%;
  box-shadow: 0 5px 24px #0002;
}
@media (min-width: 1650px) {
  #main {
    padding-top: 70px;
  }
  .content-layout {
    grid-template-columns: minmax(0, 1fr) 290px;
  }
  #relations {
    padding: 70px 35px;
  }
}
@media (max-width: 1190px) {
  .content-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  #relations {
    border-left: 0;
    border-top: 1px solid var(--border);
    padding: 30px 50px;
    display: block;
  }
  #relations .aside-bottom {
    margin-top: 30px;
  }
  #main {
    padding: 40px 45px;
  }
  .collection-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  #sidebar {
    display: none;
    box-shadow: 8px 0 40px #332a1922;
  }
  #sidebar.mobile-open {
    display: flex;
    width: 272px;
  }
  .main-shell {
    margin-left: 0;
  }
  .topbar {
    height: 58px;
    padding: 0 15px;
    gap: 12px;
  }
  .topbar > button {
    display: block;
    border: 0;
    background: none;
    padding: 7px;
  }
  .top-actions {
    gap: 6px;
  }
  .top-actions button {
    padding: 6px 7px;
    font-size: 10px;
  }
  .private-label {
    display: none;
  }
  #breadcrumb {
    font-size: 10px;
    max-width: 40vw;
  }
  #main {
    padding: 35px 24px 45px;
  }
  h1 {
    font-size: 33px;
    letter-spacing: -1px;
  }
  .page-icon {
    font-size: 40px;
    margin-bottom: 22px;
  }
  .lead {
    font-size: 13px;
  }
  .collection-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .collection {
    padding: 16px;
  }
  .section-heading {
    align-items: baseline;
    gap: 8px;
  }
  .section-heading > span {
    font-size: 8px;
    text-align: right;
  }
  .recent-list small {
    display: none;
  }
  .welcome-callout {
    padding: 17px;
    gap: 12px;
  }
  .metadata {
    grid-template-columns: 110px 1fr;
  }
  .top-actions #account {
    max-width: 75px;
  }
  #relations {
    padding: 30px 24px;
  }
  .auth-card h1 {
    font-size: 34px;
  }
  .content-layout {
    min-height: calc(100dvh - 58px);
  }
}
